Changeset 90559 in spip-zone
- Timestamp:
- Jun 27, 2015, 11:48:03 AM (6 years ago)
- Location:
- _plugins_/reservation_evenement/branches/v1
- Files:
-
- 3 added
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
_plugins_/reservation_evenement/branches/v1/base/reservation_evenement.php
r89236 r90559 11 11 12 12 if (!defined('_ECRIRE_INC_VERSION')) 13 13 return; 14 14 15 15 /** … … 24 24 function reservation_evenement_declarer_tables_interfaces($interfaces) { 25 25 26 27 28 29 26 $interfaces['table_des_tables']['reservations'] = 'reservations'; 27 $interfaces['table_des_tables']['reservations_details'] = 'reservations_details'; 28 29 return $interfaces; 30 30 } 31 31 … … 40 40 */ 41 41 function reservation_evenement_declarer_tables_objets_sql($tables) { 42 43 $tables['spip_reservations'] = array( 44 'type' => 'reservation', 45 'principale' => "oui", 46 'field' => array( 47 "id_reservation" => "bigint(21) NOT NULL", 48 "id_auteur" => "bigint(21) NOT NULL DEFAULT '0'", 49 "reference" => "varchar(255) NOT NULL DEFAULT ''", 50 "date_paiement" => "datetime NOT NULL DEFAULT '0000-00-00 00:00:00'", 51 "type_paiement" => "varchar(50) NOT NULL DEFAULT ''", 52 "nom" => "varchar(255) NOT NULL DEFAULT ''", 53 "email" => "varchar(255) NOT NULL DEFAULT ''", 54 "maj" => "timestamp", 55 "donnees_auteur" => "text NOT NULL DEFAULT ''", 56 "date" => "datetime NOT NULL DEFAULT '0000-00-00 00:00:00'", 57 "statut" => "varchar(20) DEFAULT '0' NOT NULL", 58 "lang" => "varchar(10) DEFAULT '' NOT NULL", 59 "maj" => "TIMESTAMP" 60 ), 61 'key' => array( 62 "PRIMARY KEY" => "id_reservation", 63 "KEY statut" => "statut,id_auteur,lang", 64 ), 65 'titre' => "reference AS titre, '' AS lang", 66 'date' => "date", 67 'champs_editables' => array( 68 'id_auteur', 69 'date_paiement', 70 'nom', 71 'email', 72 'donnees_auteur', 73 'reference', 74 'lang' 75 ), 76 'champs_versionnes' => array( 77 'id_auteur', 78 'date_paiement', 79 'nom', 80 'email', 81 'donnees_auteur', 82 'reference' 83 ), 84 'rechercher_champs' => array( 85 "reference" => 8, 86 "id_reservation" => 8 87 ), 88 'tables_jointures' => array( 89 'id_reservation', 90 'id_auteur' 91 ), 92 'statut_textes_instituer' => array( 93 'attente' => 'reservation:texte_statut_attente', 94 'attente_paiement' => 'reservation:texte_statut_attente_paiement', 95 'accepte' => 'reservation:texte_statut_accepte', 96 'cloture' => 'reservation:texte_statut_cloture', 97 'encours' => 'reservation:texte_statut_encours', 98 'refuse' => 'reservation:texte_statut_refuse', 99 'poubelle' => 'reservation:texte_statut_poubelle', 100 ), 101 'statut_images' => array( 102 'attente' => 'puce-reservation-attente-16.png', 103 'attente_paiement' => 'puce-reservation-attente_paiement-16.png', 104 'accepte' => 'puce-reservation-accepte-16.png', 105 'cloture' => 'puce-reservation-cloture-16.png', 106 'encours' => 'puce-reservation-encours-16.png', 107 'refuse' => 'puce-reservation-refuse-16.png', 108 'poubelle' => 'puce-reservation-poubelle-16.png', 109 ), 110 'statut' => array( array( 111 'champ' => 'statut', 112 'publie' => 'accepte,cloture', 113 'previsu' => 'accepte,attente,attente_paiement', 114 'post_date' => 'date', 115 'exception' => array( 116 'statut', 117 'tout' 118 ) 119 )), 120 'texte_changer_statut' => 'reservation:texte_changer_statut_reservation', 121 ); 122 123 $tables['spip_reservations_details'] = array( 124 'type' => 'reservations_detail', 125 'principale' => "oui", 126 'table_objet_surnoms' => array('reservationsdetail'), // table_objet('reservations_detail') => 'reservations_details' 127 'field' => array( 128 "id_reservations_detail" => "bigint(21) NOT NULL", 129 "id_reservation" => "bigint(21) NOT NULL DEFAULT '0'", 130 "id_evenement" => "bigint(21) NOT NULL DEFAULT '0'", 131 "descriptif" => "text NOT NULL", 132 "quantite" => "int(11) NOT NULL DEFAULT '1'", 133 "prix_ht" => "float NOT NULL DEFAULT '0'", 134 "prix" => "float NOT NULL DEFAULT '0'", 135 "taxe" => "decimal(4,3) NOT NULL DEFAULT '0.000'", 136 "statut" => "varchar(20) DEFAULT '0' NOT NULL", 137 "maj" => "TIMESTAMP" 138 ), 139 'key' => array( 140 "PRIMARY KEY" => "id_reservations_detail", 141 "KEY statut" => "statut,id_reservation,id_evenement", 142 ), 143 'titre' => "descriptif AS titre, '' AS lang", 144 #'date' => "", 145 'champs_editables' => array( 146 'id_reservation', 147 'id_evenement', 148 'descriptif', 149 'quantite', 150 'prix_ht', 151 'prix', 152 'taxe' 153 ), 154 'champs_versionnes' => array(), 155 'rechercher_champs' => array(), 156 'tables_jointures' => array( 157 'id_evenement', 158 'id_reservation' 159 ), 160 'statut_textes_instituer' => array( 161 'attente' => 'reservation:texte_statut_attente', 162 'attente_paiement' => 'reservation:texte_statut_attente_paiement', 163 'accepte' => 'reservation:texte_statut_accepte', 164 'cloture' => 'reservation:texte_statut_cloture', 165 'refuse' => 'reservation:texte_statut_refuse', 166 'poubelle' => 'reservation:texte_statut_poubelle', 167 ), 168 'statut_images' => array( 169 'attente' => 'puce-reservation-attente-16.png', 170 'attente_paiement' => 'puce-reservation-attente_paiement-16.png', 171 'accepte' => 'puce-reservation-accepte-16.png', 172 'cloture' => 'puce-reservation-cloture-16.png', 173 'refuse' => 'puce-reservation-refuse-16.png', 174 'poubelle' => 'puce-reservation-poubelle-16.png', 175 ), 176 'statut' => array( array( 177 'champ' => 'statut', 178 'publie' => 'accepte,cloture', 179 'previsu' => 'accepte,attente,attente_paiement', 180 'post_date' => 'date', 181 'exception' => array( 182 'statut', 183 'tout' 184 ) 185 )), 186 'texte_changer_statut' => 'reservations:texte_changer_statut_reservations_detail', 187 ); 188 //adaptation de la déclaration si le plugin prix_objets est installé 189 if (test_plugin_actif('prix_objets')) { 190 $tables['spip_reservations_details']['field'] = array_merge($tables['spip_reservations_details']['field'], array('id_prix_objet' => "bigint(21) NOT NULL DEFAULT '0'")); 191 $tables['spip_reservations_details']['champs_editables'] = array( 192 'id_reservation', 193 'id_evenement', 194 'descriptif', 195 'quantite', 196 'prix_ht', 197 'prix', 198 'taxe', 199 'id_prix_objet' 200 ); 201 } 202 203 //Ajouter le champ action_cloture dans le tables artiles et evenements 204 205 206 $tables['spip_articles']['champs_editable'][] = "action_cloture"; 207 $tables['spip_evenements']['champs_editable'][] = "action_cloture"; 208 209 return $tables; 210 42 43 $tables['spip_reservations'] = array( 44 'type' => 'reservation', 45 'principale' => "oui", 46 'field' => array( 47 "id_reservation" => "bigint(21) NOT NULL", 48 "id_reservation_source" => "bigint(21) NOT NULL", 49 "id_auteur" => "bigint(21) NOT NULL DEFAULT '0'", 50 "reference" => "varchar(255) NOT NULL DEFAULT ''", 51 "date_paiement" => "datetime NOT NULL DEFAULT '0000-00-00 00:00:00'", 52 "type_paiement" => "varchar(50) NOT NULL DEFAULT ''", 53 "nom" => "varchar(255) NOT NULL DEFAULT ''", 54 "email" => "varchar(255) NOT NULL DEFAULT ''", 55 "type_lien" => "varchar(25) NOT NULL DEFAULT ''", 56 "origine_lien" => "varchar(25) NOT NULL DEFAULT ''", 57 "maj" => "timestamp", 58 "donnees_auteur" => "text NOT NULL DEFAULT ''", 59 "date" => "datetime NOT NULL DEFAULT '0000-00-00 00:00:00'", 60 "statut" => "varchar(20) DEFAULT '0' NOT NULL", 61 "lang" => "varchar(10) DEFAULT '' NOT NULL", 62 "maj" => "TIMESTAMP" 63 ), 64 'key' => array( 65 "PRIMARY KEY" => "id_reservation", 66 "KEY statut" => "statut,id_auteur,lang,id_reservation_source", 67 ), 68 'titre' => "reference AS titre, '' AS lang", 69 'date' => "date", 70 'champs_editables' => array( 71 'id_reservation_source', 72 'id_auteur', 73 'date_paiement', 74 'nom', 75 'email', 76 'type_lien', 77 'origine_lien', 78 'donnees_auteur', 79 'reference', 80 'lang' 81 ), 82 'champs_versionnes' => array( 83 'id_auteur', 84 'date_paiement', 85 'nom', 86 'email', 87 'donnees_auteur', 88 'reference' 89 ), 90 'rechercher_champs' => array( 91 "reference" => 8, 92 "id_reservation" => 8, 93 "email" => 8, 94 "nom" => 8, 95 ), 96 'tables_jointures' => array( 97 'id_reservation', 98 'id_auteur' 99 ), 100 'statut_textes_instituer' => array( 101 'attente' => 'reservation:texte_statut_attente', 102 'attente_paiement' => 'reservation:texte_statut_attente_paiement', 103 'accepte' => 'reservation:texte_statut_accepte', 104 'cloture' => 'reservation:texte_statut_cloture', 105 'encours' => 'reservation:texte_statut_encours', 106 'refuse' => 'reservation:texte_statut_refuse', 107 'poubelle' => 'reservation:texte_statut_poubelle', 108 ), 109 'statut_images' => array( 110 'attente' => 'puce-reservation-attente-16.png', 111 'attente_paiement' => 'puce-reservation-attente_paiement-16.png', 112 'accepte' => 'puce-reservation-accepte-16.png', 113 'cloture' => 'puce-reservation-cloture-16.png', 114 'encours' => 'puce-reservation-encours-16.png', 115 'refuse' => 'puce-reservation-refuse-16.png', 116 'poubelle' => 'puce-reservation-poubelle-16.png', 117 ), 118 'statut' => array( array( 119 'champ' => 'statut', 120 'publie' => 'accepte,cloture', 121 'previsu' => 'accepte,attente,attente_paiement', 122 'post_date' => 'date', 123 'exception' => array( 124 'statut', 125 'tout' 126 ) 127 )), 128 'texte_changer_statut' => 'reservation:texte_changer_statut_reservation', 129 ); 130 131 $tables['spip_reservations_details'] = array( 132 'type' => 'reservations_detail', 133 'principale' => "oui", 134 'table_objet_surnoms' => array('reservationsdetail'), // table_objet('reservations_detail') => 'reservations_details' 135 'field' => array( 136 "id_reservations_detail" => "bigint(21) NOT NULL", 137 "id_reservation" => "bigint(21) NOT NULL DEFAULT '0'", 138 "id_evenement" => "bigint(21) NOT NULL DEFAULT '0'", 139 "descriptif" => "text NOT NULL", 140 "quantite" => "int(11) NOT NULL DEFAULT '1'", 141 "prix_ht" => "float NOT NULL DEFAULT '0'", 142 "prix" => "float NOT NULL DEFAULT '0'", 143 "taxe" => "decimal(4,3) NOT NULL DEFAULT '0.000'", 144 "statut" => "varchar(20) DEFAULT '0' NOT NULL", 145 "maj" => "TIMESTAMP" 146 ), 147 'key' => array( 148 "PRIMARY KEY" => "id_reservations_detail", 149 "KEY statut" => "statut,id_reservation,id_evenement", 150 ), 151 'titre' => "descriptif AS titre, '' AS lang", 152 #'date' => "", 153 'champs_editables' => array( 154 'id_reservation', 155 'id_evenement', 156 'descriptif', 157 'quantite', 158 'prix_ht', 159 'prix', 160 'taxe' 161 ), 162 'champs_versionnes' => array(), 163 'rechercher_champs' => array(), 164 'tables_jointures' => array( 165 'id_evenement', 166 'id_reservation' 167 ), 168 'statut_textes_instituer' => array( 169 'attente' => 'reservation:texte_statut_attente', 170 'attente_paiement' => 'reservation:texte_statut_attente_paiement', 171 'accepte' => 'reservation:texte_statut_accepte', 172 'cloture' => 'reservation:texte_statut_cloture', 173 'refuse' => 'reservation:texte_statut_refuse', 174 'poubelle' => 'reservation:texte_statut_poubelle', 175 ), 176 'statut_images' => array( 177 'attente' => 'puce-reservation-attente-16.png', 178 'attente_paiement' => 'puce-reservation-attente_paiement-16.png', 179 'accepte' => 'puce-reservation-accepte-16.png', 180 'cloture' => 'puce-reservation-cloture-16.png', 181 'refuse' => 'puce-reservation-refuse-16.png', 182 'poubelle' => 'puce-reservation-poubelle-16.png', 183 ), 184 'statut' => array( array( 185 'champ' => 'statut', 186 'publie' => 'accepte,cloture', 187 'previsu' => 'accepte,attente,attente_paiement', 188 'post_date' => 'date', 189 'exception' => array( 190 'statut', 191 'tout' 192 ) 193 )), 194 'texte_changer_statut' => 'reservations_detail:texte_changer_statut_reservations_detail', 195 ); 196 //adaptation de la déclaration si le plugin prix_objets est installé 197 if (test_plugin_actif('prix_objets')) { 198 $tables['spip_reservations_details']['field'] = array_merge($tables['spip_reservations_details']['field'], array('id_prix_objet' => "bigint(21) NOT NULL DEFAULT '0'")); 199 $tables['spip_reservations_details']['champs_editables'] = array( 200 'id_reservation', 201 'id_evenement', 202 'descriptif', 203 'quantite', 204 'prix_ht', 205 'prix', 206 'taxe', 207 'id_prix_objet' 208 ); 209 } 210 211 //Ajouter le champ action_cloture dans le tables artiles et evenements 212 213 $tables['spip_articles']['champs_editable'][] = "action_cloture"; 214 $tables['spip_evenements']['champs_editable'][] = "action_cloture"; 215 216 return $tables; 217 211 218 } 212 219 213 220 function reservation_evenement_declarer_tables_principales($tables_principales) { 214 221 215 216 217 218 222 $tables_principales['spip_articles']['field']['action_cloture'] = "tinyint(1) NOT NULL"; 223 $tables_principales['spip_evenements']['field']['action_cloture'] = "tinyint(1) NOT NULL"; 224 225 return $tables_principales; 219 226 } 220 -
_plugins_/reservation_evenement/branches/v1/formulaires/configurer_reservation_evenement.php
r89885 r90559 168 168 'options' => array( 169 169 'nom' => 'vendeur', 170 'label' => _T('reservation:notifications_destinat eur_label'),171 'explication' => _T('reservation:notifications_destinat eur_explication'),170 'label' => _T('reservation:notifications_destinataire_label'), 171 'explication' => _T('reservation:notifications_destinataire_explication'), 172 172 'cacher_option_intro' => 'on', 173 173 'defaut' => $config['vendeur'], -
_plugins_/reservation_evenement/branches/v1/formulaires/inc-action_cloture.html
r88150 r90559 2 2 [(#SAISIE{radio,action_cloture, 3 3 label=<:reservation:label_action_cloture:>, 4 datas=#ARRAY{1, oui,2,non},4 datas=#ARRAY{1,<:item_oui:>,2,<:item_non:>}, 5 5 })] 6 6 , -
_plugins_/reservation_evenement/branches/v1/inc/reservation_enregistrer.php
r89847 r90559 22 22 $fonction_reference = charger_fonction('reservation_reference', 'inc/'); 23 23 24 $set = array( 25 'statut' => $statut, 26 'lang' => _request('lang') 27 ); 28 29 //les champs extras auteur 30 include_spip('cextras_pipelines'); 31 $valeurs_extras = array(); 24 set_request('statut', $statut); 25 $reference = $fonction_reference($id_auteur); 26 set_request('reference', $reference); 32 27 33 28 if (_request('enregistrer')) { … … 42 37 auth_loger($auteur); 43 38 } 44 $set['reference'] = $fonction_reference($id_auteur); 39 45 40 } 46 elseif (!intval($id_auteur)) { 47 $set['nom'] = _request('nom'); 48 $set['email'] = _request('email'); 49 //$set['donnees_auteur']=serialize( $valeurs_extras); 50 } 51 else { 41 elseif (intval($id_auteur)) { 42 //les champs extras auteur 43 include_spip('cextras_pipelines'); 44 $valeurs_extras = array(); 45 46 if (!is_array($champs_extras_auteurs) AND function_exists('champs_extras_objet')) { 47 //Charger les définitions pour la création des formulaires 48 $champs_extras_auteurs = champs_extras_objet(table_objet_sql('auteur')); 49 } 50 51 if (is_array($champs_extras_auteurs)) { 52 foreach ($champs_extras_auteurs as $value) { 53 $valeurs_extras[$value['options']['label']] = _request($value['options']['nom']); 54 } 55 } 56 57 set_request('nom', ''); 58 set_request('email', ''); 59 52 60 $valeurs = array_merge(array( 53 61 'nom' => _request('nom'), … … 56 64 sql_updateq('spip_auteurs', $valeurs, 'id_auteur=' . $id_auteur); 57 65 } 58 $set['reference'] = $fonction_reference();59 $set['id_auteur'] = $id_auteur;66 67 set_request('id_auteur',$id_auteur); 60 68 61 $id_reservation = $action('new', 'reservation' , $set);69 $id_reservation = $action('new', 'reservation'); 62 70 63 71 // On ajoute l'id à la session 64 session_set('id_reservation', $id_reservation); 72 $id_reservation = $id_reservation[0]; 73 if (! _request('id_reservation_source')) session_set('id_reservation', $id_reservation); 65 74 66 75 $message = '<p>' . _T('reservation:reservation_enregistre') . '</p>'; 67 76 $message .= '<h3>' . _T('reservation:details_reservation') . '</h3>'; 68 $message .= recuperer_fond('inclure/reservation', array('id_reservation' => $id_reservation [0]));77 $message .= recuperer_fond('inclure/reservation', array('id_reservation' => $id_reservation)); 69 78 70 79 //Ivalider les caches -
_plugins_/reservation_evenement/branches/v1/lang/reservation.xml
r89980 r90559 1 1 <traduction module="reservation" gestionnaire="salvatore" url="http://trad.spip.net" source="svn://zone.spip.org/spip-zone/_plugins_/reservation_evenement/trunk/lang/" reference="fr"> 2 <langue code="de" url="http://trad.spip.net/tradlang_module/reservation?lang_cible=de" total="1 39" traduits="93" relire="0" modifs="2" nouveaux="44" pourcent="66.91">2 <langue code="de" url="http://trad.spip.net/tradlang_module/reservation?lang_cible=de" total="140" traduits="93" relire="0" modifs="2" nouveaux="45" pourcent="66.43"> 3 3 <traducteur nom="Rainer Müller" lien="http://trad.spip.net/auteur/rainer-muller" /> 4 4 </langue> 5 <langue code="en" url="http://trad.spip.net/tradlang_module/reservation?lang_cible=en" total="1 39" traduits="101" relire="0" modifs="2" nouveaux="36" pourcent="72.66">5 <langue code="en" url="http://trad.spip.net/tradlang_module/reservation?lang_cible=en" total="140" traduits="101" relire="0" modifs="2" nouveaux="37" pourcent="72.14"> 6 6 <traducteur nom="Hanjo" lien="http://trad.spip.net/auteur/hanjo" /> 7 7 <traducteur nom="Rainer Müller" lien="http://trad.spip.net/auteur/rainer-muller" /> 8 8 </langue> 9 <langue code="fr" url="http://trad.spip.net/tradlang_module/reservation?lang_cible=fr" total="1 39" traduits="139" relire="0" modifs="0" nouveaux="0" pourcent="100.00">9 <langue code="fr" url="http://trad.spip.net/tradlang_module/reservation?lang_cible=fr" total="140" traduits="140" relire="0" modifs="0" nouveaux="0" pourcent="100.00"> 10 10 </langue> 11 <langue code="pt_br" url="http://trad.spip.net/tradlang_module/reservation?lang_cible=pt_br" total="1 39" traduits="94" relire="6" modifs="2" nouveaux="37" pourcent="67.63">11 <langue code="pt_br" url="http://trad.spip.net/tradlang_module/reservation?lang_cible=pt_br" total="140" traduits="94" relire="6" modifs="2" nouveaux="38" pourcent="67.14"> 12 12 <traducteur nom="telopa" lien="http://trad.spip.net/auteur/telopa" /> 13 13 </langue> -
_plugins_/reservation_evenement/branches/v1/lang/reservation_fr.php
r89980 r90559 45 45 'icone_modifier_reservation' => 'Modifier cette réservation', 46 46 'info_1_reservation' => 'Une réservation', 47 'info_1_reservation_liee' => 'Une réservation liée', 47 48 'info_aucun_reservation' => 'Aucune réservation', 48 49 'info_nb_reservations' => '@nb@ réservations', 50 'info_nb_reservations_liees' => '@nb@ réservations liées', 49 51 'info_reservations_auteur' => 'Les réservations de cet auteur', 50 52 'info_voir_reservations_poubelle' => 'Voir les Résevations mises à la poubelle', … … 98 100 'notifications_client_explication' => 'Envoyer les notifications au client ?', 99 101 'notifications_client_label' => 'Client', 100 'notifications_destinat eur_label' => 'Destinateur',101 'notifications_destinat eur_label_explication' => 'Choisir le(s) destinataire(s) des notifications',102 'notifications_destinataire_label' => 'Destinataire', 103 'notifications_destinataire_explication' => 'Choisir le(s) destinataire(s) des notifications', 102 104 'notifications_envoi_separe' => 'Activer le mode Envoi Séparé pour le statut :', 103 105 'notifications_envoi_separe_explication' => 'Permet de déclencher l’envoi des notifications pour chaque Détail de Résérvation séparément', … … 170 172 'titre_reservations' => 'Réservations', 171 173 'total' => 'Total', 174 'type_lien' => 'Lié avec la réservation @reference@', 172 175 173 176 // U -
_plugins_/reservation_evenement/branches/v1/paquet.xml
r89951 r90559 2 2 prefix="reservation_evenement" 3 3 categorie="date" 4 version="1.19. 4"4 version="1.19.5" 5 5 etat="test" 6 6 compatibilite="[3.0.16;3.1.*]" 7 7 logo="prive/themes/spip/images/reservation_evenement-64.png" 8 8 documentation="http://contrib.spip.net/Reservation-d-evenements-4459" 9 schema="1. 4.2"9 schema="1.5.2" 10 10 > 11 11 -
_plugins_/reservation_evenement/branches/v1/prive/objets/liste/inc-reservations_reservations.html
r79404 r90559 1 1 [(#SET{defaut_tri,#ARRAY{ 2 reference,-1, 2 reference,-1, 3 id_reservation,1, 3 4 date,-1, 4 id_reservation,1,5 5 points,-1 6 }})]<B_liste_reservations> 6 }})] 7 #SET{chaine_defaut,reservation:type_lien}<B_liste_reservations> 7 8 #ANCRE_PAGINATION 9 <BOUCLE_liste_reservations_total(RESERVATIONS){id_auteur?}{id_mot?}{id_auteur?}{where?}{statut ?IN #ENV{statut}}{recherche?}{si #ENV{id_reservation_source}|=={0}|oui}> 10 </BOUCLE_liste_reservations_total> 11 #SET{grand_total,#GRAND_TOTAL} 12 #SET{titre_singulier,reservation:info_1_reservation} 13 #SET{titre_pluriel,reservation:info_nb_reservations} 14 </B_liste_reservations_total> 15 16 [(#ENV{id_reservation_source}|>{0}|oui) 17 #SET{titre_singulier,reservation:info_1_reservation_liee} 18 #SET{titre_pluriel,reservation:info_nb_reservations_liees} 19 ] 8 20 <div class="liste-objets reservations"> 9 <table class='spip liste'> 10 [<caption><strong class="caption">(#ENV*{titre,#GRAND_TOTAL|singulier_ou_pluriel{reservation:info_1_reservation,reservation:info_nb_reservations}})</strong></caption>] 21 <table class='spip liste'>[(#GET{grand_total}|non)#SET{grand_total,#GRAND_TOTAL}] 22 23 [<caption><strong class="caption">(#ENV*{titre,#GET{grand_total}|singulier_ou_pluriel{#GET{titre_singulier},#GET{titre_pluriel}}})</strong></caption>] 11 24 <thead> 12 25 <tr class='first_row'> … … 20 33 </thead> 21 34 <tbody> 22 <BOUCLE_liste_reservations(RESERVATIONS){id_ auteur?}{id_mot?}{id_auteur?}{where?}{statut ?IN #ENV{statut}}{recherche?}{tri #ENV{par,numreference},#GET{defaut_tri}}{pagination #ENV{nb,10}}>23 <tr class='[(#COMPTEUR_BOUCLE|alterner{row_odd,row_even})]'>35 <BOUCLE_liste_reservations(RESERVATIONS){id_reservation_source ?=#ENV{id_reservation_source}}{id_auteur?}{id_mot?}{id_auteur?}{where?}{statut ?IN #ENV{statut}}{recherche?}{tri #ENV{par,reference},#GET{defaut_tri}}{pagination #ENV{nb,10}}> 36 <tr> 24 37 <td class='picto'>[(#CHEMIN_IMAGE{reservation-16.png}|balise_img)]</td> 25 38 <td class='statut'>[(#STATUT|puce_statut{reservation,#ID_RESERVATION})]</td> 26 <td class='reference principale'>[(#LOGO_RESERVATION|image_reduire{20,26})]<a href="[(#ID_RESERVATION|generer_url_entite{reservation})]" title="<:info_numero_abbreviation|attribut_html:> #ID_RESERVATION">[(#RANG). ]#REFERENCE</a></td> 39 <td class='reference principale'><a href="[(#ID_RESERVATION|generer_url_entite{reservation})]" title="<:info_numero_abbreviation|attribut_html:> #ID_RESERVATION"> 40 [(#RANG). ]#REFERENCE 41 </a> 42 43 [(#ID_RESERVATION_SOURCE|>{0}|oui) 44 #SET{reference,#INFO_REFERENCE{reservation,#ID_RESERVATION_SOURCE}} 45 #SET{chaine,#ORIGINE_LIEN|concat{:type_lien_#TYPE_LIEN}{reference=#GET{reference}}} 46 [(#SET{chaine_traduite,#GET{chaine}|_T{#ARRAY{reference,#GET{reference}},#ARRAY{force,''}}|sinon{#GET{chaine_defaut}|_T{#ARRAY{reference,#GET{reference}}}}})] 47 <br /><img src="[(#CHEMIN_IMAGE{lien-#TYPE_LIEN-16.png}|sinon{#CHEMIN_IMAGE{lien-16.png}})]" alt="#GET{chaine_traduite}" title="#GET{chaine_traduite}" /> 48 ] 49 50 </td> 27 51 <td class='auteur'> 28 52 <BOUCLE_auteur(AUTEURS){id_auteur}{tout}> … … 40 64 })]</td> 41 65 </tr> 66 [(#ENV{id_reservation_source}|=={0}|oui) 67 <INCLURE{fond=prive/objets/liste/inc-reservations_reservations_liees,env,id_reservation_source=#ID_RESERVATION}/> 68 ] 42 69 </BOUCLE_liste_reservations> 43 70 </tbody> … … 46 73 </div> 47 74 </B_liste_reservations> 48 <div class="liste-objets reservations caption-wrap"><strong class="caption"><:reservation:info_aucun_reservation:></strong></div> 75 [(#ENV{id_reservation_source}|>{0}|non) 76 <div class="liste-objets reservations caption-wrap"><strong class="caption"><:reservation:info_aucun_reservation:></strong></div> 77 ] 49 78 <//B_liste_reservations> -
_plugins_/reservation_evenement/branches/v1/prive/objets/liste/reservations.html
r79406 r90559 1 1 #SET{id_evenement,#ARRAY} 2 2 #SET{date_debut,#ENV{date_debut,#ENV{date}}|affdate{Y-m-d 00:00:00}|agenda_dateplus{-1}} 3 #SET{id_reservation_source,''} 4 [(#ENV{recherche}|non)#SET{id_reservation_source,0}] 3 5 4 5 <INCLURE{fond=prive/objets/liste/inc-reservations_reservations,env,titre='',statut=#LISTE{ attente,attente_paiement,accepte,encours,refuse}}/> 6 <INCLURE{fond=prive/objets/liste/inc-reservations_reservations,env,titre='',statut=#LISTE{ attente,attente_paiement,accepte,encours,refuse},id_reservation_source=#GET{id_reservation_source}}/> 6 7 7 8 <BOUCLE_liste_reservations(RESERVATIONS){id_auteur?}{id_mot?}{id_auteur?}{where?}{statut=poubelle}{recherche?}{0,1}> … … 12 13 13 14 <a class="ajax" href="[(#SELF|parametre_url{afficher,''})]"><:reservation:icone_cacher:></a> 14 [(#INCLURE{fond=prive/objets/liste/inc-reservations_reservations,env,titre='',statut=#LISTE{poubelle} })]15 [(#INCLURE{fond=prive/objets/liste/inc-reservations_reservations,env,titre='',statut=#LISTE{poubelle},id_reservation_source=#GET{id_reservation_source}})] 15 16 } 16 17 )] -
_plugins_/reservation_evenement/branches/v1/prive/squelettes/contenu/reservation.html
r78019 r90559 44 44 <INCLURE{fond=prive/objets/liste/reservations_details,id_reservation,par=id_evenement,env}/> 45 45 46 <INCLURE{fond=prive/objets/liste/inc-reservations_reservations,env,id_reservation_source=#ID_RESERVATION}/> 47 46 48 [(#AUTORISER{creer,reservations_detail}) 47 49 [(#URL_ECRIRE{reservations_detail_edit,new=oui&id_reservation=#ID_RESERVATION}|icone_verticale{<:reservations_detail:icone_creer_reservations_detail:>,reservations_detail,new,right})] -
_plugins_/reservation_evenement/branches/v1/reservation_evenement_administrations.php
r89236 r90559 10 10 */ 11 11 12 if (!defined('_ECRIRE_INC_VERSION')) return;13 12 if (!defined('_ECRIRE_INC_VERSION')) 13 return; 14 14 15 15 /** … … 21 21 * - insérer du pre-contenu, 22 22 * - installer des valeurs de configuration, 23 * - mettre à jour la structure SQL 23 * - mettre à jour la structure SQL 24 24 * 25 25 * @param string $nom_meta_base_version … … 28 28 * Version du schéma de données dans ce plugin (déclaré dans paquet.xml) 29 29 * @return void 30 **/30 **/ 31 31 function reservation_evenement_upgrade($nom_meta_base_version, $version_cible) { 32 $maj = array(); 33 34 if($version_cible=='1.3.3'){ 35 include_spip('inc/config'); 36 $config=lire_config('reservation_evenement'); 37 if(isset($config['envoi_separe'])){ 38 $config['envoi_separe']=$config['envoi_separe']; 39 unset($config['envoi_separe']); 40 } 41 } 32 $maj = array(); 42 33 43 $maj['create'] = array(array('maj_tables', array('spip_reservations', 'spip_reservations_details','spip_articles','spip_evenements'))); 44 $maj['1.1.0'] = array( 45 array('sql_alter','TABLE spip_reservations_details CHANGE prix_unitaire_ht prix_ht float NOT NULL DEFAULT 0'), 46 array('maj_tables', array('spip_reservations_details')) 47 ); 48 $maj['1.2.0'] = array( array('maj_tables', array('spip_reservations_details'))); 49 $maj['1.3.1'] = array( array('maj_tables', array('spip_reservations'))); 50 $maj['1.3.3'] = array( array('ecrire_config', 'reservation_evenement', $config) ); 51 $maj['1.4.1'] = array(array('maj_tables', array('spip_articles','spip_evenements'))); 52 include_spip('inc/reservation_evenement_administrations'); 53 $maj['1.4.2'] = array( 54 array('sql_alter','TABLE spip_reservations_details CHANGE quantite quantite int(11) NOT NULL DEFAULT 1'), 55 array('update_donnees_auteurs') 56 ); 57 58 include_spip('base/upgrade'); 59 maj_plugin($nom_meta_base_version, $version_cible, $maj); 34 if ($version_cible == '1.3.3') { 35 include_spip('inc/config'); 36 $config = lire_config('reservation_evenement'); 37 if (isset($config['envoi_separe'])) { 38 $config['envoi_separe'] = $config['envoi_separe']; 39 unset($config['envoi_separe']); 40 } 41 } 42 43 $maj['create'] = array( array( 44 'maj_tables', 45 array( 46 'spip_reservations', 47 'spip_reservations_details', 48 'spip_articles', 49 'spip_evenements' 50 ) 51 )); 52 $maj['1.1.0'] = array( 53 array( 54 'sql_alter', 55 'TABLE spip_reservations_details CHANGE prix_unitaire_ht prix_ht float NOT NULL DEFAULT 0' 56 ), 57 array( 58 'maj_tables', 59 array('spip_reservations_details') 60 ) 61 ); 62 $maj['1.2.0'] = array( array( 63 'maj_tables', 64 array('spip_reservations_details') 65 )); 66 $maj['1.3.1'] = array( array( 67 'maj_tables', 68 array('spip_reservations') 69 )); 70 $maj['1.3.3'] = array( array( 71 'ecrire_config', 72 'reservation_evenement', 73 $config 74 )); 75 $maj['1.4.1'] = array( array( 76 'maj_tables', 77 array( 78 'spip_articles', 79 'spip_evenements' 80 ) 81 )); 82 include_spip('inc/reservation_evenement_administrations'); 83 $maj['1.4.2'] = array( 84 array( 85 'sql_alter', 86 'TABLE spip_reservations_details CHANGE quantite quantite int(11) NOT NULL DEFAULT 1' 87 ), 88 array('update_donnees_auteurs') 89 ); 90 $maj['1.5.2'] = array( 91 array( 92 'maj_tables', 93 array('spip_reservations') 94 ), 95 array( 96 'sql_alter', 97 'TABLE spip_reservations ADD INDEX `id_reservation_source` (`id_reservation_source`)' 98 ) 99 ); 100 101 include_spip('base/upgrade'); 102 maj_plugin($nom_meta_base_version, $version_cible, $maj); 60 103 } 61 62 104 63 105 /** 64 106 * Fonction de désinstallation du plugin Réservation Événements. 65 * 107 * 66 108 * Vous devez : 67 109 * 68 110 * - nettoyer toutes les données ajoutées par le plugin et son utilisation 69 * - supprimer les tables et les champs créés par le plugin. 111 * - supprimer les tables et les champs créés par le plugin. 70 112 * 71 113 * @param string $nom_meta_base_version 72 114 * Nom de la meta informant de la version du schéma de données du plugin installé dans SPIP 73 115 * @return void 74 **/116 **/ 75 117 function reservation_evenement_vider_tables($nom_meta_base_version) { 76 118 119 sql_drop_table("spip_reservations"); 120 sql_drop_table("spip_reservations_details"); 77 121 78 sql_drop_table("spip_reservations"); 79 sql_drop_table("spip_reservations_details"); 122 # Nettoyer les versionnages et forums 123 sql_delete("spip_versions", sql_in("objet", array( 124 'reservation', 125 'reservations_detail' 126 ))); 127 sql_delete("spip_versions_fragments", sql_in("objet", array( 128 'reservation', 129 'reservations_detail' 130 ))); 131 sql_delete("spip_forum", sql_in("objet", array( 132 'reservation', 133 'reservations_detail' 134 ))); 80 135 81 # Nettoyer les versionnages et forums 82 sql_delete("spip_versions", sql_in("objet", array('reservation', 'reservations_detail'))); 83 sql_delete("spip_versions_fragments", sql_in("objet", array('reservation', 'reservations_detail'))); 84 sql_delete("spip_forum", sql_in("objet", array('reservation', 'reservations_detail'))); 85 86 effacer_meta($nom_meta_base_version); 136 effacer_meta($nom_meta_base_version); 87 137 } -
_plugins_/reservation_evenement/branches/v1/reservation_evenement_pipelines.php
r88302 r90559 11 11 12 12 if (!defined('_ECRIRE_INC_VERSION')) 13 13 return; 14 14 15 15 //Afficher les box infos et téléchargement des réservations 16 16 function reservation_evenement_affiche_gauche($flux) { 17 18 19 20 21 22 23 24 25 26 27 28 include_spip('inc/reservation_evenements'); 29 30 $config=lire_config('reservation_evenement/rubrique_reservation');31 32 33 34 $contexte['id_evenement'] = intval($flux['args']['id_evenement']) ? $flux['args']['id_evenement'] : ''; 35 $id=$contexte['id_'.$exec];36 $rubrique_reservation=picker_selected($config,'rubrique');37 $zone=rubrique_reservation($id,$exec,$rubrique_reservation);38 39 40 if($zone){41 42 43 44 17 include_spip('inc/presentation'); 18 $exec = $flux['args']['exec']; 19 $objets_affichage = array( 20 'rubrique', 21 'article', 22 'evenement' 23 ); 24 25 if (in_array($exec, $objets_affichage)) { 26 include_spip('inc/config'); 27 include_spip('formulaires/selecteur/generique_fonctions'); 28 include_spip('inc/reservation_evenements'); 29 30 $config = lire_config('reservation_evenement/rubrique_reservation'); 31 $contexte = array(); 32 $contexte['id_article'] = intval($flux['args']['id_article']) ? $flux['args']['id_article'] : ''; 33 $contexte['id_rubrique'] = intval($flux['args']['id_rubrique']) ? $flux['args']['id_rubrique'] : ''; 34 $contexte['id_evenement'] = intval($flux['args']['id_evenement']) ? $flux['args']['id_evenement'] : ''; 35 $id = $contexte['id_' . $exec]; 36 $rubrique_reservation = picker_selected($config, 'rubrique'); 37 $zone = rubrique_reservation($id, $exec, $rubrique_reservation); 38 39 //Si l'objet se trouve dans la zone Reservation Evènement, on affiche 40 if ($zone) { 41 $flux['data'] .= recuperer_fond('inclure/reservations', $contexte); 42 } 43 } 44 return $flux; 45 45 } 46 46 … … 53 53 */ 54 54 function reservation_evenement_affiche_auteurs_interventions($flux) { 55 if ($id_auteur = intval($flux['args']['id_auteur'])) { 56 57 $flux['data'] .= '<br class="nettoyeur"/>' . recuperer_fond('prive/objets/liste/reservations', array( 58 'id_auteur' => $id_auteur, 59 'titre' => _T('reservation:info_reservations_auteur') 60 ), array('ajax' => true)); 61 62 } 63 return $flux; 55 if ($id_auteur = intval($flux['args']['id_auteur'])) { 56 57 $flux['data'] .= '<br class="nettoyeur"/>' . recuperer_fond('prive/objets/liste/reservations', array( 58 'id_auteur' => $id_auteur, 59 'titre' => _T('reservation:info_reservations_auteur') 60 ), array('ajax' => true)); 61 } 62 return $flux; 64 63 } 65 64 66 65 function reservation_evenement_affiche_milieu($flux) { 67 $e = trouver_objet_exec($flux['args']['exec']); 68 // reservations sur les evenements 69 if (!$e['edition'] AND in_array($e['type'], array('evenement'))) { 70 $contexte = calculer_contexte(); 71 $contexte['id_evenement'] = _request('id_evenement'); 72 $contexte['par'] = 'id_evenement'; 73 $texte .= recuperer_fond('prive/objets/liste/reservations_details', $contexte, array('ajax' => 'oui')); 74 $flux['data'] .= $texte; 75 } 76 77 return $flux; 66 $e = trouver_objet_exec($flux['args']['exec']); 67 // reservations sur les evenements 68 if (!$e['edition'] AND in_array($e['type'], array('evenement'))) { 69 $contexte = calculer_contexte(); 70 $contexte['id_evenement'] = _request('id_evenement'); 71 $contexte['par'] = 'id_evenement'; 72 $texte .= recuperer_fond('prive/objets/liste/reservations_details', $contexte, array('ajax' => 'oui')); 73 $flux['data'] .= $texte; 74 } 75 return $flux; 78 76 } 79 77 80 78 // Définitions des notifications pour https://github.com/abelass/notifications_archive 81 79 function reservation_evenement_notifications_archive($flux) { 82 $flux = array_merge($flux, array( 83 'reservation_client' => array( 84 'activer' => 'on', 85 'duree' => '180' 86 ), 87 'reservation_vendeur' => array('duree' => '180') 88 )); 89 90 return $flux; 80 $flux = array_merge($flux, array( 81 'reservation_client' => array( 82 'activer' => 'on', 83 'duree' => '180' 84 ), 85 'reservation_vendeur' => array('duree' => '180') 86 )); 87 return $flux; 91 88 } 92 89 … … 96 93 97 94 function reservation_evenement_taches_generales_cron($taches) { 98 include_spip('inc/config'); 99 $config = lire_config('reservation_evenement', array()); 100 if (isset($config['cron'])) { 101 //La périodicité 102 if (isset($config['periodicite_cron']) AND $config['periodicite_cron'] >= 600) 103 $periodicite = $config['periodicite_cron']; 104 else 105 $periodicite = 24 * 3600; 106 107 $taches['reservation_evenement_cloture'] = $periodicite; 108 } 109 return $taches; 110 } 111 112 function reservation_evenement_formulaire_charger($flux){ 113 $form = $flux['args']['form']; 114 $forms=array('editer_article','editer_evenement'); 115 $contexte = $flux['data']; 116 117 //Charger les valeurs par défaut 118 if (in_array($form,$forms)){ 119 $action_cloture=$contexte['action_cloture']; 120 $id_evenement=isset($contexte['id_evenement'])?$contexte['id_evenement']:'0'; 121 if($form==$forms[1] AND (!$action_cloture OR $action_cloture==0) AND $form=='editer_evenement' AND intval($contexte['id_parent'])){ 122 $action_cloture=sql_getfetsel('action_cloture','spip_articles','id_article='.$contexte['id_parent']); 123 } 124 125 if($action_cloture) $flux['data']['action_cloture'] = $action_cloture; 126 } 127 128 129 return $flux; 130 } 131 132 function reservation_evenement_formulaire_traiter($flux){ 133 $form = $flux['args']['form']; 134 $forms=array('editer_article','editer_evenement'); 135 if (in_array($form,$forms)){ 136 list($edit,$objet)=explode('_',$form); 137 sql_updateq('spip_'.$objet.'s',array('action_cloture'=>_request('action_cloture')),'id_'.$objet.'='.$flux['data']['id_'.$objet]); 138 } 139 140 return $flux; 141 } 142 143 144 function reservation_evenement_recuperer_fond($flux){ 145 $fond=$flux['args']['fond']; 146 147 $contexte=$flux['data']['contexte']; 148 $fonds=array( 149 'formulaires/editer_article'=>'article', 150 'formulaires/editer_evenement'=>'evenement' 151 ); 152 //Ajouter le champ action_cloture 153 if (isset($fonds[$fond])){ 154 155 include_spip('inc/config'); 156 include_spip('formulaires/selecteur/generique_fonctions'); 157 include_spip('inc/reservation_evenements'); 158 $config=lire_config('reservation_evenement',array()); 159 160 $type=$fonds[$fond]; 161 $rubrique_reservation=isset($config['rubrique_reservation'])?picker_selected($config['rubrique_reservation'],'rubrique'):''; 162 $id=_request('id_'.$type); 163 $zone=rubrique_reservation($id,$type,$rubrique_reservation); 164 $cron=isset($config['cron'])?$config['cron']:''; 165 //Si cron activé et l'objet se trouve dans la zone Reservation Evènement, on affiche 166 if($cron AND $zone){ 167 $action_cloture='<ul>'.recuperer_fond('formulaires/inc-action_cloture',$contexte).'</ul>'; 168 $flux['data']['texte'] = str_replace('<!--extra-->',$action_cloture. '<!--extra-->',$flux['data']['texte']); 169 } 170 } 171 return $flux; 95 include_spip('inc/config'); 96 $config = lire_config('reservation_evenement', array()); 97 if (isset($config['cron'])) { 98 //La périodicité 99 if (isset($config['periodicite_cron']) AND $config['periodicite_cron'] >= 600) 100 $periodicite = $config['periodicite_cron']; 101 else 102 $periodicite = 24 * 3600; 103 104 $taches['reservation_evenement_cloture'] = $periodicite; 105 } 106 return $taches; 107 } 108 109 function reservation_evenement_formulaire_charger($flux) { 110 $form = $flux['args']['form']; 111 $forms = array( 112 'editer_article', 113 'editer_evenement' 114 ); 115 $contexte = $flux['data']; 116 117 //Charger les valeurs par défaut 118 if (in_array($form, $forms)) { 119 $action_cloture = $contexte['action_cloture']; 120 $id_evenement = isset($contexte['id_evenement']) ? $contexte['id_evenement'] : '0'; 121 if ($form == $forms[1] AND (!$action_cloture OR $action_cloture == 0) AND $form == 'editer_evenement' AND intval($contexte['id_parent'])) { 122 $action_cloture = sql_getfetsel('action_cloture', 'spip_articles', 'id_article=' . $contexte['id_parent']); 123 } 124 if ($action_cloture) 125 $flux['data']['action_cloture'] = $action_cloture; 126 } 127 return $flux; 128 } 129 130 function reservation_evenement_formulaire_traiter($flux) { 131 $form = $flux['args']['form']; 132 $forms = array( 133 'editer_article', 134 'editer_evenement' 135 ); 136 if (in_array($form, $forms)) { 137 list($edit, $objet) = explode('_', $form); 138 sql_updateq('spip_' . $objet . 's', array('action_cloture' => _request('action_cloture')), 'id_' . $objet . '=' . $flux['data']['id_' . $objet]); 139 } 140 return $flux; 141 } 142 143 function reservation_evenement_recuperer_fond($flux) { 144 $fond = $flux['args']['fond']; 145 146 $contexte = $flux['data']['contexte']; 147 $fonds = array( 148 'formulaires/editer_article' => 'article', 149 'formulaires/editer_evenement' => 'evenement' 150 ); 151 //Ajouter le champ action_cloture 152 if (isset($fonds[$fond])) { 153 154 include_spip('inc/config'); 155 include_spip('formulaires/selecteur/generique_fonctions'); 156 include_spip('inc/reservation_evenements'); 157 $config = lire_config('reservation_evenement', array()); 158 159 $type = $fonds[$fond]; 160 $rubrique_reservation = isset($config['rubrique_reservation']) ? picker_selected($config['rubrique_reservation'], 'rubrique') : ''; 161 $id = _request('id_' . $type); 162 $zone = rubrique_reservation($id, $type, $rubrique_reservation); 163 $cron = isset($config['cron']) ? $config['cron'] : ''; 164 //Si cron activé et l'objet se trouve dans la zone Reservation Evènement, on affiche 165 if ($cron AND $zone) { 166 $action_cloture = '<ul>' . recuperer_fond('formulaires/inc-action_cloture', $contexte) . '</ul>'; 167 $flux['data']['texte'] = str_replace('<!--extra-->', $action_cloture . '<!--extra-->', $flux['data']['texte']); 168 } 169 } 170 return $flux; 172 171 } 173 172 174 173 // ajouter le champ action_cloture 175 function reservation_evenement_afficher_contenu_objet($flux){ 176 $type=$flux['args']['type']; 177 $types=array('article','evenement'); 178 179 180 if (in_array($type,$types)) { 181 include_spip('inc/config'); 182 include_spip('formulaires/selecteur/generique_fonctions'); 183 include_spip('inc/reservation_evenements'); 184 185 $config=lire_config('reservation_evenement',array()); 186 $rubrique_reservation=isset($config['rubrique_reservation'])?picker_selected($config['rubrique_reservation'],'rubrique'):''; 187 $id=_request('id_'.$type); 188 $zone=rubrique_reservation($id,$type,$rubrique_reservation); 189 $cron=isset($config['cron'])?$config['cron']:''; 190 191 //Si cron activé et l'objet se trouve dans la zone Reservation Evènement, on affiche 192 if($cron AND $zone){ 193 $etats=array( 194 1=>_T('item:oui'), 195 2=>_T('item:non'), 196 3=>_T('reservation:evenement_cloture') 197 ); 198 199 $action_cloture=sql_getfetsel('action_cloture','spip_'.$type.'s','id_'.$type.'='.$type=$flux['args']['id_objet']); 200 if($action_cloture!=0)$contexte['cloture_etat']=$etats[$action_cloture]; 201 $action_cloture = recuperer_fond('prive/objets/contenu/inc-action_cloture',$contexte); 202 $flux['data'] .= "\n".$action_cloture; 203 } 204 205 } 206 return $flux; 207 } 174 function reservation_evenement_afficher_contenu_objet($flux) { 175 $type = $flux['args']['type']; 176 $types = array( 177 'article', 178 'evenement' 179 ); 180 181 if (in_array($type, $types)) { 182 include_spip('inc/config'); 183 include_spip('formulaires/selecteur/generique_fonctions'); 184 include_spip('inc/reservation_evenements'); 185 186 $config = lire_config('reservation_evenement', array()); 187 $rubrique_reservation = isset($config['rubrique_reservation']) ? picker_selected($config['rubrique_reservation'], 'rubrique') : ''; 188 $id = _request('id_' . $type); 189 $zone = rubrique_reservation($id, $type, $rubrique_reservation); 190 $cron = isset($config['cron']) ? $config['cron'] : ''; 191 192 //Si cron activé et l'objet se trouve dans la zone Reservation Evènement, on affiche 193 if ($cron AND $zone) { 194 $etats = array( 195 1 => _T('item:oui'), 196 2 => _T('item:non'), 197 3 => _T('reservation:evenement_cloture') 198 ); 199 $action_cloture = sql_getfetsel('action_cloture', 'spip_' . $type . 's', 'id_' . $type . '=' . $type = $flux['args']['id_objet']); 200 if ($action_cloture != 0) 201 $contexte['cloture_etat'] = $etats[$action_cloture]; 202 $action_cloture = recuperer_fond('prive/objets/contenu/inc-action_cloture', $contexte); 203 $flux['data'] .= "\n" . $action_cloture; 204 } 205 } 206 return $flux; 207 }
Note: See TracChangeset
for help on using the changeset viewer.