#88 Extra biotope codes templates
* extends the detail view templates for all compensation related models to render extra CompensationState details as well * reduces number of landing page news from 4 to 3 * improves .card-text in favor of .scroll-150 * improves .card font size
This commit is contained in:
parent
68eb773e43
commit
2439f37b69
@ -29,9 +29,12 @@
|
|||||||
<table class="table table-hover">
|
<table class="table table-hover">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="col">
|
<th class="w-25" scope="col">
|
||||||
{% trans 'Biotope type' %}
|
{% trans 'Biotope type' %}
|
||||||
</th>
|
</th>
|
||||||
|
<th class="w-25" scope="col">
|
||||||
|
{% trans 'Biotope additional type' %}
|
||||||
|
</th>
|
||||||
<th scope="col">
|
<th scope="col">
|
||||||
{% trans 'Surface' %}
|
{% trans 'Surface' %}
|
||||||
</th>
|
</th>
|
||||||
@ -48,8 +51,15 @@
|
|||||||
<td class="align-middle">
|
<td class="align-middle">
|
||||||
{{ state.biotope_type }}
|
{{ state.biotope_type }}
|
||||||
</td>
|
</td>
|
||||||
|
<td class="align-middle">
|
||||||
|
{% for biotope_extra in state.biotope_extra_types.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">{{ state.surface|floatformat:2 }} m²</td>
|
||||||
<td>
|
<td class="align-middle">
|
||||||
{% if is_default_member and has_access %}
|
{% if is_default_member and has_access %}
|
||||||
<button data-form-url="{% url 'compensation:state-remove' obj.id state.id %}" class="btn btn-default btn-modal" title="{% trans 'Remove state' %}">
|
<button data-form-url="{% url 'compensation:state-remove' obj.id state.id %}" class="btn btn-default btn-modal" title="{% trans 'Remove state' %}">
|
||||||
{% fa5_icon 'trash' %}
|
{% fa5_icon 'trash' %}
|
||||||
|
@ -29,9 +29,12 @@
|
|||||||
<table class="table table-hover">
|
<table class="table table-hover">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="col">
|
<th class="w-25" scope="col">
|
||||||
{% trans 'Biotope type' %}
|
{% trans 'Biotope type' %}
|
||||||
</th>
|
</th>
|
||||||
|
<th class="w-25" scope="col">
|
||||||
|
{% trans 'Biotope additional type' %}
|
||||||
|
</th>
|
||||||
<th scope="col">
|
<th scope="col">
|
||||||
{% trans 'Surface' %}
|
{% trans 'Surface' %}
|
||||||
</th>
|
</th>
|
||||||
@ -48,8 +51,15 @@
|
|||||||
<td class="align-middle">
|
<td class="align-middle">
|
||||||
{{ state.biotope_type }}
|
{{ state.biotope_type }}
|
||||||
</td>
|
</td>
|
||||||
|
<td class="align-middle">
|
||||||
|
{% for biotope_extra in state.biotope_extra_types.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">{{ state.surface|floatformat:2 }} m²</td>
|
||||||
<td>
|
<td class="align-middle">
|
||||||
{% if is_default_member and has_access %}
|
{% if is_default_member and has_access %}
|
||||||
<button data-form-url="{% url 'compensation:state-remove' obj.id state.id %}" class="btn btn-default btn-modal" title="{% trans 'Remove state' %}">
|
<button data-form-url="{% url 'compensation:state-remove' obj.id state.id %}" class="btn btn-default btn-modal" title="{% trans 'Remove state' %}">
|
||||||
{% fa5_icon 'trash' %}
|
{% fa5_icon 'trash' %}
|
||||||
|
@ -29,9 +29,12 @@
|
|||||||
<table class="table table-hover">
|
<table class="table table-hover">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="col">
|
<th class="w-25" scope="col">
|
||||||
{% trans 'Biotope type' %}
|
{% trans 'Biotope type' %}
|
||||||
</th>
|
</th>
|
||||||
|
<th class="w-25" scope="col">
|
||||||
|
{% trans 'Biotope additional type' %}
|
||||||
|
</th>
|
||||||
<th scope="col">
|
<th scope="col">
|
||||||
{% trans 'Surface' %}
|
{% trans 'Surface' %}
|
||||||
</th>
|
</th>
|
||||||
@ -48,8 +51,15 @@
|
|||||||
<td class="align-middle">
|
<td class="align-middle">
|
||||||
{{ state.biotope_type }}
|
{{ state.biotope_type }}
|
||||||
</td>
|
</td>
|
||||||
|
<td class="align-middle">
|
||||||
|
{% for biotope_extra in state.biotope_extra_types.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">{{ state.surface|floatformat:2 }} m²</td>
|
||||||
<td>
|
<td class="align-middle">
|
||||||
{% if is_default_member and has_access %}
|
{% if is_default_member and has_access %}
|
||||||
<button data-form-url="{% url 'compensation:acc-state-remove' obj.id state.id %}" class="btn btn-default btn-modal" title="{% trans 'Remove state' %}">
|
<button data-form-url="{% url 'compensation:acc-state-remove' obj.id state.id %}" class="btn btn-default btn-modal" title="{% trans 'Remove state' %}">
|
||||||
{% fa5_icon 'trash' %}
|
{% fa5_icon 'trash' %}
|
||||||
|
@ -29,9 +29,12 @@
|
|||||||
<table class="table table-hover">
|
<table class="table table-hover">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="col">
|
<th class="w-25" scope="col">
|
||||||
{% trans 'Biotope type' %}
|
{% trans 'Biotope type' %}
|
||||||
</th>
|
</th>
|
||||||
|
<th class="w-25" scope="col">
|
||||||
|
{% trans 'Biotope additional type' %}
|
||||||
|
</th>
|
||||||
<th scope="col">
|
<th scope="col">
|
||||||
{% trans 'Surface' %}
|
{% trans 'Surface' %}
|
||||||
</th>
|
</th>
|
||||||
@ -48,8 +51,15 @@
|
|||||||
<td class="align-middle">
|
<td class="align-middle">
|
||||||
{{ state.biotope_type }}
|
{{ state.biotope_type }}
|
||||||
</td>
|
</td>
|
||||||
|
<td class="align-middle">
|
||||||
|
{% for biotope_extra in state.biotope_extra_types.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">{{ state.surface|floatformat:2 }} m²</td>
|
||||||
<td>
|
<td class="align-middle">
|
||||||
{% if is_default_member and has_access %}
|
{% if is_default_member and has_access %}
|
||||||
<button data-form-url="{% url 'compensation:acc-state-remove' obj.id state.id %}" class="btn btn-default btn-modal" title="{% trans 'Remove state' %}">
|
<button data-form-url="{% url 'compensation:acc-state-remove' obj.id state.id %}" class="btn btn-default btn-modal" title="{% trans 'Remove state' %}">
|
||||||
{% fa5_icon 'trash' %}
|
{% fa5_icon 'trash' %}
|
||||||
|
@ -29,9 +29,12 @@
|
|||||||
<table class="table table-hover">
|
<table class="table table-hover">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="col">
|
<th class="w-25" scope="col">
|
||||||
{% trans 'Biotope type' %}
|
{% trans 'Biotope type' %}
|
||||||
</th>
|
</th>
|
||||||
|
<th class="w-25" scope="col">
|
||||||
|
{% trans 'Biotope additional type' %}
|
||||||
|
</th>
|
||||||
<th scope="col">
|
<th scope="col">
|
||||||
{% trans 'Surface' %}
|
{% trans 'Surface' %}
|
||||||
</th>
|
</th>
|
||||||
@ -46,8 +49,15 @@
|
|||||||
<td class="align-middle">
|
<td class="align-middle">
|
||||||
{{ state.biotope_type }}
|
{{ state.biotope_type }}
|
||||||
</td>
|
</td>
|
||||||
|
<td class="align-middle">
|
||||||
|
{% for biotope_extra in state.biotope_extra_types.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">{{ state.surface|floatformat:2 }} m²</td>
|
||||||
<td>
|
<td class="align-middle">
|
||||||
{% if is_default_member and has_access %}
|
{% 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" title="{% trans 'Remove state' %}">
|
||||||
{% fa5_icon 'trash' %}
|
{% fa5_icon 'trash' %}
|
||||||
|
@ -29,9 +29,12 @@
|
|||||||
<table class="table table-hover">
|
<table class="table table-hover">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="col">
|
<th class="w-25" scope="col">
|
||||||
{% trans 'Biotope type' %}
|
{% trans 'Biotope type' %}
|
||||||
</th>
|
</th>
|
||||||
|
<th class="w-25" scope="col">
|
||||||
|
{% trans 'Biotope additional type' %}
|
||||||
|
</th>
|
||||||
<th scope="col">
|
<th scope="col">
|
||||||
{% trans 'Surface' %}
|
{% trans 'Surface' %}
|
||||||
</th>
|
</th>
|
||||||
@ -46,8 +49,15 @@
|
|||||||
<td class="align-middle">
|
<td class="align-middle">
|
||||||
{{ state.biotope_type }}
|
{{ state.biotope_type }}
|
||||||
</td>
|
</td>
|
||||||
|
<td class="align-middle">
|
||||||
|
{% for biotope_extra in state.biotope_extra_types.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">{{ state.surface|floatformat:2 }} m²</td>
|
||||||
<td>
|
<td class="align-middle">
|
||||||
{% if is_default_member and has_access %}
|
{% 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" title="{% trans 'Remove state' %}">
|
||||||
{% fa5_icon 'trash' %}
|
{% fa5_icon 'trash' %}
|
||||||
|
@ -121,18 +121,12 @@ a {
|
|||||||
|
|
||||||
.card{
|
.card{
|
||||||
margin: 0 0.5rem 0.5rem 0;
|
margin: 0 0.5rem 0.5rem 0;
|
||||||
font-size: 12px;
|
font-size: 0.9rem;
|
||||||
}
|
}
|
||||||
.card:hover{
|
.card:hover{
|
||||||
box-shadow: 1px 1px 3px var(--rlp-gray-light);
|
box-shadow: 1px 1px 3px var(--rlp-gray-light);
|
||||||
}
|
}
|
||||||
|
|
||||||
.card .card-text{
|
|
||||||
font-size: 12px;
|
|
||||||
max-height: 150px;
|
|
||||||
overflow: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
.qs-box{
|
.qs-box{
|
||||||
background-color: var(--rlp-red);
|
background-color: var(--rlp-red);
|
||||||
color: white;
|
color: white;
|
||||||
@ -215,6 +209,11 @@ Overwrites bootstrap .btn:focus box shadow color
|
|||||||
color: var(--rlp-red);
|
color: var(--rlp-red);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.scroll-150{
|
||||||
|
max-height: 150px;
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
|
||||||
.scroll-300{
|
.scroll-300{
|
||||||
max-height: 300px;
|
max-height: 300px;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<div class="card-text font-italic">
|
<div class="scroll-150 font-italic">
|
||||||
{{obj.comment}}
|
{{obj.comment}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -60,7 +60,7 @@ def home_view(request: HttpRequest):
|
|||||||
unpublish_on__gte=now,
|
unpublish_on__gte=now,
|
||||||
).order_by(
|
).order_by(
|
||||||
"-publish_on"
|
"-publish_on"
|
||||||
)[:4]
|
)[:3]
|
||||||
|
|
||||||
# First fetch all valid objects (undeleted, only newest versions)
|
# First fetch all valid objects (undeleted, only newest versions)
|
||||||
interventions = Intervention.objects.filter(
|
interventions = Intervention.objects.filter(
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
{{msg.subject}}
|
{{msg.subject}}
|
||||||
</h6>
|
</h6>
|
||||||
<small>{% trans 'Published on' %} {{msg.publish_on}}</small>
|
<small>{% trans 'Published on' %} {{msg.publish_on}}</small>
|
||||||
<article class="card-text">{{msg.body|safe}}</article>
|
<article class="scroll-150">{{msg.body|safe}}</article>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
<small> {% trans 'Published on' %} {{msg.publish_on}}</small>
|
<small> {% trans 'Published on' %} {{msg.publish_on}}</small>
|
||||||
</h5>
|
</h5>
|
||||||
<small></small>
|
<small></small>
|
||||||
<article class="card-text">{{msg.body|safe}}</article>
|
<article class="scroll-150">{{msg.body|safe}}</article>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
Loading…
Reference in New Issue
Block a user