X-Git-Url: http://git.cyclocoop.org/?p=velocampus%2Fweb%2Fwww.git;a=blobdiff_plain;f=www%2Fecrire%2Finc%2Fgadgets.php;h=caef3f1a932e27fcfa3d0a954c7861a432676415;hp=2b73e989013b81b91ebca74609aec26750cbff49;hb=e99f0878011913365e49b30d90e496c24c301393;hpb=80b4d3e85f78d402ed2e73f8f5d1bf4c19962eed diff --git a/www/ecrire/inc/gadgets.php b/www/ecrire/inc/gadgets.php index 2b73e98..caef3f1 100644 --- a/www/ecrire/inc/gadgets.php +++ b/www/ecrire/inc/gadgets.php @@ -3,7 +3,7 @@ /***************************************************************************\ * SPIP, Systeme de publication pour l'internet * * * - * Copyright (c) 2001-2011 * + * Copyright (c) 2001-2014 * * Arnaud Martin, Antoine Pitrou, Philippe Riviere, Emmanuel Saint-James * * * * Ce programme est un logiciel libre distribue sous licence GNU/GPL. * @@ -23,16 +23,30 @@ include_spip('inc/presentation'); // 2. Au survol, sera execute un script en Ajax menu_{gadget}.php // - // http://doc.spip.org/@bandeau_gadgets function bandeau_gadgets($largeur, $options, $id_rubrique) { - global $connect_id_auteur, $spip_lang_rtl, $spip_lang, $spip_lang_left, $spip_lang_right, $spip_ecran; + + return "
" . + "\n
" . + "\n
" . + bandeau_gadget_menu_rubriques() . + bandeau_gadget_navigation_rapide($id_rubrique) . + bandeau_gadget_recherche() . + (($GLOBALS['meta']['messagerie_agenda'] != 'non') + ? bandeau_gadget_agenda_messagerie() : '') . + bandeau_gadget_suivi_activite () . + // -------- Affichage de droite ---------- + bandeau_gadget_deconnection() . + bandeau_gadget_couleurs() . + "
\n"; +} - $bandeau = "
". - "\n
\n
" +function bandeau_gadget_menu_rubriques() +{ + global $spip_lang_left; - // GADGET Menu rubriques - . "\n
" + return + "\n"; - // FIN GADGET Menu rubriques +} // FIN GADGET Menu rubriques +function bandeau_gadget_navigation_rapide($id_rubrique) +{ + global $spip_lang_left; - // GADGET Navigation rapide - $bandeau .= "
" - . "" . _T('icone_brouteur') . "" + return + "\n"; - // FIN GADGET Navigation rapide +} // FIN GADGET Navigation rapide + +function bandeau_gadget_recherche() +{ + global $spip_lang_left; - // GADGET Recherche $r = _T('info_rechercher'); - $bandeau .= "\n
" + + return "\n
" . generer_form_ecrire('recherche', (""), " method='get' style='margin: 0px; position: relative;'") . "
"; - // FIN GADGET recherche +} // FIN GADGET recherche + - // messagerie et agenda - if ($GLOBALS['meta']['messagerie_agenda'] != 'non') { - // GADGET Agenda - $bandeau .= "
" +function bandeau_gadget_agenda_messagerie() +{ + global $spip_lang_left; + + return "
" . "" . _T('icone_agenda') . "" . "\n
\n" - . "
\n"; + . "
\n" // FIN GADGET Agenda // GADGET Messagerie - $gadget = ''; - $gadget .= "
"; - $gadget .= ""; - $gadget .= _T('icone_messagerie_personnelle'); - $gadget .= ""; - $gadget .= "\n
\n"; - $gadget .= "
"; - $bandeau .= $gadget; + . ""; + +} // FIN GADGET Messagerie - // FIN GADGET Messagerie - } +function bandeau_gadget_suivi_activite () +{ + global $spip_lang_left; - // Suivi activite - $bandeau .= "
" + return + "
" . "" . _T('icone_suivi_activite') . "" @@ -104,19 +130,28 @@ function bandeau_gadgets($largeur, $options, $id_rubrique) { . "" . "
"; */ - - // - // -------- Affichage de droite ---------- - - // Deconnection - $bandeau .= "\n
"; - $bandeau .= ""._T('icone_deconnecter')."".aide("deconnect"); - $bandeau .= "
"; - +} + +function bandeau_gadget_deconnection() +{ + global $spip_lang_right; + + return + "\n
" + . ""._T('icone_deconnecter')."" + . aide("deconnect") + . "
"; +} + +function bandeau_gadget_couleurs() +{ + global $spip_ecran, $spip_lang, $spip_lang_rtl, $spip_lang_left, $spip_lang_right; $decal = 0; $decal = $decal + 150; - $bandeau .= "\n
"; + $bandeau = "\n
"; // couleurs // $couleurs = charger_fonction('couleurs', 'inc'); @@ -129,24 +164,18 @@ function bandeau_gadgets($largeur, $options, $id_rubrique) { . lien_change_var (generer_action_auteur('preferer',"display:1", $self),'','', '1,0,18,15', _T('lien_afficher_texte_seul')) . lien_change_var (generer_action_auteur('preferer',"display:2", $self),'','', '19,0,40,15', _T('lien_afficher_texte_icones')) . lien_change_var (generer_action_auteur('preferer',"display:3", $self),'','', '41,0,59,15', _T('lien_afficher_icones_seuls')) - . "\n
"; + . "\n
"; + $bandeau .= "
" . http_img_pack("choix-layout$spip_lang_rtl".($spip_lang=='he'?'_he':'').".gif", _T('choix_interface'), " style='vertical-align: middle' width='59' height='15' usemap='#map_layout'") . http_img_pack("rien.gif", "", "width='10' height='1'") . "
"; - // ecran + // ecran if ($spip_ecran == "large") $bandeau .= "
"._T('info_petit_ecran')."/"._T('info_grand_ecran')."
"; else $bandeau .= "
"._T('info_petit_ecran')."/"._T('info_grand_ecran')."
"; $bandeau .= "
"; - - - $bandeau .= "
"; - $bandeau .= "
\n"; - - - $bandeau .= '
'; return $bandeau; } @@ -208,16 +237,17 @@ function repercuter_gadgets($id_rubrique) { // comme on cache fortement ce menu, // son url change en fonction de sa date de modif - $toutsite = "./?exec=menu_rubriques\\x26date=" . $GLOBALS['meta']['date_calcul_rubriques']; - $navrapide = "./?exec=menu_navigation\\x26id_rubrique=$id_rubrique"; - $agenda = "./?exec=menu_agenda"; - return - - "\ninit_gadgets('$toutsite','$navrapide','$agenda','" - .str_replace('