diff options
| -rw-r--r-- | archaeological_operations/models.py | 14 | ||||
| -rw-r--r-- | archaeological_operations/templates/ishtar/sheet_administrativeact.html | 1 | 
2 files changed, 9 insertions, 6 deletions
| diff --git a/archaeological_operations/models.py b/archaeological_operations/models.py index aa72d24ec..f705ce7be 100644 --- a/archaeological_operations/models.py +++ b/archaeological_operations/models.py @@ -446,12 +446,14 @@ class AdministrativeAct(BaseHistorizedItem, OwnPerms, ValueGetter):      full_ref_lbl = _(u"Ref.")      @property      def full_ref(self): -        keys = ['year', 'index'] -        if settings.COUNTRY == 'fr': -            keys.append('ref_sra') -        return settings.JOINT.join( -                [getattr(self, k) and unicode(getattr(self, k)) or '-' -                                                         for k in keys]) +        lbl = [] +        if self.year: +            lbl.append(unicode(self.year)) +        if self.index: +            lbl.append(u"n°%d" %self.index) +        if settings.COUNTRY == 'fr' and self.ref_sra: +            lbl.append(u"[%s]" % self.ref_sra) +        return u" ".join(lbl)      @property      def year(self): diff --git a/archaeological_operations/templates/ishtar/sheet_administrativeact.html b/archaeological_operations/templates/ishtar/sheet_administrativeact.html index da80f6747..2cceb0222 100644 --- a/archaeological_operations/templates/ishtar/sheet_administrativeact.html +++ b/archaeological_operations/templates/ishtar/sheet_administrativeact.html @@ -11,6 +11,7 @@  <h3>{% trans "General"%}</h3>  <p><label>{%trans "Year:"%}</label> <span class='value strong'>{{ item.year }}</span></p>  {% if item.index %}<p><label>{%trans "Numerical reference:"%}</label> <span class='value strong'>{{ item.index }}</span></p>{% endif %} +{% if item.ref_sra %}<p><label>{%trans "Internal reference:"%}</label> <span class='value strong'>{{ item.ref_sra }}</span></p>{% endif %}  <p><label>{%trans "Type:"%}</label> <span class='value'>{{ item.act_type }}</span></p>  <p><label>{%trans "Signature date:"%}</label> <span class='value'>{{ item.signature_date }}</span></p>  <p><label>{%trans "In charge:"%}</label> <span class='value'>{{ item.in_charge.full_label }}</span></p> | 
