diff options
Diffstat (limited to 'archaeological_finds')
-rw-r--r-- | archaeological_finds/locale/django.pot | 1 | ||||
-rw-r--r-- | archaeological_finds/templates/ishtar/sheet_find.html | 4 | ||||
-rw-r--r-- | archaeological_finds/templates/ishtar/sheet_findbasket.html | 6 | ||||
-rw-r--r-- | archaeological_finds/tests.py | 28 |
4 files changed, 20 insertions, 19 deletions
diff --git a/archaeological_finds/locale/django.pot b/archaeological_finds/locale/django.pot index 819cf38bf..b25eac027 100644 --- a/archaeological_finds/locale/django.pot +++ b/archaeological_finds/locale/django.pot @@ -4,7 +4,6 @@ # Étienne Loks <etienne.loks at peacefrogs net>, 2010-2015. # Valérie-Emma Leroux <emma@iggdrasil.net>, 2016. #zanata # Valérie-Emma Leroux <emma@iggdrasil.net>, 2017. #zanata -# Étienne Loks <etienne.loks@iggdrasil.net>, 2017. #zanata msgid "" msgstr "" diff --git a/archaeological_finds/templates/ishtar/sheet_find.html b/archaeological_finds/templates/ishtar/sheet_find.html index bb2e629c7..4ae6dbffe 100644 --- a/archaeological_finds/templates/ishtar/sheet_find.html +++ b/archaeological_finds/templates/ishtar/sheet_find.html @@ -95,6 +95,7 @@ <th>{% trans "Year - index" %}</th> <th>{% trans "Label" %}</th> <th>{% trans "Type" %}</th> + <th>{% trans "State" %}</th> <th>{% trans "Related finds (max. 15 displayed)" %}</th> <th>{% trans "Doer" %}</th> <th>{% trans "Container" %}</th> @@ -112,6 +113,7 @@ <td class='string'>{{ treatment.year }} - {{treatment.index}}</td> <td class='string'>{{ treatment.label|default_if_none:"-" }}</td> <td class='string'>{{ treatment.treatment_types_lbl }}</td> + <td class='string'>{{ treatment.treatment_state|default_if_none:"-" }}</td> <td class='item-list'>{% for item in items %}<span>{{item}} {{ item|link_to_window}}</span>{% endfor %}</td> <td class='string'>{{ treatment.person|default_if_none:"-" }}</td> <td class='string'>{{ treatment.container|default_if_none:"-" }}</td> @@ -135,6 +137,7 @@ <th>{% trans "Year - index" %}</th> <th>{% trans "Label" %}</th> <th>{% trans "Type" %}</th> + <th>{% trans "State" %}</th> <th>{% trans "Related finds (max. 15 displayed)" %}</th> <th>{% trans "Doer" %}</th> <th>{% trans "Container" %}</th> @@ -152,6 +155,7 @@ <td class='string'>{{ treatment.year }} - {{treatment.index}}</td> <td class='string'>{{ treatment.label }}</td> <td class='string'>{{ treatment.treatment_types_lbl }}</td> + <td class='string'>{{ treatment.treatment_state|default_if_none:"-" }}</td> <td class='item-list'>{% for item in items %}<span>{{item}} {{ item|link_to_window}}</span>{% endfor %}</td> <td class='string'>{{ treatment.person|default_if_none:"" }}</td> <td class='string'>{{ treatment.container|default_if_none:"-" }}</td> diff --git a/archaeological_finds/templates/ishtar/sheet_findbasket.html b/archaeological_finds/templates/ishtar/sheet_findbasket.html index 7738a872d..6f8b12e6d 100644 --- a/archaeological_finds/templates/ishtar/sheet_findbasket.html +++ b/archaeological_finds/templates/ishtar/sheet_findbasket.html @@ -1,9 +1,13 @@ {% extends "ishtar/sheet.html" %} -{% load i18n window_tables window_header from_dict %} +{% load i18n window_tables window_header from_dict window_field %} {% block head_title %}{% trans "Find basket" %}{% endblock %} {% block content %} + {% window_nav item window_id 'show-findbasket' 'select_itemsinbasket' %} +<p class="window-refs">{{ item.label|default:"" }}</p> +{% field "Owned by" item.user %} +{% field "Comment" item.comment %} {% dynamic_table_document_large finds 'finds_for_ope' 'basket' item.pk 'TABLE_COLS_FOR_OPE' output %} {% endblock %} diff --git a/archaeological_finds/tests.py b/archaeological_finds/tests.py index f0112123b..a1dc33dd8 100644 --- a/archaeological_finds/tests.py +++ b/archaeological_finds/tests.py @@ -33,11 +33,12 @@ from archaeological_context_records.models import Period, Dating from archaeological_finds import models, views from archaeological_warehouse.models import Warehouse, WarehouseType -from archaeological_context_records.tests import ImportContextRecordTest, \ - ContextRecordInit - from ishtar_common import forms_common + from ishtar_common.tests import WizardTest, WizardTestFormData as FormData +from archaeological_operations.tests import ImportTest +from archaeological_context_records.tests import ImportContextRecordTest, \ + ContextRecordInit class FindInit(ContextRecordInit): @@ -217,17 +218,14 @@ class ATreatmentWizardCreationTest(WizardTest, FindInit, TestCase): treat) -class ImportFindTest(ImportContextRecordTest): - test_operations = False - test_context_records = False - +class ImportFindTest(ImportTest, TestCase): fixtures = ImportContextRecordTest.fixtures + [ settings.ROOT_PATH + '../archaeological_finds/fixtures/initial_data-fr.json', ] - def testMCCImportFinds(self, test=True): - self.testMCCImportContextRecords(test=False) + def test_mcc_import_finds(self): + self.init_context_record() old_nb = models.BaseFind.objects.count() old_nb_find = models.Find.objects.count() @@ -252,22 +250,18 @@ class ImportFindTest(ImportContextRecordTest): mcc_images.read())} post_dict = {'importer_type': MCC.pk, 'skip_lines': 1, "encoding": 'utf-8'} - form = forms_common.NewImportForm(data=post_dict, files=file_dict, - instance=None) + form = forms_common.NewImportForm(data=post_dict, files=file_dict) form.is_valid() - if test: - self.assertTrue(form.is_valid()) + self.assertTrue(form.is_valid()) impt = form.save(self.ishtar_user) impt.initialize() # doing manual connections ceram = models.MaterialType.objects.get(txt_idx='ceramic').pk glass = models.MaterialType.objects.get(txt_idx='glass').pk - self.setTargetKey('find__material_types', 'terre-cuite', ceram) - self.setTargetKey('find__material_types', 'verre', glass) + self.set_target_key('find__material_types', 'terre-cuite', ceram) + self.set_target_key('find__material_types', 'verre', glass) impt.importation() - if not test: - return # new finds has now been imported current_nb = models.BaseFind.objects.count() self.assertEqual(current_nb, (old_nb + 4)) |