diff options
| -rw-r--r-- | archaeological_finds/forms.py | 16 | ||||
| -rw-r--r-- | archaeological_finds/migrations/0061_auto_20190213_1651.py | 27 | ||||
| -rw-r--r-- | archaeological_finds/models_finds.py | 6 | ||||
| -rw-r--r-- | archaeological_finds/templates/ishtar/sheet_find.html | 1 | 
4 files changed, 45 insertions, 5 deletions
| diff --git a/archaeological_finds/forms.py b/archaeological_finds/forms.py index 221eb4f82..738b634e9 100644 --- a/archaeological_finds/forms.py +++ b/archaeological_finds/forms.py @@ -146,10 +146,10 @@ class BaseFindForm(CustomForm, ManageOldType):      field_order = [          'label', 'denomination', 'previous_id', 'museum_id', 'seal_number',          'mark', 'description', 'is_complete', 'material_type', -        'material_type_quality', 'object_type', 'object_type_quality', -        'find_number', 'min_number_of_individuals', 'inscription', -        'decoration', 'manufacturing_place', 'communicabilitie', 'comment', -        'dating_comment', +        'material_type_quality', 'material_comment', 'object_type', +        'object_type_quality', 'find_number', 'min_number_of_individuals', +        'inscription', 'decoration', 'manufacturing_place', 'communicabilitie', +        'comment', 'dating_comment',          'length', 'width', 'height', 'thickness', 'diameter', 'circumference',          'volume', 'weight', 'clutter_long_side', 'clutter_short_side',          'clutter_height', 'dimensions_comment', 'checked_type', 'check_date' @@ -176,6 +176,9 @@ class BaseFindForm(CustomForm, ManageOldType):      )      material_type_quality = forms.ChoiceField(          label=_(u"Material type quality"), required=False, choices=[]) +    material_comment = forms.CharField( +        label=_(u"Comment on the material"), required=False, +        widget=forms.Textarea)      object_type = widgets.Select2MultipleField(          label=_(u"Object types"), required=False,      ) @@ -280,7 +283,8 @@ class FindForm(BaseFindForm):          'get_first_base_find__excavation_id', 'museum_id', 'seal_number',          'mark', 'description', 'get_first_base_find__discovery_date',          'get_first_base_find__discovery_date_taq', 'get_first_base_find__batch', -        'is_complete', 'material_type', 'material_type_quality', 'object_type', +        'is_complete', 'material_type', 'material_type_quality', +        'material_comment', 'object_type',          'object_type_quality', 'find_number', 'min_number_of_individuals',          'inscription', 'manufacturing_place', 'communicabilitie', 'comment',          'dating_comment', 'length', 'width', 'height', 'thickness', 'diameter', @@ -964,6 +968,7 @@ class FindSelect(HistorySelect):      )      material_type_quality = forms.ChoiceField(label=_(u"Material type quality"),                                                choices=[]) +    material_comment = forms.CharField(label=_(u"Comment on the material"))      object_types = forms.IntegerField(          label=_(u"Object type"),          widget=widgets.JQueryAutoComplete( @@ -1076,6 +1081,7 @@ class FindSelect(HistorySelect):          choices=[], label=_(u"Treatment emergency")      ) +      estimated_value__higher = FloatField(          label=_(u"Estimated value - higher than"))      estimated_value__lower = FloatField( diff --git a/archaeological_finds/migrations/0061_auto_20190213_1651.py b/archaeological_finds/migrations/0061_auto_20190213_1651.py new file mode 100644 index 000000000..4690812ff --- /dev/null +++ b/archaeological_finds/migrations/0061_auto_20190213_1651.py @@ -0,0 +1,27 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.10 on 2019-02-13 16:51 +from __future__ import unicode_literals + +from django.db import migrations, models +import django.db.models.deletion +import ishtar_common.models + + +class Migration(migrations.Migration): + +    dependencies = [ +        ('archaeological_finds', '0060_auto_20190206_1522'), +    ] + +    operations = [ +        migrations.AddField( +            model_name='find', +            name='material_comment', +            field=models.TextField(blank=True, null=True, verbose_name='Comment on the material'), +        ), +        migrations.AddField( +            model_name='historicalfind', +            name='material_comment', +            field=models.TextField(blank=True, null=True, verbose_name='Comment on the material'), +        ), +    ] diff --git a/archaeological_finds/models_finds.py b/archaeological_finds/models_finds.py index c4e6abb54..6f8199412 100644 --- a/archaeological_finds/models_finds.py +++ b/archaeological_finds/models_finds.py @@ -1083,6 +1083,10 @@ class Find(BulkUpdatedItem, ValueGetter, BaseHistorizedItem, OwnPerms,              SearchAltName(                  pgettext_lazy(u"key for text search", u"comment"),                  'comment__iexact'), +        'material_comment': +            SearchAltName( +                pgettext_lazy(u"key for text search", u"material-comment"), +                'material_comment__iexact'),          'dating_comment':              SearchAltName(                  pgettext_lazy(u"key for text search", u"dating-comment"), @@ -1343,6 +1347,8 @@ class Find(BulkUpdatedItem, ValueGetter, BaseHistorizedItem, OwnPerms,          on_delete=models.SET_NULL,          blank=True, null=True      ) +    material_comment = models.TextField(_(u"Comment on the material"), +                                        blank=True, null=True)      volume = models.FloatField(_(u"Volume (l)"), blank=True, null=True)      weight = models.FloatField(_(u"Weight"), blank=True, null=True)      weight_unit = models.CharField(_(u"Weight unit"), max_length=4, diff --git a/archaeological_finds/templates/ishtar/sheet_find.html b/archaeological_finds/templates/ishtar/sheet_find.html index 03295a8e2..1b383e4e5 100644 --- a/archaeological_finds/templates/ishtar/sheet_find.html +++ b/archaeological_finds/templates/ishtar/sheet_find.html @@ -143,6 +143,7 @@            {% field_flex "Is complete?" item.is_complete %}            {% field_flex_multiple_obj "Material types" item 'material_types' %}            {% field_flex "Material type quality" item.material_type_quality %} +          {% field_flex_full "Comment on the material" item.material_comment "<pre>" "</pre>" %}            {% field_flex_multiple_obj "Object types" item 'object_types' %}            {% field_flex "Object type quality" item.object_type_quality %}            {% field_flex "Find number" item.find_number %} | 
