« 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
 
(635 versions intermédiaires par 2 utilisateurs non affichées)
Ligne 1 : Ligne 1 :
{{#if: {{{Projet|}}}|
<!-- Affiche le projet dont l'identifiant est obtenu dans le requête Fiche Projet&projet=[ID] -->
{{#if: {{{projet|}}}|
<!-- 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/Sp%C3%A9cial:Requ%C3%AAter/-5B-5B:Projet-2000148-5D-5D/-3FA-20le-20nom-20de-20projet%3DNomProjet/-3FA-20le-20type-20de-20projet%3DTypeProjet/-3FA-20la-20description-20du-20projet%3DDescription/%3FA-20la-20date-20de-20plantation%3DDatePlantation/mainlabel%3Did/-3F-Est-20une-20photo-20du-20projet.Path%3DPhoto/limit%3D1/format%3Dcsv
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=NomProjet=NomProjet,
TypeProjet=TypeProjet,
Description=Description,
DatePlantation=DatePlantation,
id=id,
Photo=Photo
}}
}}
[[L Projets|Liste des projets]]
<!-- On teste ensuite si le numéro de projet existe : on a une valeur public -->
={{#external_value: NomProjet}}=
{{#ifeq: {{#external_value: public}}||
=Erreur=
Oh! oh! Numéro de projet manquant, inexistant ou incorrect
<!-- On teste ensuite si le projet est public -->
|{{#ifeq: {{#external_value: public}}|faux|
=Erreur=
Oh! oh! Numéro de projet manquant, inexistant ou incorrect...
|
<!-- On a un numéro de projet valide et un projet public -  on procède -->
{{#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,
centreGeo=centreGeo,
parcelle=parcelle,
nomPa=nomPa,
nomPas=nomPas,
muni=muni,
presse=presse
}}
<!-- TITRES HAUT -->
<div class="col mb-2">
<div class="row">
<div class="row">
<div class="col-9">
<h1 class="col-12 mb-0">{{#external_value: nomP}}</h1>
{{#external_value: Photos}}--
<h4 class="col-6 mb-0">{{#external_value: typeP}}</h4>
===Description===
<h4 class="col-6 text-right my-0 pr-0">{{#external_value: muni}}</h4>
{{#external_value: Description}}
</div>
</div>


<div class="row">
<!-- COLONNE DE GAUCHE -->
<div class="col-7">
<!-- PHOTO PRÉFÉRÉE -->
{{#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%3DphotoLien/mainlabel%3Did/limit%3D10/order%3Drandom/sort%3DPath/offset%3D0/format%3Dcsv/link%3Dnone
| data=photoLien=photoLien
}}<div class="col-12 mb-3" style="min-height:320px;)">
{{#if: {{#external_value: photoLien}}|
<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>
<!-- DESCRIPTION -->
<div class="col-12" style="font-size:90%;">
{{#external_value: desc}}
</div>
<!-- REVUE DE PRESSE -->
<div class="col-12" style="font-size:90%;">
{{AfficheRevueDePresse|projet={{{projet|}}}}}
</div>
</div>
<div class="col-3">
;No. d'identification au registre : {{#external_value: id}}
===Projet===
; Type de projet : {{#external_value: TypeProjet}}
; Date de plantation : {{#external_value: DatePlantation}}


<!-- HISTORIQUE -->
<div class="col-12">
<h5>Historique</h5>
<!--{{#arraymaptemplate: {{#external_value: nomPas}}|Affiche Plantation2|,|}} -->
{{Affiche PlantationInitialeProjet|projet={{{projet|}}}}}
</div>
</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>
</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:
coordinates=
| mappingservice=leaflet
| layers=OpenStreetMap
| width=100%
| height=320
| centre={{#explode:{{#external_value: centreGeo}}|,|0}},{{#explode:{{#external_value: centreGeo}}|,|1}}
| zoom=14
| maxzoom=17
| minzoom=8
| 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/>}}
}}</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>
<span class="my-2 btn btn-success">[https://calculcarbone.org/ Contribuez à nos projets!]</span>
<!-- SIGNATAIRES ET CONTRIBUTEURS -->
<div class="col-12">
<!-- 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>
<!-- RANGÉE DU BAS -->
}}
|
|
Oh! oh! Numéro de projet absent ou incorrect...
=Erreur=
Oh! oh! Numéro de projet manquant, inexistant ou incorrect...
}}
}}
}}
__NOTOC__
__NOTOC__
__NOEDITSECTION__

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