From 538348c38472391d1d30552666dd5d585e2d7c6a Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Fri, 23 Dec 2016 19:48:56 +0100 Subject: Better display of closing date for treatment and file treatments (refs #3388) --- archaeological_finds/forms_treatments.py | 2 +- archaeological_finds/models_treatments.py | 2 +- archaeological_finds/templates/ishtar/sheet_treatment.html | 7 ++++++- archaeological_finds/templates/ishtar/sheet_treatmentfile.html | 7 ++++++- 4 files changed, 14 insertions(+), 4 deletions(-) diff --git a/archaeological_finds/forms_treatments.py b/archaeological_finds/forms_treatments.py index 5f3fc6496..12d25dfdb 100644 --- a/archaeological_finds/forms_treatments.py +++ b/archaeological_finds/forms_treatments.py @@ -136,7 +136,7 @@ class BaseTreatmentForm(ManageOldType, forms.Form): widget=forms.Textarea, required=False) start_date = forms.DateField(label=_(u"Start date"), required=False, widget=widgets.JQueryDate) - end_date = forms.DateField(label=_(u"End date"), required=False, + end_date = forms.DateField(label=_(u"Closing date"), required=False, widget=widgets.JQueryDate) image = forms.ImageField( label=_(u"Image"), help_text=mark_safe( diff --git a/archaeological_finds/models_treatments.py b/archaeological_finds/models_treatments.py index 76b9a2d86..7f2e4e348 100644 --- a/archaeological_finds/models_treatments.py +++ b/archaeological_finds/models_treatments.py @@ -118,7 +118,7 @@ class Treatment(BaseHistorizedItem, ImageModel, OwnPerms): description = models.TextField(_(u"Description"), blank=True, null=True) goal = models.TextField(_(u"Goal"), blank=True, null=True) start_date = models.DateField(_(u"Start date"), blank=True, null=True) - end_date = models.DateField(_(u"End date"), blank=True, null=True) + end_date = models.DateField(_(u"Closing date"), blank=True, null=True) container = models.ForeignKey(Container, verbose_name=_(u"Container"), blank=True, null=True) target_is_basket = models.BooleanField(_(u"Target a basket"), default=False) diff --git a/archaeological_finds/templates/ishtar/sheet_treatment.html b/archaeological_finds/templates/ishtar/sheet_treatment.html index 887ae4e07..8ce8a0350 100644 --- a/archaeological_finds/templates/ishtar/sheet_treatment.html +++ b/archaeological_finds/templates/ishtar/sheet_treatment.html @@ -16,6 +16,11 @@

{{ item.year }} - {{ item.index }}

{% if item.external_id %}

{{ item.external_id }}

{% endif %} +{% if item.end_date %} +

{% trans "Closed" %} ({{item.end_date}})

{% endif %} +{% else %} +

{% trans "Active" %}

{% endif %} +{% endif %} {% if item.description or item.comment or item.goal %} {% field "Comment" item.comment "
" "
" %} diff --git a/archaeological_finds/templates/ishtar/sheet_treatmentfile.html b/archaeological_finds/templates/ishtar/sheet_treatmentfile.html index 5632afbfd..58efe482a 100644 --- a/archaeological_finds/templates/ishtar/sheet_treatmentfile.html +++ b/archaeological_finds/templates/ishtar/sheet_treatmentfile.html @@ -12,6 +12,11 @@

{{ item.year }} - {{ item.index }}

{% if item.external_id %}

{{ item.external_id }}

{% endif %} +{% if item.end_date %} +

{% trans "Closed" %} ({{item.end_date}})

{% endif %} +{% else %} +

{% trans "Active" %}

{% endif %} +{% endif %} {% field "Comment" item.comment "
" "
" %} -- cgit v1.2.3