Update of /home/spip-cvs/spip/ecrire
In directory alan:/tmp/cvs-serv914
Modified Files:
inc_presentation.php3 index.php3 js_menu_rubriques.php
Log Message:
Menu des rubriques "Tout le site" sur plusieurs colonnes (pour eviter menu trop "haut")
Index: index.php3
RCS file: /home/spip-cvs/spip/ecrire/index.php3,v
retrieving revision 1.123
retrieving revision 1.124
diff -u -d -r1.123 -r1.124
--- index.php3 19 Oct 2004 12:43:51 -0000 1.123
+++ index.php3 23 Oct 2004 13:14:57 -0000 1.124
@@ -439,7 +439,6 @@
if ($relief) {
- echo "<p>";
debut_cadre_couleur_foncee("",false, "", _T('texte_en_cours_validation'));
//echo "<div class='verdana2' style='color: black;'><b>"._T('texte_en_cours_validation')."</b></div><p>";
Index: inc_presentation.php3
RCS file: /home/spip-cvs/spip/ecrire/inc_presentation.php3,v
retrieving revision 1.498
retrieving revision 1.499
diff -u -d -r1.498 -r1.499
--- inc_presentation.php3 23 Oct 2004 10:12:42 -0000 1.498
+++ inc_presentation.php3 23 Oct 2004 13:14:57 -0000 1.499
@@ -2192,10 +2192,10 @@
//
function afficher_menu_rubriques() {
- global $spip_lang_rtl;
+ global $spip_lang_rtl, $spip_ecran;
$date_maj = lire_meta("date_calcul_rubriques");
- echo "<script type='text/javascript' src='js_menu_rubriques.php?date=$date_maj&dir=$spip_lang_rtl'></script>";
+ echo "<script type='text/javascript' src='js_menu_rubriques.php?date=$date_maj&spip_ecran=$spip_ecran&dir=$spip_lang_rtl'></script>";
}
@@ -2571,7 +2571,7 @@
// GADGET Menu rubriques
echo "<div style='position: relative; z-index: 1000;'>";
- echo "<div id='bandeautoutsite' class='bandeau_couleur_sous' style='$spip_lang_left: 0px; width: 200px;'>";
+ echo "<div id='bandeautoutsite' class='bandeau_couleur_sous' style='$spip_lang_left: 0px;'>";
echo "<a href='articles_tous.php3' class='lien_sous'>"._T('icone_site_entier')."</a>";
afficher_menu_rubriques();
echo "</div>";
Index: js_menu_rubriques.php
RCS file: /home/spip-cvs/spip/ecrire/js_menu_rubriques.php,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- js_menu_rubriques.php 8 Oct 2004 11:02:33 -0000 1.4
+++ js_menu_rubriques.php 23 Oct 2004 13:14:57 -0000 1.5
@@ -19,12 +19,32 @@
function bandeau_menu() {
+ global $spip_ecran;
$result_racine = spip_query("SELECT * FROM spip_rubriques WHERE id_parent=0 ORDER BY titre");
$i = spip_num_rows($result_racine);
+
+ $total_lignes = $i;
+ if ($spip_ecran == "large") $max_lignes = 20;
+ else $max_lignes = 15;
+
+ $nb_col = ceil($total_lignes / $max_lignes);
+ if ($nb_col < 1) $nb_col = 1;
+ $max_lignes = ceil($total_lignes / $nb_col);
+
+
+ $count_lignes = 0;
+
if ($i > 0) {
$ret = "<div> </div>";
$ret .= "<div class='bandeau_rubriques' style='z-index: 1;'>";
while ($row = spip_fetch_array($result_racine)) {
+
+ if ($count_lignes == $max_lignes) {
+ $count_lignes = 0;
+ $ret .= "</div></td><td valign='top' width='200'><div> </div><div class='bandeau_rubriques' style='z-index: 1;'>";
+ }
+ $count_lignes ++;
+
$id_rubrique = $row["id_rubrique"];
$titre_rubrique = supprimer_numero(typo($row["titre"]));
@@ -84,7 +104,9 @@
}
echo "document.write(\"";
+echo "<table><tr><td valign='top' width='200'>";
echo bandeau_menu();
+echo "</td></tr></table>";
echo "\");\n";
?>
\ No newline at end of file