mirror of
https://github.com/almet/copanier.git
synced 2025-04-28 19:42:37 +02:00
Use more specific property Delivery.infos_url
This commit is contained in:
parent
77bf047974
commit
5437508b03
3 changed files with 3 additions and 3 deletions
|
@ -163,7 +163,7 @@ class Delivery(Base):
|
|||
products: List[Product] = field(default_factory=list)
|
||||
orders: Dict[str, Order] = field(default_factory=dict)
|
||||
id: str = field(default_factory=lambda *a, **k: uuid.uuid4().hex)
|
||||
url: str = ""
|
||||
infos_url: str = ""
|
||||
|
||||
@property
|
||||
def status(self):
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
</label>
|
||||
<label>
|
||||
<p>URL externe d'information</p>
|
||||
<input type="url" name="url" value="{{ delivery.url or '' }}">
|
||||
<input type="url" name="infos_url" value="{{ delivery.infos_url or '' }}">
|
||||
</label>
|
||||
<div>
|
||||
<input type="submit" name="submit" value="Valider" class="primary">
|
||||
|
|
|
@ -5,5 +5,5 @@
|
|||
<li><i class="icon-clock"></i> <strong>Date de livraison</strong> <time datetime="{{ delivery.from_date }}">{{ delivery.from_date|date }} de {{ delivery.from_date|time }} à {{ delivery.to_date|time }}</time></li>
|
||||
<li><i class="icon-hourglass"></i> {% if delivery.status == delivery.OPEN %}<strong>Date limite de commande</strong> <time datetime="{{ delivery.order_before.date() }}">{{ delivery.order_before|date }}</time>{% elif delivery.status == delivery.ADJUSTMENT %}<strong>Ajustement en cours</strong>{% else %}<strong>Fermée</strong>{% endif %}</li>
|
||||
{% if delivery.instructions %}<li><i class="icon-lightbulb"></i> <strong>À savoir</strong> {{ delivery.instructions }}</li>{% endif %}
|
||||
{% if delivery.url %}<li><i class="icon-global"></i><strong>Plus d'infos</strong> <a href="{{ delivery.url }}" title="{{ delivery.url }}">{{ delivery.url|truncate(20)}}</a></li>{% endif %}
|
||||
{% if delivery.infos_url %}<li><i class="icon-global"></i><strong>Plus d'infos</strong> <a href="{{ delivery.infos_url }}" title="{{ delivery.infos_url }}">{{ delivery.infos_url|truncate(20)}}</a></li>{% endif %}
|
||||
</ul>
|
||||
|
|
Loading…
Reference in a new issue