forked from PnX-SI/GeoNature-atlas
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Compactage des informations annexes de l'espece
- Loading branch information
Showing
2 changed files
with
180 additions
and
165 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,168 +1,170 @@ | ||
{% block otherInformations %} | ||
<div class="card mt-4" id="otherInformationsPanel"> | ||
<div class="row" id="otherInformations"> | ||
<ul class="nav nav-tabs"> | ||
{% if articles | length != 0 %} | ||
<li class="nav-item"><a data-toggle="tab" class="nav-link active" | ||
href="#articles"><b>{{ articles|length }}</b> {{ 'articles' if articles|length > 1 else 'article' }} | ||
</a></li> | ||
<li class="nav-item"><a class="nav-link" data-toggle="tab" href="#communes"> | ||
<b>{{ communes|length }}</b> {{ _('municipalities')|lower if communes|length > 1 else _('municipality')|lower }}</a> | ||
</li> | ||
{% else %} | ||
<li class="nav-item"><a data-toggle="tab" class="nav-link active" href="#communes"> | ||
<b>{{ communes|length }}</b> {{ _('municipalities')|lower if communes|length > 1 else _('municipality')|lower }}</a> | ||
</li> | ||
<div class="card mt-4" id="otherInformationsPanel"> | ||
<div class="row" id="otherInformations"> | ||
<ul class="nav nav-tabs"> | ||
{% if articles | length != 0 %} | ||
<li class="nav-item"><a data-toggle="tab" class="nav-link active" href="#articles"><b>{{ articles|length }}</b> | ||
{{ 'articles' if articles|length > 1 else 'article' }} | ||
</a></li> | ||
<li class="nav-item"><a class="nav-link" data-toggle="tab" href="#communes"> | ||
<b>{{ communes|length }}</b> | ||
{{ _('municipalities')|lower if communes|length > 1 else _('municipality')|lower }}</a> | ||
</li> | ||
{% else %} | ||
<li class="nav-item"><a data-toggle="tab" class="nav-link active" href="#communes"> | ||
<b>{{ communes|length }}</b> | ||
{{ _('municipalities')|lower if communes|length > 1 else _('municipality')|lower }}</a> | ||
</li> | ||
{% endif %} | ||
|
||
{% if configuration.ORGANISM_MODULE %} | ||
<li class="nav-item"> | ||
<a class="nav-link" data-toggle="tab" href="#organisms"> | ||
<b>{{ organisms|length }} </b> {{ _('organisms')|lower if organisms|length > 1 else _('organism')|lower }} | ||
</a> | ||
</li> | ||
{% endif %} | ||
|
||
{% if configuration.DISPLAY_OBSERVERS %} | ||
<li class="nav-item"><a class="nav-link" data-toggle="tab" href="#observateurs"> | ||
<b>{{ observers|length }} </b> {{ _('observers')|lower if observers|length > 1 else _('observer')|lower }} | ||
</a></li> | ||
{% endif %} | ||
</ul> | ||
|
||
|
||
<div class="tab-content" style="width:100%;"> | ||
<!-- municipality tab--> | ||
{% if articles | length != 0 %} | ||
<div id="articles" class="tab-pane fade show active"> | ||
<table class="table table-striped"> | ||
<thead> | ||
<th></th> | ||
<th> {{ _('title') }}</th> | ||
<th> {{ _('author')}}</th> | ||
</thead> | ||
<tbody> | ||
|
||
{% for i in range (articles | length) %} | ||
<tr class="accordion-toggle" data-toggle="collapse" data-target=".moreInfo{{ i }}"> | ||
<td> {% if articles[i].id_type == 3 %} | ||
<span class="fas fa-link"> </span> | ||
{% else %} <span class="fas fa-paperclip"> </span> | ||
{% endif %} | ||
|
||
{% if configuration.ORGANISM_MODULE %} | ||
<li class="nav-item"> | ||
<a class="nav-link" data-toggle="tab" href="#organisms"> | ||
<b>{{ organisms|length }} </b> {{ _('organisms')|lower if organisms|length > 1 else _('organism')|lower }} | ||
</a> | ||
</li> | ||
{% endif %} | ||
|
||
{% if configuration.DISPLAY_OBSERVERS %} | ||
<li class="nav-item"><a class="nav-link" data-toggle="tab" href="#observateurs"> | ||
<b>{{ observers|length }} </b> {{ _('observers')|lower if observers|length > 1 else _('observer')|lower }} | ||
</a></li> | ||
{% endif %} | ||
</ul> | ||
|
||
|
||
<div class="tab-content" style="width:100%;"> | ||
<!-- municipality tab--> | ||
{% if articles | length != 0 %} | ||
<div id="articles" class="tab-pane fade show active"> | ||
<table class="table table-striped"> | ||
<thead> | ||
<th></th> | ||
<th> {{ _('title') }}</th> | ||
<th> {{ _('author')}}</th> | ||
</thead> | ||
<tbody> | ||
|
||
{% for i in range (articles | length) %} | ||
<tr class="accordion-toggle" data-toggle="collapse" data-target=".moreInfo{{ i }}"> | ||
<td> {% if articles[i].id_type == 3 %} | ||
<span class="fas fa-link"> </span> | ||
{% else %} <span class="fas fa-paperclip"> </span> | ||
{% endif %} | ||
</td> | ||
|
||
<td> | ||
<a href="{{ articles[i].path }}" target="_blank"> {{ articles[i].title }} </a> | ||
</td> | ||
|
||
<td> | ||
{{ articles[i].author }} | ||
</td> | ||
<td> | ||
<i class="btn-more"> <span class="fas fa-chevron-down "> </span></i> | ||
</td> | ||
|
||
</tr> | ||
<tr> | ||
<td colspan="4" class="hiddenRow" style="padding:0px;"> | ||
<div class="collapse moreInfo{{ i }}"> | ||
<strong> {{ _('description') }} : </strong> | ||
<br> {{ articles[i].description | safe }} <br> | ||
<strong> {{ _('date') }} : </strong> {{ articles[i].date }} | ||
</div> | ||
</td> | ||
</tr> | ||
|
||
{% endfor %} | ||
|
||
</tbody> | ||
</table> | ||
</div> | ||
{% endif %} | ||
{% if articles | length != 0 %} | ||
<div id="communes" class="tab-pane fade"> | ||
{% else %} | ||
<div id="communes" class="tab-pane fade show active"> | ||
{% endif %} | ||
<p> | ||
{% for com in communes %} | ||
<a href="{{ url_for('main.ficheCommune', insee = com.insee) }}">{{ com.commune_maj }}</a> | ||
{% if not loop.last %} | ||
- | ||
{% endif %} | ||
{% endfor %} | ||
</p> | ||
</td> | ||
|
||
<td> | ||
<a href="{{ articles[i].path }}" target="_blank"> {{ articles[i].title }} </a> | ||
</td> | ||
|
||
<td> | ||
{{ articles[i].author }} | ||
</td> | ||
<td> | ||
<i class="btn-more"> <span class="fas fa-chevron-down "> </span></i> | ||
</td> | ||
|
||
</tr> | ||
<tr> | ||
<td colspan="4" class="hiddenRow" style="padding:0px;"> | ||
<div class="collapse moreInfo{{ i }}"> | ||
<strong> {{ _('description') }} : </strong> | ||
<br> {{ articles[i].description | safe }} <br> | ||
<strong> {{ _('date') }} : </strong> {{ articles[i].date }} | ||
</div> | ||
</td> | ||
</tr> | ||
|
||
{% endfor %} | ||
|
||
</tbody> | ||
</table> | ||
</div> | ||
{% endif %} | ||
{% if articles | length != 0 %} | ||
<div id="communes" class="tab-pane fade"> | ||
{% else %} | ||
<div id="communes" class="tab-pane fade show active"> | ||
{% endif %} | ||
<p> | ||
{% for com in communes %} | ||
<a href="{{ url_for('main.ficheCommune', insee = com.insee) }}">{{ com.commune_maj }}</a> | ||
{% if not loop.last %} | ||
- | ||
{% endif %} | ||
{% endfor %} | ||
</p> | ||
</div> | ||
|
||
<!--- oberservers tab--> | ||
{% if configuration.DISPLAY_OBSERVERS %} | ||
<div id="observateurs" class="tab-pane fade"> | ||
{% for o in observers %} | ||
{{ o }} | ||
{% if not loop.last %} | ||
- | ||
{% endif %} | ||
{% endfor %} | ||
</div> | ||
{% endif %} | ||
<!--- oberservers tab--> | ||
{% if configuration.DISPLAY_OBSERVERS %} | ||
<div id="observateurs" class="tab-pane fade"> | ||
{% for o in observers %} | ||
{{ o }} | ||
{% if not loop.last %} | ||
- | ||
{% endif %} | ||
{% endfor %} | ||
</div> | ||
{% endif %} | ||
|
||
{% if configuration.ORGANISM_MODULE %} | ||
<!-- organism tab --> | ||
<div id="organisms" class="tab-pane fade flex-grow-1"> | ||
<ul class="list-group w-100"> | ||
{% for o in organisms %} | ||
<li id="organismListItem" class="media border-bottom p-2" id_organism="{{ o['nom_organism'] }}"> | ||
<div class="pictoImgList mr-2" data-toggle="tooltip" data-original-title="{{ taxon.group2_inpn }}" | ||
data-placement="right"> | ||
<span class="float-right"></span> | ||
<div class="pictoImgList mr-2" data-toggle="tooltip" data-original-title="{{ taxon.group2_inpn }}" | ||
data-placement="right"> | ||
{% if o['url_logo']!= None %} | ||
{% if not o['url_organism'] in (None, '') %} | ||
<a href="{{ o['url_organism'] }}" target="_blank"> | ||
<img class="mx-auto d-block" src="{{ o['url_logo'] }}" style='width:100px'> | ||
</a> | ||
{% else %} | ||
<img class="mx-auto d-block" src="{{ o['url_logo'] }}" style='width:100px'> | ||
{% endif %} | ||
{% endif %} | ||
</div> | ||
</div> | ||
|
||
<div class="media-body d-flex align-items-center justify-content-between flex-wrap"> | ||
<div> | ||
<h5 class="mt-0 mb-1 "> | ||
<span id="name"><b>{{ o['nom_organism'] }}</b></span> | ||
</h5> | ||
|
||
<strong>{{ _('organism.participation') }} | ||
{{ o['nb_observation']}} | ||
{% if o['nb_observation'] > 1 %} | ||
{{ _('observations') }} | ||
{% else %} | ||
{{ _('observation') }} | ||
{% endif %} | ||
</strong> | ||
<br>{{ _('organism.prospection') }} : | ||
<strong>{{ "%.2f"|format(o['nb_observation']/taxon.taxonSearch.nb_obs*100) }} %</strong> | ||
|
||
{% if configuration.ORGANISM_MODULE %} | ||
<!-- organism tab --> | ||
<div id="organisms" class="tab-pane fade flex-grow-1"> | ||
<ul class="list-group w-100"> | ||
{% for o in organisms %} | ||
<li id="organismListItem" class="media border-bottom p-2" | ||
id_organism="{{ o['nom_organism'] }}"> | ||
<div class="pictoImgList mr-2" data-toggle="tooltip" data-original-title="{{ taxon.group2_inpn }}" | ||
data-placement="right"> | ||
<span class="float-right"></span> | ||
<div class="pictoImgList mr-2" data-toggle="tooltip" data-original-title="{{ taxon.group2_inpn }}" | ||
data-placement="right"> | ||
{% if o['url_logo']!= None %} | ||
{% if not o['url_organism'] in (None, '') %} | ||
<a href="{{ o['url_organism'] }}" target="_blank"> | ||
<img class="mx-auto d-block" src="{{ o['url_logo'] }}" style='width:100px'> | ||
</a> | ||
{% else %} | ||
<img class="mx-auto d-block" src="{{ o['url_logo'] }}" style='width:100px'> | ||
{% endif %} | ||
{% endif %} | ||
</div> | ||
</div> | ||
|
||
<div class="media-body"> | ||
<span class="float-right"></span> | ||
<h5 class="mt-0 mb-1 "> | ||
<span id="name"><b>{{ o['nom_organism'] }}</b></span> | ||
</h5> | ||
|
||
<strong>{{ _('organism.participation') }} | ||
{{ o['nb_observation']}} | ||
{% if o['nb_observation'] > 1 %} | ||
{{ _('observations') }} | ||
{% else %} | ||
{{ _('observation') }} | ||
{% endif %} | ||
</strong> | ||
<br>{{ _('organism.prospection') }} : <strong>{{ "%.2f"|format(o['nb_observation']/taxon.taxonSearch.nb_obs*100) }} %</strong> | ||
<br> | ||
<br> | ||
<span class="float-right"> | ||
<h3><a class="badge badge-primary" href="{{ url_for('main.ficheOrganism', id_organism=o['id_organism']) }}" | ||
data-toggle="tooltip" style="color: white;" | ||
title="{{ _('check.organism.sheet') }}" data-placement="left"> | ||
<i class="fas fa-list fa-fw"></i> {{ _('organism.sheet') }}</i> | ||
</a></h3> | ||
</span> | ||
|
||
</div> | ||
{% endfor %} | ||
</ul> | ||
</div> | ||
{% endif %} | ||
</div> | ||
<span> | ||
<h3><a class="badge badge-primary" | ||
href="{{ url_for('main.ficheOrganism', id_organism=o['id_organism']) }}" data-toggle="tooltip" | ||
style="color: white;" title="{{ _('check.organism.sheet') }}" data-placement="left"> | ||
<i class="fas fa-list fa-fw"></i> {{ _('organism.sheet') }}</i> | ||
</a></h3> | ||
</span> | ||
|
||
</div> | ||
{% endfor %} | ||
</ul> | ||
</div> | ||
{% endif %} | ||
|
||
</div> | ||
</div> | ||
|
||
</div> | ||
</div> | ||
{% endblock %} | ||
</div> | ||
</div> | ||
{% endblock %} |