diff options
Diffstat (limited to 'archaeological_operations')
-rw-r--r-- | archaeological_operations/templates/ishtar/sheet_operation.html | 127 |
1 files changed, 71 insertions, 56 deletions
diff --git a/archaeological_operations/templates/ishtar/sheet_operation.html b/archaeological_operations/templates/ishtar/sheet_operation.html index 91c1501ec..733b0b39a 100644 --- a/archaeological_operations/templates/ishtar/sheet_operation.html +++ b/archaeological_operations/templates/ishtar/sheet_operation.html @@ -9,9 +9,10 @@ {% 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"> +<h3>{% trans "General"%}</h3> + +<div class="clearfix"> + <div class="card float-left col-12 col-md-6 col-lg-4"> {% include "ishtar/blocks/window_image.html" %} <div class="card-body"> <div class="row"> @@ -25,66 +26,75 @@ </div> </div> <p class="card-text"> - <p class='window-refs' title="{% trans 'Name' %}">{{item.common_name|default:''}}</p> - <p class='window-refs' title="{% trans 'Address' %}">{{item.address|default:''}}</p> + <p class='window-refs' title="{% trans 'Name' %}">{{item.common_name|default:''}}</p> + <p class='window-refs' title="{% trans 'Address' %}">{{item.address|default:''}}</p> </p> </div> - </div> </div> -</div> - -<h3>{% trans "General"%}</h3> -<div class="row"> - {% field_flex "Old code" item.old_code %} - {% include "ishtar/blocks/sheet_creation_section.html" %} - {% trans "Begining date" as begining_date_label %} - {% field_flex begining_date_label item.start_date|date:"DATE_FORMAT" %} - {% field_flex "Excavation end date" item.excavation_end_date|date:"DATE_FORMAT"|default:"-" %} - {% field_flex_detail "Head scientist" item.scientist %} - {% field_flex_detail "In charge" item.in_charge %} - {% field_flex_multiple "Collaborators" item.collaborators %} - {% field_flex_detail "Operator" item.operator %} - <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 operation"%}{% endif %} - </dd> - </div> - {% if item.closing.date %} - <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 }} - </dd> + <div class="row"> + {% field_flex_2 "Old code" item.old_code %} + {% trans "Begining date" as begining_date_label %} + {% field_flex_2 begining_date_label item.start_date|date:"DATE_FORMAT" %} + {% field_flex_2 "Excavation end date" item.excavation_end_date|date:"DATE_FORMAT"|default:"-" %} + {% with has_image=item.images.count %} + {% if not has_image %} </div> - {% endif %} - {% field_flex "Type" item.operation_type %} - {% if item.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.surface }} m<sup>2</sup> ({{ item.surface_ha }} ha) - </dd> - </div> - {% endif %} - {% if item.cost %} - <div class="col-12 col-md-6 col-lg-4 d-flex flex-wrap row"> - <dt class="col-5">{%trans "Cost" %}</dt> - <dd class='col-7'> - {{ item.cost }} €{% if item.cost_by_m2 %}, ({{ item.cost_by_m2 }} €/m<sup>2</sup>){%endif%} - </dd> +</div> + <div class="row"> + {% endif %} + + {% field_flex_detail "Head scientist" item.scientist has_image %} + {% field_flex_detail "In charge" item.in_charge has_image %} + {% field_flex_multiple "Collaborators" item.collaborators has_image %} + {% field_flex_detail "Operator" item.operator has_image %} + <div class="col-12 {% if has_image %}col-lg-6{% else %}col-md-6 col-lg-4{% endif %} 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 operation"%}{% endif %} + </dd> + </div> + {% if item.closing.date %} + <div class="col-12 {% if has_image %}col-lg-6{% else %}col-md-6 col-lg-4{% endif %} 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 }} + </dd> + </div> + {% endif %} + {% field_flex_2 "Type" item.operation_type %} + {% if item.surface %} + <div class="col-12 {% if has_image %}col-lg-6{% else %}col-md-6 col-lg-4{% endif %} d-flex flex-wrap row"> + <dt class="col-5">{%trans "Surface"%}</dt> + <dd class='col-7'> + {{ item.surface }} m<sup>2</sup> ({{ item.surface_ha }} ha) + </dd> + </div> + {% endif %} + {% if item.cost %} + <div class="col-12 {% if has_image %}col-lg-6{% else %}col-md-6 col-lg-4{% endif %} d-flex flex-wrap row"> + <dt class="col-5">{%trans "Cost" %}</dt> + <dd class='col-7'> + {{ item.cost }} €{% if item.cost_by_m2 %}, ({{ item.cost_by_m2 }} €/m<sup>2</sup>){%endif%} + </dd> + </div> + {% endif %} + {% if item.duration %} + <div class="col-12 {% if has_image %}col-lg-6{% else %}col-md-6 col-lg-4{% endif %} d-flex flex-wrap row"> + <dt class="col-5">{%trans "Duration"%}</dt> + <dd class='col-7'> + {{ item.duration }} {% trans "days" %} + </dd> + </div> + {% endif %} + {% if has_image %} </div> - {%endif%} - {% if item.duration %} - <div class="col-12 col-md-6 col-lg-4 d-flex flex-wrap row"> - <dt class="col-5">{%trans "Duration"%}</dt> - <dd class='col-7'> - {{ item.duration }} {% trans "days" %} - </dd> + {% endif %} + {% endwith %} </div> - {%endif%} +</div> +<div class="row"> {% field_flex_multiple "Remains" item.remains %} {% field_flex_multiple "Periods" item.periods %} {% field_flex "Record quality" item.record_quality_type %} @@ -116,6 +126,11 @@ {% field_flex_full "Comment about scientific documentation" item.scientific_documentation_comment "<pre>" "</pre>" %} </div> +<h3>{% trans "Sheet"%}</h3> +<div class="row"> + {% include "ishtar/blocks/sheet_creation_section.html" %} +</div> + {% include "ishtar/blocks/sheet_json.html" %} {% if item.virtual_operation %} |