From f6fe204ef36dfbafae1603055824266f6ff82ea8 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Wed, 17 Jan 2018 18:12:36 +0100 Subject: UI: work on sheet display --- .../templates/ishtar/sheet_contextrecord.html | 9 ++- ishtar_common/static/media/styles.css | 4 -- .../templates/ishtar/sheet_organization.html | 22 ++++--- ishtar_common/templates/ishtar/sheet_person.html | 73 +++++++++++----------- 4 files changed, 57 insertions(+), 51 deletions(-) diff --git a/archaeological_context_records/templates/ishtar/sheet_contextrecord.html b/archaeological_context_records/templates/ishtar/sheet_contextrecord.html index e1ea9019b..93a9b67d2 100644 --- a/archaeological_context_records/templates/ishtar/sheet_contextrecord.html +++ b/archaeological_context_records/templates/ishtar/sheet_contextrecord.html @@ -1,10 +1,13 @@ {% extends "ishtar/sheet.html" %} -{% load i18n window_field window_header window_tables %} +{% load i18n window_field window_header window_tables window_field %} -{% block head_title %}{% trans "Context Record" %}{% endblock %} +{% block head_title %}{% trans "Context Record:" %}{{item.full_label}}{% endblock %} -{% block content %} +{% block toolbar %} {% window_nav item window_id 'show-contextrecord' 'record_modify' 'show-historized-contextrecord' 'revert-contextrecord' previous next 1 %} +{% endblock %} + +{% block content %} {% if item.image %} diff --git a/ishtar_common/static/media/styles.css b/ishtar_common/static/media/styles.css index 3db227c99..771a13747 100644 --- a/ishtar_common/static/media/styles.css +++ b/ishtar_common/static/media/styles.css @@ -90,10 +90,6 @@ div#foot{ text-align: center; } -.sheet{ - font-size: 0.9em; -} - .sheet .card-body{ padding: 0.5em; } diff --git a/ishtar_common/templates/ishtar/sheet_organization.html b/ishtar_common/templates/ishtar/sheet_organization.html index 403eb7dec..483a97ef1 100644 --- a/ishtar_common/templates/ishtar/sheet_organization.html +++ b/ishtar_common/templates/ishtar/sheet_organization.html @@ -1,18 +1,22 @@ {% extends "ishtar/sheet.html" %} -{% load i18n window_header window_tables %} +{% load i18n window_header window_field window_tables %} -{% block head_title %}{% trans "Organization" %}{% endblock %} +{% block head_title %}{% trans "Organization:" %} {{item.name}}{% endblock %} -{% block content %} +{% block toolbar %} {% window_nav item window_id 'show-organization' 'organization_modify' %} -

{{item.name}}

-

{{ item.history_creator.ishtaruser.person }}

-{% include "ishtar/blocks/sheet_address_section.html" %} -{% if item.phone %}

{{item.phone}}

{% endif %} -{% if item.mobile_phone %}

{{item.mobile_phone}}

{% endif %} +{% endblock %} +{% block content %} +
+ {% field_flex "Name" item.name %} + {% field_flex_detail "Created by" item.history_creator.ishtaruser.person %} + {% include "ishtar/blocks/sheet_address_section.html" %} + {% field_flex "Phone" item.phone %} + {% field_flex "Mobile phone" item.mobile_phone %} +
- +
diff --git a/ishtar_common/templates/ishtar/sheet_person.html b/ishtar_common/templates/ishtar/sheet_person.html index aa5192dc4..b9a7055b8 100644 --- a/ishtar_common/templates/ishtar/sheet_person.html +++ b/ishtar_common/templates/ishtar/sheet_person.html @@ -1,23 +1,26 @@ {% extends "ishtar/sheet.html" %} {% load i18n window_field window_tables window_header %} -{% block head_title %}{% trans "Person"%}{% endblock %} -{% block content %} +{% block head_title %}{% trans "Person:"%} {{item}}{% endblock %} + +{% block toolbar %} {% window_nav item window_id 'show-person' 'person_modify' %} -

{% trans "Identity" %}

- - +{% endblock %} + +{% block content %} + +
+{% field_flex "Title" item.full_title %} +{% field_flex "Name" item.name %} +{% field_flex "Surname" item.surname %} +{% field_flex "Raw name" item.raw_name %} +{% field_flex_detail "Created by" item.history_creator.ishtaruser.person %} +{% field_flex "Email" item.email %} +{% field_flex "Type(s)" item.person_types_list %} +
{% if item.phone or item.phone2 or item.phone3 or item.mobile_phone %} -
{%trans "Person in the organization"%}
{% trans "Name" %}
+
@@ -44,33 +47,33 @@ {% if item.address or item.postal_code or item.town %}

{% trans "Business address" %}

-{% endif %} +
+ {% field_flex "Address" item.address %} + {% field_flex "Address complement" item.address_complement %} + {% field_flex "Postal code" item.postal_code %} + {% field_flex "Town" item.town %} +
{% endif %} {% if item.alt_address or item.alt_postal_code or item.alt_town %}

{% trans "Other address" %}

-{% endif %} +
+ {% field_flex "Address" item.alt_address %} + {% field_flex "Address complement" item.alt_address_complement %} + {% field_flex "Postal code" item.alt_postal_code %} + {% field_flex "Town" item.alt_town %} +
{% endif %} {% if item.attached_to %}

{% trans "Associated organization"%}

-{% endif %} +
+ {% field_flex_detail "Name" item.attached_to %} + {% field_flex "Address" item.attached_to.address %} + {% field_flex "Address complement" item.attached_to.address_complement %} + {% field_flex "Postal code" item.attached_to.postal_code %} + {% field_flex "Town" item.attached_to.town %} + {% field_flex "Phone" item.attached_to.phone %} + {% field_flex "Mobile phone" item.attached_to.mobile_phone %} +
{% endif %} {% trans "Associated operations as scientist" as ao %} -- cgit v1.2.3
{% trans "Phone" %}
{% trans "Phone type" %}