diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2018-01-31 16:01:19 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2018-01-31 16:01:19 +0100 |
commit | 8f13e1e7b9bd1ff8f7367e568f2bb2ba234a7f33 (patch) | |
tree | 4e1064444b5711e72648019e15e74de721b730c4 /archaeological_warehouse | |
parent | 9c94fdd38c92e349ee299270226a2adc5e68f97b (diff) | |
parent | 818a23a3d064c2216759e0d0f239a6c4fff1069f (diff) | |
download | Ishtar-8f13e1e7b9bd1ff8f7367e568f2bb2ba234a7f33.tar.bz2 Ishtar-8f13e1e7b9bd1ff8f7367e568f2bb2ba234a7f33.zip |
Merge branch 'master' into develop
Diffstat (limited to 'archaeological_warehouse')
-rw-r--r-- | archaeological_warehouse/forms.py | 4 | ||||
-rw-r--r-- | archaeological_warehouse/locale/django.pot | 71 | ||||
-rw-r--r-- | archaeological_warehouse/migrations/0013_auto_20180131_1551.py | 25 | ||||
-rw-r--r-- | archaeological_warehouse/models.py | 7 | ||||
-rw-r--r-- | archaeological_warehouse/templates/ishtar/sheet_container.html | 1 |
5 files changed, 72 insertions, 36 deletions
diff --git a/archaeological_warehouse/forms.py b/archaeological_warehouse/forms.py index 2e672efd4..4d4348b70 100644 --- a/archaeological_warehouse/forms.py +++ b/archaeological_warehouse/forms.py @@ -168,7 +168,9 @@ class ContainerForm(CustomForm, ManageOldType, forms.Form): associated_models = {'container_type': models.ContainerType, 'location': models.Warehouse, 'responsible': models.Warehouse} - reference = forms.CharField(label=_(u"Ref.")) + reference = forms.CharField(label=_(u"Ref."), max_length=200) + old_reference = forms.CharField(label=_(u"Old reference"), required=False, + max_length=200) container_type = forms.ChoiceField(label=_(u"Container type"), choices=[]) location = forms.IntegerField( label=_(u"Current location (warehouse)"), diff --git a/archaeological_warehouse/locale/django.pot b/archaeological_warehouse/locale/django.pot index 430a51127..323978feb 100644 --- a/archaeological_warehouse/locale/django.pot +++ b/archaeological_warehouse/locale/django.pot @@ -13,7 +13,7 @@ msgstr "" msgid "Warehouse" msgstr "" -#: forms.py:47 forms.py:52 models.py:524 +#: forms.py:47 forms.py:52 models.py:527 msgid "Division" msgstr "" @@ -49,7 +49,7 @@ msgstr "" msgid "Person in charge" msgstr "" -#: forms.py:116 forms.py:186 models.py:56 models.py:294 +#: forms.py:116 forms.py:188 models.py:56 models.py:295 msgid "Comment" msgstr "" @@ -81,79 +81,84 @@ msgstr "" msgid "Would you like to delete this warehouse?" msgstr "" -#: forms.py:160 models.py:305 models.py:521 +#: forms.py:160 models.py:308 models.py:524 #: templates/ishtar/sheet_container.html:4 msgid "Container" msgstr "" -#: forms.py:165 forms.py:243 models.py:248 +#: forms.py:165 forms.py:245 models.py:248 msgid "Ref." msgstr "" -#: forms.py:166 forms.py:242 models.py:251 models.py:292 +#: forms.py:166 models.py:301 +#| msgid "Reference" +msgid "Old reference" +msgstr "" + +#: forms.py:168 forms.py:244 models.py:251 models.py:293 msgid "Container type" msgstr "" -#: forms.py:168 +#: forms.py:170 msgid "Current location (warehouse)" msgstr "" -#: forms.py:174 models.py:289 +#: forms.py:176 models.py:290 msgid "Responsible warehouse" msgstr "" -#: forms.py:180 +#: forms.py:182 msgid "Image" msgstr "" -#: forms.py:181 +#: forms.py:183 #, python-format msgid "" "<p>Heavy images are resized to: %(width)dx%(height)d (ratio is preserved).</" "p>" msgstr "" -#: forms.py:213 +#: forms.py:215 msgid "ID" msgstr "" -#: forms.py:235 +#: forms.py:237 msgid "This ID already exists for this warehouse." msgstr "" -#: forms.py:253 forms.py:259 views.py:142 +#: forms.py:255 forms.py:261 views.py:142 msgid "Container search" msgstr "" -#: forms.py:255 forms.py:261 +#: forms.py:257 forms.py:263 msgid "You should select a container." msgstr "" -#: forms.py:256 +#: forms.py:258 msgid "Add a new container" msgstr "" -#: forms.py:266 ishtar_menu.py:36 views.py:95 +#: forms.py:268 ishtar_menu.py:36 views.py:95 msgid "Packaging" msgstr "" -#: forms.py:272 +#: forms.py:274 msgid "Packager" msgstr "" -#: forms.py:278 +#: forms.py:280 msgid "Date" msgstr "" -#: forms.py:282 +#: forms.py:284 msgid "Packaged finds" msgstr "" -#: forms.py:286 models.py:295 +#: forms.py:288 models.py:296 msgid "Localisation" msgstr "" -#: forms.py:311 forms.py:312 +#: forms.py:313 forms.py:314 msgid "Would you like to delete this container?" msgstr "" @@ -177,7 +182,7 @@ msgstr "" msgid "Deletion" msgstr "" -#: ishtar_menu.py:57 models.py:306 templates/ishtar/sheet_warehouse.html:23 +#: ishtar_menu.py:57 models.py:309 templates/ishtar/sheet_warehouse.html:23 #: templates/ishtar/sheet_warehouse.html:56 msgid "Containers" msgstr "" @@ -186,11 +191,11 @@ msgstr "" msgid "Warehouse types" msgstr "" -#: models.py:61 models.py:300 +#: models.py:61 models.py:303 msgid "External ID" msgstr "" -#: models.py:63 models.py:302 +#: models.py:63 models.py:305 msgid "External ID is set automatically" msgstr "" @@ -234,43 +239,43 @@ msgstr "" msgid "Container types" msgstr "" -#: models.py:278 +#: models.py:279 msgid "Location - index" msgstr "" -#: models.py:279 +#: models.py:280 msgid "Precise localisation" msgstr "" -#: models.py:280 +#: models.py:281 msgid "Type" msgstr "" -#: models.py:286 +#: models.py:287 msgid "Location (warehouse)" msgstr "" -#: models.py:293 +#: models.py:294 msgid "Container ref." msgstr "" -#: models.py:297 +#: models.py:298 msgid "Cached location" msgstr "" -#: models.py:525 +#: models.py:528 msgid "Reference" msgstr "" -#: models.py:528 +#: models.py:531 msgid "Container localisation" msgstr "" -#: models.py:529 +#: models.py:532 msgid "Container localisations" msgstr "" -#: templates/ishtar/sheet_container.html:29 +#: templates/ishtar/sheet_container.html:30 msgid "Content" msgstr "" diff --git a/archaeological_warehouse/migrations/0013_auto_20180131_1551.py b/archaeological_warehouse/migrations/0013_auto_20180131_1551.py new file mode 100644 index 000000000..327b5adc4 --- /dev/null +++ b/archaeological_warehouse/migrations/0013_auto_20180131_1551.py @@ -0,0 +1,25 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11 on 2018-01-31 15:51 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('archaeological_warehouse', '0012_auto_20180109_1057'), + ] + + operations = [ + migrations.AddField( + model_name='container', + name='old_reference', + field=models.CharField(blank=True, max_length=200, null=True, verbose_name='Old reference'), + ), + migrations.AlterField( + model_name='container', + name='reference', + field=models.CharField(max_length=200, verbose_name='Container ref.'), + ), + ] diff --git a/archaeological_warehouse/models.py b/archaeological_warehouse/models.py index d6c33583f..6ea5a7d10 100644 --- a/archaeological_warehouse/models.py +++ b/archaeological_warehouse/models.py @@ -259,7 +259,7 @@ post_delete.connect(post_save_cache, sender=ContainerType) class Container(LightHistorizedItem, ImageModel): TABLE_COLS = ['reference', 'container_type__label', 'cached_location', - 'divisions_lbl'] + 'divisions_lbl', 'old_reference'] IMAGE_PREFIX = 'containers/' # search parameters @@ -267,6 +267,7 @@ class Container(LightHistorizedItem, ImageModel): 'location': 'location__pk', 'container_type': 'container_type__pk', 'reference': 'reference__icontains', + 'old_reference': 'old_reference__icontains', 'finds__base_finds__context_record__operation': 'finds__base_finds__context_record__operation', 'finds__base_finds__context_record': @@ -290,13 +291,15 @@ class Container(LightHistorizedItem, ImageModel): related_name='owned_containers') container_type = models.ForeignKey(ContainerType, verbose_name=_("Container type")) - reference = models.CharField(_(u"Container ref."), max_length=40) + reference = models.CharField(_(u"Container ref."), max_length=200) comment = models.TextField(_(u"Comment"), null=True, blank=True) cached_label = models.CharField(_(u"Localisation"), max_length=500, null=True, blank=True, db_index=True) cached_location = models.CharField(_(u"Cached location"), max_length=500, null=True, blank=True, db_index=True) index = models.IntegerField(u"Container ID", default=0) + old_reference = models.CharField(_(u"Old reference"), max_length=200, + blank=True, null=True) external_id = models.TextField(_(u"External ID"), blank=True, null=True) auto_external_id = models.BooleanField( _(u"External ID is set automatically"), default=False) diff --git a/archaeological_warehouse/templates/ishtar/sheet_container.html b/archaeological_warehouse/templates/ishtar/sheet_container.html index 7c9f84a32..706e9e176 100644 --- a/archaeological_warehouse/templates/ishtar/sheet_container.html +++ b/archaeological_warehouse/templates/ishtar/sheet_container.html @@ -11,6 +11,7 @@ {% endif%} <p class="window-refs">{{ item.reference|default:"" }}</p> +<p class="window-refs">{{ item.old_reference|default:"" }}</p> <p class="window-refs">{{ item.container_type|default:"" }}</p> <p class="window-refs">{{ item.responsible.name }} - {{ item.index }}</p> {% include "ishtar/blocks/sheet_external_id.html" %} |