diff options
| -rw-r--r-- | archaeological_operations/forms.py | 2 | ||||
| -rw-r--r-- | archaeological_operations/migrations/0025_auto_20180413_1604.py | 30 | ||||
| -rw-r--r-- | archaeological_operations/models.py | 13 | ||||
| -rw-r--r-- | archaeological_operations/templates/ishtar/sheet_site.html | 1 | 
4 files changed, 42 insertions, 4 deletions
| diff --git a/archaeological_operations/forms.py b/archaeological_operations/forms.py index 1fd9a8d79..e28fb2421 100644 --- a/archaeological_operations/forms.py +++ b/archaeological_operations/forms.py @@ -1322,6 +1322,8 @@ class SiteForm(ManageOldType):          label=_(u"Cadastral locality"),          widget=forms.Textarea, required=False      ) +    comment = forms.CharField(label=_(u"Comment"), widget=forms.Textarea, +                              required=False)      TYPES = [          FieldType('period', models.Period, True), diff --git a/archaeological_operations/migrations/0025_auto_20180413_1604.py b/archaeological_operations/migrations/0025_auto_20180413_1604.py new file mode 100644 index 000000000..489558401 --- /dev/null +++ b/archaeological_operations/migrations/0025_auto_20180413_1604.py @@ -0,0 +1,30 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.10 on 2018-04-13 16:04 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + +    dependencies = [ +        ('archaeological_operations', '0024_auto_20180413_1540'), +    ] + +    operations = [ +        migrations.AddField( +            model_name='archaeologicalsite', +            name='comment', +            field=models.TextField(blank=True, null=True, verbose_name='Comment'), +        ), +        migrations.AlterField( +            model_name='historicaloperation', +            name='comment', +            field=models.TextField(blank=True, null=True, verbose_name='Comment'), +        ), +        migrations.AlterField( +            model_name='operation', +            name='comment', +            field=models.TextField(blank=True, null=True, verbose_name='Comment'), +        ), +    ] diff --git a/archaeological_operations/models.py b/archaeological_operations/models.py index a67397d1d..c342fb2a4 100644 --- a/archaeological_operations/models.py +++ b/archaeological_operations/models.py @@ -94,7 +94,8 @@ class ArchaeologicalSite(BaseHistorizedItem):      SLUG = 'site'      BASE_SEARCH_VECTORS = [          "reference", "name", "oceanographic_service_localisation", -        "shipwreck_code" +        "shipwreck_code", "comment", "shipwreck_name", "discovery_area" +      ]      M2M_SEARCH_VECTORS = ["periods__name", "remains__name", "towns__name"]      PARENT_SEARCH_VECTORS = ['operations'] @@ -107,6 +108,7 @@ class ArchaeologicalSite(BaseHistorizedItem):                                       blank=True)      towns = models.ManyToManyField(Town, verbose_name=_(u"Towns"),                                     related_name='sites', blank=True) +    comment = models.TextField(_(u"Comment"), null=True, blank=True)      top_operation = models.ForeignKey("Operation", blank=True, null=True,                                        verbose_name=_(u"Top operation"),                                        on_delete=models.SET_NULL) @@ -342,8 +344,11 @@ class Operation(ClosedItem, BaseHistorizedItem, ImageModel, OwnPerms,          'archaeological_sites__reference': _(u"Archaeological sites ("                                               u"reference)"),      } -    BASE_SEARCH_VECTORS = ["scientist__raw_name", "cached_label", -                           "common_name", "comment", "address", "old_code"] +    BASE_SEARCH_VECTORS = [ +        "scientist__raw_name", "cached_label", "common_name", "comment", +        "address", "old_code", "seizure_name", "official_report_number", +        "name_of_the_protagonist" +    ]      INT_SEARCH_VECTORS = ["year"]      M2M_SEARCH_VECTORS = ["towns__name"]      ASSOCIATED = { @@ -443,7 +448,7 @@ class Operation(ClosedItem, BaseHistorizedItem, ImageModel, OwnPerms,          _(u"Operator reference"), max_length=20, null=True, blank=True)      common_name = models.TextField(_(u"Generic name"), null=True, blank=True)      address = models.TextField(_(u"Address / Locality"), null=True, blank=True) -    comment = models.TextField(_(u"General comment"), null=True, blank=True) +    comment = models.TextField(_(u"Comment"), null=True, blank=True)      scientific_documentation_comment = models.TextField(          _(u"Comment about scientific documentation"), null=True, blank=True)      images = models.ManyToManyField(IshtarImage, verbose_name=_(u"Images"), diff --git a/archaeological_operations/templates/ishtar/sheet_site.html b/archaeological_operations/templates/ishtar/sheet_site.html index d6360f965..9836a25b0 100644 --- a/archaeological_operations/templates/ishtar/sheet_site.html +++ b/archaeological_operations/templates/ishtar/sheet_site.html @@ -40,6 +40,7 @@      {% include "ishtar/blocks/sheet_creation_section.html" %}      {% field_flex_multiple "Periods" item.periods %}      {% field_flex_multiple "Remains" item.remains %} +    {% field_flex_full "Comment" item.comment "<pre>" "</pre>" %}  </div>  {% if item.towns.count or item.locality_ngi or item.locality_cadastral %} | 
