renommages des bien -> article
ajout d'un paramètre au plugin (pour les groupes) mise en forme des formulaires
This commit is contained in:
parent
475f6aeed7
commit
2312297c4a
11 changed files with 609 additions and 188 deletions
46
content/editer_article.html
Normal file
46
content/editer_article.html
Normal file
|
@ -0,0 +1,46 @@
|
||||||
|
<section class="section-top section-bottom">
|
||||||
|
|
||||||
|
<div class="container">
|
||||||
|
|
||||||
|
[(#ENV{id_article}|?{
|
||||||
|
[(#INCLURE{fond=inclure/bouton_supprimer,id_article=#ENV{id_article}})]
|
||||||
|
[(#INCLURE{fond=inclure/bouton_une,id_article=#ENV{id_article}})]
|
||||||
|
<h1>Éditer l'article n°[(#ENV{id_article})]</h1>
|
||||||
|
,
|
||||||
|
<h1>Rédiger un article</h1>
|
||||||
|
})]
|
||||||
|
|
||||||
|
[(#SESSION{id_auteur}|oui)
|
||||||
|
[(#ENV{id_article}|oui)
|
||||||
|
[(#AUTORISER{modifier, article, #ENV{id_article}}|?{
|
||||||
|
<div class="ajax">
|
||||||
|
[(#FORMULAIRE_EDITER_ARTICLE{#ENV{id_article}})]<br>
|
||||||
|
</div>
|
||||||
|
,
|
||||||
|
<div class="reponse_formulaire reponse_formulaire_erreur">Votre compte ne fait pas partie des auteurs autorisés à modifier cet article.</div>
|
||||||
|
})]
|
||||||
|
]
|
||||||
|
[(#ENV{id_article}|non)
|
||||||
|
[(#AUTORISER{creer, article}|?{
|
||||||
|
<div class="ajax">
|
||||||
|
[(#FORMULAIRE_EDITER_ARTICLE)]
|
||||||
|
</div>
|
||||||
|
,
|
||||||
|
<div class="reponse_formulaire reponse_formulaire_erreur">Votre compte n'a pas les droits suffisants pour créer un article.</div>
|
||||||
|
})]
|
||||||
|
]
|
||||||
|
]
|
||||||
|
[(#SESSION{id_auteur}|non)
|
||||||
|
<div class="row mt-4">
|
||||||
|
<div class="se_connecter bloc_connexion col-lg-5">
|
||||||
|
[(#FORMULAIRE_LOGIN{#SELF})]
|
||||||
|
</div>
|
||||||
|
<div class="ou col-lg-2 text-center"><h2>ou</h2></div>
|
||||||
|
<div class="creer_associer_compte bloc_connexion col-lg-5">
|
||||||
|
[(#FORMULAIRE_INSCRIPTION{#SELF})]
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
]
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</section>
|
|
@ -1,35 +0,0 @@
|
||||||
[(#ENV{id_article}|?{
|
|
||||||
[(#INCLURE{fond=inclure/bouton_supprimer,id_article=#ENV{id_article}})]
|
|
||||||
[(#INCLURE{fond=inclure/bouton_une,id_article=#ENV{id_article}})]
|
|
||||||
<h1>Éditer l'article n°[(#ENV{id_article})]</h1>
|
|
||||||
,
|
|
||||||
<h1>Créer un article</h1>
|
|
||||||
})]
|
|
||||||
|
|
||||||
<div class="container">
|
|
||||||
[(#SESSION{id_auteur}|oui)
|
|
||||||
[(#ENV{id_article}|oui)
|
|
||||||
[(#AUTORISER{modifier, article, #ENV{id_article}}|?{
|
|
||||||
[(#FORMULAIRE_EDITER_BIEN{#ENV{id_article}})]<br>
|
|
||||||
,
|
|
||||||
<div class="reponse_formulaire reponse_formulaire_erreur">Votre compte ne fait pas partie des auteurs autorisés à modifier cet article.</div>
|
|
||||||
})]
|
|
||||||
]
|
|
||||||
[(#ENV{id_article}|non)
|
|
||||||
[(#AUTORISER{creer, article}|?{
|
|
||||||
[(#FORMULAIRE_EDITER_BIEN)]
|
|
||||||
,
|
|
||||||
<div class="reponse_formulaire reponse_formulaire_erreur">Votre compte n'a pas les droits suffisants pour créer un article.</div>
|
|
||||||
})]
|
|
||||||
]
|
|
||||||
]
|
|
||||||
[(#SESSION{id_auteur}|non)
|
|
||||||
<div class="se_connecter bloc_connexion">
|
|
||||||
[(#FORMULAIRE_LOGIN{#ENV{url}})]
|
|
||||||
</div>
|
|
||||||
<div class="ou"><h2>ou</h2></div>
|
|
||||||
<div class="creer_associer_compte bloc_connexion">
|
|
||||||
[(#FORMULAIRE_INSCRIPTION)]
|
|
||||||
</div>
|
|
||||||
]
|
|
||||||
</div>
|
|
|
@ -231,18 +231,15 @@ body{
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
}
|
}
|
||||||
.formulaire_nous_contacter{
|
.formulaire_nous_contacter{
|
||||||
|
background: none;
|
||||||
input, textarea{
|
input, textarea{
|
||||||
background-color: $light;
|
background-color: $light;
|
||||||
padding: 0.5rem;
|
|
||||||
border: none;
|
border: none;
|
||||||
border-radius: 0.2rem;
|
|
||||||
}
|
}
|
||||||
input.submit{
|
input.submit{
|
||||||
border: solid 2px $light;
|
border: solid 2px $light;
|
||||||
font-size: 1.5rem;
|
|
||||||
background: none;
|
background: none;
|
||||||
color: $light;
|
color: $light;
|
||||||
cursor: pointer;
|
|
||||||
&:hover{
|
&:hover{
|
||||||
background: rgba(255,255,255,0.25);
|
background: rgba(255,255,255,0.25);
|
||||||
border-color: transparent;
|
border-color: transparent;
|
||||||
|
@ -342,7 +339,7 @@ body{
|
||||||
padding: 10px 15px;
|
padding: 10px 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.colophon{
|
.footer-options{
|
||||||
background:$fond-footer;
|
background:$fond-footer;
|
||||||
padding: 1rem 0;
|
padding: 1rem 0;
|
||||||
ul{
|
ul{
|
||||||
|
@ -351,7 +348,7 @@ body{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.colophon .generator {
|
.footer-options .generator {
|
||||||
max-width: 300px;
|
max-width: 300px;
|
||||||
}
|
}
|
||||||
.lien_cc svg {
|
.lien_cc svg {
|
||||||
|
@ -367,7 +364,7 @@ body{
|
||||||
.nav li { display: inline-block !important; }
|
.nav li { display: inline-block !important; }
|
||||||
.nav li:not(.generator) a { display: inline; }
|
.nav li:not(.generator) a { display: inline; }
|
||||||
.nav li.separ { border: none; }
|
.nav li.separ { border: none; }
|
||||||
.nav li.separ:not(:first-of-type)::before { content: " | "; }
|
//.nav li.separ:not(:first-of-type)::before { content: " | "; }
|
||||||
.generator { /*position: absolute; top: 1rem; right: 0; max-width: 200px;*/ float: right; }
|
.generator { /*position: absolute; top: 1rem; right: 0; max-width: 200px;*/ float: right; }
|
||||||
.nav li a .title { display: none; }
|
.nav li a .title { display: none; }
|
||||||
}
|
}
|
||||||
|
@ -410,16 +407,39 @@ body{
|
||||||
/**********************************************************************/
|
/**********************************************************************/
|
||||||
|
|
||||||
.boutons .submit {
|
.boutons .submit {
|
||||||
font-size: 2.5rem;
|
font-size: 1.5rem;
|
||||||
|
line-height: 1rem;
|
||||||
|
padding: 1rem;
|
||||||
|
border: solid 1px $light;
|
||||||
|
border-radius: 0.5rem;
|
||||||
|
background-color: #4f56cd;
|
||||||
|
color: $light;
|
||||||
|
&:hover{
|
||||||
|
background-color: #7276ee;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.btn.pull-right, .une_OK {
|
.btn.pull-right, .une_OK {
|
||||||
margin-left: 2rem;
|
margin-left: 2rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.formulaire_spip{
|
||||||
|
background: $fond-formulaires;
|
||||||
|
border-radius: 0.5rem;
|
||||||
|
fieldset legend{
|
||||||
|
background: none;
|
||||||
|
}
|
||||||
|
input, textarea{
|
||||||
|
padding: 0.5rem;
|
||||||
|
border-radius: 0.2rem;
|
||||||
|
border: solid 1px grey;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**********************************************************************/
|
/**********************************************************************/
|
||||||
/*************** FORMULAIRE DE SAISIE D'ARTICLE ***********************/
|
/*************** FORMULAIRE DE SAISIE D'ARTICLE ***********************/
|
||||||
/**********************************************************************/
|
/**********************************************************************/
|
||||||
.formulaire_editer_bien {
|
.formulaire_editer_article {
|
||||||
clear: none;
|
clear: none;
|
||||||
.resume textarea { min-height: 25rem; }
|
.resume textarea { min-height: 25rem; }
|
||||||
.upload_vignette {
|
.upload_vignette {
|
||||||
|
@ -431,24 +451,8 @@ body{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.col_droite {
|
|
||||||
float: right;
|
|
||||||
width: 33%;
|
|
||||||
clear: right;
|
|
||||||
}
|
|
||||||
.principal, .auteurs { width: 60%; }
|
|
||||||
.formulaire_uploadhtml5 {
|
|
||||||
margin-bottom: 0;
|
|
||||||
float: left;
|
|
||||||
width: 100%;
|
|
||||||
.dropzone {
|
|
||||||
min-height: 50px;
|
|
||||||
.dz-message { margin: .5em 0; }
|
|
||||||
}
|
|
||||||
@include media-breakpoint-up(lg) {
|
|
||||||
width: 25%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.photo_bien {
|
.photo_bien {
|
||||||
justify-content: left;
|
justify-content: left;
|
||||||
.une_photo {
|
.une_photo {
|
||||||
|
@ -474,32 +478,6 @@ body{
|
||||||
width: auto;
|
width: auto;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.une_OK i.fas { color: green; }
|
|
||||||
|
|
||||||
/**********************************************************************/
|
|
||||||
/******** FORMULAIRE DE CONNEXION / CREATION DE COMPTE ****************/
|
|
||||||
/**********************************************************************/
|
|
||||||
|
|
||||||
#choix_connexion {
|
|
||||||
fieldset {
|
|
||||||
clear: none;
|
|
||||||
margin-bottom: 2rem;
|
|
||||||
border: solid 1px #BBB;
|
|
||||||
padding: 1.5rem;
|
|
||||||
background-color: #FCFCFC;
|
|
||||||
> div { margin-bottom: 1.2rem;}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@include media-breakpoint-up(md) {
|
|
||||||
#choix_connexion { flex-wrap: nowrap; }
|
|
||||||
}
|
|
||||||
.bloc_connexion {
|
|
||||||
flex-grow: 1;
|
|
||||||
}
|
|
||||||
.creer_associer_compte {
|
|
||||||
flex-grow: 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**********************************************************************/
|
/**********************************************************************/
|
||||||
/****************************** spip_admin ****************************/
|
/****************************** spip_admin ****************************/
|
||||||
|
|
|
@ -5,9 +5,8 @@ $couleur-liens : #dc7544;
|
||||||
$page-active: #ffe9aa;
|
$page-active: #ffe9aa;
|
||||||
$fond-footer: #464ba3;
|
$fond-footer: #464ba3;
|
||||||
$titres-footer: #64d4af;
|
$titres-footer: #64d4af;
|
||||||
|
$fond-formulaires: rgba(255,255,255,0.8);
|
||||||
$fond-transparent: rgba(255, 255, 255, 0.92);
|
$fond-transparent: rgba(255, 255, 255, 0.92);
|
||||||
$fond-rouge: #882625;
|
|
||||||
|
|
||||||
|
|
||||||
$bg-body: url('../images/bg-web.jpg');
|
$bg-body: url('../images/bg-web.jpg');
|
||||||
$bg-presentation: url('../images/bg-rouge-fonce-3.jpg');
|
$bg-presentation: url('../images/bg-rouge-fonce-3.jpg');
|
||||||
|
|
132
css/mon_site.css
132
css/mon_site.css
|
@ -12086,19 +12086,19 @@ body {
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#nous-contacter .formulaire_nous_contacter {
|
||||||
|
background: none;
|
||||||
|
}
|
||||||
|
|
||||||
#nous-contacter .formulaire_nous_contacter input, #nous-contacter .formulaire_nous_contacter textarea {
|
#nous-contacter .formulaire_nous_contacter input, #nous-contacter .formulaire_nous_contacter textarea {
|
||||||
background-color: #f8f9fa;
|
background-color: #f8f9fa;
|
||||||
padding: 0.5rem;
|
|
||||||
border: none;
|
border: none;
|
||||||
border-radius: 0.2rem;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#nous-contacter .formulaire_nous_contacter input.submit {
|
#nous-contacter .formulaire_nous_contacter input.submit {
|
||||||
border: solid 2px #f8f9fa;
|
border: solid 2px #f8f9fa;
|
||||||
font-size: 1.5rem;
|
|
||||||
background: none;
|
background: none;
|
||||||
color: #f8f9fa;
|
color: #f8f9fa;
|
||||||
cursor: pointer;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#nous-contacter .formulaire_nous_contacter input.submit:hover {
|
#nous-contacter .formulaire_nous_contacter input.submit:hover {
|
||||||
|
@ -12209,19 +12209,19 @@ body {
|
||||||
padding: 10px 15px;
|
padding: 10px 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.footer .colophon {
|
.footer .footer-options {
|
||||||
background: #464ba3;
|
background: #464ba3;
|
||||||
padding: 1rem 0;
|
padding: 1rem 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.footer .colophon ul {
|
.footer .footer-options ul {
|
||||||
-webkit-box-pack: justify;
|
-webkit-box-pack: justify;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
-webkit-box-align: center;
|
-webkit-box-align: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.footer .colophon .generator {
|
.footer .footer-options .generator {
|
||||||
max-width: 300px;
|
max-width: 300px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -12253,9 +12253,6 @@ body {
|
||||||
.footer .nav li.separ {
|
.footer .nav li.separ {
|
||||||
border: none;
|
border: none;
|
||||||
}
|
}
|
||||||
.footer .nav li.separ:not(:first-of-type)::before {
|
|
||||||
content: " | ";
|
|
||||||
}
|
|
||||||
.footer .generator {
|
.footer .generator {
|
||||||
/*position: absolute; top: 1rem; right: 0; max-width: 200px;*/
|
/*position: absolute; top: 1rem; right: 0; max-width: 200px;*/
|
||||||
float: right;
|
float: right;
|
||||||
|
@ -12305,74 +12302,70 @@ body {
|
||||||
/**************** TOUS LES FORMULAIRES DE CONNEXION *******************/
|
/**************** TOUS LES FORMULAIRES DE CONNEXION *******************/
|
||||||
/**********************************************************************/
|
/**********************************************************************/
|
||||||
.boutons .submit {
|
.boutons .submit {
|
||||||
font-size: 2.5rem;
|
font-size: 1.5rem;
|
||||||
|
line-height: 1rem;
|
||||||
|
padding: 1rem;
|
||||||
|
border: solid 1px #f8f9fa;
|
||||||
|
border-radius: 0.5rem;
|
||||||
|
background-color: #4f56cd;
|
||||||
|
color: #f8f9fa;
|
||||||
|
}
|
||||||
|
|
||||||
|
.boutons .submit:hover {
|
||||||
|
background-color: #7276ee;
|
||||||
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn.pull-right, .une_OK {
|
.btn.pull-right, .une_OK {
|
||||||
margin-left: 2rem;
|
margin-left: 2rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.formulaire_spip {
|
||||||
|
background: rgba(255, 255, 255, 0.8);
|
||||||
|
border-radius: 0.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.formulaire_spip fieldset legend {
|
||||||
|
background: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.formulaire_spip input, .formulaire_spip textarea {
|
||||||
|
padding: 0.5rem;
|
||||||
|
border-radius: 0.2rem;
|
||||||
|
border: solid 1px grey;
|
||||||
|
}
|
||||||
|
|
||||||
/**********************************************************************/
|
/**********************************************************************/
|
||||||
/*************** FORMULAIRE DE SAISIE D'ARTICLE ***********************/
|
/*************** FORMULAIRE DE SAISIE D'ARTICLE ***********************/
|
||||||
/**********************************************************************/
|
/**********************************************************************/
|
||||||
.formulaire_editer_bien {
|
.formulaire_editer_article {
|
||||||
clear: none;
|
clear: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.formulaire_editer_bien .resume textarea {
|
.formulaire_editer_article .resume textarea {
|
||||||
min-height: 25rem;
|
min-height: 25rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.formulaire_editer_bien .upload_vignette label {
|
.formulaire_editer_article .upload_vignette label {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
.formulaire_editer_bien .upload_vignette .ajaxbloc {
|
.formulaire_editer_article .upload_vignette .ajaxbloc {
|
||||||
clear: both;
|
clear: both;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (min-width: 992px) {
|
@media (min-width: 992px) {
|
||||||
.formulaire_editer_bien .upload_vignette .ajaxbloc {
|
.formulaire_editer_article .upload_vignette .ajaxbloc {
|
||||||
clear: initial;
|
clear: initial;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.formulaire_editer_bien .col_droite {
|
.formulaire_editer_article .photo_bien {
|
||||||
float: right;
|
|
||||||
width: 33%;
|
|
||||||
clear: right;
|
|
||||||
}
|
|
||||||
|
|
||||||
.formulaire_editer_bien .principal, .formulaire_editer_bien .auteurs {
|
|
||||||
width: 60%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.formulaire_editer_bien .formulaire_uploadhtml5 {
|
|
||||||
margin-bottom: 0;
|
|
||||||
float: left;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.formulaire_editer_bien .formulaire_uploadhtml5 .dropzone {
|
|
||||||
min-height: 50px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.formulaire_editer_bien .formulaire_uploadhtml5 .dropzone .dz-message {
|
|
||||||
margin: .5em 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (min-width: 992px) {
|
|
||||||
.formulaire_editer_bien .formulaire_uploadhtml5 {
|
|
||||||
width: 25%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.formulaire_editer_bien .photo_bien {
|
|
||||||
-webkit-box-pack: left;
|
-webkit-box-pack: left;
|
||||||
justify-content: left;
|
justify-content: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
.formulaire_editer_bien .photo_bien .une_photo {
|
.formulaire_editer_article .photo_bien .une_photo {
|
||||||
margin-right: 1rem;
|
margin-right: 1rem;
|
||||||
display: -webkit-box;
|
display: -webkit-box;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
@ -12382,60 +12375,25 @@ body {
|
||||||
max-width: 320px;
|
max-width: 320px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.formulaire_editer_bien .photo_bien .boutons_actions {
|
.formulaire_editer_article .photo_bien .boutons_actions {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
display: -webkit-box;
|
display: -webkit-box;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-around;
|
justify-content: space-around;
|
||||||
}
|
}
|
||||||
|
|
||||||
.formulaire_editer_bien .photo_bien .boutons_actions i.green {
|
.formulaire_editer_article .photo_bien .boutons_actions i.green {
|
||||||
padding: .6rem 1.5rem;
|
padding: .6rem 1.5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.formulaire_editer_bien .photo_bien .boutons_actions a {
|
.formulaire_editer_article .photo_bien .boutons_actions a {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.formulaire_editer_bien legend {
|
.formulaire_editer_article legend {
|
||||||
width: auto;
|
width: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.une_OK i.fas {
|
|
||||||
color: green;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**********************************************************************/
|
|
||||||
/******** FORMULAIRE DE CONNEXION / CREATION DE COMPTE ****************/
|
|
||||||
/**********************************************************************/
|
|
||||||
#choix_connexion fieldset {
|
|
||||||
clear: none;
|
|
||||||
margin-bottom: 2rem;
|
|
||||||
border: solid 1px #BBB;
|
|
||||||
padding: 1.5rem;
|
|
||||||
background-color: #FCFCFC;
|
|
||||||
}
|
|
||||||
|
|
||||||
#choix_connexion fieldset > div {
|
|
||||||
margin-bottom: 1.2rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (min-width: 768px) {
|
|
||||||
#choix_connexion {
|
|
||||||
flex-wrap: nowrap;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.bloc_connexion {
|
|
||||||
-webkit-box-flex: 1;
|
|
||||||
flex-grow: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
.creer_associer_compte {
|
|
||||||
-webkit-box-flex: 2;
|
|
||||||
flex-grow: 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**********************************************************************/
|
/**********************************************************************/
|
||||||
/****************************** spip_admin ****************************/
|
/****************************** spip_admin ****************************/
|
||||||
/**********************************************************************/
|
/**********************************************************************/
|
||||||
|
|
|
@ -40,14 +40,20 @@
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
<fieldset>
|
<fieldset>
|
||||||
#SET{name,id_bien}
|
#SET{name1,id_rub_articles}
|
||||||
#SET{erreurs,#ENV**{erreurs}|table_valeur{#GET{name}}}
|
#SET{name2,id_rub_groupes}
|
||||||
|
#SET{erreurs,#ENV**{erreurs}|table_valeur{#GET{name1}}|table_valeur{#GET{name2}}}
|
||||||
#SET{obli,"obligatoire"}
|
#SET{obli,"obligatoire"}
|
||||||
<legend>Configuration de l'arborescence</legend>
|
<legend>Configuration de l'arborescence</legend>
|
||||||
<div class="editer_[(#GET{name})][ (#GET{obli})][ (#GET{erreurs}|oui)erreur]">
|
<div class="editer_[(#GET{name1})][ (#GET{obli})][ (#GET{erreurs}|oui)erreur]">
|
||||||
<label for="#GET{name}">ID du secteur des biens</label>
|
<label for="#GET{name1}">ID du secteur des articles</label>
|
||||||
[<span class="erreur_message">(#GET{erreurs})</span>]
|
[<span class="erreur_message">(#GET{erreurs})</span>]
|
||||||
<input type="text" name="#GET{name}" id="#GET{name}" value="#ENV{#GET{name}}">
|
<input type="text" name="#GET{name1}" id="#GET{name1}" value="#ENV{#GET{name1}}">
|
||||||
|
</div>
|
||||||
|
<div class="editer_[(#GET{name2})][ (#GET{obli})][ (#GET{erreurs}|oui)erreur]">
|
||||||
|
<label for="#GET{name2}">ID du secteur des groupes</label>
|
||||||
|
[<span class="erreur_message">(#GET{erreurs})</span>]
|
||||||
|
<input type="text" name="#GET{name2}" id="#GET{name2}" value="#ENV{#GET{name2}}">
|
||||||
</div>
|
</div>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
|
|
160
formulaires/editer_article.html
Normal file
160
formulaires/editer_article.html
Normal file
|
@ -0,0 +1,160 @@
|
||||||
|
<link rel="stylesheet" href="[(#CHEMIN{css/tag_editor.css}|compacte|timestamp)]">
|
||||||
|
<div class="formulaire_spip formulaire_#FORM ajax">
|
||||||
|
|
||||||
|
[<p class="reponse_formulaire reponse_formulaire_erreur">(#ENV*{message_erreur})</p>]
|
||||||
|
[<p class="reponse_formulaire reponse_formulaire_ok">(#ENV*{message_ok})</p>]
|
||||||
|
|
||||||
|
<form name="formulaire_#FORM" action="#ENV{action}" method="post" enctype="multipart/form-data">
|
||||||
|
|
||||||
|
#ACTION_FORMULAIRE{#ENV{action}}
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-lg-9">
|
||||||
|
<fieldset>
|
||||||
|
<div class="titre">
|
||||||
|
<label for="titre">Titre</label>
|
||||||
|
<input class="text" type="text" name="titre" value="#ENV{titre}">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="soustitre">
|
||||||
|
<label for="soustitre">Sous-titre</label>
|
||||||
|
<input class="text" type="text" name="soustitre" value="#ENV{soustitre}">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="resume">
|
||||||
|
<label for="resume">Texte</label>
|
||||||
|
<textarea class="text" type="text" name="texte">#ENV{texte}</textarea>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
[(#REM) champ_1 en attente
|
||||||
|
<div class="champ_1">
|
||||||
|
<label for="champ_1">champ_1</label>
|
||||||
|
<textarea id="champ_1" name="champ_1" placeholder="Le champ_1...">#ENV{champ_1}</textarea>
|
||||||
|
OU
|
||||||
|
<input class="text" type="text" name="champ_1" value="#ENV{champ_1}" placeholder="Le champ_1">
|
||||||
|
</div>
|
||||||
|
]
|
||||||
|
[(#REM) champ_2 en attente
|
||||||
|
<div class="champ_2">
|
||||||
|
<label for="champ_2">Intervenants</label>
|
||||||
|
<textarea id="champ_2" name="champ_2" placeholder="le champ_2...">#ENV{champ_2}</textarea>
|
||||||
|
OU
|
||||||
|
<input class="text" type="text" name="champ_2" value="#ENV{champ_2}" placeholder="Le champ_2">
|
||||||
|
</div>
|
||||||
|
]
|
||||||
|
[(#REM) les champs non utilisés
|
||||||
|
<div class="references">
|
||||||
|
<label for="references">Références utilisées</label>
|
||||||
|
<textarea id="references" name="descriptif">#ENV{descriptif}</textarea>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="ressources">
|
||||||
|
<label for="ressources">Ressources pour aller plus loin</label>
|
||||||
|
<textarea id="ressources" name="chapo">#ENV{chapo}</textarea>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="credits">
|
||||||
|
<label for="credits">Crédits</label>
|
||||||
|
<textarea id="credits" name="surtitre">#ENV{surtitre}</textarea>
|
||||||
|
</div>
|
||||||
|
]
|
||||||
|
</fieldset>
|
||||||
|
[(#REM)
|
||||||
|
<fieldset>
|
||||||
|
<legend><i class="fas fa-globe"></i> Localisation</legend>
|
||||||
|
|
||||||
|
[(#SAISIE{carte,editer_gis_oui,env})]
|
||||||
|
|
||||||
|
[(#SAISIE{input,lat,
|
||||||
|
label=<:gis:lat:>,
|
||||||
|
defaut=#ENV{lat,#CONFIG{gis/lat,0}},
|
||||||
|
obligatoire=oui})]
|
||||||
|
[(#SAISIE{input,lon,
|
||||||
|
label=<:gis:lon:>,
|
||||||
|
defaut=#ENV{lon,#CONFIG{gis/lon,0}},
|
||||||
|
obligatoire=oui})]
|
||||||
|
</fieldset>
|
||||||
|
]
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="col-lg-3">
|
||||||
|
<fieldset class="col_droite type_biens">
|
||||||
|
<legend><i class="fas fa-globe"></i> Groupe</legend>
|
||||||
|
<div class="">
|
||||||
|
<select id="id_rubrique" name="id_rubrique" class="chosen">
|
||||||
|
<option value=""> </option>
|
||||||
|
<BOUCLE_pays(RUBRIQUES){id_parent = #CONFIG{balint/id_rub_groupes}}{tout}>
|
||||||
|
<optgroup label="#TITRE">
|
||||||
|
<BOUCLE_groupes(RUBRIQUES){id_parent = #ID_RUBRIQUE}{tout}>
|
||||||
|
<option value="#ID_RUBRIQUE" [(#ID_RUBRIQUE|=={#RUBRIQUE_SELECTED}|oui) selected="selected"]>#TITRE</option>
|
||||||
|
</BOUCLE_groupes>
|
||||||
|
</BOUCLE_pays>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</fieldset>
|
||||||
|
|
||||||
|
<B_mots_fermes>
|
||||||
|
<fieldset class="col_droite mots_fermes">
|
||||||
|
<legend><i class="fas fa-thumb-tack"></i> Emplacements</legend>
|
||||||
|
<BOUCLE_mots_fermes(GROUPES_MOTS){grigri != tags}{si #SESSION{statut}|=={0minirezo}}>
|
||||||
|
<div class="">
|
||||||
|
<select id="id_groupe_#ID_GROUPE" name="id_groupe_#ID_GROUPE[]" class="chosen" [(#UNSEUL|=={non}|oui) multiple]>
|
||||||
|
[(#UNSEUL|=={oui}|oui)
|
||||||
|
<option value=""> </option>
|
||||||
|
]
|
||||||
|
<BOUCLE_mot(MOTS){id_groupe}{par rang}>
|
||||||
|
#SET{selected,''}
|
||||||
|
<BOUCLE_arts(ARTICLES){id_article?}{id_mot?}>
|
||||||
|
[(#ID_MOT|oui) #SET{selected, selected}]
|
||||||
|
</BOUCLE_arts>
|
||||||
|
|
||||||
|
<option value="#ID_MOT" #GET{selected}>#TITRE</option>
|
||||||
|
</BOUCLE_mot>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</BOUCLE_mots_fermes>
|
||||||
|
</fieldset>
|
||||||
|
</B_mots_fermes>
|
||||||
|
|
||||||
|
<fieldset class="upload_vignette">
|
||||||
|
<legend><i class="fas fa-image"></i> Photos</legend>
|
||||||
|
<label for=""><small>largeur conseillée: entre 1024 et 2048 pixels</small></label>
|
||||||
|
<div class="ajax">
|
||||||
|
<INCLURE{fond=inclure/bigform,env}>
|
||||||
|
</div>
|
||||||
|
<INCLURE{fond=inclure/photos_bien,env,id_article=#ENV{id_article},ajax=les_photos}>
|
||||||
|
</fieldset>
|
||||||
|
|
||||||
|
<p class="boutons"><input type="submit" class="submit" value="Enregistrer" /></p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script src="[(#CHEMIN{js/tag_editor.min.js}|timestamp)]" type="text/javascript"></script>
|
||||||
|
<script src="[(#CHEMIN{js/caret.min.js}|timestamp)]" type="text/javascript"></script>
|
||||||
|
<script src="[(#CHEMIN{js/editer_bien.js}|compacte|timestamp)]" type="text/javascript"></script>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
var T_hashtag = [
|
||||||
|
<BOUCLE_gp_mots(GROUPES_MOTS){grigri=tags}>
|
||||||
|
<BOUCLE_htags(MOTS){id_groupe}>
|
||||||
|
"#TITRE",
|
||||||
|
</BOUCLE_htags>
|
||||||
|
</BOUCLE_gp_mots>
|
||||||
|
]
|
||||||
|
|
||||||
|
var T_hastag_ini = [
|
||||||
|
<BOUCLE_gp_mots2(GROUPES_MOTS){grigri=tags}>
|
||||||
|
<BOUCLE_htags2(MOTS){id_groupe}>
|
||||||
|
<BOUCLE_art(ARTICLES){id_article}{id_mot}>
|
||||||
|
"#_htags2:TITRE",
|
||||||
|
</BOUCLE_art>
|
||||||
|
</BOUCLE_htags2>
|
||||||
|
</BOUCLE_gp_mots2>
|
||||||
|
]
|
||||||
|
</script>
|
307
formulaires/editer_article.php
Normal file
307
formulaires/editer_article.php
Normal file
|
@ -0,0 +1,307 @@
|
||||||
|
<?php
|
||||||
|
if (!defined('_ECRIRE_INC_VERSION')) return;
|
||||||
|
|
||||||
|
function formulaires_editer_bien_charger_dist($id_article=0, $redirect=''){
|
||||||
|
|
||||||
|
$id_rubrique = intval(_request('id_rubrique'));
|
||||||
|
$titre = _request('titre');
|
||||||
|
$texte = _request('texte');
|
||||||
|
$soustitre = _request('soustitre');
|
||||||
|
|
||||||
|
$erreurs = array();
|
||||||
|
include_spip('inc/autoriser');
|
||||||
|
if (! autoriser("creer","article")) {
|
||||||
|
$erreurs['message_erreur'] = "Vous devez être connecté pour utiliser ce formulaire.";
|
||||||
|
return $erreurs;
|
||||||
|
}
|
||||||
|
|
||||||
|
$valeurs = array();
|
||||||
|
$valeurs['titre'] = $titre;
|
||||||
|
$valeurs['texte'] = $texte;
|
||||||
|
$valeurs['soustitre'] = $soustitre;
|
||||||
|
$valeurs['rubrique_selected'] = $id_rubrique;
|
||||||
|
|
||||||
|
if (intval($id_article)) {
|
||||||
|
if (! autoriser("modifier","article", $id_article)) {
|
||||||
|
$erreurs['message_erreur'] = "Vous n'êtes pas autorisé à modifier cet article.";
|
||||||
|
return $erreurs;
|
||||||
|
}
|
||||||
|
|
||||||
|
$valeurs = sql_fetsel('*', 'spip_articles', 'id_article='.intval($id_article));
|
||||||
|
$where = array(
|
||||||
|
'id_objet='.intval($id_article),
|
||||||
|
'objet="article"',
|
||||||
|
);
|
||||||
|
$res = sql_allfetsel('id_auteur','spip_auteurs_liens',$where);
|
||||||
|
$valeurs['T_id_auteurs'] = array_column($res,'id_auteur');
|
||||||
|
$valeurs['rubrique_selected'] = sql_getfetsel('id_rubrique','spip_articles','id_article='. $id_article);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$valeurs['T_id_auteurs'] = array();
|
||||||
|
$valeurs['id_article'] = -1 * intval(session_get('id_auteur'));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (intval($id_article)) {
|
||||||
|
$from = array(
|
||||||
|
'spip_gis as G',
|
||||||
|
'spip_gis_liens as L',
|
||||||
|
'spip_articles as A'
|
||||||
|
);
|
||||||
|
$where = array(
|
||||||
|
'L.id_objet='.intval($id_article),
|
||||||
|
'L.objet="article"',
|
||||||
|
'L.id_gis=G.id_gis'
|
||||||
|
);
|
||||||
|
$res = sql_fetsel('G.lat, G.lon', $from, $where);
|
||||||
|
if (count($res)) {
|
||||||
|
$valeurs['lat'] = $res['lat'];
|
||||||
|
$valeurs['lon'] = $res['lon'];
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
// recup gis
|
||||||
|
|
||||||
|
$valeurs['_bigup_rechercher_fichiers'] = true;
|
||||||
|
return $valeurs;
|
||||||
|
}
|
||||||
|
|
||||||
|
function formulaires_editer_bien_verifier_dist($id_article=0, $redirect=''){
|
||||||
|
$erreurs = array();
|
||||||
|
|
||||||
|
include_spip('inc/autoriser');
|
||||||
|
if (! autoriser("creer","article")) {
|
||||||
|
$erreurs['message_erreur'] = "Vous devez être connecté pour utiliser ce formulaire.";
|
||||||
|
return $erreurs;
|
||||||
|
}
|
||||||
|
if (intval($id_article)) {
|
||||||
|
if (! autoriser("modifier","article", $id_article)) {
|
||||||
|
$erreurs['message_erreur'] = "Vous n'êtes pas autorisé à modifier cet article.";
|
||||||
|
return $erreurs;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// il faut au minimum titre, texte et id_rubrique pour créer un article
|
||||||
|
if (_request('titre') == '' OR _request('texte') == '' OR _request('id_rubrique') == ''){
|
||||||
|
$erreurs['message_erreur'] = "Il faut obligatoirement un titre, un texte et une rubrique pour créer un article.";
|
||||||
|
return $erreurs;
|
||||||
|
}
|
||||||
|
// la rubrique choisie doit être une sous-rubrique du secteur défini en config
|
||||||
|
$id_rubrique = intval(_request('id_rubrique'));
|
||||||
|
$id_secteur = sql_getfetsel('id_secteur', 'spip_rubriques', 'id_rubrique='.$id_rubrique);
|
||||||
|
if ($id_secteur != lire_config('balint/id_bien')) {
|
||||||
|
$erreurs['message_erreur'] = "La rubrique choisie comme type d'article ne correspond au secteur défini dans les options de configuration.";
|
||||||
|
return $erreurs;
|
||||||
|
}
|
||||||
|
|
||||||
|
$bigform = charger_fonction('bigform_verifier','inc');
|
||||||
|
$options = ['mime' => 'image_web','taille_max'=>'2000','largeur_max'=>'2048','hauteur_max'=>'2048'];
|
||||||
|
$bigform($options,$erreurs);
|
||||||
|
|
||||||
|
return $erreurs;
|
||||||
|
}
|
||||||
|
|
||||||
|
function formulaires_editer_bien_traiter_dist($id_article=0, $redirect=''){
|
||||||
|
$new = $id_article;
|
||||||
|
if (!intval($id_article)) {
|
||||||
|
|
||||||
|
//$id_rubrique = lire_config('balint/id_bien');
|
||||||
|
$id_rubrique = intval(_request('id_rubrique'));
|
||||||
|
include_spip('action/editer_article');
|
||||||
|
$set = array(
|
||||||
|
'statut' => 'prepa'
|
||||||
|
);
|
||||||
|
$id_article = article_inserer($id_rubrique,$set);
|
||||||
|
}
|
||||||
|
|
||||||
|
// enregistrement de l'image
|
||||||
|
if (!intval($new)) {
|
||||||
|
$where = array(
|
||||||
|
'objet="article"',
|
||||||
|
'id_objet='.intval(session_get('id_auteur')) * -1
|
||||||
|
);
|
||||||
|
sql_updateq('spip_documents_liens',array('id_objet' => intval($id_article)), $where);
|
||||||
|
}
|
||||||
|
|
||||||
|
// maj de l'article
|
||||||
|
$set = array(
|
||||||
|
'titre' => _request('titre'),
|
||||||
|
'texte' => _request('texte'),
|
||||||
|
'soustitre' => _request('soustitre'),
|
||||||
|
'date' => date("Y-m-d H:i:s"),
|
||||||
|
// 'champ_1' => _request('champ_1'),
|
||||||
|
// 'champ_2' => _request('champ_2'),
|
||||||
|
// 'descriptif' => _request('descriptif'),
|
||||||
|
// 'chapo' => _request('chapo'),
|
||||||
|
// 'surtitre' => _request('surtitre')
|
||||||
|
);
|
||||||
|
sql_updateq('spip_articles',$set,'id_article='.intval($id_article));
|
||||||
|
|
||||||
|
// maj rubrique si besoin
|
||||||
|
$id_rubrique = intval(_request('id_rubrique'));
|
||||||
|
$id_rub = sql_getfetsel('id_rubrique', 'spip_articles', 'id_article='.$id_article);
|
||||||
|
if ($id_rub != $id_rubrique) {
|
||||||
|
include_spip('action/editer_article');
|
||||||
|
article_instituer($id_article, array('id_parent' => $id_rubrique));
|
||||||
|
}
|
||||||
|
|
||||||
|
// maj association article -> auteurs
|
||||||
|
include_spip('action/editer_liens');
|
||||||
|
$where = array(
|
||||||
|
'id_objet='.intval($id_article),
|
||||||
|
'objet="article"',
|
||||||
|
);
|
||||||
|
$ids_auteurs = sql_allfetsel('id_auteur', 'spip_auteurs_liens', $where);
|
||||||
|
$ids_auteurs = array_column($ids_auteurs, 'id_auteur');
|
||||||
|
$Tauteurs = _request('Tauteurs');
|
||||||
|
if (count($Tauteurs)) {
|
||||||
|
$associer = array_diff($Tauteurs, $ids_auteurs);
|
||||||
|
$dissocier = array_diff($ids_auteurs, $Tauteurs);
|
||||||
|
|
||||||
|
objet_associer( array('auteur' => $associer),array('article' => intval($id_article) ));
|
||||||
|
objet_dissocier( array('auteur' => $dissocier) , array('article' =>intval($id_article) ));
|
||||||
|
}
|
||||||
|
|
||||||
|
// maj des mots fermes
|
||||||
|
$T_id_groupe = sql_allfetsel('id_groupe','spip_groupes_mots','grigri!="tags"');
|
||||||
|
$T_id_groupe = array_column($T_id_groupe,'id_groupe');
|
||||||
|
|
||||||
|
foreach ($T_id_groupe as $id_groupe) {
|
||||||
|
$from = array(
|
||||||
|
'spip_mots as M',
|
||||||
|
'spip_mots_liens as L'
|
||||||
|
);
|
||||||
|
$where = array(
|
||||||
|
'L.id_objet='.intval($id_article),
|
||||||
|
'L.objet="article"',
|
||||||
|
'L.id_mot=M.id_mot',
|
||||||
|
'M.id_groupe='.$id_groupe
|
||||||
|
);
|
||||||
|
|
||||||
|
$ids_mots = sql_allfetsel('M.id_mot AS id_mot', $from, $where);
|
||||||
|
$ids_mots = array_column($ids_mots, 'id_mot');
|
||||||
|
$coches = _request('id_groupe_'.$id_groupe);
|
||||||
|
if (count($coches)) {
|
||||||
|
$associer = array_diff($coches, $ids_mots);
|
||||||
|
$dissocier = array_diff($ids_mots, $coches);
|
||||||
|
|
||||||
|
objet_associer(array('mot' => $associer),array('article' => intval($id_article)));
|
||||||
|
objet_dissocier(array('mot' => $dissocier), array('article' => intval($id_article)));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// maj des mots clefs ouverts
|
||||||
|
$json_htags = _request('tags_save');
|
||||||
|
$T_htags = json_decode($json_htags);
|
||||||
|
|
||||||
|
$from = array(
|
||||||
|
'spip_groupes_mots AS G',
|
||||||
|
'spip_mots AS M'
|
||||||
|
);
|
||||||
|
$where = array(
|
||||||
|
'G.grigri="tags"',
|
||||||
|
'G.id_groupe=M.id_groupe'
|
||||||
|
);
|
||||||
|
$res = sql_allfetsel('M.id_mot as id_mot, M.titre as titre',$from,$where);
|
||||||
|
$T_mots_existants = array_column($res,'id_mot','titre');
|
||||||
|
$T_id_mots_existants = array_column($res,'id_mot');
|
||||||
|
// on supprime toutes les liaisons
|
||||||
|
include_spip('action/editer_liens');
|
||||||
|
objet_dissocier(array("mot"=>$T_id_mots_existants), array("article"=>intval($id_article)));
|
||||||
|
|
||||||
|
$T_id_mots_a_associer = array();
|
||||||
|
$T_mots_a_creer = array();
|
||||||
|
foreach ($T_htags as $mot) {
|
||||||
|
if (array_key_exists($mot,$T_mots_existants)) {
|
||||||
|
$T_id_mots_a_associer[] = $T_mots_existants[$mot];
|
||||||
|
} else {
|
||||||
|
$T_mots_a_creer[] = $mot;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// On associe les nouveaux mots existants:
|
||||||
|
objet_associer(array("mot"=>$T_id_mots_a_associer), array("article"=>intval($id_article)));
|
||||||
|
|
||||||
|
// On cree les nouveaux mots
|
||||||
|
if (count($T_mots_a_creer)) {
|
||||||
|
$id_groupe = sql_getfetsel('id_groupe','spip_groupes_mots','grigri="tags"');
|
||||||
|
include_spip('action/editer_mot');
|
||||||
|
$T_nvx_id_mot = array();
|
||||||
|
foreach ($T_mots_a_creer as $nvx_mot) {
|
||||||
|
$set = array( 'titre' => $nvx_mot);
|
||||||
|
$T_nvx_id_mot[] = mot_inserer($id_groupe, $set);
|
||||||
|
}
|
||||||
|
// On associe les nouveaux mots crees :
|
||||||
|
objet_associer(array("mot"=>$T_nvx_id_mot), array("article"=>intval($id_article)));
|
||||||
|
}
|
||||||
|
|
||||||
|
include_spip('action/editer_objet');
|
||||||
|
// GIS
|
||||||
|
$lat_def = lire_config('gis/lat');
|
||||||
|
$lon_def = lire_config('gis/lon');
|
||||||
|
$lat = _request('lat');
|
||||||
|
$lon = _request('lon');
|
||||||
|
// 1. recup id_gis si present
|
||||||
|
$from = array(
|
||||||
|
'spip_gis as G',
|
||||||
|
'spip_gis_liens as L',
|
||||||
|
'spip_articles as A'
|
||||||
|
);
|
||||||
|
$where = array(
|
||||||
|
'L.id_objet='.intval($id_article),
|
||||||
|
'L.objet="article"',
|
||||||
|
'L.id_gis=G.id_gis'
|
||||||
|
);
|
||||||
|
$id_gis = sql_getfetsel('G.id_gis', $from, $where);
|
||||||
|
$set = array(
|
||||||
|
'titre' => _request('titre'),
|
||||||
|
'lat' => $lat,
|
||||||
|
'lon' => $lon,
|
||||||
|
'zoom' => 15
|
||||||
|
);
|
||||||
|
|
||||||
|
if (!$id_gis) {
|
||||||
|
$id_gis = sql_insertq('spip_gis',$set);
|
||||||
|
$set = array(
|
||||||
|
'id_gis' => $id_gis,
|
||||||
|
'id_objet' => intval($id_article),
|
||||||
|
'objet' => 'article'
|
||||||
|
);
|
||||||
|
sql_insertq('spip_gis_liens',$set);
|
||||||
|
} else {
|
||||||
|
if ($lat !== $lat_def and $lon !== $lon_def) {
|
||||||
|
objet_modifier('gis', $id_gis, $set);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// SEO title et description: créer ou mettre à jour, y compris si les valeurs postées sont vides (= vidage du champ)
|
||||||
|
$id_article = intval($id_article);
|
||||||
|
$seo_titre = _request('seo_titre');
|
||||||
|
$set = array('id_objet' => $id_article, 'objet' => 'article', 'meta_name' => 'title', 'meta_content' => $seo_titre);
|
||||||
|
$where = array("id_objet = $id_article", "objet = 'article'", "meta_name = 'title'");
|
||||||
|
$res = sql_getfetsel('meta_content', 'spip_seo', $where);
|
||||||
|
if ((!$res AND $seo_titre != '')
|
||||||
|
OR ($res != $seo_titre)) {
|
||||||
|
sql_replace('spip_seo', $set, $where);
|
||||||
|
}
|
||||||
|
$seo_descriptif = _request('seo_descriptif');
|
||||||
|
$set = array('id_objet' => $id_article, 'objet' => 'article', 'meta_name' => 'description', 'meta_content' => $seo_descriptif);
|
||||||
|
$where = array("id_objet = $id_article", "objet = 'article'", "meta_name = 'description'");
|
||||||
|
$res = sql_getfetsel('meta_content', 'spip_seo', $where);
|
||||||
|
if ((!$res AND $seo_descriptif != '')
|
||||||
|
OR ($res != $seo_descriptif)) {
|
||||||
|
sql_replace('spip_seo', $set, $where);
|
||||||
|
}
|
||||||
|
|
||||||
|
include_spip('inc/invalideur');
|
||||||
|
suivre_invalideur("id='id_article/1'");
|
||||||
|
|
||||||
|
$retour = array();
|
||||||
|
$retour['message_ok'] = "L'article est enregistré";
|
||||||
|
|
||||||
|
$retour['redirect'] = 'spip.php?page=article&id_article='.$id_article;
|
||||||
|
|
||||||
|
$bigform = charger_fonction('bigform_traiter','inc');
|
||||||
|
$bigform($id_article, 'article');
|
||||||
|
|
||||||
|
|
||||||
|
return $retour;
|
||||||
|
}
|
|
@ -17,7 +17,7 @@
|
||||||
[(#REM) declarer les hidden qui declencheront le service du formulaire parametre : url d'action ]
|
[(#REM) declarer les hidden qui declencheront le service du formulaire parametre : url d'action ]
|
||||||
#ACTION_FORMULAIRE{#ENV{action}}
|
#ACTION_FORMULAIRE{#ENV{action}}
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<legend><i class="fas fa-unlock-alt"></i> Se connecter</legend>
|
<legend><i class="fas fa-sign-in"></i> Se connecter</legend>
|
||||||
[<span id="spip_logo_auteur">(#ENV*{_logo,''})</span>]
|
[<span id="spip_logo_auteur">(#ENV*{_logo,''})</span>]
|
||||||
<div class="editer-groupe">
|
<div class="editer-groupe">
|
||||||
<div class="editer editer_login obligatoire[(#ENV**{erreurs}|table_valeur{var_login}|oui)erreur]">
|
<div class="editer editer_login obligatoire[(#ENV**{erreurs}|table_valeur{var_login}|oui)erreur]">
|
||||||
|
|
|
@ -6,14 +6,16 @@
|
||||||
</ol>
|
</ol>
|
||||||
<div class="carousel-inner">
|
<div class="carousel-inner">
|
||||||
<BOUCLE_diapo(ARTICLES){titre_mot=diaporama}{tout}>
|
<BOUCLE_diapo(ARTICLES){titre_mot=diaporama}{tout}>
|
||||||
|
[(#SET{lien_url,[(#URL_SITE|sinon{#URL_ARTICLE})]})]
|
||||||
<div class="carousel-item [(#COMPTEUR_BOUCLE|=={1}|oui) active]">
|
<div class="carousel-item [(#COMPTEUR_BOUCLE|=={1}|oui) active]">
|
||||||
<div class="carousel-caption text-light">
|
<div class="carousel-caption text-light">
|
||||||
<a href="#URL_SITE" class="diapo-texte text-light">
|
<a href="#GET{lien_url}" class="diapo-texte text-light">
|
||||||
<h2>#TITRE</h2>
|
<h2>#TITRE</h2>
|
||||||
#TEXTE
|
[(#DATE_AGENDA)]
|
||||||
|
#DESCRIPTIF
|
||||||
</a>
|
</a>
|
||||||
<a href="#URL_SITE" class="diapo-bouton text-light">
|
<a href="#GET{lien_url}" class="diapo-bouton text-light">
|
||||||
#NOM_SITE
|
[(#NOM_SITE|sinon{En savoir plus})]
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
compatibilite="[3.1.7;3.3.*]"
|
compatibilite="[3.1.7;3.3.*]"
|
||||||
logo="img/immomardi-64.png"
|
logo="img/immomardi-64.png"
|
||||||
documentation=""
|
documentation=""
|
||||||
schema="1.0.4"
|
schema="1.0.5"
|
||||||
>
|
>
|
||||||
|
|
||||||
<nom>Squelette AIPB</nom>
|
<nom>Squelette AIPB</nom>
|
||||||
|
|
Loading…
Add table
Reference in a new issue