« Modèle:AfficheProjet » : différence entre les versions

De Mouvement Arbre-Évolution
Aller à :navigation, rechercher
Aucun résumé des modifications
Aucun résumé des modifications
 
(361 versions intermédiaires par 2 utilisateurs non affichées)
Ligne 1 : Ligne 1 :
<!-- Affiche le projet dont l'identifiant est obtenu dans le requête AfficheProjet&projet=[ID] -->
<!-- Affiche le projet dont l'identifiant est obtenu dans le requête Fiche Projet&projet=[ID] -->
{{#if: {{{projet|}}}|
{{#if: {{{projet|}}}|
<!-- On ne fait la requête que si l'ID existe -->
<!-- On ne fait la requête que si l'ID existe -->
{{#get_web_data:
{{#get_web_data:
url=https://wiki.arbre-evolution.org/index.php?title=Sp%C3%A9cial:Requ%C3%AAter&x=-5B-5B%3A{{{projet}}}-5D-5D%2F-3FA-20le-20nom-20de-20projet%3DnomP%2F-3FA-20le-20type-20de-20projet%3DtypeP%2F-3FA-20la-20description-20du-20projet%3Ddesc%2F-3FA-20la-20date-20de-20plantation%3DdatePl%2F-3FNombre-20total-20d%27arbres-20plant%C3%A9s-20initialement%3DarbrePl%2F-3FNombre-20total-20d%27arbres-20en-20croissance%3DarbreAct%2F-3FNombre-20de-20parcelles-20associ%C3%A9es%3Dnparcelles%2F-3FDate-20de-20derni%C3%A8re-20pr%C3%A9sence-20au-20projet%3Ddatev%2F-3FRatio-20de-20succ%C3%A8s%3Dratio%2F-3FA-20le-20nombre-20de-20b%C3%A9n%C3%A9voles%3Dbenev%2F-3FNombre-20de-20parcelles-20associ%C3%A9es%3DnParc%2F-3FParcelle-20associ%C3%A9e.A-20le-20polygone%3DparcGeo%2F-3FParcelle-20associ%C3%A9e.A-20le-20centre-20g%C3%A9ographique%3DcentreGeo&format=csv&limit=1&link=none&headers=show&&mainlabel=id
url=https://wiki.arbre-evolution.org/index.php?title=Sp%C3%A9cial:Requ%C3%AAter&x=-5B-5B%3A{{{projet|}}}-5D-5D%2F-3FA-20le-20nom-20de-20projet%3DnomP%2F-3FA-20le-20type-20de-20projet%3DtypeP%2F-3FA-20la-20description-20du-20projet%3Ddesc%2F-3FA-20la-20date-20de-20plantation%3DdatePl%2F-3FNombre-20total-20d%27arbres-20plant%C3%A9s-20initialement%3DarbrePl%2F-3FNombre-20total-20d%27arbres-20en-20croissance%3DarbreAct%2F-3FNombre-20de-20parcelles-20associ%C3%A9es%3Dnparcelles%2F-3FDate-20de-20derni%C3%A8re-20pr%C3%A9sence-20au-20projet%3Ddatev%2F-3FRatio-20de-20succ%C3%A8s%3Dratio%2F-3FOrganisation-20signataire-20du-20projet%3Dsignataire%2F-3FA-20le-20nombre-20de-20b%C3%A9n%C3%A9voles%3Dbenev%2F-3FProjet-20public%3Dpublic&format=csv&limit=1&link=none&headers=show&&mainlabel=id
| format=csv
| data=id=id,nomP=nomP,typeP=typeP,desc=desc,datePl=datePl,url=url,benev=benev,arbrePl=arbrePl,arbreAct=arbreAct,datev=datev,ratio=ratio,public=public
| data=id=id,
}}
nomP=nomP,
<!-- On teste ensuite si le numéro de projet existe : on a une valeur public -->
typeP=typeP,
{{#ifeq: {{#external_value: public}}||
desc=desc,
=Erreur=
datePl=datePl,
Oh! oh! Numéro de projet manquant, inexistant ou incorrect
url=url,
<!-- On teste ensuite si le projet est public -->
benev=benev,
|{{#ifeq: {{#external_value: public}}|faux|
arbrePl=arbrePl,
=Erreur=
arbreAct=arbreAct,
Oh! oh! Numéro de projet manquant, inexistant ou incorrect...
datev=datev,
|
ratio=ratio,
<!-- On a un numéro de projet valide et un projet public -  on procède -->
nParc=nParc,
{{#get_web_data:
url=https://wiki.arbre-evolution.org/index.php?title=Sp%C3%A9cial:Requ%C3%AAter&x=-5B-5B%3A{{{projet|}}}-5D-5D%2F-3FNombre-20de-20parcelles-20associ%C3%A9es%3DnParc%2F-3FParcelle-20associ%C3%A9e%3Dparcelle%2F-3FParcelle-20associ%C3%A9e.A-20le-20nom-20de-20parcelle%3DnomPa%2F-3FParcelle-20associ%C3%A9e.Polygone%3DparcGeo%2F-3FParcelle-20associ%C3%A9e.A-20le-20centre-20g%C3%A9ographique%3DcentreGeo%2F-3FParcelle-20associ%C3%A9e.Nom-20standardis%C3%A9-20de-20parcelle%3DnomPas%2F-3FMunicipalit%C3%A9-20du-20projet%3Dmuni%2F-3FA-20l-20url-20de-20revue-20de-20presse=presse&format=csv&limit=1
| data=nParc=nParc,
parcGeo=parcGeo,
parcGeo=parcGeo,
centreGeo=centreGeo
centreGeo=centreGeo,
parcelle=parcelle,
nomPa=nomPa,
nomPas=nomPas,
muni=muni,
presse=presse
}}
}}
<!-- Affichage des données reçues de la requête-->
<!-- TITRES HAUT -->
={{#external_value: nomP}}=
<div class="col mb-2">
<div class="row">
<h1 class="col-12 mb-0">{{#external_value: nomP}}</h1>
<h4 class="col-6 mb-0">{{#external_value: typeP}}</h4>
<h4 class="col-6 text-right my-0 pr-0">{{#external_value: muni}}</h4>
</div>
</div>
 
<div class="row">
<div class="row">
<!-- Colonne de gauche -->
<!-- COLONNE DE GAUCHE -->
<div class="col-6">
<div class="col-7">
<!-- Photo préférée -->
<!-- PHOTO PRÉFÉRÉE -->
<div class="col-12 border border-light bg-color-light mb-3" style="min-height:320px;">
{{#get_web_data:
{{#get_web_data:
url=https://wiki.arbre-evolution.org/index.php/Sp%C3%A9cial:Requ%C3%AAter/-5B-5BCat%C3%A9gorie:PhotoProjet-5D-5D-20-5B-5BEst-20une-20photo-20du-20projet::{{{projet}}}-5D-5D-20-5B-5BPhoto-20pr%C3%A9f%C3%A9r%C3%A9e::vrai-5D-5D/-3FPath%3DLien/mainlabel%3Did/limit%3D5000/order%3Drandom/sort%3DPath/offset%3D0/format%3Dcsv/link%3Dnone
url=https://wiki.arbre-evolution.org/index.php/Sp%C3%A9cial:Requ%C3%AAter/-5B-5BCat%C3%A9gorie:PhotoProjet-5D-5D-20-5B-5BEst-20une-20photo-20du-20projet::{{{projet}}}-5D-5D-20-5B-5BPhoto-20pr%C3%A9f%C3%A9r%C3%A9e::vrai-5D-5D/-3FPath%3DphotoLien/mainlabel%3Did/limit%3D10/order%3Drandom/sort%3DPath/offset%3D0/format%3Dcsv/link%3Dnone
| format=csv
| data=photoLien=photoLien
| data=Lien=Lien
}}<div class="col-12 mb-3" style="min-height:320px;)">
}}{{#if: {{#external_value: Lien}}|
{{#if: {{#external_value: photoLien}}|
<htmltag tagname="img" src="{{#external_value: Lien}}" class="img-fluid"></htmltag>|}}
<htmltag tagname="img" src="{{#external_value: photoLien}}" class="vignette" style="object-fit:cover"></htmltag>
 
|<div class="border border-light bg-color-light>&nbsp;</div>
}}
</div>
</div>
<!-- DESCRIPTION -->
<div class="col-12" style="font-size:90%;">
<div class="col-12" style="font-size:90%;">
{{#external_value: desc}}
{{#external_value: desc}}
</div>
</div>
<!-- REVUE DE PRESSE -->
<div class="col-12" style="font-size:90%;">
{{AfficheRevueDePresse|projet={{{projet|}}}}}
</div>
</div>
<!-- Colonne de droite -->
 
<div class="col-6">
<!-- HISTORIQUE -->
<div class="row">
<div class="col-12">
<div class="col-12">
{{#urldecode:{{#replace: {{#replace: {{urlencode: {{#external_value: parcGeo}}}}|%5BParcelle+|{{urlencode: https://labo.laferme.wiki/mouvement/index.php?title=Fiche_Parcelle&parcelle=Parcelle+}} }}|%5D%5D%7E|+{{#external_value: id}}%5D%7E}} }}
<h5>Historique</h5>
<!--{{#arraymaptemplate: {{#external_value: nomPas}}|Affiche Plantation2|,|}} -->
{{Affiche PlantationInitialeProjet|projet={{{projet|}}}}}
</div>
<!-- INTERVENTIONS -->
{{#get_web_data:
url=https://wiki.arbre-evolution.org/index.php/Sp%C3%A9cial:Requ%C3%AAter/-5B-5BConcerne::{{{projet|}}}-5D-5D-20-5B-5BEst-20un-20suivi-20du-20type::%2B-5D-5D/-3FEst-20un-20suivi-20du-20type%3DtypeS/-3FA-20le-20nom-20de-20l-20action%3DtitreS/-3FDate-20de-20compl%C3%A9tion-20de-20l%27action-23ISO%3DdateS/-3FCommentaire-20pour-20Mouvement%3DcommS/mainlabel%3D/limit%3D5000/order%3Dasc/sort%3DDate-20de-20compl%C3%A9tion-20de-20l%27action/offset%3D0/format%3Dcsv
| data=typeS=typeS,titreS=titreS,dateS=dateS,commS=commS
}}<div class="col-12">
<h6>Interventions</h6>
{{#if: {{#external_value: dateS}}|
{{#for_external_table:|
{{#if: {{{dateS|}}}|
<div class="col-12 border-top border-success border-right-0 border-left-0 border-bottom-0">
<div class="row no-gutter">
<div class="col-12"><b>{{{dateS}}} - <!--Enlever correction contacte quand réglé-->{{#ifeq: {{{typeS}}}|Contacte|Contact|{{{typeS}}} }}</b></div>
<div class="col-8 offset-4"><small>
<b>{{{titreS}}}</b><br>
<i>{{{commS}}}</i></small>
</div>
</div>
{{#ifeq: {{{typeS}}}|Replantation|
{{Affiche ReplantationProjet|projet={{{projet|}}}|date={{{dateS|}}}}}
|}}
</div>
|}}}}
|<small>Aucune intervention n'a été encore réalisée.</small>}}
</div>
 
</div>
 
<!-- COLONNE DE DROITE -->
<div class="col-5">
<!-- CARTE -->
<div class="col-12 border border-success p-2">
{{#display_map:
{{#display_map:
coordinates=  
coordinates=  
Ligne 54 : Ligne 105 :
| maxzoom=17
| maxzoom=17
| minzoom=8
| minzoom=8
| polygons={{#urldecode:{{#replace: {{#replace: {{urlencode: {{#external_value: parcGeo}}}}|%5BParcelle+|{{urlencode: https://labo.laferme.wiki/mouvement/index.php?title=Fiche_Parcelle&parcelle=Parcelle+}} }}|%5D%5D%7E|+{{#external_value: id}}%5D%7E}} }}
| polygons={{#replace: {{#replace: {{#replace: {{#replace: {{#external_value: parcGeo}}|Parcelle 0|[https://mouvement.arbre-evolution.org/index.php?title=Fiche_Parcelle&parcelle=Parcelle+0}}|**|<nowiki/> <nowiki/> <nowiki/>}}|~~|<nowiki/> <nowiki/> <nowiki/>]<nowiki/> <nowiki/>~~}}|++|<nowiki/> <nowiki/> <nowiki/>}}
| scrollwheelzoom=off
}}</div>
}}
<!-- Identifiants des parcelles -->
<div class="col-12 my-0" style="font-size:80%;">
<b>Parcelle(s) reboisée(s)</b> : {{#arraymap: {{#external_value: nomPas}}|,|@@|
<span class="pr-1 pill">[{{fullurl:Fiche Parcelle|parcelle={{urlencode:{{#explode:@@|~|1}}}} }} {{#explode:@@|~|0}}]</span>|•\s}}
</div>
<!-- SITUATION DU PROJET - en vert -->
<div class="col-12 shadow px-3 py-2 mb-3 text-white" style="background-color:rgba(76, 169, 72);z-index:1000;border-radius:5px;">
{{AfficheSituation|projet={{{projet}}}}}
</div>
</div>
<div class="col-8 border border-light shadow p-3 mt-n4 mr-n2" style="background-color:rgba(76, 169, 72);z-index:1000;">
<span class="my-2 btn btn-success">[https://calculcarbone.org/ Contribuez à nos projets!]</span>
{{#ifeq: {{#external_value: datev}}|{{#external_value: datePl}}
|Dans le cadre de ce projet, ce sont '''{{#external_value: arbrePl}}''' arbres qui ont été plantés ({{#external_value: datePl}}) sur '''{{#external_value: nParc}}''' parcelles avec l'aide de '''{{#external_value: benev}}''' bénévoles.
|Lors de notre dernière visite ({{#external_value: datev}}), ce projet comptait '''{{#external_value: arbreAct}}''' arbres en croissance sur les '''{{#external_value: arbrePl}}''' arbres de la plantation initiale du projet ({{#external_value: datePl}}), soit un ratio de succès de '''{{#external_value: ratio}}''' %.  


Ce sont '''{{#external_value: benev}}''' bénévoles qui ont participé à la plantation initiale.
<!-- SIGNATAIRES ET CONTRIBUTEURS -->
}}
<div class="col-12">
Ce sont '''XX''' tonnes de CO<sub>2</sub> qui sont séquestrées.
<!-- On teste s'il y a au moins un signataire  et on va chercher son logo-->
<!-- Si oui on va chercher  et on affiche son logo -->
{{AfficheSignataires|{{{projet}}}}}
{{AfficheContributeurs|{{{projet}}}}}
</div>
<!-- PHOTOS -->
<div class="col-12">
{{AffichePhotoProjet|projet={{{projet|}}}}}
</div>
</div>
<div class="col-6">
Partenaires et bailleurs
</div>
</div>
<div class="col-6">
<!-- RANGÉE DU BAS -->
Autres infos


{{#external_value: id}}
}}
...
</div>
</div>
|
|
===Erreur===
=Erreur=
Oh! oh! Numéro de projet manquant ou incorrect...
Oh! oh! Numéro de projet manquant, inexistant ou incorrect...
}}
}}
}}
__NOTOC__
__NOTOC__
__NOEDITSECTION__

Dernière version du 4 septembre 2024 à 20:53