diff options
Diffstat (limited to 'archaeological_files')
| -rw-r--r-- | archaeological_files/forms.py | 32 | ||||
| -rw-r--r-- | archaeological_files/models.py | 14 | ||||
| -rw-r--r-- | archaeological_files/templates/ishtar/blocks/window_file_nav.html | 9 | ||||
| -rw-r--r-- | archaeological_files/templates/ishtar/dashboards/dashboard_file.html | 44 | ||||
| -rw-r--r-- | archaeological_files/templates/ishtar/sheet_file.html | 195 |
5 files changed, 182 insertions, 112 deletions
diff --git a/archaeological_files/forms.py b/archaeological_files/forms.py index cf8b8ea4b..b87ef9ba5 100644 --- a/archaeological_files/forms.py +++ b/archaeological_files/forms.py @@ -37,15 +37,17 @@ from archaeological_operations.models import ActType, AdministrativeAct, \ import models from ishtar_common.forms import FinalForm, get_now, reverse_lazy, TableSelect, \ - ManageOldType, CustomForm, FieldType + ManageOldType, CustomForm, FieldType, IshtarForm from ishtar_common.forms_common import get_town_field from archaeological_operations.forms import AdministrativeActOpeForm, \ AdministrativeActOpeFormSelection, \ ParcelField, SLICING, AdministrativeActModifForm, ParcelForm, ParcelFormSet from ishtar_common import widgets +from bootstrap_datepicker.widgets import DatePicker class FileSelect(TableSelect): + search_vector = forms.CharField(label=_(u"Full text search")) year = forms.IntegerField(label=_("Year")) numeric_reference = forms.IntegerField(label=_("Numeric reference")) internal_reference = forms.CharField(max_length=200, @@ -124,12 +126,13 @@ class FileSelect(TableSelect): class FileFormSelection(forms.Form): + SEARCH_AND_SELECT = True form_label = _("Archaeological file search") associated_models = {'pk': models.File} currents = {'pk': models.File} pk = forms.IntegerField( label="", required=False, - widget=widgets.JQueryJqGrid( + widget=widgets.DataTable( reverse_lazy('get-file'), FileSelect, models.File, source_full=reverse_lazy('get-file-full')), @@ -141,11 +144,12 @@ class FileFormSelection(forms.Form): raise forms.ValidationError(_(u"You should select a file.")) return cleaned_data + DATE_SOURCE = (('creation', _(u"Creation date")), ("reception", _(u"Reception date"))) -class DashboardForm(forms.Form): +class DashboardForm(IshtarForm): slicing = forms.ChoiceField( label=_("Slicing"), choices=SLICING, required=False) department_detail = forms.BooleanField( @@ -157,9 +161,9 @@ class DashboardForm(forms.Form): saisine_type = forms.ChoiceField( label=_("Saisine type"), choices=[], required=False) after = forms.DateField( - label=_(u"Date after"), widget=widgets.JQueryDate, required=False) + label=_(u"Date after"), widget=DatePicker, required=False) before = forms.DateField( - label=_(u"Date before"), widget=widgets.JQueryDate, required=False) + label=_(u"Date before"), widget=DatePicker, required=False) def __init__(self, *args, **kwargs): if 'prefix' not in kwargs: @@ -195,7 +199,7 @@ class DashboardForm(forms.Form): return fltr -class FileFormGeneral(ManageOldType, forms.Form): +class FileFormGeneral(ManageOldType): form_label = _("General") associated_models = {'in_charge': Person, 'related_file': models.File, @@ -219,7 +223,7 @@ class FileFormGeneral(ManageOldType, forms.Form): label=_(u"Other reference"), max_length=60, required=False) name = forms.CharField(label=_(u"Name"), required=False, max_length=100) creation_date = forms.DateField(label=_(u"Creation date"), - initial=get_now, widget=widgets.JQueryDate) + initial=get_now, widget=DatePicker) file_type = forms.ChoiceField(label=_("File type"), choices=[]) related_file = forms.IntegerField( label=_("Related file"), required=False, @@ -323,7 +327,7 @@ class FileFormPreventive(ManageOldType, forms.Form): saisine_type = forms.ChoiceField(label=_(u"Saisine type"), choices=[]) reception_date = forms.DateField( - label=_(u"Reception date"), initial=get_now, widget=widgets.JQueryDate) + label=_(u"Reception date"), initial=get_now, widget=DatePicker) def __init__(self, *args, **kwargs): super(FileFormPreventive, self).__init__(*args, **kwargs) @@ -402,6 +406,7 @@ class FinalFileDeleteForm(FinalForm): class AdministrativeActFileModifySelect(TableSelect): + search_vector = forms.CharField(label=_(u"Full text search")) year = forms.IntegerField(label=_("Year")) index = forms.IntegerField(label=_("Index")) if settings.COUNTRY == 'fr': @@ -429,6 +434,7 @@ class AdministrativeActFileModifySelect(TableSelect): class AdministrativeActFileSelect(TableSelect): + search_vector = forms.CharField(label=_(u"Full text search")) year = forms.IntegerField(label=_("Year")) index = forms.IntegerField(label=_("Index")) if settings.COUNTRY == 'fr': @@ -445,9 +451,9 @@ class AdministrativeActFileSelect(TableSelect): max_length=300) signature_date_after = forms.DateField( - label=_(u"Signature date after"), widget=widgets.JQueryDate) + label=_(u"Signature date after"), widget=DatePicker) signature_date_before = forms.DateField( - label=_(u"Signature date before"), widget=widgets.JQueryDate) + label=_(u"Signature date before"), widget=DatePicker) associated_file__name = forms.CharField( label=_(u"File name"), max_length=200) associated_file__general_contractor = forms.IntegerField( @@ -518,9 +524,10 @@ class AdministrativeActFileSelect(TableSelect): class AdministrativeActFileFormSelection(AdministrativeActOpeFormSelection): + SEARCH_AND_SELECT = True pk = forms.IntegerField( label="", required=False, - widget=widgets.JQueryJqGrid( + widget=widgets.DataTable( reverse_lazy('get-administrativeactfile'), AdministrativeActFileSelect, AdministrativeAct, table_cols='TABLE_COLS_FILE'), @@ -529,9 +536,10 @@ class AdministrativeActFileFormSelection(AdministrativeActOpeFormSelection): class AdministrativeActFileModifyFormSelection( AdministrativeActOpeFormSelection): + SEARCH_AND_SELECT = True pk = forms.IntegerField( label="", required=False, - widget=widgets.JQueryJqGrid( + widget=widgets.DataTable( reverse_lazy('get-administrativeactfile'), AdministrativeActFileModifySelect, AdministrativeAct, table_cols='TABLE_COLS_FILE'), diff --git a/archaeological_files/models.py b/archaeological_files/models.py index b0f53f11c..f8b3dc0ca 100644 --- a/archaeological_files/models.py +++ b/archaeological_files/models.py @@ -61,9 +61,12 @@ class PermitType(GeneralType): verbose_name = _(u"Permit type") verbose_name_plural = _(u"Permit types") ordering = ('label',) + + post_save.connect(post_save_cache, sender=PermitType) post_delete.connect(post_save_cache, sender=PermitType) + if settings.COUNTRY == 'fr': class SaisineType(GeneralType, ValueGetter): delay = models.IntegerField(_(u"Delay (in days)"), default=30) @@ -104,6 +107,17 @@ class File(ClosedItem, BaseHistorizedItem, OwnPerms, ValueGetter, 'history_creator': 'history_creator__ishtaruser__person__pk', 'history_modifier': 'history_modifier__ishtaruser__person__pk', } + BASE_SEARCH_VECTORS = [ + 'name', 'internal_reference', 'file_type__label', 'saisine_type__label', + 'permit_type__label', 'permit_reference', 'comment', 'research_comment' + ] + INT_SEARCH_VECTORS = ['numeric_reference', 'year'] + M2M_SEARCH_VECTORS = ['towns__name'] + PARENT_SEARCH_VECTORS = [ + 'in_charge', 'general_contractor', 'corporation_general_contractor', + 'responsible_town_planning_service', 'planning_service', 'organization', + 'scientist' + ] # fields year = models.IntegerField(_(u"Year"), default=get_current_year) diff --git a/archaeological_files/templates/ishtar/blocks/window_file_nav.html b/archaeological_files/templates/ishtar/blocks/window_file_nav.html index f8b6ddb8a..d464c4af2 100644 --- a/archaeological_files/templates/ishtar/blocks/window_file_nav.html +++ b/archaeological_files/templates/ishtar/blocks/window_file_nav.html @@ -1,11 +1,8 @@ {% extends "ishtar/blocks/window_nav.html" %} {% load i18n %} {% block extra_actions %} -<a class='history-nav' href='{% url "operation_add" item.pk %}'> - <span class="fa-stack fa-lg"> - <i class="fa fa-circle fa-stack-2x"></i> - <i class="fa fa-plus fa-stack-1x fa-inverse"></i> - </span> - <br/>{%trans "Add an operation for this file" %} +<a class="btn btn-secondary" href='{% url "operation_add" item.pk %}' + title="{%trans 'Add an operation for this file' %}"> + <i class="fa fa-plus"></i> {% trans "operation" %} </a> {% endblock %} diff --git a/archaeological_files/templates/ishtar/dashboards/dashboard_file.html b/archaeological_files/templates/ishtar/dashboards/dashboard_file.html index a1462698c..127c9f2f8 100644 --- a/archaeological_files/templates/ishtar/dashboards/dashboard_file.html +++ b/archaeological_files/templates/ishtar/dashboards/dashboard_file.html @@ -9,15 +9,23 @@ <h3>{% trans "Global informations" %}</h3> <div> - <p><label>{% trans "Total:" %}</label> <span class='value numeric'>{{dashboard.total_number|intcomma}}</span></p> - {% for type in dashboard.types %} - <p><label>{{type.file_type__label}}{% trans ":"%}</label> <span class='value numeric'>{{type.number|intcomma}}</span></p> + <table class="table table-striped"> + <tr> + <th>{% trans "Total" %}</th> + <td>{{dashboard.total_number|intcomma}}</td> + </tr> + {% for type in dashboard.types %} + <tr> + <th>{{type.file_type__label}}</th> + <td>{{type.number|intcomma}}</td> + </tr> {% endfor %} + </table> <div class='clean-table'> <h4>{% trans "by year"%}</h4> <div class='clean-table-wrap'> - <table> + <table class="table table-striped"> <tr> {% for year in dashboard.by_year %}<th>{% if year.date.year %}{{year.date.year}}{% else %}{% trans "no year" %}{% endif %}</th>{% endfor %} </tr> @@ -30,7 +38,7 @@ <div class='clean-table'> <h4>{% trans "by month"%}</h4> - <table> + <table class="table table-striped"> <tr> {% for month in dashboard.by_month %}<th>{{month.date|date:"N Y"|capfirst}}</th>{% endfor %} </tr> @@ -47,7 +55,7 @@ <p><label>{% trans "Total:" %}</label><span class='value numeric'>{{dashboard.research.total_number|intcomma}}</span></p> <div class='clean-table'> <h4>{% trans "by year"%}</h4> - <table> + <table class="table table-striped"> <tr> {% for year in dashboard.research.by_year %}<th>{{year.date.year}}</th>{% endfor %} </tr> @@ -59,7 +67,7 @@ <div class='clean-table'> <h4>{% trans "by month"%}</h4> - <table> + <table class="table table-striped"> <tr> {% for month in dashboard.research.by_month %}<th>{{month.date|date:"F Y"|capfirst}}</th>{% endfor %} </tr> @@ -71,7 +79,7 @@ <div class='clean-table'> <h4>{% trans "by department"%}</h4> - <table> + <table class="table table-striped"> <tr> {% for dpt in dashboard.research.by_dpt %}<th>{{dpt.department__label}}</th>{% endfor %} </tr> @@ -84,7 +92,7 @@ <div class='clean-table'> <h4>{% trans "main towns"%}</h4> <div class='clean-table-wrap'> - <table> + <table class="table table-striped"> <tr> {% for town in dashboard.research.towns %}<th>{{town.town__name}}</th>{% endfor %} </tr> @@ -104,7 +112,7 @@ <div class='clean-table'> <h4>{% trans "by saisine type"%}</h4> <div class='clean-table-wrap'> - <table> + <table class="table table-striped"> <tr> {% for saisine in dashboard.rescue.saisine %}<th>{{saisine.saisine_type__label}}</th>{% endfor %} </tr> @@ -118,7 +126,7 @@ <div class='clean-table'> <h4>{% trans "by administrative act"%}</h4> <div class='clean-table-wrap'> - <table> + <table class="table table-striped"> <tr> {% for act in dashboard.rescue.administrative_act %}<th>{{act.act_type__label}}</th>{% endfor %} </tr> @@ -132,7 +140,7 @@ <div class='clean-table'> <h4>{% trans "by year"%}</h4> <div class='clean-table-wrap'> - <table> + <table class="table table-striped"> <tr> {% for year in dashboard.rescue.by_year %}<th>{{year.date.year}}</th>{% endfor %} </tr> @@ -146,7 +154,7 @@ <div class='clean-table'> <h4>{% trans "by month"%}</h4> <div class='clean-table-wrap'> - <table> + <table class="table table-striped"> <tr> {% for month in dashboard.rescue.by_month %}<th>{{month.date|date:"F Y"|capfirst}}</th>{% endfor %} </tr> @@ -163,7 +171,7 @@ <div class='clean-table'> <h4>{% trans "archaeological files linked to at least one operation (%)"%}</h4> <div class='clean-table-wrap'> - <table> + <table class="table table-striped"> <tr> {% for year in dashboard.rescue.operational_by_year %}<th>{{year.date.year}}</th>{% endfor %} </tr> @@ -177,7 +185,7 @@ <div class='clean-table'> <h4>{% trans "by department"%}</h4> <div class='clean-table-wrap'> - <table> + <table class="table table-striped"> <tr> {% for dpt in dashboard.rescue.by_dpt %}<th>{{dpt.department__label}}</th>{% endfor %} </tr> @@ -191,7 +199,7 @@ <div class='clean-table'> <h4>{% trans "surface by department (ha)"%}</h4> <div class='clean-table-wrap'> - <table> + <table class="table table-striped"> <tr> {% for dpt in dashboard.rescue.surface_by_dpt %}<th>{{dpt.department__label}}</th>{% endfor %} </tr> @@ -205,7 +213,7 @@ <div class='clean-table'> <h4>{% trans "main towns by number"%}</h4> <div class='clean-table-wrap'> - <table> + <table class="table table-striped"> <tr> {% for town in dashboard.rescue.towns %}<th>{{town.town__name}}</th>{% endfor %} </tr> @@ -219,7 +227,7 @@ <div class='clean-table'> <h4>{% trans "main towns by surface (ha)"%}</h4> <div class='clean-table-wrap'> - <table> + <table class="table table-striped"> <tr> {% for town in dashboard.rescue.surface_by_town %}<th>{{town.town__name}}</th>{% endfor %} </tr> diff --git a/archaeological_files/templates/ishtar/sheet_file.html b/archaeological_files/templates/ishtar/sheet_file.html index 6eda1124a..20684baf9 100644 --- a/archaeological_files/templates/ishtar/sheet_file.html +++ b/archaeological_files/templates/ishtar/sheet_file.html @@ -1,102 +1,153 @@ {% extends "ishtar/sheet.html" %} {% load i18n window_ope_tables window_field window_header %} -{% block head_title %}{% trans "Archaeological file" %}{% endblock %} - -{% block content %} +{% block head_title %}<strong>{% trans "Archaeological file" %}</strong> - {{item.full_internal_ref|default:''}}{% endblock %} +{% block toolbar %} {% if can_add_operation %} {% window_file_nav item window_id previous next %} {% else %} {% window_nav item window_id 'show-file' 'file_modify' 'show-historized-file' 'revert-file' previous next 1 %} {% endif %} -<p class='window-refs'>{{item.full_internal_ref|default:''}}</p> -<p class='window-refs'>{{item.internal_reference|default:''}}</p> -<p class='window-refs'>{{item.name|default:''}}</p> -{% include "ishtar/blocks/sheet_external_id.html" %} +{% endblock %} + +{% block content %} + +<div class="row"> + <div class="offset-lg-4 col-lg-4 offset-md-3 col-md-6 offset-sm-1 col-sm-10 col-12"> + <div class="card"> + {% if item.image %} + <img class='card-img-top' src="{{item.thumbnail.url}}"> + {% endif%} + <div class="card-body"> + <p class="card-text"> + <p class='window-refs'>{{item.full_internal_ref|default:''}}</p> + <p class='window-refs'>{{item.internal_reference|default:''}}</p> + <p class='window-refs'>{{item.name|default:''}}</p> + {% include "ishtar/blocks/sheet_external_id.html" %} + </p> + </div> + </div> + </div> +</div> + <h3>{% trans "General"%}</h3> -<ul class='form-flex'> - {% field_li "Reception date" item.reception_date|date:"DATE_FORMAT" %} +<div class="row"> + {% field_flex "Reception date" item.reception_date|date:"DATE_FORMAT" %} {% include "ishtar/blocks/sheet_creation_section.html" %} - {% comment %} {% if item.deadline_date and not item.acts %} <p><label>{%trans "Deadline"%}</label> <span class='value'>{% item.deadline_date %}</span></p> <!-- calculated deadline for some preventive files , see saisine_type, not displayed if an act as been send --> {% endif %} {% endcomment %} -{% field_li_detail "In charge" item.in_charge %} - -<li><label>{%trans "State"%}</label> <span class='value'>{% if item.is_active %}{%trans "Active file"%}</span></p> -{% else %}{%trans "Closed file"%}</span></li> - -{% if item.closing %}<li><label>{%trans "Closing date"%}</label> <span class='value'>{{ item.closing.date }} <strong>{%trans "by" %}</strong> {{ item.closing.user.full_label }}</span></li>{% endif %} -{% endif %} - -{% field_li "Type" item.file_type %} - -{% if item.related_file %}<li><label>{%trans "Related file"%}</label> <span class='value'><a href='#' onclick='load_window("{% url "show-file" item.related_file.pk "" %}")'>{{ item.related_file }}</a></span></li>{% endif %} - -</ul> -{% field "Comment" item.comment "<pre>" "</pre>" %} - -{% include "ishtar/blocks/sheet_json.html" %} + {% field_flex_detail "In charge" item.in_charge %} + <div class="col-12 col-md-6 col-lg-4 d-flex flex-wrap row"> + <dt class="col-5">{%trans "State"%}</dt> + <dd class='col-7'> + {% if item.is_active %}{%trans "Active file"%}{% else %}{%trans "Closed file"%}{% endif %} + </dd> + </div> + {% if item.closing %} + <div class="col-12 col-md-6 col-lg-4 d-flex flex-wrap row"> + <dt class="col-5">{%trans "Closing date"%}</dt> + <dd class='col-7'> + {{ item.closing.date }} <strong>{%trans "by" %}</strong> {{ item.closing.user.full_label }} + </dd> + </div> + {% endif %} + {% field_flex "Type" item.file_type %} + {% field_flex_detail "Related file" item.related_file %} + {% field_flex_full "Comment" item.comment "<pre>" "</pre>" %} + {% include "ishtar/blocks/sheet_json.html" %} +</div> <h3>{% trans "Localisation"%}</h3> -{% if item.towns.count %}<p><label>{%trans "Towns"%}</label> <span class='value'>{{ item.towns.all|join:", " }}</span></p>{% endif %} -{% if item.departments.count %}<p><label>{%trans "Departments"%}</label> <span class='value'>{{ item.departments.all|join:", " }}</span></p>{% endif %} -{% if item.address %} -<p><label>{%trans "Main address"%}</label> <span class='value'>{{ item.address }}</span></p> -{% if item.address_complement %}<p><label>{%trans "Complement"%}</label> <span class='value'>{{ item.address_complement }}</span></p>{%endif%} -{% if item.postal_code %}<p><label>{%trans "Postal code"%}</label> <span class='value'>{{ item.postal_code }}</span></p>{%endif%} -{% endif %} -{% if item.total_surface %}<p><label>{%trans "Surface"%}</label> <span class='value'>{{ item.total_surface }} m<sup>2</sup> ({{ item.total_surface_ha }} ha)</span></p>{%endif%} - +<div class="row"> + {% field_flex_multiple "Towns" item.towns %} + {% field_flex_multiple "Departments" item.departments %} + {% field_flex "Main address" item.address %} + {% field_flex "Complement" item.address_complement %} + {% field_flex "Postal code" item.postal_code %} + {% if item.total_surface %} + <div class="col-12 col-md-6 col-lg-4 d-flex flex-wrap row"> + <dt class="col-5">{%trans "Surface"%}</dt> + <dd class='col-7'> + {{ item.total_surface }} m<sup>2</sup> ({{ item.total_surface_ha }} ha) + </dd> + </div> + {% endif %} +</div> {% if item.is_preventive %} <h3>{% trans "Preventive archaeological file"%}</h3> -<ul class='form-flex'> -{% if item.total_developed_surface %}<li><label>{%trans "Developed surface"%}</label> <span class='value'>{{ item.total_developed_surface }} m<sup>2</sup> ({{ item.total_developed_surface_ha }} ha)</span></li>{% endif %} - -{% field_li "Saisine type" item.saisine_type %} +<div class="row"> + + {% if item.total_developed_surface %} + <div class="col-12 col-md-6 col-lg-4 d-flex flex-wrap row"> + <dt class="col-5">{%trans "Developed surface"%}</dt> + <dd class='col-7'> + {{ item.total_developed_surface }} m<sup>2</sup> ({{ item.total_developed_surface_ha }} ha)</span></li> + </dd> + </div> + {% endif %} + + {% field_flex "Saisine type" item.saisine_type %} + + {% field_flex_detail "Responsible for planning service" item.responsible_town_planning_service %} + {% field_flex "Responsible for planning service address" item.responsible_town_planning_service.full_address %} + {% if item.town_planning_service %} + {% field_flex "Planning service organization" item.town_planning_service.full_address %} + {% else %} + {% field_flex "Planning service organization" item.responsible_town_planning_service.attached_to.full_address %} + {% endif %} + + {% field_flex "Permit type" item.permit_type %} + {% field_flex "Permit reference" item.permit_reference %} + + {% field_flex "General contractor" item.general_contractor.full_address %} + {% if item.corporation_general_contractor %} + {% field_flex "General contractor organization" item.corporation_general_contractor.full_address %} + {% else%} + {% field_flex "General contractor organization" item.general_contractor.attached_to.full_address %} + {% endif %} -{% field_li_detail "Responsible for planning service" item.responsible_town_planning_service %} -{% field_li "Responsible for planning service address" item.responsible_town_planning_service.full_address %} -{% if item.town_planning_service %} - {% field_li "Planning service organization" item.town_planning_service.full_address %} +</div> {% else %} - {% field_li "Planning service organization" item.responsible_town_planning_service.attached_to.full_address %} -{% endif %} -{% field_li "Permit type" item.permit_type %} -{% field_li "Permit reference" item.permit_reference %} +<h3>{% trans "Research archaeology"%}</h3> +<div class="row"> + {% field_flex_detail "Head scientist" item.scientist %} + {% field_flex "Requested operation type" item.requested_operation_type %} + {% field_flex_detail "Organization" item.organization %} -{% field_li "General contractor" item.general_contractor.full_address %} -{% if item.corporation_general_contractor %} - {% field_li "General contractor organization" item.corporation_general_contractor.full_address %} -{% else%} - {% field_li "General contractor organization" item.general_contractor.attached_to.full_address %} -{% endif %} + {% if item.cira_advised != None %} + {% field_flex "Passage en CIRA" item.cira_advised|yesno %} + {% endif %} -</ul> -{% else %} + {% if item.mh_register != None %} + {% field_flex "Sur Monument Historique classé" item.mh_register|yesno %} + {% endif %} -<h3>{% trans "Research archaeology"%}</h3> -{% if item.departments.count %}<p><label>{%trans "Departments"%}</label> <span class='value'>{% for department in item.departments.all %}{% if forloop.counter0 %}, {% endif %}{{ department }}{% endfor %}</span></p>{% endif %} -{% if item.scientist %}<p><label>{%trans "Head scientist"%}</label> <span class='value'>{{ item.scientist }}</span></p>{% endif %} -{% if item.requested_operation_type %}<p><label>{%trans "Requested operation type"%}</label> <span class='value'>{{ item.requested_operation_type }}</span></p>{% endif %} -{% if item.organization %}<p><label>{%trans "Organization"%}</label> <span class='value'>{{ item.organization }}</span></p>{% endif %} -{% if item.cira_advised != None %}<p><label>Passage en CIRA</label> <span class='value'>{{ item.cira_advised|yesno }}</span></p>{% endif %} -{% if item.mh_register != None %}<p><label>Sur Monument Historique classé</label> <span class='value'>{{ item.mh_register|yesno }}</span></p>{% endif %} -{% if item.mh_listing != None %}<p><label>Sur Monument Historique inscrit</label> <span class='value'>{{ item.mh_listing|yesno }}</span></p>{% endif %} -{% if item.classified_area != None %}<p><label>{% trans "Classified area" %}</label> <span class='value'>{{ item.classified_area|yesno }}</span></p>{% endif %} -{% if item.protected_area != None %}<p><label>{% trans "Protected area" %}</label> <span class='value'>{{ item.protected_area|yesno }}</span></p>{% endif %} -{% if item.research_comment %}<p><label>{%trans "Comment"%}</label> <span class='value'>{{ item.research_comment }}</span></p>{% endif %} + {% if item.mh_listing != None %} + {% field_flex "Sur Monument Historique inscrit" item.mh_listing|yesno %} + {% endif %} + + {% if item.classified_area != None %} + {% field_flex "Classified area" item.classified_area|yesno %} + {% endif %} + + {% if item.protected_area != None %} + {% field_flex "Protected area" item.protected_area|yesno %} + {% endif %} + + {% field_flex_full "Comment" item.research_comment "<pre>" "</pre>" %} +</div> {% endif %} @@ -109,9 +160,7 @@ {% table_administrativact administrativeacts_label item.administrative_act.all %} <h4>{%trans "Associated operations"%}</h4> -<div class='clean-table'> -<div class='clean-table-wrap'> -<table> +<table class="table table-striped"> <tr> <th>{% trans "Ref." %}</th> <th>Code Patriarche</th> @@ -136,13 +185,9 @@ <tr><td colspan="8" class='no_items'>{% trans "No operation associated to this archaeological file" %}</td></tr> {% endfor %} </table> -</div> -</div> <h4>{%trans "Admninistrative acts linked to associated operations"%}</h4> -<div class='clean-table'> -<div class='clean-table-wrap'> -<table> +<table class="table table-striped"> <tr> <th>{% trans "Year" %}</th> <th>{% trans "Ref." %}</th> @@ -160,8 +205,6 @@ <tr><td colspan="4" class='no_items'>{% trans "No administrative act linked to operations" %}</td></tr> {% endfor %} </table> -</div> -</div> {% endif %} {% endblock %} |
