diff --git a/action/supprimer_chapitre.php b/action/supprimer_chapitre.php new file mode 100644 index 0000000..2826d15 --- /dev/null +++ b/action/supprimer_chapitre.php @@ -0,0 +1,118 @@ +, + * #URL_ACTION_AUTEUR{supprimer_chapitre, #ID_CHAPITRE, #URL_ECRIRE{chapitres}}, + * danger, <:chapitre:confirmer_supprimer_chapitre:/>})] + * ] + * ``` + * + * @example + * ``` + * [(#AUTORISER{supprimer, chapitre, #ID_CHAPITRE}|oui) + * [(#BOUTON_ACTION{ + * [(#CHEMIN_IMAGE{chapitre-del-24.png}|balise_img{<:chapitre:supprimer_chapitre:/>}|concat{' ',#VAL{<:chapitre:supprimer_chapitre:/>}|wrap{}}|trim)], + * #URL_ACTION_AUTEUR{supprimer_chapitre, #ID_CHAPITRE, #URL_ECRIRE{chapitres}}, + * icone s24 horizontale danger chapitre-del-24, <:chapitre:confirmer_supprimer_chapitre:/>})] + * ] + * ``` + * + * @example + * ``` + * if (autoriser('supprimer', 'chapitre', $id_chapitre)) { + * $supprimer_chapitre = charger_fonction('supprimer_chapitre', 'action'); + * $supprimer_chapitre($id_chapitre); + * } + * ``` + * + * @param null|int $arg + * Identifiant à supprimer. + * En absence de id utilise l'argument de l'action sécurisée. +**/ +function action_supprimer_chapitre_dist($arg=null) { + $need_confirm = false; + if (is_null($arg)){ + $securiser_action = charger_fonction('securiser_action', 'inc'); + $arg = $securiser_action(); + $need_confirm = true; + } + $arg = intval($arg); + + if ($need_confirm){ + $ok = confirmer_supprimer_chapitre_avant_action(_T('chapitre:confirmer_supprimer_chapitre'), _T('item_oui') . '! ' . _T('chapitre:supprimer_chapitre')); + } + + // cas suppression + if (autoriser('supprimer', 'chapitre', $arg)) { + if ($arg) { + $objet = sql_fetsel('*', 'spip_chapitres', 'id_chapitre=' . sql_quote($arg)); + $qui = (!empty($GLOBALS['visiteur_session']['id_auteur']) ? 'auteur #' . $GLOBALS['visiteur_session']['id_auteur'] : 'IP ' . $GLOBALS['ip']); + spip_log("SUPPRESSION chapitre#$arg par $qui : " . json_encode($objet), "suppressions" . _LOG_INFO_IMPORTANTE); + + sql_delete('spip_chapitres', 'id_chapitre=' . sql_quote($arg)); + + // invalider le cache + include_spip('inc/invalideur'); + suivre_invalideur("id='chapitre/$arg'"); + + } + else { + spip_log("action_supprimer_chapitre_dist $arg pas compris"); + } + } +} + +/** + * Confirmer avant suppression si on arrive par un bouton action + * @param string $titre + * @param string $titre_bouton + * @param string|null $url_action + * @return bool + */ +function confirmer_supprimer_chapitre_avant_action($titre, $titre_bouton, $url_action=null) { + + if (!$url_action) { + $url_action = self(); + $action = _request('action'); + $url_action = parametre_url($url_action, 'action', $action, '&'); + } + else { + $action = parametre_url($url_action, 'action'); + } + $arg = parametre_url($url_action, 'arg'); + $confirm = md5("$action:$arg:".realpath(__FILE__)); + if (_request('confirm_action') === $confirm) { + return true; + } + + $url_confirm = parametre_url($url_action, "confirm_action", $confirm, '&'); + include_spip("inc/filtres"); + $bouton_action = bouton_action($titre_bouton, $url_confirm); + $corps = "
$bouton_action
"; + + include_spip("inc/minipres"); + echo minipres($titre,$corps); + exit; +} diff --git a/base/podcast.php b/base/podcast.php index 41a7df8..c37506c 100644 --- a/base/podcast.php +++ b/base/podcast.php @@ -26,6 +26,7 @@ if (!defined('_ECRIRE_INC_VERSION')) { function podcast_declarer_tables_interfaces($interfaces) { $interfaces['table_des_tables']['podcasts'] = 'podcasts'; + $interfaces['table_des_tables']['chapitres'] = 'chapitres'; return $interfaces; } @@ -64,6 +65,33 @@ function podcast_declarer_tables_objets_sql($tables) { 'tables_jointures' => array(), + ); + + $tables['spip_chapitres'] = array( + 'type' => 'chapitre', + 'principale' => 'oui', + 'field'=> array( + 'id_chapitre' => 'bigint(21) NOT NULL', + 'id_podcast' => 'bigint(21) NOT NULL DEFAULT 0', + 'titre' => 'tinytext NOT NULL DEFAULT ""', + 'nom_identifiant' => 'tinytext NOT NULL DEFAULT ""', + 'sujet_principal' => 'int(6) NOT NULL DEFAULT 0', + 'debut' => 'varchar(25) NOT NULL DEFAULT ""', + 'fin' => 'varchar(25) NOT NULL DEFAULT ""', + 'maj' => 'TIMESTAMP NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP' + ), + 'key' => array( + 'PRIMARY KEY' => 'id_chapitre', + 'KEY id_podcast' => 'id_podcast', + ), + 'titre' => 'titre AS titre, "" AS lang', + #'date' => '', + 'champs_editables' => array('titre', 'nom_identifiant', 'sujet_principal', 'debut', 'fin', 'id_podcast'), + 'champs_versionnes' => array('titre', 'nom_identifiant', 'sujet_principal', 'debut', 'fin', 'id_podcast'), + 'rechercher_champs' => array("titre" => 5), + 'tables_jointures' => array(), + + ); return $tables; diff --git a/fabrique_diff.diff b/fabrique_diff.diff index 308b175..d7da545 100644 --- a/fabrique_diff.diff +++ b/fabrique_diff.diff @@ -1,110 +1,76 @@ -Only in ../sites/fabrique.spip/tmp/cache/fabrique/podcast/: action -Only in ../sites/fabrique.spip/tmp/cache/fabrique/podcast/: base -Only in ../sites/fabrique.spip/tmp/cache/fabrique/podcast/formulaires: editer_podcast.html -Only in ../sites/fabrique.spip/tmp/cache/fabrique/podcast/formulaires: editer_podcast.php -diff -r -x . -x .. -x fabrique_diff.diff -x fabrique_podcast.php ../sites/fabrique.spip/tmp/cache/fabrique/.backup/podcast/lang/podcast_fr.php ../sites/fabrique.spip/tmp/cache/fabrique/podcast/lang/podcast_fr.php -7a8 +Only in ../sites/fabrique.spip/tmp/cache/fabrique/podcast/action: supprimer_chapitre.php +diff -r -x . -x .. -x fabrique_diff.diff -x fabrique_podcast.php ../sites/fabrique.spip/tmp/cache/fabrique/.backup/podcast/base/podcast.php ../sites/fabrique.spip/tmp/cache/fabrique/podcast/base/podcast.php +28a29 +> $interfaces['table_des_tables']['chapitres'] = 'chapitres'; +63a65,91 +> 'tables_jointures' => array(), > -10,11c11,12 -< // P -< 'podcast_titre' => 'podcast', ---- -> // A -> 'ajouter_lien_podcast' => 'Ajouter ce podcast', -14,16c15,34 -< 'cfg_exemple' => 'Exemple', -< 'cfg_exemple_explication' => 'Explication de cet exemple', -< 'cfg_titre_parametrages' => 'Paramétrages', ---- -> 'champ_code_explication' => 'Code de l\'émission sous la forme « 20210119 »', -> 'champ_code_label' => 'code', -> 'champ_duree_explication' => 'La durée de l\'émission sous la forme « ?? »', -> 'champ_duree_label' => 'durée', -> 'confirmer_supprimer_podcast' => 'Confirmez-vous la suppression de ce podcast ?', > -> // I -> 'icone_creer_podcast' => 'Créer un podcast', -> 'icone_modifier_podcast' => 'Modifier ce podcast', -> 'info_1_podcast' => 'Un podcast', -> 'info_aucun_podcast' => 'Aucun podcast', -> 'info_nb_podcasts' => '@nb@ podcasts', -> 'info_podcasts_auteur' => 'Les podcasts de cet auteur', +> ); > -> // R -> 'retirer_lien_podcast' => 'Retirer ce podcast', -> 'retirer_tous_liens_podcasts' => 'Retirer tous les podcasts', -> -> // S -> 'supprimer_podcast' => 'Supprimer ce podcast', -19c37,47 -< 'titre_page_configurer_podcast' => 'podcast', ---- -> 'texte_ajouter_podcast' => 'Ajouter un podcast', -> 'texte_changer_statut_podcast' => 'Ce podcast est :', -> 'texte_creer_associer_podcast' => 'Créer et associer un podcast', -> 'texte_definir_comme_traduction_podcast' => 'Ce podcast est une traduction du podcast numéro :', -> 'titre_langue_podcast' => 'Langue de ce podcast', -> 'titre_logo_podcast' => 'Logo de ce podcast', -> 'titre_objets_lies_podcast' => 'Liés à ce podcast', -> 'titre_page_podcasts' => 'Les podcasts', -> 'titre_podcast' => 'Podcast', -> 'titre_podcasts' => 'Podcasts', -> 'titre_podcasts_rubrique' => 'Podcasts de la rubrique', +> $tables['spip_chapitres'] = array( +> 'type' => 'chapitre', +> 'principale' => 'oui', +> 'field'=> array( +> 'id_chapitre' => 'bigint(21) NOT NULL', +> 'id_podcast' => 'bigint(21) NOT NULL DEFAULT 0', +> 'titre' => 'tinytext NOT NULL DEFAULT ""', +> 'nom_identifiant' => 'tinytext NOT NULL DEFAULT ""', +> 'sujet_principal' => 'int(6) NOT NULL DEFAULT 0', +> 'debut' => 'varchar(25) NOT NULL DEFAULT ""', +> 'fin' => 'varchar(25) NOT NULL DEFAULT ""', +> 'maj' => 'TIMESTAMP NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP' +> ), +> 'key' => array( +> 'PRIMARY KEY' => 'id_chapitre', +> 'KEY id_podcast' => 'id_podcast', +> ), +> 'titre' => 'titre AS titre, "" AS lang', +> #'date' => '', +> 'champs_editables' => array('titre', 'nom_identifiant', 'sujet_principal', 'debut', 'fin', 'id_podcast'), +> 'champs_versionnes' => array('titre', 'nom_identifiant', 'sujet_principal', 'debut', 'fin', 'id_podcast'), +> 'rechercher_champs' => array("titre" => 5), +Only in ../sites/fabrique.spip/tmp/cache/fabrique/podcast/formulaires: editer_chapitre.html +Only in ../sites/fabrique.spip/tmp/cache/fabrique/podcast/formulaires: editer_chapitre.php +Only in ../sites/fabrique.spip/tmp/cache/fabrique/podcast/lang: chapitre_fr.php diff -r -x . -x .. -x fabrique_diff.diff -x fabrique_podcast.php ../sites/fabrique.spip/tmp/cache/fabrique/.backup/podcast/paquet.xml ../sites/fabrique.spip/tmp/cache/fabrique/podcast/paquet.xml 12c12 -< Paquet généré le 2021-02-10 06:55:22 +< Paquet généré le 2021-02-10 07:11:23 --- -> Paquet généré le 2021-02-10 07:11:23 -44a45,46 -> -> -47a50,54 -> -> -> -> -> -48a56 -> +> Paquet généré le 2021-02-11 09:30:30 diff -r -x . -x .. -x fabrique_diff.diff -x fabrique_podcast.php ../sites/fabrique.spip/tmp/cache/fabrique/.backup/podcast/podcast_administrations.php ../sites/fabrique.spip/tmp/cache/fabrique/podcast/podcast_administrations.php -53a54,55 -> $maj['create'] = array(array('maj_tables', array('spip_podcasts'))); -> -76a79,88 -> sql_drop_table('spip_podcasts'); -> -> # Nettoyer les liens courants (le génie optimiser_base_disparus se chargera de nettoyer toutes les tables de liens) -> sql_delete('spip_documents_liens', sql_in('objet', array('podcast'))); -> sql_delete('spip_mots_liens', sql_in('objet', array('podcast'))); -> sql_delete('spip_auteurs_liens', sql_in('objet', array('podcast'))); -> # Nettoyer les versionnages et forums -> sql_delete('spip_versions', sql_in('objet', array('podcast'))); -> sql_delete('spip_versions_fragments', sql_in('objet', array('podcast'))); -> sql_delete('spip_forum', sql_in('objet', array('podcast'))); +54c54 +< $maj['create'] = array(array('maj_tables', array('spip_podcasts'))); +--- +> $maj['create'] = array(array('maj_tables', array('spip_podcasts', 'spip_chapitres'))); +79a80 +> sql_drop_table('spip_chapitres'); +82,84c83,85 +< sql_delete('spip_documents_liens', sql_in('objet', array('podcast'))); +< sql_delete('spip_mots_liens', sql_in('objet', array('podcast'))); +< sql_delete('spip_auteurs_liens', sql_in('objet', array('podcast'))); +--- +> sql_delete('spip_documents_liens', sql_in('objet', array('podcast', 'chapitre'))); +> sql_delete('spip_mots_liens', sql_in('objet', array('podcast', 'chapitre'))); +> sql_delete('spip_auteurs_liens', sql_in('objet', array('podcast', 'chapitre'))); +86,88c87,89 +< sql_delete('spip_versions', sql_in('objet', array('podcast'))); +< sql_delete('spip_versions_fragments', sql_in('objet', array('podcast'))); +< sql_delete('spip_forum', sql_in('objet', array('podcast'))); +--- +> sql_delete('spip_versions', sql_in('objet', array('podcast', 'chapitre'))); +> sql_delete('spip_versions_fragments', sql_in('objet', array('podcast', 'chapitre'))); +> sql_delete('spip_forum', sql_in('objet', array('podcast', 'chapitre'))); diff -r -x . -x .. -x fabrique_diff.diff -x fabrique_podcast.php ../sites/fabrique.spip/tmp/cache/fabrique/.backup/podcast/podcast_autorisations.php ../sites/fabrique.spip/tmp/cache/fabrique/podcast/podcast_autorisations.php -39a40,143 -> +143a144,233 > // ----------------- -> // Objet podcasts +> // Objet chapitres +> +> > > > /** -> * Autorisation de voir un élément de menu (podcasts) -> * -> * @param string $faire Action demandée -> * @param string $type Type d'objet sur lequel appliquer l'action -> * @param int $id Identifiant de l'objet -> * @param array $qui Description de l'auteur demandant l'autorisation -> * @param array $opt Options de cette autorisation -> * @return bool true s'il a le droit, false sinon -> **/ -> function autoriser_podcasts_menu_dist($faire, $type, $id, $qui, $opt) { -> return true; -> } -> -> -> /** -> * Autorisation de voir (podcasts) +> * Autorisation de voir (chapitres) > * > * @param string $faire Action demandée > * @param string $type Type d'objet sur lequel appliquer l'action @@ -113,12 +79,12 @@ diff -r -x . -x .. -x fabrique_diff.diff -x fabrique_podcast.php ../sites/fabriq > * @param array $opt Options de cette autorisation > * @return bool true s'il a le droit, false sinon > **/ -> function autoriser_podcasts_voir_dist($faire, $type, $id, $qui, $opt) { +> function autoriser_chapitres_voir_dist($faire, $type, $id, $qui, $opt) { > return true; > } > > /** -> * Autorisation de voir (podcast) +> * Autorisation de voir (chapitre) > * > * @param string $faire Action demandée > * @param string $type Type d'objet sur lequel appliquer l'action @@ -127,12 +93,12 @@ diff -r -x . -x .. -x fabrique_diff.diff -x fabrique_podcast.php ../sites/fabriq > * @param array $opt Options de cette autorisation > * @return bool true s'il a le droit, false sinon > **/ -> function autoriser_podcast_voir_dist($faire, $type, $id, $qui, $opt) { +> function autoriser_chapitre_voir_dist($faire, $type, $id, $qui, $opt) { > return true; > } > > /** -> * Autorisation de créer (podcast) +> * Autorisation de créer (chapitre) > * > * @param string $faire Action demandée > * @param string $type Type d'objet sur lequel appliquer l'action @@ -141,12 +107,12 @@ diff -r -x . -x .. -x fabrique_diff.diff -x fabrique_podcast.php ../sites/fabriq > * @param array $opt Options de cette autorisation > * @return bool true s'il a le droit, false sinon > **/ -> function autoriser_podcast_creer_dist($faire, $type, $id, $qui, $opt) { +> function autoriser_chapitre_creer_dist($faire, $type, $id, $qui, $opt) { > return in_array($qui['statut'], array('0minirezo', '1comite')); > } > > /** -> * Autorisation de modifier (podcast) +> * Autorisation de modifier (chapitre) > * > * @param string $faire Action demandée > * @param string $type Type d'objet sur lequel appliquer l'action @@ -155,12 +121,12 @@ diff -r -x . -x .. -x fabrique_diff.diff -x fabrique_podcast.php ../sites/fabriq > * @param array $opt Options de cette autorisation > * @return bool true s'il a le droit, false sinon > **/ -> function autoriser_podcast_modifier_dist($faire, $type, $id, $qui, $opt) { +> function autoriser_chapitre_modifier_dist($faire, $type, $id, $qui, $opt) { > return in_array($qui['statut'], array('0minirezo', '1comite')); > } > > /** -> * Autorisation de supprimer (podcast) +> * Autorisation de supprimer (chapitre) > * > * @param string $faire Action demandée > * @param string $type Type d'objet sur lequel appliquer l'action @@ -169,13 +135,13 @@ diff -r -x . -x .. -x fabrique_diff.diff -x fabrique_podcast.php ../sites/fabriq > * @param array $opt Options de cette autorisation > * @return bool true s'il a le droit, false sinon > **/ -> function autoriser_podcast_supprimer_dist($faire, $type, $id, $qui, $opt) { +> function autoriser_chapitre_supprimer_dist($faire, $type, $id, $qui, $opt) { > return in_array($qui['statut'], array('0minirezo', '1comite')); > } > > > /** -> * Autorisation de créer l'élément (podcast) dans un articles +> * Autorisation de créer l'élément (chapitre) dans un podcasts > * > * @param string $faire Action demandée > * @param string $type Type d'objet sur lequel appliquer l'action @@ -184,89 +150,45 @@ diff -r -x . -x .. -x fabrique_diff.diff -x fabrique_podcast.php ../sites/fabriq > * @param array $opt Options de cette autorisation > * @return bool true s'il a le droit, false sinon > **/ -> function autoriser_article_creerpodcastdans_dist($faire, $type, $id, $qui, $opt) { -> return ($id and autoriser('voir', 'articles', $id) and autoriser('creer', 'podcast')); +> function autoriser_podcast_creerchapitredans_dist($faire, $type, $id, $qui, $opt) { +> return ($id and autoriser('voir', 'podcasts', $id) and autoriser('creer', 'chapitre')); > } diff -r -x . -x .. -x fabrique_diff.diff -x fabrique_podcast.php ../sites/fabrique.spip/tmp/cache/fabrique/.backup/podcast/podcast_pipelines.php ../sites/fabrique.spip/tmp/cache/fabrique/podcast/podcast_pipelines.php -21a22,96 +57a58,78 > -> -> /** -> * Ajouter les objets sur les vues des parents directs -> * -> * @pipeline affiche_enfants -> * @param array $flux Données du pipeline -> * @return array Données du pipeline -> **/ -> function podcast_affiche_enfants($flux) { -> if ( -> $e = trouver_objet_exec($flux['args']['exec']) -> and $e['edition'] === false -> ) { -> $id_objet = $flux['args']['id_objet']; -> -> if ($e['type'] === 'article') { +> if ($e['type'] === 'podcast') { > $flux['data'] .= recuperer_fond( -> 'prive/objets/liste/podcasts', +> 'prive/objets/liste/chapitres', > array( -> 'titre' => _T('podcast:titre_podcasts'), -> 'id_article' => $id_objet +> 'titre' => _T('chapitre:titre_chapitres'), +> 'id_podcast' => $id_objet > ) > ); > -> if (autoriser('creerpodcastdans', 'articles', $id_objet)) { +> if (autoriser('creerchapitredans', 'podcasts', $id_objet)) { > include_spip('inc/presentation'); > $flux['data'] .= icone_verticale( -> _T('podcast:icone_creer_podcast'), -> generer_url_ecrire('podcast_edit', "id_article=$id_objet"), -> 'podcast-24.png', +> _T('chapitre:icone_creer_chapitre'), +> generer_url_ecrire('chapitre_edit', "id_podcast=$id_objet"), +> 'chapitre-24.png', > 'new', > 'right' > ) . "
"; > } > } -> } -> return $flux; -> } -> -> /** -> * Afficher le nombre d'éléments dans les parents -> * -> * @pipeline boite_infos -> * @param array $flux Données du pipeline -> * @return array Données du pipeline -> **/ -> function podcast_boite_infos($flux) { -> if (isset($flux['args']['type']) and isset($flux['args']['id']) and $id = intval($flux['args']['id'])) { -> $texte = ''; -> if ($flux['args']['type'] == 'article' and $nb = sql_countsel('spip_podcasts', array('id_article=' . $id))) { -> $texte .= '
' . singulier_ou_pluriel($nb, 'podcast:info_1_podcast', 'podcast:info_nb_podcasts') . "
\n"; -> } -> if ($texte and $p = strpos($flux['data'], '')) { -> $flux['data'] = substr_replace($flux['data'], $texte, $p, 0); +74a96,98 +> if ($flux['args']['type'] == 'podcast' and $nb = sql_countsel('spip_chapitres', array('id_podcast=' . $id))) { +> $texte .= '
' . singulier_ou_pluriel($nb, 'chapitre:info_1_chapitre', 'chapitre:info_nb_chapitres') . "
\n"; > } +92a117,119 > } -> return $flux; -> } -> -> -> /** -> * Compter les enfants d'un objet -> * -> * @pipeline objets_compte_enfants -> * @param array $flux Données du pipeline -> * @return array Données du pipeline -> **/ -> function podcast_objet_compte_enfants($flux) { -> if ($flux['args']['objet'] == 'article' and $id_article = intval($flux['args']['id_objet'])) { -> $flux['data']['podcasts'] = sql_countsel('spip_podcasts', 'id_article= ' . intval($id_article)); -> } -> -> return $flux; -> } -Only in ../sites/fabrique.spip/tmp/cache/fabrique/podcast/prive: objets -Only in ../sites/fabrique.spip/tmp/cache/fabrique/podcast/prive/squelettes/contenu: podcast_edit.html -Only in ../sites/fabrique.spip/tmp/cache/fabrique/podcast/prive/squelettes: hierarchie -Only in ../sites/fabrique.spip/tmp/cache/fabrique/podcast/prive: themes -Only in ../sites/fabrique.spip/tmp/cache/fabrique/podcast/: saisies -Only in ../sites/fabrique.spip/tmp/cache/fabrique/podcast/: saisies-vues \ No newline at end of file +> if ($flux['args']['objet'] == 'podcast' and $id_podcast = intval($flux['args']['id_objet'])) { +> $flux['data']['chapitres'] = sql_countsel('spip_chapitres', 'id_podcast= ' . intval($id_podcast)); +Only in ../sites/fabrique.spip/tmp/cache/fabrique/podcast/prive/objets/contenu: chapitre.html +Only in ../sites/fabrique.spip/tmp/cache/fabrique/podcast/prive/objets/infos: chapitre.html +Only in ../sites/fabrique.spip/tmp/cache/fabrique/podcast/prive/objets/liste: chapitres.html +Only in ../sites/fabrique.spip/tmp/cache/fabrique/podcast/prive/squelettes/contenu: chapitre_edit.html +Only in ../sites/fabrique.spip/tmp/cache/fabrique/podcast/prive/squelettes/hierarchie: chapitre.html +Only in ../sites/fabrique.spip/tmp/cache/fabrique/podcast/prive/squelettes/hierarchie: chapitre_edit.html +Only in ../sites/fabrique.spip/tmp/cache/fabrique/podcast/saisies: chapitres.html +Only in ../sites/fabrique.spip/tmp/cache/fabrique/podcast/saisies-vues: chapitres.html \ No newline at end of file diff --git a/fabrique_podcast.php b/fabrique_podcast.php index 4abe161..4b4fac3 100644 --- a/fabrique_podcast.php +++ b/fabrique_podcast.php @@ -2,7 +2,7 @@ /** * Fichier généré par la Fabrique de plugin v7 - * le 2021-02-10 07:11:23 + * le 2021-02-11 09:30:30 * * Ce fichier de sauvegarde peut servir à recréer * votre plugin avec le plugin «Fabrique» qui a servi à le créer. @@ -193,6 +193,158 @@ $data = array ( 0 => 'menu_edition', ), ), + 1 => + array ( + 'nom' => 'Chapitres', + 'nom_singulier' => 'Chapitre', + 'genre' => 'masculin', + 'logo' => + array ( + 0 => '', + 32 => '', + 24 => '', + 16 => '', + 12 => '', + ), + 'table' => 'spip_chapitres', + 'cle_primaire' => 'id_chapitre', + 'cle_primaire_sql' => 'bigint(21) NOT NULL', + 'table_type' => 'chapitre', + 'champs' => + array ( + 0 => + array ( + 'nom' => 'titre', + 'champ' => 'titre', + 'sql' => 'tinytext NOT NULL DEFAULT \'\'', + 'caracteristiques' => + array ( + 0 => 'editable', + 1 => 'versionne', + 2 => 'obligatoire', + ), + 'recherche' => '5', + 'saisie' => 'input', + 'explication' => 'dans le json = chapter_title', + 'saisie_options' => '', + ), + 1 => + array ( + 'nom' => 'nom identifiant', + 'champ' => 'nom_identifiant', + 'sql' => 'tinytext NOT NULL DEFAULT \'\'', + 'caracteristiques' => + array ( + 0 => 'editable', + 1 => 'versionne', + ), + 'recherche' => '', + 'saisie' => 'input', + 'explication' => 'dans le json = short_chapter_name', + 'saisie_options' => '', + ), + 2 => + array ( + 'nom' => 'sujet principal', + 'champ' => 'sujet_principal', + 'sql' => 'int(6) NOT NULL DEFAULT 0', + 'caracteristiques' => + array ( + 0 => 'editable', + 1 => 'versionne', + ), + 'recherche' => '', + 'saisie' => 'case', + 'explication' => 'par défaut non = 0', + 'saisie_options' => '', + ), + 3 => + array ( + 'nom' => 'debut', + 'champ' => 'debut', + 'sql' => 'varchar(25) NOT NULL DEFAULT \'\'', + 'caracteristiques' => + array ( + 0 => 'editable', + 1 => 'versionne', + ), + 'recherche' => '', + 'saisie' => 'input', + 'explication' => 'dans le json = start_timestamp', + 'saisie_options' => '', + ), + 4 => + array ( + 'nom' => 'fin', + 'champ' => 'fin', + 'sql' => 'varchar(25) NOT NULL DEFAULT \'\'', + 'caracteristiques' => + array ( + 0 => 'editable', + 1 => 'versionne', + ), + 'recherche' => '', + 'saisie' => 'input', + 'explication' => 'dans le json = end_timestamp', + 'saisie_options' => '', + ), + ), + 'champ_titre' => 'titre', + 'champ_date' => '', + 'champ_date_ignore' => 'on', + 'statut' => '', + 'chaines' => + array ( + 'titre_objets' => 'Chapitres', + 'titre_page_objets' => 'Les chapitres', + 'titre_objet' => 'Chapitre', + 'info_aucun_objet' => 'Aucun chapitre', + 'info_1_objet' => 'Un chapitre', + 'info_nb_objets' => '@nb@ chapitres', + 'icone_creer_objet' => 'Créer un chapitre', + 'icone_modifier_objet' => 'Modifier ce chapitre', + 'titre_logo_objet' => 'Logo de ce chapitre', + 'titre_langue_objet' => 'Langue de ce chapitre', + 'texte_definir_comme_traduction_objet' => 'Ce chapitre est une traduction du chapitre numéro :', + 'titre_\\objets_lies_objet' => 'Liés à ce chapitre', + 'titre_objets_rubrique' => 'Chapitres de la rubrique', + 'info_objets_auteur' => 'Les chapitres de cet auteur', + 'retirer_lien_objet' => 'Retirer ce chapitre', + 'retirer_tous_liens_objets' => 'Retirer tous les chapitres', + 'ajouter_lien_objet' => 'Ajouter ce chapitre', + 'texte_ajouter_objet' => 'Ajouter un chapitre', + 'texte_creer_associer_objet' => 'Créer et associer un chapitre', + 'texte_changer_statut_objet' => 'Ce chapitre est :', + 'supprimer_objet' => 'Supprimer ce chapitre', + 'confirmer_supprimer_objet' => 'Confirmez-vous la suppression de ce chapitre ?', + ), + 'liaison_directe' => 'spip_podcasts', + 'table_liens' => '', + 'afficher_liens' => '', + 'roles' => '', + 'auteurs_liens' => '', + 'vue_auteurs_liens' => '', + 'fichiers' => + array ( + 'explicites' => + array ( + 0 => 'action/supprimer_objet.php', + ), + ), + 'saisies' => + array ( + 0 => 'objets', + ), + 'autorisations' => + array ( + 'objets_voir' => '', + 'objet_creer' => '', + 'objet_voir' => '', + 'objet_modifier' => '', + 'objet_supprimer' => 'redacteur', + 'associerobjet' => 'redacteur', + ), + ), ), 'images' => array ( @@ -212,6 +364,9 @@ $data = array ( 0 => array ( ), + 1 => + array ( + ), ), ), ); diff --git a/formulaires/editer_chapitre.html b/formulaires/editer_chapitre.html new file mode 100644 index 0000000..f816084 --- /dev/null +++ b/formulaires/editer_chapitre.html @@ -0,0 +1,41 @@ +
+ [

(#ENV**{message_ok})

] + [

(#ENV*{message_erreur})

] + + [(#ENV{editable}) +
+ #ACTION_FORMULAIRE + +
+ + [(#SAISIE{input, titre, obligatoire=oui, + label=<:chapitre:champ_titre_label:/>, + explication=<:chapitre:champ_titre_explication:/> })] + + [(#SAISIE{podcasts, id_podcast, obligatoire=oui, + label=<:podcast:titre_podcast:/>})] + + + [(#SAISIE{input, nom_identifiant, + label=<:chapitre:champ_nom_identifiant_label:/>, + explication=<:chapitre:champ_nom_identifiant_explication:/> })] + + [(#SAISIE{case, sujet_principal, + label=<:chapitre:champ_sujet_principal_label:/>, + explication=<:chapitre:champ_sujet_principal_explication:/> })] + + [(#SAISIE{input, debut, + label=<:chapitre:champ_debut_label:/>, + explication=<:chapitre:champ_debut_explication:/> })] + + [(#SAISIE{input, fin, + label=<:chapitre:champ_fin_label:/>, + explication=<:chapitre:champ_fin_explication:/> })] + +
+ [(#REM) ajouter les saisies supplementaires : extra et autre, a cet endroit ] + +

+
+ ] +
diff --git a/formulaires/editer_chapitre.php b/formulaires/editer_chapitre.php new file mode 100644 index 0000000..e54a00d --- /dev/null +++ b/formulaires/editer_chapitre.php @@ -0,0 +1,135 @@ +})] + [(#SAISIE{input, duree, label=<:podcast:champ_duree_label:/>, explication=<:podcast:champ_duree_explication:/> })] diff --git a/lang/chapitre_fr.php b/lang/chapitre_fr.php new file mode 100644 index 0000000..706cd13 --- /dev/null +++ b/lang/chapitre_fr.php @@ -0,0 +1,54 @@ + 'Ajouter ce chapitre', + + // C + 'champ_debut_explication' => 'dans le json = start_timestamp', + 'champ_debut_label' => 'debut', + 'champ_fin_explication' => 'dans le json = end_timestamp', + 'champ_fin_label' => 'fin', + 'champ_nom_identifiant_explication' => 'dans le json = short_chapter_name', + 'champ_nom_identifiant_label' => 'nom identifiant', + 'champ_sujet_principal_explication' => 'par défaut non = 0', + 'champ_sujet_principal_label' => 'sujet principal', + 'champ_titre_explication' => 'dans le json = chapter_title', + 'champ_titre_label' => 'titre', + 'confirmer_supprimer_chapitre' => 'Confirmez-vous la suppression de ce chapitre ?', + + // I + 'icone_creer_chapitre' => 'Créer un chapitre', + 'icone_modifier_chapitre' => 'Modifier ce chapitre', + 'info_1_chapitre' => 'Un chapitre', + 'info_aucun_chapitre' => 'Aucun chapitre', + 'info_chapitres_auteur' => 'Les chapitres de cet auteur', + 'info_nb_chapitres' => '@nb@ chapitres', + + // R + 'retirer_lien_chapitre' => 'Retirer ce chapitre', + 'retirer_tous_liens_chapitres' => 'Retirer tous les chapitres', + + // S + 'supprimer_chapitre' => 'Supprimer ce chapitre', + + // T + 'texte_ajouter_chapitre' => 'Ajouter un chapitre', + 'texte_changer_statut_chapitre' => 'Ce chapitre est :', + 'texte_creer_associer_chapitre' => 'Créer et associer un chapitre', + 'texte_definir_comme_traduction_chapitre' => 'Ce chapitre est une traduction du chapitre numéro :', + 'titre_chapitre' => 'Chapitre', + 'titre_chapitres' => 'Chapitres', + 'titre_chapitres_rubrique' => 'Chapitres de la rubrique', + 'titre_langue_chapitre' => 'Langue de ce chapitre', + 'titre_logo_chapitre' => 'Logo de ce chapitre', + 'titre_objets_lies_chapitre' => 'Liés à ce chapitre', + 'titre_page_chapitres' => 'Les chapitres', +); diff --git a/paquet.xml b/paquet.xml index dd0fa97..de6623a 100644 --- a/paquet.xml +++ b/paquet.xml @@ -1,7 +1,7 @@ diff --git a/podcast_administrations.php b/podcast_administrations.php index f9cdacb..e9eacb1 100644 --- a/podcast_administrations.php +++ b/podcast_administrations.php @@ -51,7 +51,7 @@ function podcast_upgrade($nom_meta_base_version, $version_cible) { # ); # ... - $maj['create'] = array(array('maj_tables', array('spip_podcasts'))); + $maj['create'] = array(array('maj_tables', array('spip_podcasts', 'spip_chapitres'))); include_spip('base/upgrade'); maj_plugin($nom_meta_base_version, $version_cible, $maj); @@ -77,15 +77,16 @@ function podcast_vider_tables($nom_meta_base_version) { # sql_drop_table('spip_xx_liens'); sql_drop_table('spip_podcasts'); + sql_drop_table('spip_chapitres'); # Nettoyer les liens courants (le génie optimiser_base_disparus se chargera de nettoyer toutes les tables de liens) - sql_delete('spip_documents_liens', sql_in('objet', array('podcast'))); - sql_delete('spip_mots_liens', sql_in('objet', array('podcast'))); - sql_delete('spip_auteurs_liens', sql_in('objet', array('podcast'))); + sql_delete('spip_documents_liens', sql_in('objet', array('podcast', 'chapitre'))); + sql_delete('spip_mots_liens', sql_in('objet', array('podcast', 'chapitre'))); + sql_delete('spip_auteurs_liens', sql_in('objet', array('podcast', 'chapitre'))); # Nettoyer les versionnages et forums - sql_delete('spip_versions', sql_in('objet', array('podcast'))); - sql_delete('spip_versions_fragments', sql_in('objet', array('podcast'))); - sql_delete('spip_forum', sql_in('objet', array('podcast'))); + sql_delete('spip_versions', sql_in('objet', array('podcast', 'chapitre'))); + sql_delete('spip_versions_fragments', sql_in('objet', array('podcast', 'chapitre'))); + sql_delete('spip_forum', sql_in('objet', array('podcast', 'chapitre'))); effacer_meta($nom_meta_base_version); } diff --git a/podcast_autorisations.php b/podcast_autorisations.php index 0559148..e776d92 100644 --- a/podcast_autorisations.php +++ b/podcast_autorisations.php @@ -141,3 +141,93 @@ function autoriser_podcast_supprimer_dist($faire, $type, $id, $qui, $opt) { function autoriser_article_creerpodcastdans_dist($faire, $type, $id, $qui, $opt) { return ($id and autoriser('voir', 'articles', $id) and autoriser('creer', 'podcast')); } +// ----------------- +// Objet chapitres + + + + +/** +* Autorisation de voir (chapitres) +* +* @param string $faire Action demandée +* @param string $type Type d'objet sur lequel appliquer l'action +* @param int $id Identifiant de l'objet +* @param array $qui Description de l'auteur demandant l'autorisation +* @param array $opt Options de cette autorisation +* @return bool true s'il a le droit, false sinon +**/ +function autoriser_chapitres_voir_dist($faire, $type, $id, $qui, $opt) { + return true; +} + +/** +* Autorisation de voir (chapitre) +* +* @param string $faire Action demandée +* @param string $type Type d'objet sur lequel appliquer l'action +* @param int $id Identifiant de l'objet +* @param array $qui Description de l'auteur demandant l'autorisation +* @param array $opt Options de cette autorisation +* @return bool true s'il a le droit, false sinon +**/ +function autoriser_chapitre_voir_dist($faire, $type, $id, $qui, $opt) { + return true; +} + +/** + * Autorisation de créer (chapitre) + * + * @param string $faire Action demandée + * @param string $type Type d'objet sur lequel appliquer l'action + * @param int $id Identifiant de l'objet + * @param array $qui Description de l'auteur demandant l'autorisation + * @param array $opt Options de cette autorisation + * @return bool true s'il a le droit, false sinon +**/ +function autoriser_chapitre_creer_dist($faire, $type, $id, $qui, $opt) { + return in_array($qui['statut'], array('0minirezo', '1comite')); +} + +/** + * Autorisation de modifier (chapitre) + * + * @param string $faire Action demandée + * @param string $type Type d'objet sur lequel appliquer l'action + * @param int $id Identifiant de l'objet + * @param array $qui Description de l'auteur demandant l'autorisation + * @param array $opt Options de cette autorisation + * @return bool true s'il a le droit, false sinon +**/ +function autoriser_chapitre_modifier_dist($faire, $type, $id, $qui, $opt) { + return in_array($qui['statut'], array('0minirezo', '1comite')); +} + +/** + * Autorisation de supprimer (chapitre) + * + * @param string $faire Action demandée + * @param string $type Type d'objet sur lequel appliquer l'action + * @param int $id Identifiant de l'objet + * @param array $qui Description de l'auteur demandant l'autorisation + * @param array $opt Options de cette autorisation + * @return bool true s'il a le droit, false sinon +**/ +function autoriser_chapitre_supprimer_dist($faire, $type, $id, $qui, $opt) { + return in_array($qui['statut'], array('0minirezo', '1comite')); +} + + +/** + * Autorisation de créer l'élément (chapitre) dans un podcasts + * + * @param string $faire Action demandée + * @param string $type Type d'objet sur lequel appliquer l'action + * @param int $id Identifiant de l'objet + * @param array $qui Description de l'auteur demandant l'autorisation + * @param array $opt Options de cette autorisation + * @return bool true s'il a le droit, false sinon +**/ +function autoriser_podcast_creerchapitredans_dist($faire, $type, $id, $qui, $opt) { + return ($id and autoriser('voir', 'podcasts', $id) and autoriser('creer', 'chapitre')); +} diff --git a/podcast_pipelines.php b/podcast_pipelines.php index bf48874..21e85f5 100644 --- a/podcast_pipelines.php +++ b/podcast_pipelines.php @@ -55,6 +55,27 @@ function podcast_affiche_enfants($flux) { ) . "
"; } } + + if ($e['type'] === 'podcast') { + $flux['data'] .= recuperer_fond( + 'prive/objets/liste/chapitres', + array( + 'titre' => _T('chapitre:titre_chapitres'), + 'id_podcast' => $id_objet + ) + ); + + if (autoriser('creerchapitredans', 'podcasts', $id_objet)) { + include_spip('inc/presentation'); + $flux['data'] .= icone_verticale( + _T('chapitre:icone_creer_chapitre'), + generer_url_ecrire('chapitre_edit', "id_podcast=$id_objet"), + 'chapitre-24.png', + 'new', + 'right' + ) . "
"; + } + } } return $flux; } @@ -72,6 +93,9 @@ function podcast_boite_infos($flux) { if ($flux['args']['type'] == 'article' and $nb = sql_countsel('spip_podcasts', array('id_article=' . $id))) { $texte .= '
' . singulier_ou_pluriel($nb, 'podcast:info_1_podcast', 'podcast:info_nb_podcasts') . "
\n"; } + if ($flux['args']['type'] == 'podcast' and $nb = sql_countsel('spip_chapitres', array('id_podcast=' . $id))) { + $texte .= '
' . singulier_ou_pluriel($nb, 'chapitre:info_1_chapitre', 'chapitre:info_nb_chapitres') . "
\n"; + } if ($texte and $p = strpos($flux['data'], '')) { $flux['data'] = substr_replace($flux['data'], $texte, $p, 0); } @@ -91,6 +115,9 @@ function podcast_objet_compte_enfants($flux) { if ($flux['args']['objet'] == 'article' and $id_article = intval($flux['args']['id_objet'])) { $flux['data']['podcasts'] = sql_countsel('spip_podcasts', 'id_article= ' . intval($id_article)); } + if ($flux['args']['objet'] == 'podcast' and $id_podcast = intval($flux['args']['id_objet'])) { + $flux['data']['chapitres'] = sql_countsel('spip_chapitres', 'id_podcast= ' . intval($id_podcast)); + } return $flux; } diff --git a/prive/objets/contenu/chapitre.html b/prive/objets/contenu/chapitre.html new file mode 100644 index 0000000..e899ff8 --- /dev/null +++ b/prive/objets/contenu/chapitre.html @@ -0,0 +1,27 @@ + +[
+
<:chapitre:champ_titre_label:/> :
+ (#TITRE) +
] + +[
+
<:chapitre:champ_nom_identifiant_label:/> :
+ (#NOM_IDENTIFIANT) +
] + +[
+
<:chapitre:champ_sujet_principal_label:/> :
+ (#SUJET_PRINCIPAL) +
] + +[
+
<:chapitre:champ_debut_label:/> :
+ (#DEBUT) +
] + +[
+
<:chapitre:champ_fin_label:/> :
+ (#FIN) +
] + + diff --git a/prive/objets/infos/chapitre.html b/prive/objets/infos/chapitre.html new file mode 100644 index 0000000..d3c7980 --- /dev/null +++ b/prive/objets/infos/chapitre.html @@ -0,0 +1,22 @@ + +
+[(#SET{texte_objet,<:chapitre:titre_chapitre:/>})] +
<:titre_cadre_numero_objet{objet=#GET{texte_objet}}:/>

#ID_CHAPITRE

+ +
+ + [(#VAL{redirect} + |generer_url_action{type=chapitre&id=#ID_CHAPITRE} + |parametre_url{var_mode,calcul} + |icone_horizontale{<:icone_voir_en_ligne:>,racine})] + + [(#AUTORISER{supprimer, chapitre, #ID_CHAPITRE}|oui) +
+ [(#BOUTON_ACTION{ + [(#CHEMIN_IMAGE{chapitre-del-24.png}|balise_img{<:chapitre:supprimer_chapitre:/>}|concat{' ',#VAL{<:chapitre:supprimer_chapitre:/>}|wrap{}}|trim)], + #URL_ACTION_AUTEUR{supprimer_chapitre, #ID_CHAPITRE, #URL_ECRIRE{chapitres}}, + icone s24 horizontale danger chapitre-del-24, <:chapitre:confirmer_supprimer_chapitre:/>})] + ] + +
+ diff --git a/prive/objets/liste/chapitres.html b/prive/objets/liste/chapitres.html new file mode 100644 index 0000000..bb1ff0b --- /dev/null +++ b/prive/objets/liste/chapitres.html @@ -0,0 +1,34 @@ +[(#SET{defaut_tri,#ARRAY{ + titre,1, + id_chapitre,1, + points,-1 +}})] +#ANCRE_PAGINATION +
+ + [] + + + + + + + + + + + + + + + + +
(#ENV*{titre,#GRAND_TOTAL|singulier_ou_pluriel{chapitre:info_1_chapitre,chapitre:info_nb_chapitres}})
[(#TRI{titre,<:chapitre:champ_titre_label:/>,ajax})][(#TRI{id_chapitre,<:info_numero_abbreviation:/>,ajax})]
[(#CHEMIN_IMAGE{chapitre-16.png}|balise_img)][(#LOGO_CHAPITRE|image_reduire{20,26})][(#RANG). ]#TITRE[(#AUTORISER{modifier,chapitre,#ID_CHAPITRE}|?{ + #ID_CHAPITRE, + #ID_CHAPITRE + })]
+[

(#PAGINATION{prive})

] +
+
[ +
(#ENV*{sinon,''})
+] diff --git a/prive/squelettes/contenu/chapitre_edit.html b/prive/squelettes/contenu/chapitre_edit.html new file mode 100644 index 0000000..3d6c7a8 --- /dev/null +++ b/prive/squelettes/contenu/chapitre_edit.html @@ -0,0 +1,36 @@ +[(#ID_CHAPITRE|oui) + [(#AUTORISER{modifier,chapitre,#ID_CHAPITRE}|sinon_interdire_acces)] + [(#SET{id_parent,#INFO_ID_PODCAST{chapitre,#ID_CHAPITRE}})] +] + +[(#ID_CHAPITRE|non) + #SET{id_parent,#ENV{id_podcast,#ENV{id_parent}}} + [(#GET{id_parent}|non|ou{[(#AUTORISER{creerchapitredans, podcast, #GET{id_parent}})]}|sinon_interdire_acces)] +] + +#SET{redirect,#ENV{redirect}|sinon{#ID_CHAPITRE|?{#ID_CHAPITRE|generer_url_entite{chapitre},#GET{id_parent}|?{#GET{id_parent}|generer_url_entite{podcast},#URL_ECRIRE{podcasts}}}}} + + + +
+
+ [(#ID_CHAPITRE|oui) + [(#GET{redirect}|icone_verticale{<:icone_retour:/>,chapitre,'',left retour[(#ENV{retourajax,''}|oui)ajax preload]})] + ] + [ + [(#ID_CHAPITRE|?{<:chapitre:icone_modifier_chapitre:/>,<:chapitre:icone_creer_chapitre:/>})] +

(#ENV{titre,#INFO_TITRE{chapitre,#ID_CHAPITRE}|sinon{<:info_sans_titre:/>}})

+ ] +
+ +#SET{redirect,#ENV{redirect,#ID_CHAPITRE|generer_url_entite{chapitre}}} +[(#ENV{retourajax,''}|oui) + #SET{redirect,'javascript:if (window.jQuery) jQuery(".entete-formulaire .retour a").followLink();'} +
+] + [(#FORMULAIRE_EDITER_CHAPITRE{#ENV{id_chapitre,oui}, #GET{id_parent}, #GET{redirect}})] +[(#ENV{retourajax,''}|oui) +
+ +] +
diff --git a/prive/squelettes/hierarchie/chapitre.html b/prive/squelettes/hierarchie/chapitre.html new file mode 100644 index 0000000..1437e75 --- /dev/null +++ b/prive/squelettes/hierarchie/chapitre.html @@ -0,0 +1,10 @@ + +<:chapitre:titre_chapitres:/> + +> [(#URL_ECRIRE{podcast,id_podcast=#ID_PODCAST}|lien_ou_expose{#INFO_TITRE{podcasts,#ID_PODCAST},''})] +> #TITRE + +[(#ENV{id_podcast}|oui) + > [(#URL_ECRIRE{podcast,id_podcast=#ID_PODCAST}|lien_ou_expose{#INFO_TITRE{podcasts,#ID_PODCAST},''})] +]> <:ecrire:info_sans_titre:/> + diff --git a/prive/squelettes/hierarchie/chapitre_edit.html b/prive/squelettes/hierarchie/chapitre_edit.html new file mode 100644 index 0000000..a1e7ee3 --- /dev/null +++ b/prive/squelettes/hierarchie/chapitre_edit.html @@ -0,0 +1 @@ + diff --git a/readme.md b/readme.md index 10346d9..c2fa59d 100644 --- a/readme.md +++ b/readme.md @@ -1,3 +1,6 @@ *PODCASTS* Un nouvel objet éditorial pour SPIP : "Podcast", qui gère le lecteur Podlove spécialement pour l'émission de l'April "Libre à vous !" + +- Podcast +-- chapitre diff --git a/saisies-vues/chapitres.html b/saisies-vues/chapitres.html new file mode 100644 index 0000000..739962a --- /dev/null +++ b/saisies-vues/chapitres.html @@ -0,0 +1,20 @@ + + [(#SET{valeur,[(#ENV*{valeur}|is_array|?{[(#ENV*{valeur})],[(#ENV*{valeur}|explode{','})]})]})] + +
    + +
  • #TITRE (#ID_CHAPITRE)
  • + +
+
+ [(#ENV*{sans_reponse}|propre)] + + + +

#TITRE (#ID_CHAPITRE)

+ + [(#ENV*{sans_reponse}|propre)] + + diff --git a/saisies/chapitres.html b/saisies/chapitres.html new file mode 100644 index 0000000..ff98dda --- /dev/null +++ b/saisies/chapitres.html @@ -0,0 +1,13 @@ +[(#ENV{multiple}|oui) + [(#SET{valeur,[(#ENV*{valeur}|is_array|?{[(#ENV*{valeur})],[(#ENV*{valeur}|explode{','})]})]})] +] +