diff options
Diffstat (limited to 'archaeological_files/templates')
3 files changed, 148 insertions, 100 deletions
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 %} |
