diff options
Diffstat (limited to 'ishtar_common/templates')
13 files changed, 94 insertions, 43 deletions
diff --git a/ishtar_common/templates/ishtar/blocks/sheet_creation_section.html b/ishtar_common/templates/ishtar/blocks/sheet_creation_section.html new file mode 100644 index 000000000..e6ce31c25 --- /dev/null +++ b/ishtar_common/templates/ishtar/blocks/sheet_creation_section.html @@ -0,0 +1,19 @@ +{% load i18n link_to_window %} +{% if item.history_creator.ishtaruser.person %} +<li><label>{% trans "Creation" context "Sheet" %}</label> + <span class='value'> + {{item.history_creator.ishtaruser.person}} + {{item.history_creator.ishtaruser.person|link_to_window}} <br/> + <small><em>{{item.history_creation_date|date:"DATETIME_FORMAT"}}</em></small> + </span> +</li> +{% endif %} +{% if item.history_creation_date != item.last_edition_date %} +<li><label>{% trans "Modification" context "Sheet" %}</label> + <span class='value'> + {{item.history_modifier.ishtaruser.person}} + {{item.history_modifier.ishtaruser.person|link_to_window}} <br/> + <small><em>{% firstof item.history_date|date:"DATETIME_FORMAT" item.history.all.0.history_date|date:"DATETIME_FORMAT" %}</em></small> + </span> +</li> +{% endif %} diff --git a/ishtar_common/templates/ishtar/blocks/sheet_external_id.html b/ishtar_common/templates/ishtar/blocks/sheet_external_id.html new file mode 100644 index 000000000..95628ab15 --- /dev/null +++ b/ishtar_common/templates/ishtar/blocks/sheet_external_id.html @@ -0,0 +1,7 @@ +{% load i18n %}{% if item.external_id %} +<p class='window-refs external-id'> + <small title="{% trans 'Internal ID' %}"> + <i class="fa fa-key" aria-hidden="true"></i> + {{item.external_id|default:''}} + </small> +</p>{% endif %} diff --git a/ishtar_common/templates/ishtar/blocks/window_field.html b/ishtar_common/templates/ishtar/blocks/window_field.html index 969f32dbb..b52ed78ee 100644 --- a/ishtar_common/templates/ishtar/blocks/window_field.html +++ b/ishtar_common/templates/ishtar/blocks/window_field.html @@ -1,3 +1,3 @@ -{% load i18n %}{% if data %}{% if li %}<li>{% else %}<p>{% endif %}<label>{% trans caption %}{% trans ":"%}</label> +{% load i18n %}{% if data %}{% if li %}<li>{% else %}<p>{% endif %}<label>{% trans caption %}</label> <span class='value'>{{pre_data|safe}}{{data|linebreaksbr}}{{post_data|safe}}</span>{% if li %}</li>{% else %}</p>{% endif %} {% endif %} diff --git a/ishtar_common/templates/ishtar/blocks/window_field_detail.html b/ishtar_common/templates/ishtar/blocks/window_field_detail.html index 2be9c5ec4..594c67529 100644 --- a/ishtar_common/templates/ishtar/blocks/window_field_detail.html +++ b/ishtar_common/templates/ishtar/blocks/window_field_detail.html @@ -1,3 +1,3 @@ -{% load i18n %}{% if item %}{% if li %}<li>{% else %}<p>{% endif %}<label>{% trans caption %}{% trans ":"%}</label> +{% load i18n %}{% if item %}{% if li %}<li>{% else %}<p>{% endif %}<label>{% trans caption %}</label> <span class='value'>{{item}}{{link}}</span>{% if li %}</li>{% else %}</p>{% endif %} {% endif %} diff --git a/ishtar_common/templates/ishtar/blocks/window_field_multiple.html b/ishtar_common/templates/ishtar/blocks/window_field_multiple.html index cc817490c..f07630174 100644 --- a/ishtar_common/templates/ishtar/blocks/window_field_multiple.html +++ b/ishtar_common/templates/ishtar/blocks/window_field_multiple.html @@ -1,4 +1,4 @@ -{% load i18n %}{% if data.count %}{% if li %}<li>{% else %}<p>{% endif %}<label>{% trans caption %}{% trans ":"%}</label> +{% load i18n %}{% if data.count %}{% if li %}<li>{% else %}<p>{% endif %}<label>{% trans caption %}</label> <span class='value'>{% for d in data.all %} {% if forloop.counter0 %} ; {% endif %}{{ d }} {% endfor %}</span> diff --git a/ishtar_common/templates/ishtar/blocks/window_field_url.html b/ishtar_common/templates/ishtar/blocks/window_field_url.html index d63ebdca9..cd6365106 100644 --- a/ishtar_common/templates/ishtar/blocks/window_field_url.html +++ b/ishtar_common/templates/ishtar/blocks/window_field_url.html @@ -1,3 +1,3 @@ -{% load i18n %}{% if link %}{% if li %}<li>{% else %}<p>{% endif %}<p><label>{% trans caption %}{% trans ":"%}</label> +{% load i18n %}{% if link %}{% if li %}<li>{% else %}<p>{% endif %}<p><label>{% trans caption %}</label> <span class='value'><a target="_blank" href='{{link|safe}}'>{% if link_name %}{{link_name}}{% else %}{{link}}{% endif %}</a></span>{% if li %}</li>{% else %}</p>{% endif %} {% endif%} diff --git a/ishtar_common/templates/ishtar/display_item.html b/ishtar_common/templates/ishtar/display_item.html index e00fef05b..e1c63b775 100644 --- a/ishtar_common/templates/ishtar/display_item.html +++ b/ishtar_common/templates/ishtar/display_item.html @@ -4,7 +4,7 @@ <script type='text/javascript'> $(document).ready( function(){ - load_window("/show-{{item_type}}/{{pk}}/"); + load_window("{{show_url}}"); }); </script> {% endblock %} diff --git a/ishtar_common/templates/ishtar/import_delete.html b/ishtar_common/templates/ishtar/import_delete.html index 30217bf8d..4b48ebc8c 100644 --- a/ishtar_common/templates/ishtar/import_delete.html +++ b/ishtar_common/templates/ishtar/import_delete.html @@ -4,21 +4,22 @@ {% block content %} <h2>{{page_name}}</h2> <div class='form'> -<form action="." method="post">{% csrf_token %} -<p>{% trans "The current items are linked to this import:" %}</p> -{% for accessor, imported in object.get_all_imported %} -{% ifchanged imported|verbose_model_name %} -{% if forloop.counter %}</ul>{% endif %} -<h4>{{imported|verbose_model_name}}</h4> -<ul class='item-list'> -{%endifchanged%} - <li>{{imported}}</li> -{% endfor %} -</ul> -<p>{% trans "All these items will be deleted with this import." %}</p> -<strong>{% trans "Are you sure?" %}</strong> -<input type="submit" value="{% trans "Yes" %}"/> -</form> -<p><a href='{% url 'current_imports' %}'>{% trans "Back" %}</a></p> + <h3>{{object}}</h3> + <form action="." method="post">{% csrf_token %} + <p>{% trans "The current items are linked to this import:" %}</p> + {% for accessor, imported in object.get_all_imported %} + {% ifchanged imported|verbose_model_name %} + {% if forloop.counter %}</ul>{% endif %} + <h4>{{imported|verbose_model_name}}</h4> + <ul class='item-list'> + {%endifchanged%} + <li>{{imported}}</li> + {% endfor %} + </ul> + <p>{% trans "All these items will be deleted with this import." %}</p> + <strong>{% trans "Are you sure?" %}</strong> + <input type="submit" value="{% trans "Yes" %}"/> + </form> + <p><a href='{% url 'current_imports' %}'>{% trans "Back" %}</a></p> </div> {% endblock %} diff --git a/ishtar_common/templates/ishtar/import_list.html b/ishtar_common/templates/ishtar/import_list.html index 55a4ea883..5dba51b6f 100644 --- a/ishtar_common/templates/ishtar/import_list.html +++ b/ishtar_common/templates/ishtar/import_list.html @@ -8,8 +8,9 @@ <p>{% trans "No pending imports." %}</p> {% else %} <form action="." method="post">{% csrf_token %} -<table> +<table class="clean-table"> <tr> + <th>{% trans "Name" %}</th> <th>{% trans "Type" %}</th> <th>{% trans "File" context "file" %}</th> <th>{% trans "Creation" %}</th> @@ -19,13 +20,16 @@ {% for import in object_list %} <tr> <td> + {{import.name|default:"-"}} + </td> + <td> {{import.importer_type}} </td> <td> <a href='{{MEDIA_URL}}{{import.imported_file}}'>{% trans "Source file" %}</a> </td> <td> - {{import.creation_date}} + {{import.creation_date}} ({{import.user}}) </td> <td> {{import.status}} diff --git a/ishtar_common/templates/ishtar/manage_basket.html b/ishtar_common/templates/ishtar/manage_basket.html index de17f3ad7..a6065a7c2 100644 --- a/ishtar_common/templates/ishtar/manage_basket.html +++ b/ishtar_common/templates/ishtar/manage_basket.html @@ -1,5 +1,6 @@ {% extends "base.html" %} {% load i18n inline_formset %} +{% load url from future %} {% block content %} <h2>{{page_name}}{% trans ":"%} {{basket}}</h2> <form enctype="multipart/form-data" action="." method="post">{% csrf_token %} @@ -13,6 +14,16 @@ <h3>{% trans "Basket content" %}</h3> <div id='basket-content' style='text-align:left'> </div> + {% block "footer" %} + <div id="footer"> + <div id='validation-bar'> + <a href="{% url 'display-findbasket' basket.id %}" + id="validate-button" + class='button'>{% trans "Close" %}</a> + </div> + {% include 'ishtar/blocks/footer.html' %} + </div> + {% endblock %} </div> </form> <script type='text/javascript' language='javascript'> diff --git a/ishtar_common/templates/ishtar/sheet_person.html b/ishtar_common/templates/ishtar/sheet_person.html index 5339e4f07..aa5192dc4 100644 --- a/ishtar_common/templates/ishtar/sheet_person.html +++ b/ishtar_common/templates/ishtar/sheet_person.html @@ -6,6 +6,7 @@ {% window_nav item window_id 'show-person' 'person_modify' %} <h3>{% trans "Identity" %}</h3> +<ul class='form-flex'> {% field_li "Title" item.full_title %} {% field_li "Name" item.name %} {% field_li "Surname" item.surname %} @@ -13,6 +14,7 @@ {% field_li_detail "Created by" item.history_creator.ishtaruser.person %} {% field_li "Email" item.email %} {% field_li "Type(s)" item.person_types_list %} +</ul> {% if item.phone or item.phone2 or item.phone3 or item.mobile_phone %} <table class='formset table-form'> @@ -42,30 +44,33 @@ {% if item.address or item.postal_code or item.town %} <h3>{% trans "Business address" %}</h3> -{% field_li "Address" item.address %} -{% field_li "Address complement" item.address_complement %} -{% field_li "Postal code" item.postal_code %} -{% field_li "Town" item.town %} -{% endif %} +<ul class='form-flex'> + {% field_li "Address" item.address %} + {% field_li "Address complement" item.address_complement %} + {% field_li "Postal code" item.postal_code %} + {% field_li "Town" item.town %} +</ul>{% endif %} {% if item.alt_address or item.alt_postal_code or item.alt_town %} <h3>{% trans "Other address" %}</h3> -{% field_li "Address" item.alt_address %} -{% field_li "Address complement" item.alt_address_complement %} -{% field_li "Postal code" item.alt_postal_code %} -{% field_li "Town" item.alt_town %} -{% endif %} +<ul class='form-flex'> + {% field_li "Address" item.alt_address %} + {% field_li "Address complement" item.alt_address_complement %} + {% field_li "Postal code" item.alt_postal_code %} + {% field_li "Town" item.alt_town %} +</ul>{% endif %} {% if item.attached_to %}<h3>{% trans "Associated organization"%}</h3> -{% field_li "Name" item.attached_to %} -{% field_li "Address" item.attached_to.address %} -{% field_li "Address complement" item.attached_to.address_complement %} -{% field_li "Postal code" item.attached_to.postal_code %} -{% field_li "Town" item.attached_to.town %} -{% field_li "Phone" item.attached_to.phone %} -{% field_li "Mobile phone" item.attached_to.mobile_phone %} -{% endif %} +<ul class='form-flex'> + {% field_li_detail "Name" item.attached_to %} + {% field_li "Address" item.attached_to.address %} + {% field_li "Address complement" item.attached_to.address_complement %} + {% field_li "Postal code" item.attached_to.postal_code %} + {% field_li "Town" item.attached_to.town %} + {% field_li "Phone" item.attached_to.phone %} + {% field_li "Mobile phone" item.attached_to.mobile_phone %} +</ul>{% endif %} {% trans "Associated operations as scientist" as ao %} diff --git a/ishtar_common/templates/ishtar/sheet_source.html b/ishtar_common/templates/ishtar/sheet_source.html index 1c00b684e..244ca1be3 100644 --- a/ishtar_common/templates/ishtar/sheet_source.html +++ b/ishtar_common/templates/ishtar/sheet_source.html @@ -5,7 +5,8 @@ {% block window_nav %}{% endblock %} {% block general %} {% block related %} -{% field "Related item" item.owner %} +{% trans "Related item" as related_item_label %} +{% field related_item_label item.owner %} {% endblock %} {% if item.image %} @@ -18,7 +19,8 @@ {% field_li "Source type" item.source_type %} {% field_li "Format type" item.format_type %} {% field_li "Scale" item.scale %} -{% field_li_url "Web link" item.associated_url %} + {% trans "Web link" as weblink_label %} + {% field_li_url weblink_label item.associated_url %} {% field_li "Item number" item.item_number %} {% field_li "Ref." item.reference %} {% field_li "Internal ref." item.internal_reference %} diff --git a/ishtar_common/templates/robots.txt b/ishtar_common/templates/robots.txt new file mode 100644 index 000000000..1f53798bb --- /dev/null +++ b/ishtar_common/templates/robots.txt @@ -0,0 +1,2 @@ +User-agent: * +Disallow: / |