diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2016-12-23 20:16:10 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2016-12-23 20:16:10 +0100 |
commit | 291aaf52135ace669b6fc86f43d5f6420c0c4435 (patch) | |
tree | 3fd012c9f4ec22ab25f1d7bf985d664459a6c8bd | |
parent | a0c1264e8925fe2fbacfd7bbbb8ccadf5cd02462 (diff) | |
download | Ishtar-291aaf52135ace669b6fc86f43d5f6420c0c4435.tar.bz2 Ishtar-291aaf52135ace669b6fc86f43d5f6420c0c4435.zip |
Applicant details on treatment file sheet (refs #3383)
-rw-r--r-- | archaeological_finds/templates/ishtar/sheet_treatment.html | 4 | ||||
-rw-r--r-- | archaeological_finds/templates/ishtar/sheet_treatmentfile.html | 23 | ||||
-rw-r--r-- | ishtar_common/models.py | 6 |
3 files changed, 23 insertions, 10 deletions
diff --git a/archaeological_finds/templates/ishtar/sheet_treatment.html b/archaeological_finds/templates/ishtar/sheet_treatment.html index 8ce8a0350..a06c10b3c 100644 --- a/archaeological_finds/templates/ishtar/sheet_treatment.html +++ b/archaeological_finds/templates/ishtar/sheet_treatment.html @@ -17,9 +17,9 @@ {% if item.external_id %} <p class="window-refs">{{ item.external_id }}</p>{% endif %} {% if item.end_date %} -<p class="window-refs">{% trans "Closed" %} ({{item.end_date}})</p>{% endif %} +<p class="window-refs">{% trans "Closed" %} ({{item.end_date}})</p> {% else %} -<p class="window-refs">{% trans "Active" %}</p>{% endif %} +<p class="window-refs">{% trans "Active" %}</p> {% endif %} <ul class='form-flex'> diff --git a/archaeological_finds/templates/ishtar/sheet_treatmentfile.html b/archaeological_finds/templates/ishtar/sheet_treatmentfile.html index 58efe482a..8988d9595 100644 --- a/archaeological_finds/templates/ishtar/sheet_treatmentfile.html +++ b/archaeological_finds/templates/ishtar/sheet_treatmentfile.html @@ -13,22 +13,35 @@ {% if item.external_id %} <p class="window-refs">{{ item.external_id }}</p>{% endif %} {% if item.end_date %} -<p class="window-refs">{% trans "Closed" %} ({{item.end_date}})</p>{% endif %} +<p class="window-refs">{% trans "Closed" %} ({{item.end_date}})</p> {% else %} -<p class="window-refs">{% trans "Active" %}</p>{% endif %} +<p class="window-refs">{% trans "Active" %}</p> {% endif %} <ul class='form-flex'> {% field_li "Type" item.type %} - {% field_li "Responsible" item.in_charge %} - {% field_li "Applicant" item.applicant %} - {% field_li "Applicant organisation" item.applicant_organisation %} + {% field_li_detail "Responsible" item.in_charge %} {% field_li "Creation date" item.creation_date %} {% field_li "Reception date" item.reception_date %} {% field_li "Closing date" item.end_date %} </ul> {% field "Comment" item.comment "<pre>" "</pre>" %} +{% if item.applicant %} +<h3>{% trans "Applicant" %}</h3> +<ul class='form-flex'> + {% field_li_detail "Name" item.applicant %} +</ul> +{% field "Contact" item.applicant.address_lbl %} +{% endif %} +{% if item.applicant_organisation %} +<h3>{% trans "Applicant organisation" %}</h3> +<ul class='form-flex'> + {% field_li_detail "Name" item.applicant_organisation %} +</ul> +{% field "Contact" item.applicant.address_lbl %} +{% endif %} + {% trans "Treatments" as treatments %} {% if item.treatments.count %} {% dynamic_table_document treatments 'treatments' 'file' item.pk '' output '' 'treatment' %} diff --git a/ishtar_common/models.py b/ishtar_common/models.py index d4f0c595e..d05ffdd77 100644 --- a/ishtar_common/models.py +++ b/ishtar_common/models.py @@ -1498,15 +1498,15 @@ class Address(BaseHistorizedItem): if self.phone: if lbl: lbl += u"\n" - lbl += u"{}{}".format(unicode(_("Tel: ")), self.phone) + lbl += u"{} {}".format(unicode(_("Tel: ")), self.phone) if self.mobile_phone: if lbl: lbl += u"\n" - lbl += u"{}{}".format(unicode(_("Mobile: ")), self.mobile_phone) + lbl += u"{} {}".format(unicode(_("Mobile: ")), self.mobile_phone) if self.email: if lbl: lbl += u"\n" - lbl += u"{}{}".format(unicode(_("Email: ")), self.email) + lbl += u"{} {}".format(unicode(_("Email: ")), self.email) return lbl |