#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
pull/96/head
mpeltriaux 3 years ago
parent 95a17ed04f
commit e1865c7267

@ -29,9 +29,12 @@
<table class="table table-hover">
<thead>
<tr>
<th scope="col">
<th class="w-25" scope="col">
{% trans 'Biotope type' %}
</th>
<th class="w-25" scope="col">
{% trans 'Biotope additional type' %}
</th>
<th scope="col">
{% trans 'Surface' %}
</th>
@ -48,8 +51,15 @@
<td class="align-middle">
{{ state.biotope_type }}
</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>
<td class="align-middle">
{% 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' %}">
{% fa5_icon 'trash' %}

@ -29,9 +29,12 @@
<table class="table table-hover">
<thead>
<tr>
<th scope="col">
<th class="w-25" scope="col">
{% trans 'Biotope type' %}
</th>
<th class="w-25" scope="col">
{% trans 'Biotope additional type' %}
</th>
<th scope="col">
{% trans 'Surface' %}
</th>
@ -48,8 +51,15 @@
<td class="align-middle">
{{ state.biotope_type }}
</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>
<td class="align-middle">
{% 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' %}">
{% fa5_icon 'trash' %}

@ -29,9 +29,12 @@
<table class="table table-hover">
<thead>
<tr>
<th scope="col">
<th class="w-25" scope="col">
{% trans 'Biotope type' %}
</th>
<th class="w-25" scope="col">
{% trans 'Biotope additional type' %}
</th>
<th scope="col">
{% trans 'Surface' %}
</th>
@ -48,8 +51,15 @@
<td class="align-middle">
{{ state.biotope_type }}
</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>
<td class="align-middle">
{% 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' %}">
{% fa5_icon 'trash' %}

@ -29,9 +29,12 @@
<table class="table table-hover">
<thead>
<tr>
<th scope="col">
<th class="w-25" scope="col">
{% trans 'Biotope type' %}
</th>
<th class="w-25" scope="col">
{% trans 'Biotope additional type' %}
</th>
<th scope="col">
{% trans 'Surface' %}
</th>
@ -48,8 +51,15 @@
<td class="align-middle">
{{ state.biotope_type }}
</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>
<td class="align-middle">
{% 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' %}">
{% fa5_icon 'trash' %}

@ -29,9 +29,12 @@
<table class="table table-hover">
<thead>
<tr>
<th scope="col">
<th class="w-25" scope="col">
{% trans 'Biotope type' %}
</th>
<th class="w-25" scope="col">
{% trans 'Biotope additional type' %}
</th>
<th scope="col">
{% trans 'Surface' %}
</th>
@ -46,8 +49,15 @@
<td class="align-middle">
{{ state.biotope_type }}
</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>
<td class="align-middle">
{% 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' %}">
{% fa5_icon 'trash' %}

@ -29,9 +29,12 @@
<table class="table table-hover">
<thead>
<tr>
<th scope="col">
<th class="w-25" scope="col">
{% trans 'Biotope type' %}
</th>
<th class="w-25" scope="col">
{% trans 'Biotope additional type' %}
</th>
<th scope="col">
{% trans 'Surface' %}
</th>
@ -46,8 +49,15 @@
<td class="align-middle">
{{ state.biotope_type }}
</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>
<td class="align-middle">
{% 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' %}">
{% fa5_icon 'trash' %}

@ -121,18 +121,12 @@ a {
.card{
margin: 0 0.5rem 0.5rem 0;
font-size: 12px;
font-size: 0.9rem;
}
.card:hover{
box-shadow: 1px 1px 3px var(--rlp-gray-light);
}
.card .card-text{
font-size: 12px;
max-height: 150px;
overflow: auto;
}
.qs-box{
background-color: var(--rlp-red);
color: white;
@ -215,6 +209,11 @@ Overwrites bootstrap .btn:focus box shadow color
color: var(--rlp-red);
}
.scroll-150{
max-height: 150px;
overflow: auto;
}
.scroll-300{
max-height: 300px;
overflow: auto;

@ -19,7 +19,7 @@
</div>
</div>
<div class="card-body">
<div class="card-text font-italic">
<div class="scroll-150 font-italic">
{{obj.comment}}
</div>
</div>

@ -60,7 +60,7 @@ def home_view(request: HttpRequest):
unpublish_on__gte=now,
).order_by(
"-publish_on"
)[:4]
)[:3]
# First fetch all valid objects (undeleted, only newest versions)
interventions = Intervention.objects.filter(

@ -10,7 +10,7 @@
{{msg.subject}}
</h6>
<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>

@ -19,7 +19,7 @@
<small> {% trans 'Published on' %} {{msg.publish_on}}</small>
</h5>
<small></small>
<article class="card-text">{{msg.body|safe}}</article>
<article class="scroll-150">{{msg.body|safe}}</article>
</div>
</div>
{% endfor %}

Loading…
Cancel
Save