# 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
This commit is contained in:
2022-02-02 14:18:44 +01:00
parent 77b59db56f
commit 874b266352
22 changed files with 267 additions and 238 deletions

View File

@@ -20,16 +20,13 @@
</div>
</div>
</div>
<div class="card-body scroll-300">
<div class="card-body scroll-300 p-2">
<table class="table table-hover">
<thead>
<tr>
<th class="w-25" scope="col">
{% trans 'Action type' %}
</th>
<th class="w-25" scope="col">
{% trans 'Action type details' %}
</th>
<th scope="col">
{% trans 'Amount' context 'Compensation' %}
</th>
@@ -37,30 +34,35 @@
{% trans 'Comment' %}
</th>
<th scope="col">
{% trans 'Action' %}
<span class="float-right">
{% trans 'Action' %}
</span>
</th>
</tr>
</thead>
<tbody>
{% for action in obj.actions.all %}
<tr>
<td class="align-middle">
{{ action.action_type }}
<td class="">
<span>{{ action.action_type }}</span>
{% if action.action_type_details.count > 0 %}
<hr>
<span>{% trans 'Action type details' %}:</span>
{% for detail in action.action_type_details.all %}
<br>
<div class="badge badge-pill rlp-r" title="{{detail}}">{{detail.long_name}}</div>
{% endfor %}
{% endif %}
</td>
<td class="align-middle">
{% for detail in action.action_type_details.all %}
<div class="mb-2" title="{{detail}}">{{detail.long_name}}</div>
{% endfor %}
</td>
<td class="align-middle">{{ action.amount|floatformat:2|intcomma }} {{ action.unit_humanize }}</td>
<td class="align-middle">
<td class="">{{ action.amount|floatformat:2|intcomma }} {{ action.unit_humanize }}</td>
<td class="">
<div class="scroll-150">
{{ action.comment }}
</div>
</td>
<td class="align-middle">
<td class="">
{% if is_default_member and has_access %}
<button data-form-url="{% url 'ema:action-remove' obj.id action.id %}" class="btn btn-default btn-modal" title="{% trans 'Remove action' %}">
<button data-form-url="{% url 'ema:action-remove' obj.id action.id %}" class="btn btn-default btn-modal float-right" title="{% trans 'Remove action' %}">
{% fa5_icon 'trash' %}
</button>
{% endif %}

View File

@@ -20,7 +20,7 @@
</div>
</div>
</div>
<div class="card-body scroll-300">
<div class="card-body scroll-300 p-2">
<table class="table table-hover">
<thead>
<tr>
@@ -34,7 +34,9 @@
{% trans 'Comment' %}
</th>
<th scope="col">
{% trans 'Action' %}
<span class="float-right">
{% trans 'Action' %}
</span>
</th>
</tr>
</thead>
@@ -52,7 +54,7 @@
</td>
<td class="align-middle">
{% if is_default_member and has_access %}
<button data-form-url="{% url 'ema:deadline-remove' obj.id deadline.id %}" class="btn btn-default btn-modal" title="{% trans 'Remove deadline' %}">
<button data-form-url="{% url 'ema:deadline-remove' obj.id deadline.id %}" class="btn btn-default btn-modal float-right" title="{% trans 'Remove deadline' %}">
{% fa5_icon 'trash' %}
</button>
{% endif %}

View File

@@ -20,7 +20,7 @@
</div>
</div>
</div>
<div class="card-body scroll-300">
<div class="card-body scroll-300 p-2">
<table class="table table-hover">
<thead>
<tr>
@@ -31,7 +31,9 @@
{% trans 'Comment' %}
</th>
<th scope="col">
{% trans 'Action' %}
<span class="float-right">
{% trans 'Action' %}
</span>
</th>
</tr>
</thead>
@@ -50,7 +52,7 @@
</td>
<td class="align-middle">
{% if is_default_member and has_access %}
<button data-form-url="{% url 'ema:remove-doc' doc.id %}" class="btn btn-default btn-modal" title="{% trans 'Remove document' %}">
<button data-form-url="{% url 'ema:remove-doc' doc.id %}" class="btn btn-default btn-modal float-right" title="{% trans 'Remove document' %}">
{% fa5_icon 'trash' %}
</button>
{% endif %}

View File

@@ -20,46 +20,46 @@
</div>
</div>
</div>
<div class="card-body scroll-300">
{% if sum_before_states > sum_after_states %}
<div class="row alert alert-danger">
{% trans 'Missing surfaces according to states before: ' %}{{ diff_states|floatformat:2 }} m²
</div>
{% endif %}
{% if sum_before_states > sum_after_states %}
<div class="alert alert-danger mb-0">
{% trans 'Missing surfaces according to states before: ' %}{{ diff_states|floatformat:2 }} m²
</div>
{% endif %}
<div class="card-body scroll-300 p-2">
<table class="table table-hover">
<thead>
<tr>
<th class="w-25" scope="col">
<th class="w-50" scope="col">
{% trans 'Biotope type' %}
</th>
<th class="w-25" scope="col">
{% trans 'Biotope additional type' %}
</th>
<th scope="col">
{% trans 'Surface' %}
</th>
<th scope="col">
{% trans 'Action' %}
<span class="float-right">
{% trans 'Action' %}
</span>
</th>
</tr>
</thead>
<tbody>
{% for state in after_states %}
<tr>
<td class="align-middle">
{{ state.biotope_type }}
<td>
<span>{{ state.biotope_type }}</span>
{% if state.biotope_type_details.count > 0 %}
<hr>
<span>{% trans 'Biotope additional type' %}:</span>
{% for detail in state.biotope_type_details.all %}
<br>
<div class="badge badge-pill rlp-r" title="{{detail}}">{{detail.long_name}}</div>
{% endfor %}
{% endif %}
</td>
<td class="align-middle">
{% for biotope_extra in state.biotope_type_details.all %}
<div class="mb-2" title="{{ biotope_extra }}">
{{ biotope_extra.long_name }}
</div>
{% endfor %}
</td>
<td class="align-middle">{{ state.surface|floatformat:2 }} m²</td>
<td class="align-middle">
<td>{{ state.surface|floatformat:2 }} m²</td>
<td>
{% if is_default_member and has_access %}
<button data-form-url="{% url 'ema:state-remove' obj.id state.id %}" class="btn btn-default btn-modal" title="{% trans 'Remove state' %}">
<button data-form-url="{% url 'ema:state-remove' obj.id state.id %}" class="btn btn-default btn-modal float-right" title="{% trans 'Remove state' %}">
{% fa5_icon 'trash' %}
</button>
{% endif %}

View File

@@ -20,46 +20,46 @@
</div>
</div>
</div>
<div class="card-body scroll-300">
{% if sum_before_states < sum_after_states %}
<div class="row alert alert-danger">
{% trans 'Missing surfaces according to states after: ' %}{{ diff_states|floatformat:2 }} m²
</div>
{% endif %}
{% if sum_before_states < sum_after_states %}
<div class="alert alert-danger mb-0">
{% trans 'Missing surfaces according to states after: ' %}{{ diff_states|floatformat:2 }} m²
</div>
{% endif %}
<div class="card-body scroll-300 p-2">
<table class="table table-hover">
<thead>
<tr>
<th class="w-25" scope="col">
<th class="w-50" scope="col">
{% trans 'Biotope type' %}
</th>
<th class="w-25" scope="col">
{% trans 'Biotope additional type' %}
</th>
<th scope="col">
{% trans 'Surface' %}
</th>
<th scope="col">
{% trans 'Action' %}
<span class="float-right">
{% trans 'Action' %}
</span>
</th>
</tr>
</thead>
<tbody>
{% for state in before_states %}
<tr>
<td class="align-middle">
{{ state.biotope_type }}
<td>
<span>{{ state.biotope_type }}</span>
{% if state.biotope_type_details.count > 0 %}
<hr>
<span>{% trans 'Biotope additional type' %}:</span>
{% for detail in state.biotope_type_details.all %}
<br>
<div class="badge badge-pill rlp-r" title="{{detail}}">{{detail.long_name}}</div>
{% endfor %}
{% endif %}
</td>
<td class="align-middle">
{% for biotope_extra in state.biotope_type_details.all %}
<div class="mb-2" title="{{ biotope_extra }}">
{{ biotope_extra.long_name }}
</div>
{% endfor %}
</td>
<td class="align-middle">{{ state.surface|floatformat:2 }} m²</td>
<td class="align-middle">
<td>{{ state.surface|floatformat:2 }} m²</td>
<td>
{% if is_default_member and has_access %}
<button data-form-url="{% url 'ema:state-remove' obj.id state.id %}" class="btn btn-default btn-modal" title="{% trans 'Remove state' %}">
<button data-form-url="{% url 'ema:state-remove' obj.id state.id %}" class="btn btn-default btn-modal float-right" title="{% trans 'Remove state' %}">
{% fa5_icon 'trash' %}
</button>
{% endif %}