From 4bff5f2548de61656bf209c2f56d395303308b8a Mon Sep 17 00:00:00 2001 From: mpeltriaux Date: Wed, 2 Feb 2022 14:18:44 +0100 Subject: [PATCH] # 86 Visual improvements * moves message rendering directly below navigation menu for a more closed look * reworks message rendering on before_states and after_states for all compensation related datatypes * reworks layout of action column on all related data card tables * resizes certain attribute layouts on related data card tables * reworks layout of details on CompensationState and CompensationAction rendering from own column into subgrouped placement of main type info * drops align-middle placement for all related data card table contents --- .../detail/compensation/includes/actions.html | 36 ++++++++------- .../compensation/includes/deadlines.html | 8 ++-- .../compensation/includes/documents.html | 8 ++-- .../compensation/includes/states-after.html | 46 +++++++++---------- .../compensation/includes/states-before.html | 46 +++++++++---------- .../detail/eco_account/includes/actions.html | 36 ++++++++------- .../eco_account/includes/deadlines.html | 8 ++-- .../eco_account/includes/deductions.html | 8 ++-- .../eco_account/includes/documents.html | 8 ++-- .../eco_account/includes/states-after.html | 46 +++++++++---------- .../eco_account/includes/states-before.html | 46 +++++++++---------- .../ema/detail/includes/actions.html | 34 +++++++------- .../ema/detail/includes/deadlines.html | 8 ++-- .../ema/detail/includes/documents.html | 8 ++-- .../ema/detail/includes/states-after.html | 46 +++++++++---------- .../ema/detail/includes/states-before.html | 46 +++++++++---------- .../detail/includes/compensations.html | 10 ++-- .../detail/includes/deductions.html | 10 ++-- .../detail/includes/documents.html | 16 ++++--- .../detail/includes/payments.html | 10 ++-- .../detail/includes/revocation.html | 8 ++-- templates/base.html | 13 +++--- 22 files changed, 267 insertions(+), 238 deletions(-) diff --git a/compensation/templates/compensation/detail/compensation/includes/actions.html b/compensation/templates/compensation/detail/compensation/includes/actions.html index 129673e..806d19f 100644 --- a/compensation/templates/compensation/detail/compensation/includes/actions.html +++ b/compensation/templates/compensation/detail/compensation/includes/actions.html @@ -21,16 +21,13 @@ -
+
- - @@ -39,7 +36,9 @@ {% if is_default_member and has_access %} {% endif %} @@ -47,23 +46,26 @@ {% for action in actions %} - - - - + -
+ {% trans 'Action type' %} - {% trans 'Action type details' %} - {% trans 'Amount' context 'Compensation' %} - {% trans 'Action' %} + + {% trans 'Action' %} +
- {{ action.action_type }} - - {% for detail in action.action_type_details.all %} -
{{detail.long_name}}
- {% endfor %} +
+ {{ action.action_type }} + {% if action.action_type_details.count > 0 %} +
+ {% trans 'Action type details' %}: + {% for detail in action.action_type_details.all %} +
+
{{detail.long_name}}
+ {% endfor %} + {% endif %}
{{ action.amount|floatformat:2|intcomma }} {{ action.unit_humanize }} + {{ action.amount|floatformat:2|intcomma }} {{ action.unit_humanize }}
{{ action.comment }}
+ {% if is_default_member and has_access %} - {% endif %} diff --git a/compensation/templates/compensation/detail/compensation/includes/deadlines.html b/compensation/templates/compensation/detail/compensation/includes/deadlines.html index dcf3894..da4e21d 100644 --- a/compensation/templates/compensation/detail/compensation/includes/deadlines.html +++ b/compensation/templates/compensation/detail/compensation/includes/deadlines.html @@ -20,7 +20,7 @@ -
+
@@ -35,7 +35,9 @@ {% if is_default_member and has_access %} {% endif %} @@ -54,7 +56,7 @@
- {% trans 'Action' %} + + {% trans 'Action' %} +
{% if is_default_member and has_access %} - {% endif %} diff --git a/compensation/templates/compensation/detail/compensation/includes/documents.html b/compensation/templates/compensation/detail/compensation/includes/documents.html index 108db76..0615d4b 100644 --- a/compensation/templates/compensation/detail/compensation/includes/documents.html +++ b/compensation/templates/compensation/detail/compensation/includes/documents.html @@ -20,7 +20,7 @@ -
+
@@ -32,7 +32,9 @@ {% if is_default_member and has_access %} {% endif %} @@ -52,7 +54,7 @@
- {% trans 'Action' %} + + {% trans 'Action' %} +
{% if is_default_member and has_access %} - {% endif %} diff --git a/compensation/templates/compensation/detail/compensation/includes/states-after.html b/compensation/templates/compensation/detail/compensation/includes/states-after.html index 408689a..026d0a5 100644 --- a/compensation/templates/compensation/detail/compensation/includes/states-after.html +++ b/compensation/templates/compensation/detail/compensation/includes/states-after.html @@ -20,27 +20,26 @@ -
- {% if sum_before_states > sum_after_states %} -
- {% trans 'Missing surfaces according to states before: ' %}{{ diff_states|floatformat:2 }} m² -
- {% endif %} + {% if sum_before_states > sum_after_states %} +
+ {% trans 'Missing surfaces according to states before: ' %}{{ diff_states|floatformat:2 }} m² +
+ {% endif %} +
- - {% if is_default_member and has_access %} {% endif %} @@ -48,20 +47,21 @@ {% for state in after_states %} - - - - +
+ {% trans 'Biotope type' %} - {% trans 'Biotope additional type' %} - {% trans 'Surface' %} - {% trans 'Action' %} + + {% trans 'Action' %} +
- {{ state.biotope_type }} - - {% for biotope_extra in state.biotope_type_details.all %} -
- {{ biotope_extra.long_name }} -
- {% endfor %} +
+ {{ state.biotope_type }} + {% if state.biotope_type_details.count > 0 %} +
+ {% trans 'Biotope additional type' %}: + {% for detail in state.biotope_type_details.all %} +
+
{{detail.long_name}}
+ {% endfor %} + {% endif %}
{{ state.surface|floatformat:2 }} m² + {{ state.surface|floatformat:2 }} m² {% if is_default_member and has_access %} - {% endif %} diff --git a/compensation/templates/compensation/detail/compensation/includes/states-before.html b/compensation/templates/compensation/detail/compensation/includes/states-before.html index 991f6c2..b9eeb34 100644 --- a/compensation/templates/compensation/detail/compensation/includes/states-before.html +++ b/compensation/templates/compensation/detail/compensation/includes/states-before.html @@ -20,27 +20,26 @@ -
- {% if sum_before_states < sum_after_states %} -
- {% trans 'Missing surfaces according to states after: ' %}{{ diff_states|floatformat:2 }} m² -
- {% endif %} + {% if sum_before_states < sum_after_states %} +
+ {% trans 'Missing surfaces according to states after: ' %}{{ diff_states|floatformat:2 }} m² +
+ {% endif %} +
- - {% if is_default_member and has_access %} {% endif %} @@ -48,20 +47,21 @@ {% for state in before_states %} - - - - +
+ {% trans 'Biotope type' %} - {% trans 'Biotope additional type' %} - {% trans 'Surface' %} - {% trans 'Action' %} + + {% trans 'Action' %} +
- {{ state.biotope_type }} - - {% for biotope_extra in state.biotope_type_details.all %} -
- {{ biotope_extra.long_name }} -
- {% endfor %} +
+ {{ state.biotope_type }} + {% if state.biotope_type_details.count > 0 %} +
+ {% trans 'Biotope additional type' %}: + {% for detail in state.biotope_type_details.all %} +
+
{{detail.long_name}}
+ {% endfor %} + {% endif %}
{{ state.surface|floatformat:2 }} m² + {{ state.surface|floatformat:2 }} m² {% if is_default_member and has_access %} - {% endif %} diff --git a/compensation/templates/compensation/detail/eco_account/includes/actions.html b/compensation/templates/compensation/detail/eco_account/includes/actions.html index b470174..2acd259 100644 --- a/compensation/templates/compensation/detail/eco_account/includes/actions.html +++ b/compensation/templates/compensation/detail/eco_account/includes/actions.html @@ -20,16 +20,13 @@ -
+
- - @@ -38,7 +35,9 @@ {% if is_default_member and has_access %} {% endif %} @@ -46,23 +45,26 @@ {% for action in actions %} - - - - + -
+ {% trans 'Action type' %} - {% trans 'Action type details' %} - {% trans 'Amount' context 'Compensation' %} - {% trans 'Action' %} + + {% trans 'Action' %} +
- {{ action.action_type }} - - {% for detail in action.action_type_details.all %} -
{{detail.long_name}}
- {% endfor %} +
+ {{ action.action_type }} + {% if action.action_type_details.count > 0 %} +
+ {% trans 'Action type details' %}: + {% for detail in action.action_type_details.all %} +
+
{{detail.long_name}}
+ {% endfor %} + {% endif %}
{{ action.amount|floatformat:2|intcomma }} {{ action.unit_humanize }} + {{ action.amount|floatformat:2|intcomma }} {{ action.unit_humanize }}
{{ action.comment }}
+ {% if is_default_member and has_access %} - {% endif %} diff --git a/compensation/templates/compensation/detail/eco_account/includes/deadlines.html b/compensation/templates/compensation/detail/eco_account/includes/deadlines.html index b57c4ad..ff8a529 100644 --- a/compensation/templates/compensation/detail/eco_account/includes/deadlines.html +++ b/compensation/templates/compensation/detail/eco_account/includes/deadlines.html @@ -20,7 +20,7 @@ -
+
@@ -34,7 +34,9 @@ {% trans 'Comment' %} @@ -52,7 +54,7 @@
- {% trans 'Action' %} + + {% trans 'Action' %} +
{% if is_default_member and has_access %} - {% endif %} diff --git a/compensation/templates/compensation/detail/eco_account/includes/deductions.html b/compensation/templates/compensation/detail/eco_account/includes/deductions.html index ca97f00..e72ab2a 100644 --- a/compensation/templates/compensation/detail/eco_account/includes/deductions.html +++ b/compensation/templates/compensation/detail/eco_account/includes/deductions.html @@ -20,7 +20,7 @@ -
+
@@ -37,7 +37,9 @@ {% trans 'Created' %} @@ -60,7 +62,7 @@
- {% trans 'Action' %} + + {% trans 'Action' %} +
{{ deduction.created.timestamp|default_if_none:""|naturalday}} {% if is_default_member and has_access %} - {% endif %} diff --git a/compensation/templates/compensation/detail/eco_account/includes/documents.html b/compensation/templates/compensation/detail/eco_account/includes/documents.html index 3c8d89a..b3895ea 100644 --- a/compensation/templates/compensation/detail/eco_account/includes/documents.html +++ b/compensation/templates/compensation/detail/eco_account/includes/documents.html @@ -20,7 +20,7 @@ -
+
@@ -31,7 +31,9 @@ {% trans 'Comment' %} @@ -50,7 +52,7 @@
- {% trans 'Action' %} + + {% trans 'Action' %} +
{% if is_default_member and has_access %} - {% endif %} diff --git a/compensation/templates/compensation/detail/eco_account/includes/states-after.html b/compensation/templates/compensation/detail/eco_account/includes/states-after.html index 17e7d44..0cec014 100644 --- a/compensation/templates/compensation/detail/eco_account/includes/states-after.html +++ b/compensation/templates/compensation/detail/eco_account/includes/states-after.html @@ -20,27 +20,26 @@ -
- {% if sum_before_states > sum_after_states %} -
- {% trans 'Missing surfaces according to states before: ' %}{{ diff_states|floatformat:2 }} m² -
- {% endif %} + {% if sum_before_states > sum_after_states %} +
+ {% trans 'Missing surfaces according to states before: ' %}{{ diff_states|floatformat:2 }} m² +
+ {% endif %} +
- - {% if is_default_member and has_access %} {% endif %} @@ -48,20 +47,21 @@ {% for state in after_states %} - - - - +
+ {% trans 'Biotope type' %} - {% trans 'Biotope additional type' %} - {% trans 'Surface' %} - {% trans 'Action' %} + + {% trans 'Action' %} +
- {{ state.biotope_type }} - - {% for biotope_extra in state.biotope_type_details.all %} -
- {{ biotope_extra.long_name }} -
- {% endfor %} +
+ {{ state.biotope_type }} + {% if state.biotope_type_details.count > 0 %} +
+ {% trans 'Biotope additional type' %}: + {% for detail in state.biotope_type_details.all %} +
+
{{detail.long_name}}
+ {% endfor %} + {% endif %}
{{ state.surface|floatformat:2 }} m² + {{ state.surface|floatformat:2 }} m² {% if is_default_member and has_access %} - {% endif %} diff --git a/compensation/templates/compensation/detail/eco_account/includes/states-before.html b/compensation/templates/compensation/detail/eco_account/includes/states-before.html index 3a1136c..8c4a094 100644 --- a/compensation/templates/compensation/detail/eco_account/includes/states-before.html +++ b/compensation/templates/compensation/detail/eco_account/includes/states-before.html @@ -20,27 +20,26 @@ -
- {% if sum_before_states < sum_after_states %} -
- {% trans 'Missing surfaces according to states after: ' %}{{ diff_states|floatformat:2 }} m² -
- {% endif %} + {% if sum_before_states < sum_after_states %} +
+ {% trans 'Missing surfaces according to states after: ' %}{{ diff_states|floatformat:2 }} m² +
+ {% endif %} +
- - {% if is_default_member and has_access %} {% endif %} @@ -48,20 +47,21 @@ {% for state in before_states %} - - - - +
+ {% trans 'Biotope type' %} - {% trans 'Biotope additional type' %} - {% trans 'Surface' %} - {% trans 'Action' %} + + {% trans 'Action' %} +
- {{ state.biotope_type }} - - {% for biotope_extra in state.biotope_type_details.all %} -
- {{ biotope_extra.long_name }} -
- {% endfor %} +
+ {{ state.biotope_type }} + {% if state.biotope_type_details.count > 0 %} +
+ {% trans 'Biotope additional type' %}: + {% for detail in state.biotope_type_details.all %} +
+
{{detail.long_name}}
+ {% endfor %} + {% endif %}
{{ state.surface|floatformat:2 }} m² + {{ state.surface|floatformat:2 }} m² {% if is_default_member and has_access %} - {% endif %} diff --git a/ema/templates/ema/detail/includes/actions.html b/ema/templates/ema/detail/includes/actions.html index 7425e3c..d585219 100644 --- a/ema/templates/ema/detail/includes/actions.html +++ b/ema/templates/ema/detail/includes/actions.html @@ -20,16 +20,13 @@ -
+
- @@ -37,30 +34,35 @@ {% trans 'Comment' %} {% for action in obj.actions.all %} - - - - + -
{% trans 'Action type' %} - {% trans 'Action type details' %} - {% trans 'Amount' context 'Compensation' %} - {% trans 'Action' %} + + {% trans 'Action' %} +
- {{ action.action_type }} - - {% for detail in action.action_type_details.all %} -
{{detail.long_name}}
- {% endfor %} +
+ {{ action.action_type }} + {% if action.action_type_details.count > 0 %} +
+ {% trans 'Action type details' %}: + {% for detail in action.action_type_details.all %} +
+
{{detail.long_name}}
+ {% endfor %} + {% endif %}
{{ action.amount|floatformat:2|intcomma }} {{ action.unit_humanize }} + {{ action.amount|floatformat:2|intcomma }} {{ action.unit_humanize }}
{{ action.comment }}
+ {% if is_default_member and has_access %} - {% endif %} diff --git a/ema/templates/ema/detail/includes/deadlines.html b/ema/templates/ema/detail/includes/deadlines.html index 83ba406..02efaf8 100644 --- a/ema/templates/ema/detail/includes/deadlines.html +++ b/ema/templates/ema/detail/includes/deadlines.html @@ -20,7 +20,7 @@ -
+
@@ -34,7 +34,9 @@ {% trans 'Comment' %} @@ -52,7 +54,7 @@
- {% trans 'Action' %} + + {% trans 'Action' %} +
{% if is_default_member and has_access %} - {% endif %} diff --git a/ema/templates/ema/detail/includes/documents.html b/ema/templates/ema/detail/includes/documents.html index 3218917..dbc8927 100644 --- a/ema/templates/ema/detail/includes/documents.html +++ b/ema/templates/ema/detail/includes/documents.html @@ -20,7 +20,7 @@ -
+
@@ -31,7 +31,9 @@ {% trans 'Comment' %} @@ -50,7 +52,7 @@
- {% trans 'Action' %} + + {% trans 'Action' %} +
{% if is_default_member and has_access %} - {% endif %} diff --git a/ema/templates/ema/detail/includes/states-after.html b/ema/templates/ema/detail/includes/states-after.html index db9e75b..0587640 100644 --- a/ema/templates/ema/detail/includes/states-after.html +++ b/ema/templates/ema/detail/includes/states-after.html @@ -20,46 +20,46 @@ -
- {% if sum_before_states > sum_after_states %} -
- {% trans 'Missing surfaces according to states before: ' %}{{ diff_states|floatformat:2 }} m² -
- {% endif %} + {% if sum_before_states > sum_after_states %} +
+ {% trans 'Missing surfaces according to states before: ' %}{{ diff_states|floatformat:2 }} m² +
+ {% endif %} +
- - {% for state in after_states %} - - - - +
+ {% trans 'Biotope type' %} - {% trans 'Biotope additional type' %} - {% trans 'Surface' %} - {% trans 'Action' %} + + {% trans 'Action' %} +
- {{ state.biotope_type }} - - {% for biotope_extra in state.biotope_type_details.all %} -
- {{ biotope_extra.long_name }} -
- {% endfor %} +
+ {{ state.biotope_type }} + {% if state.biotope_type_details.count > 0 %} +
+ {% trans 'Biotope additional type' %}: + {% for detail in state.biotope_type_details.all %} +
+
{{detail.long_name}}
+ {% endfor %} + {% endif %}
{{ state.surface|floatformat:2 }} m² + {{ state.surface|floatformat:2 }} m² {% if is_default_member and has_access %} - {% endif %} diff --git a/ema/templates/ema/detail/includes/states-before.html b/ema/templates/ema/detail/includes/states-before.html index a4da553..1d142ce 100644 --- a/ema/templates/ema/detail/includes/states-before.html +++ b/ema/templates/ema/detail/includes/states-before.html @@ -20,46 +20,46 @@ -
- {% if sum_before_states < sum_after_states %} -
- {% trans 'Missing surfaces according to states after: ' %}{{ diff_states|floatformat:2 }} m² -
- {% endif %} + {% if sum_before_states < sum_after_states %} +
+ {% trans 'Missing surfaces according to states after: ' %}{{ diff_states|floatformat:2 }} m² +
+ {% endif %} +
- - {% for state in before_states %} - - - - +
+ {% trans 'Biotope type' %} - {% trans 'Biotope additional type' %} - {% trans 'Surface' %} - {% trans 'Action' %} + + {% trans 'Action' %} +
- {{ state.biotope_type }} - - {% for biotope_extra in state.biotope_type_details.all %} -
- {{ biotope_extra.long_name }} -
- {% endfor %} +
+ {{ state.biotope_type }} + {% if state.biotope_type_details.count > 0 %} +
+ {% trans 'Biotope additional type' %}: + {% for detail in state.biotope_type_details.all %} +
+
{{detail.long_name}}
+ {% endfor %} + {% endif %}
{{ state.surface|floatformat:2 }} m² + {{ state.surface|floatformat:2 }} m² {% if is_default_member and has_access %} - {% endif %} diff --git a/intervention/templates/intervention/detail/includes/compensations.html b/intervention/templates/intervention/detail/includes/compensations.html index 79fcaa0..442d5d8 100644 --- a/intervention/templates/intervention/detail/includes/compensations.html +++ b/intervention/templates/intervention/detail/includes/compensations.html @@ -22,11 +22,11 @@ -
+
- {% if is_default_member and has_access %} {% endif %} @@ -50,7 +52,7 @@
+ {% trans 'Identifier' %} @@ -34,7 +34,9 @@ - {% trans 'Action' %} + + {% trans 'Action' %} +
{{ comp.title }} {% if is_default_member and has_access %} - {% endif %} diff --git a/intervention/templates/intervention/detail/includes/deductions.html b/intervention/templates/intervention/detail/includes/deductions.html index 3e320a1..bc16908 100644 --- a/intervention/templates/intervention/detail/includes/deductions.html +++ b/intervention/templates/intervention/detail/includes/deductions.html @@ -20,11 +20,11 @@ -
+
- {% if is_default_member and has_access %} {% endif %} @@ -55,7 +57,7 @@
+ {% trans 'Account Identifier' %} @@ -35,7 +35,9 @@ - {% trans 'Action' %} + + {% trans 'Action' %} +
{{ deduction.created.timestamp|default_if_none:""|naturalday}} {% if is_default_member and has_access %} - {% endif %} diff --git a/intervention/templates/intervention/detail/includes/documents.html b/intervention/templates/intervention/detail/includes/documents.html index b8e8ab3..f536f15 100644 --- a/intervention/templates/intervention/detail/includes/documents.html +++ b/intervention/templates/intervention/detail/includes/documents.html @@ -20,19 +20,21 @@ -
+
- {% if is_default_member and has_access %} {% endif %} @@ -40,19 +42,19 @@ {% for doc in obj.documents.all %} - - -
{% trans 'Title' %} + {% trans 'Comment' %} - {% trans 'Action' %} + + {% trans 'Action' %} +
+ {{ doc.title }} +
{{ doc.comment }}
+ {% if is_default_member and has_access %} - {% endif %} diff --git a/intervention/templates/intervention/detail/includes/payments.html b/intervention/templates/intervention/detail/includes/payments.html index 641f2c2..53a17f8 100644 --- a/intervention/templates/intervention/detail/includes/payments.html +++ b/intervention/templates/intervention/detail/includes/payments.html @@ -20,7 +20,7 @@ -
+
@@ -30,12 +30,14 @@ - {% if is_default_member and has_access %} {% endif %} @@ -54,7 +56,7 @@
{% trans 'Due on' %} + {% trans 'Comment' %} - {% trans 'Action' %} + + {% trans 'Action' %} +
{% if is_default_member and has_access %} - {% endif %} diff --git a/intervention/templates/intervention/detail/includes/revocation.html b/intervention/templates/intervention/detail/includes/revocation.html index 66e8926..9fb2989 100644 --- a/intervention/templates/intervention/detail/includes/revocation.html +++ b/intervention/templates/intervention/detail/includes/revocation.html @@ -23,7 +23,7 @@ -
+
@@ -38,7 +38,9 @@ {% if is_default_member and has_access %} {% endif %} @@ -63,7 +65,7 @@
- {% trans 'Action' %} + + {% trans 'Action' %} +
{% if is_default_member and has_access %} - {% endif %} diff --git a/templates/base.html b/templates/base.html index ccbd8f9..d0656ee 100644 --- a/templates/base.html +++ b/templates/base.html @@ -23,15 +23,14 @@ {% include 'navbars/navbar.html' %} {% endblock %} -
-
+
{% for message in messages %} -
- {{ message }} -
- {% endfor %} +
+ {{ message }}
- + {% endfor %} +
+
{% comment %} The modal wrapper, which can be used on every view can stay on the base.html template {% endcomment %}