ménage dans les fichiers
+ ajout necessite facteur
|
@ -2,6 +2,8 @@
|
||||||
if (!defined('_ECRIRE_INC_VERSION')) return;
|
if (!defined('_ECRIRE_INC_VERSION')) return;
|
||||||
|
|
||||||
function action_gamuform_add_pdf_dist(){
|
function action_gamuform_add_pdf_dist(){
|
||||||
|
// pour l'instant inutile
|
||||||
|
return false;
|
||||||
|
|
||||||
include_spip('inc/autoriser');
|
include_spip('inc/autoriser');
|
||||||
if (! autoriser("etre","connecte")) {
|
if (! autoriser("etre","connecte")) {
|
||||||
|
|
|
@ -26,7 +26,7 @@ if (!defined('_ECRIRE_INC_VERSION')) {
|
||||||
function gamumail_declarer_tables_interfaces($interfaces) {
|
function gamumail_declarer_tables_interfaces($interfaces) {
|
||||||
|
|
||||||
$interfaces['table_des_tables']['gamumails'] = 'gamumails';
|
$interfaces['table_des_tables']['gamumails'] = 'gamumails';
|
||||||
$interfaces['table_des_tables']['gamumail_pdfs'] = 'gamumail_pdfs';
|
//$interfaces['table_des_tables']['gamumail_pdfs'] = 'gamumail_pdfs';
|
||||||
|
|
||||||
return $interfaces;
|
return $interfaces;
|
||||||
}
|
}
|
||||||
|
@ -75,21 +75,21 @@ function gamumail_declarer_tables_objets_sql($tables) {
|
||||||
'texte_changer_statut' => 'gamumail:texte_changer_statut_gamumail',
|
'texte_changer_statut' => 'gamumail:texte_changer_statut_gamumail',
|
||||||
);
|
);
|
||||||
|
|
||||||
$tables['spip_gamumail_pdfs'] = array(
|
//$tables['spip_gamumail_pdfs'] = array(
|
||||||
'type' => 'gamumail_pdf',
|
//'type' => 'gamumail_pdf',
|
||||||
'principale' => 'oui',
|
//'principale' => 'oui',
|
||||||
'field'=> array(
|
//'field'=> array(
|
||||||
'id_gamumail_pdf' => 'bigint(21) NOT NULL',
|
//'id_gamumail_pdf' => 'bigint(21) NOT NULL',
|
||||||
'id_gamumail' => 'bigint(21) NOT NULL',
|
//'id_gamumail' => 'bigint(21) NOT NULL',
|
||||||
'pdf' => 'varchar(255) NOT NULL DEFAULT ""',
|
//'pdf' => 'varchar(255) NOT NULL DEFAULT ""',
|
||||||
'args' => 'varchar(255) NOT NULL DEFAULT ""',
|
//'args' => 'varchar(255) NOT NULL DEFAULT ""',
|
||||||
'maj' => 'TIMESTAMP'
|
//'maj' => 'TIMESTAMP'
|
||||||
),
|
//),
|
||||||
'key' => array(
|
//'key' => array(
|
||||||
'PRIMARY KEY' => 'id_gamumail_pdf',
|
//'PRIMARY KEY' => 'id_gamumail_pdf',
|
||||||
'KEY id_gamumail' => 'id_gamumail',
|
//'KEY id_gamumail' => 'id_gamumail',
|
||||||
)
|
//)
|
||||||
);
|
//);
|
||||||
|
|
||||||
return $tables;
|
return $tables;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,17 +0,0 @@
|
||||||
<div class='formulaire_spip formulaire_editer formulaire_#FORM formulaire_#FORM-#ENV{id_gamumail,nouveau}'>
|
|
||||||
[<p class="reponse_formulaire reponse_formulaire_ok">(#ENV**{message_ok})</p>]
|
|
||||||
[<p class="reponse_formulaire reponse_formulaire_erreur">(#ENV*{message_erreur})</p>]
|
|
||||||
|
|
||||||
[(#ENV{editable})
|
|
||||||
<form method="post" action="#ENV{action}"><div>
|
|
||||||
#ACTION_FORMULAIRE
|
|
||||||
<input type="hidden" name="id_gamumail" value="#ENV{id_gamumail}" />
|
|
||||||
<div class="editer-groupe">
|
|
||||||
|
|
||||||
</div>
|
|
||||||
[(#REM) ajouter les saisies supplementaires : extra et autre, a cet endroit ]
|
|
||||||
<!--extra-->
|
|
||||||
<p class="boutons"><input type="submit" class="submit" value="<:bouton_enregistrer:>" /></p>
|
|
||||||
</div></form>
|
|
||||||
]
|
|
||||||
</div>
|
|
|
@ -1,124 +0,0 @@
|
||||||
<?php
|
|
||||||
/**
|
|
||||||
* Gestion du formulaire de d'édition de gamumail
|
|
||||||
*
|
|
||||||
* @plugin GamuMail
|
|
||||||
* @copyright 2020
|
|
||||||
* @author tofulm
|
|
||||||
* @licence GNU/GPL
|
|
||||||
* @package SPIP\Gamumail\Formulaires
|
|
||||||
*/
|
|
||||||
|
|
||||||
if (!defined('_ECRIRE_INC_VERSION')) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
include_spip('inc/actions');
|
|
||||||
include_spip('inc/editer');
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Identifier le formulaire en faisant abstraction des paramètres qui ne représentent pas l'objet edité
|
|
||||||
*
|
|
||||||
* @param int|string $id_gamumail
|
|
||||||
* Identifiant du gamumail. 'new' pour un nouveau gamumail.
|
|
||||||
* @param string $retour
|
|
||||||
* URL de redirection après le traitement
|
|
||||||
* @param int $lier_trad
|
|
||||||
* Identifiant éventuel d'un gamumail source d'une traduction
|
|
||||||
* @param string $config_fonc
|
|
||||||
* Nom de la fonction ajoutant des configurations particulières au formulaire
|
|
||||||
* @param array $row
|
|
||||||
* Valeurs de la ligne SQL du gamumail, si connu
|
|
||||||
* @param string $hidden
|
|
||||||
* Contenu HTML ajouté en même temps que les champs cachés du formulaire.
|
|
||||||
* @return string
|
|
||||||
* Hash du formulaire
|
|
||||||
*/
|
|
||||||
function formulaires_editer_gamumail_identifier_dist($id_gamumail = 'new', $retour = '', $lier_trad = 0, $config_fonc = '', $row = array(), $hidden = '') {
|
|
||||||
return serialize(array(intval($id_gamumail)));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Chargement du formulaire d'édition de gamumail
|
|
||||||
*
|
|
||||||
* Déclarer les champs postés et y intégrer les valeurs par défaut
|
|
||||||
*
|
|
||||||
* @uses formulaires_editer_objet_charger()
|
|
||||||
*
|
|
||||||
* @param int|string $id_gamumail
|
|
||||||
* Identifiant du gamumail. 'new' pour un nouveau gamumail.
|
|
||||||
* @param string $retour
|
|
||||||
* URL de redirection après le traitement
|
|
||||||
* @param int $lier_trad
|
|
||||||
* Identifiant éventuel d'un gamumail source d'une traduction
|
|
||||||
* @param string $config_fonc
|
|
||||||
* Nom de la fonction ajoutant des configurations particulières au formulaire
|
|
||||||
* @param array $row
|
|
||||||
* Valeurs de la ligne SQL du gamumail, si connu
|
|
||||||
* @param string $hidden
|
|
||||||
* Contenu HTML ajouté en même temps que les champs cachés du formulaire.
|
|
||||||
* @return array
|
|
||||||
* Environnement du formulaire
|
|
||||||
*/
|
|
||||||
function formulaires_editer_gamumail_charger_dist($id_gamumail = 'new', $retour = '', $lier_trad = 0, $config_fonc = '', $row = array(), $hidden = '') {
|
|
||||||
$valeurs = formulaires_editer_objet_charger('gamumail', $id_gamumail, '', $lier_trad, $retour, $config_fonc, $row, $hidden);
|
|
||||||
return $valeurs;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Vérifications du formulaire d'édition de gamumail
|
|
||||||
*
|
|
||||||
* Vérifier les champs postés et signaler d'éventuelles erreurs
|
|
||||||
*
|
|
||||||
* @uses formulaires_editer_objet_verifier()
|
|
||||||
*
|
|
||||||
* @param int|string $id_gamumail
|
|
||||||
* Identifiant du gamumail. 'new' pour un nouveau gamumail.
|
|
||||||
* @param string $retour
|
|
||||||
* URL de redirection après le traitement
|
|
||||||
* @param int $lier_trad
|
|
||||||
* Identifiant éventuel d'un gamumail source d'une traduction
|
|
||||||
* @param string $config_fonc
|
|
||||||
* Nom de la fonction ajoutant des configurations particulières au formulaire
|
|
||||||
* @param array $row
|
|
||||||
* Valeurs de la ligne SQL du gamumail, si connu
|
|
||||||
* @param string $hidden
|
|
||||||
* Contenu HTML ajouté en même temps que les champs cachés du formulaire.
|
|
||||||
* @return array
|
|
||||||
* Tableau des erreurs
|
|
||||||
*/
|
|
||||||
function formulaires_editer_gamumail_verifier_dist($id_gamumail = 'new', $retour = '', $lier_trad = 0, $config_fonc = '', $row = array(), $hidden = '') {
|
|
||||||
$erreurs = array();
|
|
||||||
|
|
||||||
$erreurs = formulaires_editer_objet_verifier('gamumail', $id_gamumail);
|
|
||||||
|
|
||||||
return $erreurs;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Traitement du formulaire d'édition de gamumail
|
|
||||||
*
|
|
||||||
* Traiter les champs postés
|
|
||||||
*
|
|
||||||
* @uses formulaires_editer_objet_traiter()
|
|
||||||
*
|
|
||||||
* @param int|string $id_gamumail
|
|
||||||
* Identifiant du gamumail. 'new' pour un nouveau gamumail.
|
|
||||||
* @param string $retour
|
|
||||||
* URL de redirection après le traitement
|
|
||||||
* @param int $lier_trad
|
|
||||||
* Identifiant éventuel d'un gamumail source d'une traduction
|
|
||||||
* @param string $config_fonc
|
|
||||||
* Nom de la fonction ajoutant des configurations particulières au formulaire
|
|
||||||
* @param array $row
|
|
||||||
* Valeurs de la ligne SQL du gamumail, si connu
|
|
||||||
* @param string $hidden
|
|
||||||
* Contenu HTML ajouté en même temps que les champs cachés du formulaire.
|
|
||||||
* @return array
|
|
||||||
* Retours des traitements
|
|
||||||
*/
|
|
||||||
function formulaires_editer_gamumail_traiter_dist($id_gamumail = 'new', $retour = '', $lier_trad = 0, $config_fonc = '', $row = array(), $hidden = '') {
|
|
||||||
$retours = formulaires_editer_objet_traiter('gamumail', $id_gamumail, '', $lier_trad, $retour, $config_fonc, $row, $hidden);
|
|
||||||
return $retours;
|
|
||||||
}
|
|
|
@ -26,8 +26,8 @@ if (!defined('_ECRIRE_INC_VERSION')) {
|
||||||
function gamumail_upgrade($nom_meta_base_version, $version_cible) {
|
function gamumail_upgrade($nom_meta_base_version, $version_cible) {
|
||||||
$maj = array();
|
$maj = array();
|
||||||
|
|
||||||
$maj['create'] = array(array('maj_tables', array('spip_gamumails', 'spip_gamumail_pdfs')));
|
$maj['create'] = array(array('maj_tables', array('spip_gamumails')));
|
||||||
$maj['1.0.2'] = array(array('maj_tables', array('spip_gamumails', 'spip_gamumail_pdfs')));
|
$maj['1.0.2'] = array(array('maj_tables', array('spip_gamumails')));
|
||||||
$maj['1.0.5'] = array(array('creer_compte_curl'));
|
$maj['1.0.5'] = array(array('creer_compte_curl'));
|
||||||
|
|
||||||
function creer_compte_curl(){
|
function creer_compte_curl(){
|
||||||
|
|
|
@ -65,6 +65,7 @@
|
||||||
<strong>Message : </strong>
|
<strong>Message : </strong>
|
||||||
<div class="texte #EDIT{texte}">[(#TEXTE|sinon{cliquez})]</div>
|
<div class="texte #EDIT{texte}">[(#TEXTE|sinon{cliquez})]</div>
|
||||||
[(#REM)
|
[(#REM)
|
||||||
|
Pour l'instant, inutile
|
||||||
<div class="pdfs">
|
<div class="pdfs">
|
||||||
<INCLURE{fond=inclure/gamumail_pdfs,env,id_gamumail, ajax}>
|
<INCLURE{fond=inclure/gamumail_pdfs,env,id_gamumail, ajax}>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
|
[(#REM)
|
||||||
|
Pour l'instant inutile
|
||||||
|
]
|
||||||
|
|
||||||
<div class="pdfs">
|
<div class="pdfs">
|
||||||
[(#AUTORISER{webmestre}|oui)
|
[(#AUTORISER{webmestre}|oui)
|
||||||
<a class="btn ajax nohistory nocache" href="[(#URL_ACTION_AUTEUR{gamuform_add_pdf,#ENV{id_gamumail},#SELF})]">
|
<a class="btn ajax nohistory nocache" href="[(#URL_ACTION_AUTEUR{gamuform_add_pdf,#ENV{id_gamumail},#SELF})]">
|
||||||
|
@ -6,22 +10,18 @@
|
||||||
]
|
]
|
||||||
|
|
||||||
<BOUCLE_pdfs(GAMUMAIL_PDFS){id_gamumail}>
|
<BOUCLE_pdfs(GAMUMAIL_PDFS){id_gamumail}>
|
||||||
<div class="un-pdf">
|
<div class="un-pdf">
|
||||||
<div class="nom_pdf">
|
<div class="nom_pdf">
|
||||||
<h4><span class="label">Nom du fichier pdf</span>
|
<h4><span class="label">Nom du fichier pdf</span>
|
||||||
<span class="#EDIT{pdf} inbl w600p">[(#PDF|sinon{cliquer})]</span>
|
<span class="#EDIT{pdf} inbl w600p">[(#PDF|sinon{cliquer})]</span>
|
||||||
</h4>
|
</h4>
|
||||||
|
</div>
|
||||||
|
<div class="args-pdf">
|
||||||
|
<h4><span class="label">Nom des args</span>
|
||||||
|
<span class="#EDIT{args} inbl w600p">[(#ARGS|sinon{cliquer})]</span>
|
||||||
|
</h4>
|
||||||
|
<p class="explication">Si plusieurs arguments, les séparer par une virgule</p>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="args-pdf">
|
|
||||||
<h4><span class="label">Nom des args</span>
|
|
||||||
<span class="#EDIT{args} inbl w600p">[(#ARGS|sinon{cliquer})]</span>
|
|
||||||
</h4>
|
|
||||||
<p class="explication">Si plusieurs arguments, les séparer par une virgule</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</BOUCLE_pdfs>
|
</BOUCLE_pdfs>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -8,19 +8,16 @@
|
||||||
documentation=""
|
documentation=""
|
||||||
schema="1.0.5"
|
schema="1.0.5"
|
||||||
>
|
>
|
||||||
<!--
|
|
||||||
Paquet généré le 2020-04-24 20:56:15
|
|
||||||
-->
|
|
||||||
|
|
||||||
<nom>GamuMail</nom>
|
<nom>GamuMail</nom>
|
||||||
|
|
||||||
|
|
||||||
<auteur lien='https://gamuza.fr'>tofulm</auteur>
|
<auteur lien='https://gamuza.fr'>tofulm</auteur>
|
||||||
|
|
||||||
<licence>GNU/GPL</licence>
|
<licence>GNU/GPL</licence>
|
||||||
|
|
||||||
<necessite nom="bigform" compatibilite="[1.0.0;[" />
|
<necessite nom="bigform" compatibilite="[1.0.0;[" />
|
||||||
<necessite nom="crayons" compatibilite="[2.0.10;[" />
|
<necessite nom="crayons" compatibilite="[2.0.10;[" />
|
||||||
|
<necessite nom="facteur" compatibilite="[4.0.10;[" />
|
||||||
|
|
||||||
|
|
||||||
<pipeline nom="autoriser" inclure="gamumail_autorisations.php" />
|
<pipeline nom="autoriser" inclure="gamumail_autorisations.php" />
|
||||||
|
|
|
@ -1,17 +0,0 @@
|
||||||
<BOUCLE_gamumail(GAMUMAILS){id_gamumail}{statut?}>
|
|
||||||
[<div class="champ contenu_slug[ (#SLUG*|strlen|?{'',vide})]">
|
|
||||||
<div class="label"><:gamumail:champ_slug_label:> : </div>
|
|
||||||
<span dir="#LANG_DIR" class="#EDIT{slug} slug">(#SLUG)</span>
|
|
||||||
</div>]
|
|
||||||
|
|
||||||
[<div class="champ contenu_sujet[ (#SUJET*|strlen|?{'',vide})]">
|
|
||||||
<div class="label"><:gamumail:champ_sujet_label:> : </div>
|
|
||||||
<span dir="#LANG_DIR" class="#EDIT{sujet} sujet">(#SUJET)</span>
|
|
||||||
</div>]
|
|
||||||
|
|
||||||
[<div class="champ contenu_texte[ (#TEXTE*|strlen|?{'',vide})]">
|
|
||||||
<div class="label"><:gamumail:champ_texte_label:> : </div>
|
|
||||||
<span dir="#LANG_DIR" class="#EDIT{texte} texte">(#TEXTE)</span>
|
|
||||||
</div>]
|
|
||||||
|
|
||||||
</BOUCLE_gamumail>
|
|
|
@ -1,36 +0,0 @@
|
||||||
[(#SET{defaut_tri,#ARRAY{
|
|
||||||
slug,1,
|
|
||||||
id_gamumail,1,
|
|
||||||
points,-1
|
|
||||||
}})]<B_liste_gamumails>
|
|
||||||
#ANCRE_PAGINATION
|
|
||||||
<div class="liste-objets gamumails">
|
|
||||||
<table class="spip liste">
|
|
||||||
[<caption><strong class="caption">(#ENV*{titre,#GRAND_TOTAL|singulier_ou_pluriel{gamumail:info_1_gamumail,gamumail:info_nb_gamumails}})</strong></caption>]
|
|
||||||
<thead>
|
|
||||||
<tr class="first_row">
|
|
||||||
<th class="picto" scope="col"></th>
|
|
||||||
<th class="statut" scope="col">[(#TRI{statut,<span title="<:lien_trier_statut|attribut_html:>">#</span>,ajax})]</th>
|
|
||||||
<th class="slug" scope="col">[(#TRI{slug,<:gamumail:champ_slug_label:>,ajax})]</th>
|
|
||||||
<th class="id" scope="col">[(#TRI{id_gamumail,<:info_numero_abbreviation:>,ajax})]</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<BOUCLE_liste_gamumails(GAMUMAILS){id_mot?}{id_auteur?}{where?}{statut?}{recherche?}{tri #ENV{par,num slug},#GET{defaut_tri}}{par slug}{pagination #ENV{nb,10}}>
|
|
||||||
<tr class="[(#COMPTEUR_BOUCLE|alterner{row_odd,row_even})]">
|
|
||||||
<td class="picto">[(#CHEMIN_IMAGE{gamumail-16.png}|balise_img)]</td>
|
|
||||||
<td class="statut">[(#STATUT|puce_statut{gamumail,#ID_GAMUMAIL})]</td>
|
|
||||||
<td class="slug principale">[(#LOGO_GAMUMAIL|image_reduire{20,26})]<a href="[(#ID_GAMUMAIL|generer_url_entite{gamumail})]" title="<:info_numero_abbreviation|attribut_html:> #ID_GAMUMAIL">[(#RANG). ]#SLUG</a></td>
|
|
||||||
<td class="id">[(#AUTORISER{modifier,gamumail,#ID_GAMUMAIL}|?{
|
|
||||||
<a href="[(#URL_ECRIRE{gamumail_edit,id_gamumail=#ID_GAMUMAIL})]">#ID_GAMUMAIL</a>,
|
|
||||||
#ID_GAMUMAIL
|
|
||||||
})]</td>
|
|
||||||
</tr>
|
|
||||||
</BOUCLE_liste_gamumails>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
[<p class="pagination">(#PAGINATION{prive})</p>]
|
|
||||||
</div>
|
|
||||||
</B_liste_gamumails>[
|
|
||||||
<div class="liste-objets gamumails caption-wrap"><strong class="caption">(#ENV*{sinon,''})</strong></div>
|
|
||||||
]<//B_liste_gamumails>
|
|
|
@ -1,7 +0,0 @@
|
||||||
[(#AUTORISER{configurer,_gamumail}|sinon_interdire_acces)]
|
|
||||||
|
|
||||||
<h1 class="grostitre"><:gamumail:titre_page_configurer_gamumail:></h1>
|
|
||||||
|
|
||||||
<div class="ajax">
|
|
||||||
#FORMULAIRE_CONFIGURER_GAMUMAIL
|
|
||||||
</div>
|
|
Before Width: | Height: | Size: 414 B |
Before Width: | Height: | Size: 6.1 KiB |
Before Width: | Height: | Size: 542 B |
Before Width: | Height: | Size: 1 KiB |
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 637 B |