summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
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
commit8f13e1e7b9bd1ff8f7367e568f2bb2ba234a7f33 (patch)
tree4e1064444b5711e72648019e15e74de721b730c4
parent9c94fdd38c92e349ee299270226a2adc5e68f97b (diff)
parent818a23a3d064c2216759e0d0f239a6c4fff1069f (diff)
downloadIshtar-8f13e1e7b9bd1ff8f7367e568f2bb2ba234a7f33.tar.bz2
Ishtar-8f13e1e7b9bd1ff8f7367e568f2bb2ba234a7f33.zip
Merge branch 'master' into develop
-rw-r--r--archaeological_operations/locale/django.pot5
-rw-r--r--archaeological_warehouse/forms.py4
-rw-r--r--archaeological_warehouse/locale/django.pot71
-rw-r--r--archaeological_warehouse/migrations/0013_auto_20180131_1551.py25
-rw-r--r--archaeological_warehouse/models.py7
-rw-r--r--archaeological_warehouse/templates/ishtar/sheet_container.html1
-rw-r--r--ishtar_common/locale/django.pot2
-rw-r--r--translations/fr/archaeological_operations.po4
-rw-r--r--translations/fr/archaeological_warehouse.po75
9 files changed, 116 insertions, 78 deletions
diff --git a/archaeological_operations/locale/django.pot b/archaeological_operations/locale/django.pot
index bcbfbc23a..1fbd0c77d 100644
--- a/archaeological_operations/locale/django.pot
+++ b/archaeological_operations/locale/django.pot
@@ -2,18 +2,17 @@
# Copyright (C) 2010-2015
# This file is distributed under the same license as the Ishtar package.
# Étienne Loks <etienne.loks at peacefrogs net>, 2010-2015.
-# Étienne Loks <etienne.loks@iggdrasil.net>, 2015. #zanata
# Valérie-Emma Leroux <emma@iggdrasil.net>, 2016. #zanata
# Valérie-Emma Leroux <emma@iggdrasil.net>, 2017. #zanata
# Valérie-Emma Leroux <emma@iggdrasil.net>, 2018. #zanata
msgid ""
msgstr ""
-#: admin.py:91 models.py:379
+#: admin.py:90 models.py:379
msgid "Point"
msgstr ""
-#: admin.py:93 models.py:380
+#: admin.py:92 models.py:380
msgid "Multi polygon"
msgstr ""
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" %}
diff --git a/ishtar_common/locale/django.pot b/ishtar_common/locale/django.pot
index 098fbe1d9..750d36161 100644
--- a/ishtar_common/locale/django.pot
+++ b/ishtar_common/locale/django.pot
@@ -1424,12 +1424,10 @@ msgid "False"
msgstr ""
#: models_imports.py:505
-#| msgid "All user can use it"
msgid "All users can use it"
msgstr ""
#: models_imports.py:507
-#| msgid "All user can modify it"
msgid "All users can modify it"
msgstr ""
diff --git a/translations/fr/archaeological_operations.po b/translations/fr/archaeological_operations.po
index 64698bfea..5daa7f757 100644
--- a/translations/fr/archaeological_operations.po
+++ b/translations/fr/archaeological_operations.po
@@ -17,11 +17,11 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=n>1;\n"
"X-Generator: Zanata 3.9.6\n"
-#: admin.py:91 models.py:379
+#: admin.py:90 models.py:379
msgid "Point"
msgstr "Point"
-#: admin.py:93 models.py:380
+#: admin.py:92 models.py:380
msgid "Multi polygon"
msgstr "Polygones multi-parties"
diff --git a/translations/fr/archaeological_warehouse.po b/translations/fr/archaeological_warehouse.po
index 5f05d6626..c64382ff1 100644
--- a/translations/fr/archaeological_warehouse.po
+++ b/translations/fr/archaeological_warehouse.po
@@ -5,13 +5,14 @@
# Valérie-Emma Leroux <emma@iggdrasil.net>, 2016. #zanata
# Valérie-Emma Leroux <emma@iggdrasil.net>, 2017. #zanata
# Valérie-Emma Leroux <emma@iggdrasil.net>, 2018. #zanata
+# Étienne Loks <etienne.loks@iggdrasil.net>, 2018. #zanata
msgid ""
msgstr ""
"MIME-Version: 1.0\n"
"Content-Transfer-Encoding: 8bit\n"
"Content-Type: text/plain; charset=UTF-8\n"
-"PO-Revision-Date: 2018-01-18 07:42-0500\n"
-"Last-Translator: Valérie-Emma Leroux <emma@iggdrasil.net>\n"
+"PO-Revision-Date: 2018-01-31 09:59-0500\n"
+"Last-Translator: Étienne Loks <etienne.loks@iggdrasil.net>\n"
"Language-Team: \n"
"Language: fr\n"
"Plural-Forms: nplurals=2; plural=n>1;\n"
@@ -22,7 +23,7 @@ msgstr ""
msgid "Warehouse"
msgstr "Dépôt"
-#: forms.py:47 forms.py:52 models.py:524
+#: forms.py:47 forms.py:52 models.py:527
msgid "Division"
msgstr "Division"
@@ -58,7 +59,7 @@ msgstr "Rechercher un dépôt"
msgid "Person in charge"
msgstr "Responsable"
-#: 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 "Commentaires"
@@ -90,32 +91,36 @@ msgstr "Téléphone mobile"
msgid "Would you like to delete this warehouse?"
msgstr "Voulez-vous supprimer ce dépôt ?"
-#: 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 "Contenant"
-#: forms.py:165 forms.py:243 models.py:248
+#: forms.py:165 forms.py:245 models.py:248
msgid "Ref."
msgstr "Réf."
-#: forms.py:166 forms.py:242 models.py:251 models.py:292
+#: forms.py:166 models.py:301
+msgid "Old reference"
+msgstr "Ancienne référence"
+
+#: forms.py:168 forms.py:244 models.py:251 models.py:293
msgid "Container type"
msgstr "Type de contenant"
-#: forms.py:168
+#: forms.py:170
msgid "Current location (warehouse)"
msgstr "Lieu actuel (dépôt)"
-#: forms.py:174 models.py:289
+#: forms.py:176 models.py:290
msgid "Responsible warehouse"
msgstr "Dépôt responsable"
-#: forms.py:180
+#: forms.py:182
msgid "Image"
msgstr "Image"
-#: forms.py:181
+#: forms.py:183
#, python-format
msgid ""
"<p>Heavy images are resized to: %(width)dx%(height)d (ratio is preserved).</"
@@ -124,47 +129,47 @@ msgstr ""
"<p>Les images trop grandes sont retaillées en : %(width)dx%(height)d (le "
"ratio est conservé).</p>"
-#: forms.py:213
+#: forms.py:215
msgid "ID"
msgstr "Identifiant"
-#: forms.py:235
+#: forms.py:237
msgid "This ID already exists for this warehouse."
msgstr "Cet identifiant existe déjà pour ce dépôt."
-#: forms.py:253 forms.py:259 views.py:142
+#: forms.py:255 forms.py:261 views.py:142
msgid "Container search"
msgstr "Rechercher un contenant"
-#: forms.py:255 forms.py:261
+#: forms.py:257 forms.py:263
msgid "You should select a container."
msgstr "Vous devez sélectionner un contenant."
-#: forms.py:256
+#: forms.py:258
msgid "Add a new container"
msgstr "Ajouter un nouveau contenant"
-#: forms.py:266 ishtar_menu.py:36 views.py:95
+#: forms.py:268 ishtar_menu.py:36 views.py:95
msgid "Packaging"
msgstr "Conditionnement"
-#: forms.py:272
+#: forms.py:274
msgid "Packager"
msgstr "Personne assurant le conditionnement"
-#: forms.py:278
+#: forms.py:280
msgid "Date"
msgstr "Date"
-#: forms.py:282
+#: forms.py:284
msgid "Packaged finds"
msgstr "Mobilier conditionné"
-#: forms.py:286 models.py:295
+#: forms.py:288 models.py:296
msgid "Localisation"
msgstr "Localisation"
-#: forms.py:311 forms.py:312
+#: forms.py:313 forms.py:314
msgid "Would you like to delete this container?"
msgstr "Voulez-vous supprimer ce contenant ?"
@@ -188,7 +193,7 @@ msgstr "Modification"
msgid "Deletion"
msgstr "Suppression"
-#: 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 "Contenants"
@@ -197,11 +202,11 @@ msgstr "Contenants"
msgid "Warehouse types"
msgstr "Types de dépôt"
-#: models.py:61 models.py:300
+#: models.py:61 models.py:303
msgid "External ID"
msgstr "ID externe"
-#: models.py:63 models.py:302
+#: models.py:63 models.py:305
msgid "External ID is set automatically"
msgstr "L'ID externe est attribué automatiquement"
@@ -245,43 +250,43 @@ msgstr "Volume (l)"
msgid "Container types"
msgstr "Types de contenant"
-#: models.py:278
+#: models.py:279
msgid "Location - index"
msgstr "Lieu - index"
-#: models.py:279
+#: models.py:280
msgid "Precise localisation"
msgstr "Localisation précise"
-#: models.py:280
+#: models.py:281
msgid "Type"
msgstr "Type"
-#: models.py:286
+#: models.py:287
msgid "Location (warehouse)"
msgstr "Lieu (dépôt)"
-#: models.py:293
+#: models.py:294
msgid "Container ref."
msgstr "Réf. du contenant"
-#: models.py:297
+#: models.py:298
msgid "Cached location"
msgstr "Lieu - en cache"
-#: models.py:525
+#: models.py:528
msgid "Reference"
msgstr "Référence"
-#: models.py:528
+#: models.py:531
msgid "Container localisation"
msgstr "Localisation de contenant"
-#: models.py:529
+#: models.py:532
msgid "Container localisations"
msgstr "Localisations de contenant"
-#: templates/ishtar/sheet_container.html:29
+#: templates/ishtar/sheet_container.html:30
msgid "Content"
msgstr "Contenu"