summaryrefslogtreecommitdiff
path: root/ishtar_common/templates
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2020-06-11 17:57:00 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2021-02-28 12:15:21 +0100
commit3dd8c842716d5958185e8ae0b6c8300f7590313b (patch)
treea80266247002ba5b6c2e4095bea6aad33ae727df /ishtar_common/templates
parentb850b17f6536760f74d70dc23eae88dc55e91d35 (diff)
downloadIshtar-3dd8c842716d5958185e8ae0b6c8300f7590313b.tar.bz2
Ishtar-3dd8c842716d5958185e8ae0b6c8300f7590313b.zip
Documents sheet: new fields - better layout
Diffstat (limited to 'ishtar_common/templates')
-rw-r--r--ishtar_common/templates/ishtar/blocks/sheet_creation_section.html24
-rw-r--r--ishtar_common/templates/ishtar/sheet_document.html103
2 files changed, 89 insertions, 38 deletions
diff --git a/ishtar_common/templates/ishtar/blocks/sheet_creation_section.html b/ishtar_common/templates/ishtar/blocks/sheet_creation_section.html
index 6d0baa2de..a848dad5d 100644
--- a/ishtar_common/templates/ishtar/blocks/sheet_creation_section.html
+++ b/ishtar_common/templates/ishtar/blocks/sheet_creation_section.html
@@ -1,19 +1,19 @@
{% load i18n link_to_window %}
{% if item.history_creator.ishtaruser.person %}
-<div class="col-12 col-md-6 col-lg-3 flex-wrap">
- <dt>{% trans "Creation" context "Sheet" %}{{item.history_creator.ishtaruser.person|link_to_window:request}}</dt>
- <dd>
- {{item.history_creator.ishtaruser.person}}<br/>
- <small class="text-muted">{{item.history_creation_date|date:"DATETIME_FORMAT"}}</small>
- </dd>
+<div class="col-12 col-md-6 col-lg-3 flex-wrap text-muted"
+ title="{% trans 'Creation' context 'Sheet' %}">
+ <i class="fa fa-plus-circle" aria-hidden="true"></i>
+ {{item.history_creator.ishtaruser.person}}
+ {{item.history_creator.ishtaruser.person|link_to_window:request}}<br/>
+ <small>{{item.history_creation_date|date:"DATETIME_FORMAT"}}</small>
</div>
{% endif %}
{% if not item.last_edition_date or item.history_creation_date != item.last_edition_date %}
-<div class="col-12 col-md-6 col-lg-3 flex-wrap">
- <dt>{% trans "Modification" context "Sheet" %}{{item.history_modifier.ishtaruser.person|link_to_window:request}}</dt>
- <dd>
- {{item.history_modifier.ishtaruser.person}}<br/>
- <small class="text-muted">{% firstof item.history_date|date:"DATETIME_FORMAT" item.history.all.0.history_date|date:"DATETIME_FORMAT" %}</small>
- </dd>
+<div class="col-12 col-md-6 col-lg-3 flex-wrap text-muted"
+ title="{% trans 'Modification' context 'Sheet' %}">
+ <i class="fa fa-pencil" aria-hidden="true"></i>
+ {{item.history_modifier.ishtaruser.person}}
+ {{item.history_modifier.ishtaruser.person|link_to_window:request}}<br/>
+ <small>{% firstof item.history_date|date:"DATETIME_FORMAT" item.history.all.0.history_date|date:"DATETIME_FORMAT" %}</small>
</div>
{% endif %}
diff --git a/ishtar_common/templates/ishtar/sheet_document.html b/ishtar_common/templates/ishtar/sheet_document.html
index 321125edd..0212b1695 100644
--- a/ishtar_common/templates/ishtar/sheet_document.html
+++ b/ishtar_common/templates/ishtar/sheet_document.html
@@ -11,42 +11,93 @@
{% block general %}
-{% if item.images.count %}
-<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">
- {% include "ishtar/blocks/window_image.html" %}
+{% if item.main_image %}
+<div class="clearfix">
+ <div class="card float-left col-12 col-md-4">
+ {% include "ishtar/blocks/window_image.html" %}
+ </div>
+ <div class="row float-left col-12 col-md-6 col-lg-8 text-center">
+{% else %}
+ <div class="row">
+{% endif %}
+
+ <h4 class="col-12">{% trans "Identification" %}</h4>
+ <div class="col-12 col-md-6 col-lg-3 flex-wrap">
+ <p class="window-refs"
+ title="{% trans 'Reference' %}">{{ item.reference|default:"" }}</p>
+ <p class="window-refs"
+ title="{% trans 'Internal reference' %}">{{ item.internal_reference|default:"" }}</p>
+ {% include "ishtar/blocks/sheet_external_id.html" %}
</div>
+ {% field_flex "Title" item.title %}
+ {% field_flex "Type" item.source_type_html "" "" 1 %}
+ {% include "ishtar/blocks/sheet_creation_section.html" %}
+
+ {% if item.format_type or item.support_type or item.scale %}
+ <h4 class="col-12">{% trans "Format" %}</h4>
+ {% field_flex "Format" item.format_type %}
+ {% field_flex "Support" item.support_type %}
+ {% field_flex "Scale" item.scale %}
+ {% endif %}
+
+ {% if item.associated_file or item.associated_url or item.tags.count %}
+ <h4 class="col-12">{% trans "Content" %}</h4>
+ {% trans "File" context "Not directory" as file_label %}
+ {% field_flex_file file_label item.associated_file %}
+ {% trans "Web link" as weblink_label %}
+ {% field_flex_url weblink_label item.associated_url %}
+ {% field_flex_multiple_obj "Tags" item 'tags' %}
+ {% endif %}
+
+ {% if item.authors.count %}
+ <h4 class="col-12">{% trans "Authors" %}</h4>
+ {% field_flex_full "" item.authors|add_links:'person' %}
+ {% endif %}
</div>
+{% if item.main_image %}
</div>
{% endif %}
-
<div class="row">
- {% field_flex "Title" item.title %}
- {% field_flex "Index" item.index %}
- {% field_flex "Source type" item.source_type_html "" "" 1 %}
- {% trans "File" context "Not directory" as file_label %}
- {% field_flex_file file_label item.associated_file %}
- {% field_flex "Format" item.format_type %}
- {% field_flex "Scale" item.scale %}
- {% trans "Web link" as weblink_label %}
- {% field_flex_url weblink_label item.associated_url %}
- {% if item.item_number != 1 %}{% field_flex "Item number" item.item_number %}{% endif %}
- {% field_flex "Ref." item.reference %}
- {% field_flex "Internal ref." item.internal_reference %}
+
+ {% if item.creation_date or item.receipt_date or item.receipt_date_in_documentation %}
+ <h4 class="col-12">{% trans "Dates" %}</h4>
+ {% field_flex "Creation date" item.creation_date|date:"DATE_FORMAT" %}
+ {% field_flex "Receipt date" item.receipt_date|date:"DATE_FORMAT" %}
+ {% field_flex "Receipt date in documentation" item.receipt_date_in_documentation|date:"DATE_FORMAT" %}
+ {% endif %}
+
+ {% if item.publisher or item.language or item.isbn or item.issn or item.licenses.count %}
+ <h4 class="col-12">{% trans "Publishing" %}</h4>
+ {% field_flex_detail "Publisher" item.publisher %}
+ {% field_flex "Language" item.language %}
+ {% field_flex "ISBN" item.isbn %}
+ {% field_flex "ISSN" item.issn %}
+ {% field_flex_multiple_obj "Licenses" item 'licenses' %}
+ {% endif %}
+
+ {% if item.source or item.source_free_input %}
+ <h4 class="col-12">{% trans "Source" %}</h4>
+ {% field_flex_detail "Source" item.source %}
+ {% field_flex "" item.source_free_input %}
+ {% endif %}
+
+ {% if item.container or item.container_ref or item.item_number != 1 or item.duplicate %}
+ <h4 class="col-12">{% trans "Container" %}</h4>
{% field_flex_detail "Container" item.container %}
{% field_flex_detail "Reference container" item.container_ref %}
- {% field_flex "Creation date" item.creation_date %}
- {% field_flex "Receipt date" item.receipt_date %}
- {% field_flex "Receipt date in documentation" item.receipt_date_in_documentation %}
+ {% if item.item_number != 1 %}{% field_flex "Item number" item.item_number %}{% endif %}
{% if item.duplicate %}{% field_flex "Has a duplicate" item.duplicate %}{% endif %}
- {% field_flex "Description" item.description %}
- {% field_flex "Comment" item.comment %}
- {% field_flex "Additional information" item.additional_information %}
- {% field_flex_full "Authors" item.authors|add_links:'person' %}
+ {% endif %}
+
+ {% if item.description or item.comment or item.additional_information %}
+ <h4 class="col-12">{% trans "Other" %}</h4>
+ {% field_flex_full "Description" item.description %}
+ {% field_flex_full "Comment" item.comment %}
+ {% field_flex_full "Additional information" item.additional_information %}
+ {% endif %}
+ </div>
</div>
<div class="row">
- {% include "ishtar/blocks/sheet_creation_section.html" %}
</div>
{% include "ishtar/blocks/sheet_json.html" %}