From c7d253fc94038cd3eb20e190581eff3b461e463b Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Thu, 29 Jan 2015 00:43:20 +0100 Subject: Fix Bibratce Import - Fix context record window --- archaeological_context_records/data_importer.py | 7 ++++--- archaeological_context_records/models.py | 4 ++++ .../templates/ishtar/sheet_contextrecord.html | 3 ++- 3 files changed, 10 insertions(+), 4 deletions(-) (limited to 'archaeological_context_records') diff --git a/archaeological_context_records/data_importer.py b/archaeological_context_records/data_importer.py index bbe89a5b8..0d04678c5 100644 --- a/archaeological_context_records/data_importer.py +++ b/archaeological_context_records/data_importer.py @@ -55,9 +55,10 @@ class ContextRecordsImporterBibracte(Importer): ImportFormater('comment', UnicodeFormater(1000), required=False,), # ???? None, - # chrono - ImportFormater('dating__period', TypeFormater(models.Period, - many_split="&"), required=False), + # chrono #TODO! pas de vrai création de nouvelle et en cas de modif + # c'est la zone + ImportFormater('datings__period', TypeFormater(models.Period), + required=False), ] class ContextRecordsRelationImporterBibracte(Importer): diff --git a/archaeological_context_records/models.py b/archaeological_context_records/models.py index a94421ada..6a08e2f84 100644 --- a/archaeological_context_records/models.py +++ b/archaeological_context_records/models.py @@ -157,6 +157,10 @@ class ContextRecord(BaseHistorizedItem, OwnPerms, ShortMenuItem): ("delete_own_contextrecord", ugettext(u"Can delete own Context Record")), ) + @property + def name(self): + return self.label or "" + @property def short_class_name(self): return pgettext("short", u"Context record") diff --git a/archaeological_context_records/templates/ishtar/sheet_contextrecord.html b/archaeological_context_records/templates/ishtar/sheet_contextrecord.html index acc0db718..308c20289 100644 --- a/archaeological_context_records/templates/ishtar/sheet_contextrecord.html +++ b/archaeological_context_records/templates/ishtar/sheet_contextrecord.html @@ -38,10 +38,11 @@

{{ item.parcel.town }}

{{ item.parcel.short_label }}

-{% if item.description or item.lenght or item.width or item.depth %} +{% if item.description or item.lenght or item.width or item.depth or item.comment %}

{% trans "Description"%}

{{ item.description }}

+{% if item.comment %}

{{ item.comment }}

{% endif %} {% if item.lenght %}

{{ item.length }}

{%endif%} {% if item.width %}

{{ item.width }}

{%endif%} {% if item.depth %}

{{ item.depth }}

{%endif%} -- cgit v1.2.3