mirror of
https://github.com/almet/copanier.git
synced 2025-04-28 11:32:38 +02:00
Merge branch 'delivery-url' into 'master'
Add Delivery.url to a link to an external source See merge request ybon/copanier!14
This commit is contained in:
commit
95c5f26f8e
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)
|
||||
infos_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="infos_url" value="{{ delivery.infos_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.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