diff --git a/.gitattributes b/.gitattributes index cb62754e7fa125a92de0c0074e783bd81ea7e45b..2305fea2043c809ba82564bd2a8af406b5d0ce86 100644 --- a/.gitattributes +++ b/.gitattributes @@ -418,6 +418,7 @@ javascript/vegas.jaysalvat.com/vegas.min.js -text javascript/vegas.jaysalvat.com/vegas.min.js.map -text /javascripts.js.html -text json/gis_articles_plus_sites_branche.html -text +json/gis_identite_carto.html -text json/gis_sites_branche.html -text /la_meteo.html -text lang/local_en.php -text @@ -664,6 +665,7 @@ noisettes/extra/favoris.html -text noisettes/extra/ousommesnous.html -text noisettes/extra/splickr.html -text noisettes/footer/footer.html -text +noisettes/footer/footer_identite_extra.html -text noisettes/footer/footer_link_mentions.html -text noisettes/footer/footer_modeblog.html -text noisettes/footer/footer_modecommuniquant.html -text diff --git a/json/gis_identite_carto.html b/json/gis_identite_carto.html new file mode 100644 index 0000000000000000000000000000000000000000..6f2e0cdcafa565f522e79f63370b0e4e69809385 --- /dev/null +++ b/json/gis_identite_carto.html @@ -0,0 +1,6 @@ + {"type": "Feature", + "geometry": {"type": "Point", "coordinates": [#IDENTITE_LONGITUDE, #IDENTITE_LATITUDE]}, + "id":"identite_carto", + "properties": { + "title":[(#NOM_SITE_SPIP|supprimer_tags|json_encode)] + }} \ No newline at end of file diff --git a/noisettes/footer/footer_identite_extra.html b/noisettes/footer/footer_identite_extra.html new file mode 100644 index 0000000000000000000000000000000000000000..9cb456d9640c1fc63e26a3554a71aa55dd12cf94 --- /dev/null +++ b/noisettes/footer/footer_identite_extra.html @@ -0,0 +1,36 @@ + <div id="informations" class="row"> + <div id="coordonnees" class="avec-padding"> + [<div class="adresse flexbox-flex"> + <span class="icon-location icon-lg icon-fw texte-blanc"></span> + <p> + <span class="#EDIT{meta-identite_extra/adresse}">#IDENTITE_ADRESSE</span><br /> + <span class="#EDIT{meta-identite_extra/code_postal}">(#IDENTITE_CODE_POSTAL)</span> - <span class="#EDIT{meta-identite_extra/ville}">#IDENTITE_VILLE</span> + </p> + </div>] + [<div class="telephone flexbox-flex"> + <span class="icon-phone icon-lg icon-fw texte-blanc"></span> + <p class="#EDIT{meta-identite_extra/telephone}"> + <a href="tel:#IDENTITE_TELEPHONE">(#IDENTITE_TELEPHONE)</a> + </p> + </div>] + [<div class="accueil flexbox-flex"> + <span class="icon-information icon-lg icon-fw texte-blanc"></span> + <p class="#EDIT{meta-identite_extra/informations}"> + (#IDENTITE_INFORMATIONS) + </p> + </div>] + [(#IDENTITE_ID_ARTICLE_CONTACT|oui)<p class="#EDIT{meta-identite_extra/id_article_contact}"><a class="button triadeC texte-blanc float-center avec-margin" href="#URL_ARTICLE{#IDENTITE_ID_ARTICLE_CONTACT}"><span class="icon-envelope icon-lg avec-padding-right05"></span>Nous écrire</a></p>] + </div> + [(#IDENTITE_LATITUDE|oui)<div id="carte" class="avec-padding"> + #INCLURE{fond=modeles/carte_gis, + id_map=carto_bc, + objets=identite_carto, + scale=oui, + zoom=10, + overview=oui, + autocenterandzoom=oui, + zoom_molette=non, + lat=#IDENTITE_LATITUDE, + lon=#IDENTITE_LONGITUDE} + </div>] + </div> diff --git a/noisettes/footer/footer_pied.html b/noisettes/footer/footer_pied.html index 37d53c223233891779b1303b24c408db57dfbd6a..b70ea7b1dbfa4fa6d2594e5060d2b46d13a98346 100644 --- a/noisettes/footer/footer_pied.html +++ b/noisettes/footer/footer_pied.html @@ -19,7 +19,7 @@ [(#CONFIG{soyezcreateurs_layout/affichage_lien_newsletter,affiche}|=={bas}|ou{#CONFIG{soyezcreateurs/mode_affichage,communiquant}|=={portailcognac}}|ou{#CONFIG{soyezcreateurs_layout/pictogrammesoutils,non}|=={avecoutils}}) <div id="newsletterinscription" class="cadreinfo avec-paddingx"> <h2><:soyezcreateurs:newsletter_recevoir:></h2> - #INCLURE{fond=noisettes/inscription_infolettre,env} + #INCLURE{fond=noisettes/inscription_infolettre,env,ajax} </div> ]] [(#PLUGIN{AGENDA}|oui)[(#CONFIG{soyezcreateurs/miniagenda,on}|=={bas}|ou{#CONFIG{soyezcreateurs/mode_affichage,communiquant}|=={portailcognac}}|ou{#CONFIG{soyezcreateurs_layout/pictogrammesoutils,non}|=={avecoutils}})[(#CONFIG{soyezcreateurs/homeagenda,on}|=={on}|oui)<div id="miniagenda" class="cadreinfo avec-padding"> diff --git a/paquet.xml b/paquet.xml index c90cd126e564aec4c4b5836a318d1d33b939dcd1..3ec6bf96c3ccc28c032c1e24206fc83df5bfbac1 100644 --- a/paquet.xml +++ b/paquet.xml @@ -81,6 +81,7 @@ <utilise nom="socialtags" compatibilite="[1.0.9;[" /> <utilise nom="splickr" compatibilite="[0.4.6;[" /> <utilise nom="va" compatibilite="[0.6.9;[" /> + <utilise nom="identite_extra" compatibilite="[1.4.1;[" /> <pipeline nom="jqueryui_plugins" inclure="soyezcreateurs_pipelines.php" /> <pipeline nom="formulaire_traiter" inclure="soyezcreateurs_pipelines.php" /> @@ -90,6 +91,8 @@ <pipeline nom="noizetier_blocs_defaut" inclure="soyezcreateurs_pipelines.php" /> + <pipeline nom="identite_extra_champs" inclure="soyezcreateurs_pipelines.php" /> + <menu nom="soyezcreateur_config21" titre="soyezcreateurs:configurersc" parent="bando_configuration" icone="images/soyezcreateurs-16.png" action="configurer_soyezcreateurs" parametres="cfg=soyezcreateurs" /> <menu nom="sc_aide" titre="soyezcreateurs:aidesc" parent="bando_squelette" icone="images/soyezcreateurs_help-16.png" action="sc_aide" /> </paquet> diff --git a/soyezcreateurs_fonctions.php b/soyezcreateurs_fonctions.php index d2effd1a9af49ec9f02295e5086208d21e270ce0..dc6836eb1c6b339c484742abcea51481d09701e3 100644 --- a/soyezcreateurs_fonctions.php +++ b/soyezcreateurs_fonctions.php @@ -873,4 +873,15 @@ function sc_filesize($file) { $size = 0; $size = filesize($file=preg_replace(',[?].*$,','',$file)); return $size; +} + +function sc_bandeau_contact() { + // N'afficher avec identité Extra (https://contrib.spip.net/Identite-Extra) que si au moins un champ renseigné + if (implode('', lire_config('identite_extra')) !== "") { + $texte = recuperer_fond('noisettes/footer/footer_identite_extra'); + } else { // On utilise la vieille configuration du bandeau de contact de SoyezCréateurs + $texte = propre(lire_config('soyezcreateurs/bandeau_contact')); + } + + return $texte; } \ No newline at end of file diff --git a/soyezcreateurs_pipelines.php b/soyezcreateurs_pipelines.php index 34b25a345cccfc09022284d11227b20c63258aae..b5a192e669bda0939f293f142363e9ae67f0b5c9 100644 --- a/soyezcreateurs_pipelines.php +++ b/soyezcreateurs_pipelines.php @@ -27,4 +27,9 @@ function soyezcreateurs_formulaire_traiter($flux){ function soyezcreateurs_noizetier_blocs_defaut($flux) { $flux = array('contenu'); return $flux; +} + +function soyezcreateurs_identite_extra_champs($champs) { + $champs = array('adresse', 'code_postal', 'ville', 'pays', 'telephone', 'fax', 'email_contact', 'informations', 'id_article_contact', 'facebook', 'twitter', 'linkedin', 'latitude', 'longitude'); + return $champs; } \ No newline at end of file