mirror of
https://github.com/almet/copanier.git
synced 2025-04-28 11:32:38 +02:00
Add Delivery.url to a link to an external source
This commit is contained in:
parent
437a3e0c36
commit
c1ea72455c
3 changed files with 6 additions and 0 deletions
|
@ -163,6 +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 = ""
|
||||
|
||||
@property
|
||||
def status(self):
|
||||
|
|
|
@ -35,6 +35,10 @@
|
|||
<p>Instructions particulières</p>
|
||||
<input type="text" name="instructions" value="{{ delivery.instructions or '' }}">
|
||||
</label>
|
||||
<label>
|
||||
<p>URL externe d'information</p>
|
||||
<input type="url" name="url" value="{{ delivery.url or '' }}">
|
||||
</label>
|
||||
<div>
|
||||
<input type="submit" name="submit" value="Valider" class="primary">
|
||||
</div>
|
||||
|
|
|
@ -5,4 +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>En savoir plus</strong><br><a href="{{ delivery.url }}">{{ delivery.url }}</a></li>{% endif %}
|
||||
</ul>
|
||||
|
|
Loading…
Reference in a new issue