summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2017-07-31 11:51:53 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2017-07-31 11:51:53 +0200
commit9a9300532592b575a0914e009840c2c4c11f28c0 (patch)
tree9c710dd7acf9e31b35b3fed85d207fdca532413e
parentb2e1c602627102d2c63616d98305941c773b24fa (diff)
downloadIshtar-9a9300532592b575a0914e009840c2c4c11f28c0.tar.bz2
Ishtar-9a9300532592b575a0914e009840c2c4c11f28c0.zip
Context record form/sheet: add opening/closing dates
-rw-r--r--archaeological_context_records/forms.py4
-rw-r--r--archaeological_context_records/models.py4
-rw-r--r--archaeological_context_records/templates/ishtar/sheet_contextrecord.html2
3 files changed, 8 insertions, 2 deletions
diff --git a/archaeological_context_records/forms.py b/archaeological_context_records/forms.py
index 77b42b609..86a371538 100644
--- a/archaeological_context_records/forms.py
+++ b/archaeological_context_records/forms.py
@@ -156,6 +156,10 @@ class RecordFormGeneral(ManageOldType, forms.Form):
label=_(u"Depth of appearance (m)"), required=False)
unit = forms.ChoiceField(label=_(u"Context record type"), required=False,
choices=[])
+ opening_date = forms.DateField(label=_(u"Opening date"),
+ widget=widgets.JQueryDate, required=False)
+ closing_date = forms.DateField(label=_(u"Closing date"),
+ widget=widgets.JQueryDate, required=False)
documentation = forms.MultipleChoiceField(
label=_("Documentation"), choices=[], required=False,
widget=forms.CheckboxSelectMultiple)
diff --git a/archaeological_context_records/models.py b/archaeological_context_records/models.py
index a5f02133e..f5df4e5ec 100644
--- a/archaeological_context_records/models.py
+++ b/archaeological_context_records/models.py
@@ -233,9 +233,9 @@ class ContextRecord(BaseHistorizedItem, ImageModel, OwnPerms,
label = models.CharField(_(u"ID"), max_length=200)
description = models.TextField(_(u"Description"), blank=True, null=True)
comment = models.TextField(_(u"General comment"), blank=True, null=True)
- opening_date = models.DateField(_(u"Date d'ouverture"),
+ opening_date = models.DateField(_(u"Opening date"),
blank=True, null=True)
- closing_date = models.DateField(_(u"End date"), blank=True, null=True)
+ closing_date = models.DateField(_(u"Closing date"), blank=True, null=True)
length = models.FloatField(_(u"Length (m)"), blank=True, null=True)
width = models.FloatField(_(u"Width (m)"), blank=True, null=True)
thickness = models.FloatField(_(u"Thickness (m)"), blank=True,
diff --git a/archaeological_context_records/templates/ishtar/sheet_contextrecord.html b/archaeological_context_records/templates/ishtar/sheet_contextrecord.html
index b10f46325..0a5ea30fc 100644
--- a/archaeological_context_records/templates/ishtar/sheet_contextrecord.html
+++ b/archaeological_context_records/templates/ishtar/sheet_contextrecord.html
@@ -24,6 +24,8 @@
{% field_li_multiple "Chronology" item.datings %}
{% field_li "Town" item.parcel.town %}
{% field_li_multiple "Documentation" item.documentations %}
+ {% field_li "Opening date" item.opening_date %}
+ {% field_li "Closing date" item.closing_date %}
</ul>
{% field "Comment on datings" item.datings_comment "<pre>" "</pre>" %}