Changeset 53989 in spip-zone for _plugins_/agenda/trunk/agenda_pipelines.php
- Timestamp:
- Nov 3, 2011, 2:20:28 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
_plugins_/agenda/trunk/agenda_pipelines.php
r53983 r53989 13 13 14 14 function agenda_affiche_milieu($flux) { 15 $e xec = $flux['args']['exec'];15 $e = trouver_objet_exec($flux['args']['exec']); 16 16 $out = ""; 17 if ($exec=='rubrique' 17 if ($e['type']=='rubrique' 18 AND $e['edition']==false 18 19 AND $id_rubrique = intval($flux['args']['id_rubrique'])){ 19 20 $activer = true; … … 21 22 $actif = sql_getfetsel('agenda','spip_rubriques','id_rubrique='.intval($id_rubrique)); 22 23 $statut="-32"; 24 $alt = ""; 23 25 $voir = ""; 24 26 if (!sql_countsel('spip_rubriques','agenda=1')) 25 $res .= _T('agenda:aucune_rubrique_mode_agenda').'<br />';27 $res .= "<span class='small'>" . _T('agenda:aucune_rubrique_mode_agenda') . "</span><br />"; 26 28 else { 27 29 include_spip('inc/agenda_gestion'); 28 30 if (sql_countsel('spip_rubriques',sql_in('id_rubrique',calcul_hierarchie_in($id_rubrique))." AND agenda=1 AND id_rubrique<>".intval($id_rubrique))){ 29 $ res .= _T('agenda:rubrique_dans_une_rubrique_mode_agenda').'<br />';31 $alt = _T('agenda:rubrique_dans_une_rubrique_mode_agenda'); 30 32 $activer = false; 31 33 $statut="-ok-32"; … … 33 35 } 34 36 elseif(!$actif) { 35 $ res .= _T('agenda:rubrique_sans_gestion_evenement').'<br />';37 $alt = _T('agenda:rubrique_sans_gestion_evenement').'<br />'; 36 38 $statut="-non-32"; 37 39 } 38 40 if ($actif){ 39 $ res .= _T('agenda:rubrique_mode_agenda').'<br />';41 $alt = _T('agenda:rubrique_mode_agenda').'<br />'; 40 42 $statut="-ok-32"; 41 43 $voir = _T('agenda:voir_evenements_rubrique'); … … 45 47 if (!$actif){ 46 48 if($activer){ 47 $res .= "<a href='".generer_action_auteur('rubrique_activer_agenda',$id_rubrique,self())."'>"._T('agenda:rubrique_activer_agenda').'</a>';49 $res .= bouton_action(_T('agenda:rubrique_activer_agenda'),generer_action_auteur('rubrique_activer_agenda',$id_rubrique,self()),'ajax'); 48 50 } 49 51 } 50 52 else 51 $res .= "<a href='".generer_action_auteur('rubrique_activer_agenda',"-$id_rubrique",self())."'>"._T('agenda:rubrique_desactiver_agenda').'</a>';53 $res .= bouton_action(_T('agenda:rubrique_desactiver_agenda'),generer_action_auteur('rubrique_activer_agenda',"-$id_rubrique",self()),'ajax'); 52 54 if ($voir) 53 $res .= " <p><a href='".generer_url_ecrire('calendrier',"id_rubrique=$id_rubrique")."'>$voir</a></p>";55 $res .= " | <a href='".generer_url_ecrire('calendrier',"id_rubrique=$id_rubrique")."'>$voir</a>"; 54 56 if ($res) 55 $out .= "<div class='verdana2'><img src='".chemin_image("agenda$statut.png")."' class='agenda-statut' alt='' />$res<div class='nettoyeur'></div></div>"; 57 $out .= boite_ouvrir(_T('agenda:agenda').http_img_pack("agenda$statut.png",$alt,"class='statut'",$alt),'simple agenda-statut') 58 . $res 59 . boite_fermer(); 56 60 } 57 elseif ($exec=='articles'){ 61 elseif ($e['type']=='article' 62 AND $e['edition']==false){ 58 63 $id_article = $flux['args']['id_article']; 59 64 $afficher = autoriser('creerevenementdans','article',$id_article); … … 66 71 } 67 72 } 68 elseif ($exec=='mots_edit'){ 69 $id_mot = $flux['args']['id_mot']; 73 elseif ($e['type']=='mot' 74 AND $e['edition']==false 75 AND $id_mot = intval($flux['args']['id_mot'])){ 70 76 foreach($_GET as $key=>$val) 71 77 $contexte[$key] = $val;
Note: See TracChangeset
for help on using the changeset viewer.