diff --git a/ecrire/ajax_page.php b/ecrire/ajax_page.php index 6b008b0736c42846c05fb840b827d4dca4d21b1d..703694487de13becf1560b3c4f66fe9fb96141ba 100644 --- a/ecrire/ajax_page.php +++ b/ecrire/ajax_page.php @@ -30,20 +30,44 @@ echo "<"."?xml version='1.0' encoding='$charset'?>"; // echo "$type - $id - $rac"; if ($type == "rubrique") { - $res = spip_query("SELECT titre FROM spip_rubriques WHERE id_rubrique = $id"); + $res = spip_query("SELECT titre, descriptif FROM spip_rubriques WHERE id_rubrique = $id"); if ($row = spip_fetch_array($res)) { $titre = addslashes(typo($row["titre"])); + $descriptif = propre($row["descriptif"]); + } else { + $titre = addslashes(_T('info_racine_site')); } - } + } echo "<div style='display: none;'>"; echo "<input type='text' id='".$rac."_sel' value='$id' />"; echo "<input type='text' id='".$rac."_sel2' value='$titre' />"; echo "</div>"; - echo "<b>$titre</b>"; + + include_ecrire ("inc_logos.php3"); + + + echo "<div class='arial2' style='padding: 5px; background-color: white; border: 1px solid $couleur_foncee; border-top: 0px;'>"; + + if ($type == "rubrique" AND $spip_display != 1 AND $spip_display!=4 AND lire_meta('image_process') != "non") { + include_ecrire("inc_logos.php3"); + $logo = decrire_logo("rubon$id"); + if ($logo) { + $fichier = $logo[0]; + echo "<div style='float: $spip_lang_right; margin-$spip_lang_right: -5px; margin-top: -5px;'>"; + echo reduire_image_logo(_DIR_IMG.$fichier, 100, 48); + echo "</div>"; + } + } + + + + echo "<div><p><b>$titre</b></p></div>"; + if (strlen($descriptif) > 0) echo "<div>$descriptif</div>"; + echo "</div>"; echo "<div style='text-align: $spip_lang_right;'>"; - echo "<input type='button' value='Choisir' class='fondo' onClick=\"sel=findObj_forcer('".$rac."_sel').value; sel2=findObj_forcer('".$rac."_sel2').value; func = findObj('".$rac."_fonc').value; func = func.replace('::sel::', sel); func = func.replace('::sel2::', sel2); eval(func);\">"; + echo "<input type='button' value='"._T('bouton_choisir')."' class='fondo' onClick=\"sel=findObj_forcer('".$rac."_sel').value; sel2=findObj_forcer('".$rac."_sel2').value; func = findObj('".$rac."_fonc').value; func = func.replace('::sel::', sel); func = func.replace('::sel2::', sel2); eval(func);\">"; echo "</div>"; } diff --git a/ecrire/inc_mini_nav.php b/ecrire/inc_mini_nav.php index 1b9f287f527efcc23980c3481de141e4c972f791..66528e5af74804b1c658726081e68eb21fe9f7f6 100644 --- a/ecrire/inc_mini_nav.php +++ b/ecrire/inc_mini_nav.php @@ -138,7 +138,8 @@ function mini_nav ($sel, $rac="", $fonction="document.location='naviguer.php3?id $ret .= "</div>\n"; if ($aff_racine) { - $ret .= "<div class='arial11 petite-rubrique' style='background-image: url(" . _DIR_IMG_PACK . "racine-site-12.gif); background-color: white; border: 1px solid $couleur_foncee; border-bottom: 0px;'><div class='pashighlight'>"; + $onClick .= " aff_selection('rubrique','$rac', '0');"; + $ret .= "<div class='arial11 petite-rubrique' onclick=\"$onClick\" style='background-image: url(" . _DIR_IMG_PACK . "racine-site-12.gif); background-color: white; border: 1px solid $couleur_foncee; border-bottom: 0px;'><div class='pashighlight'>"; $ret .= _T("info_racine_site"); $ret .= "</div></div>"; } diff --git a/ecrire/rubriques_edit.php3 b/ecrire/rubriques_edit.php3 index c6baed16392e85e3fd8920c0a27c5c22cecbbc2d..ce5e2ff3ea0b1b50025276eb8d14dc1ee693b701 100644 --- a/ecrire/rubriques_edit.php3 +++ b/ecrire/rubriques_edit.php3 @@ -174,38 +174,42 @@ debut_cadre_couleur("$logo_parent", false, '', _T('entree_interieur_rubrique').a //echo "<input type='text' size='10' style='font-size: 90%; width: 15%;' onkeyup=\"filtery(this.value,this.form.id_parent);\" onChange=\"filtery(this.value,this.form.id_parent);\"> "; -/* -echo "<SELECT NAME='id_parent' style='font-size: 90%; width:80%; font-face:verdana,arial,helvetica,sans-serif; max-height: 24px;' SIZE=1>\n"; - -if ($connect_toutes_rubriques) { - echo "<OPTION".mySel("0",$id_parent). http_style_background('racine-site-12.gif', "$spip_lang_left no-repeat; background-color:$couleur_foncee; padding-$spip_lang_left: 16px; font-weight:bold; color:white") .'>'._T('info_racine_site')."\n"; +if ($spip_display == 4) { + echo "<SELECT NAME='id_parent' style='font-size: 90%; width:80%; font-face:verdana,arial,helvetica,sans-serif; max-height: 24px;' SIZE=1>\n"; + + if ($connect_toutes_rubriques) { + echo "<OPTION".mySel("0",$id_parent). http_style_background('racine-site-12.gif', "$spip_lang_left no-repeat; background-color:$couleur_foncee; padding-$spip_lang_left: 16px; font-weight:bold; color:white") .'>'._T('info_racine_site')."\n"; + } else { + echo "<OPTION".mySel("0",$id_parent).">"._T('info_non_deplacer')."\n"; + } + + if (lire_meta('multi_rubriques') == 'oui') echo " [".traduire_nom_langue(lire_meta('langue_site'))."]"; + + // si le parent ne fait pas partie des rubriques restreintes, modif impossible + if (acces_rubrique($id_parent)) { + enfant(0); + } + echo "</SELECT>\n"; } else { - echo "<OPTION".mySel("0",$id_parent).">"._T('info_non_deplacer')."\n"; -} - -if (lire_meta('multi_rubriques') == 'oui') echo " [".traduire_nom_langue(lire_meta('langue_site'))."]"; - -// si le parent ne fait pas partie des rubriques restreintes, modif impossible -if (acces_rubrique($id_parent)) { - enfant(0); -} -echo "</SELECT>\n"; -*/ + $query = spip_query("SELECT titre FROM spip_rubriques WHERE id_rubrique=$id_parent"); + if ($row = spip_fetch_array($query)) { + $titre_parent = entites_html(typo($row["titre"])); + } else { + $titre_parent = entites_html(_T("info_racine_site")); + } + + echo "<table width='100%'><tr width='100%'><td width='45'>"; + echo "<a href=\"javascript:findObj('selection_rubrique').style.display='block';charger_id_url('ajax_page.php?fonction=aff_parent&id_rubrique=$id_parent&exclus=$id_rubrique','selection_rubrique');\"><img src='img_pack/loupe.png' style='border: 0px; vertical-align: middle;' /></a> "; + echo "<img src='img_pack/searching.gif' id='img_selection_rubrique' style='visibility: hidden;'>"; + echo "</td><td>"; + echo "<input type='text' id='titreparent' name='titreparent' disabled='disabled' class='forml' value=\"$titre_parent\" />"; + echo "<input type='hidden' id='id_parent' name='id_parent' value='$id_parent' />"; + echo "</td></tr></table>"; + + echo "<div id='selection_rubrique' style='display: none;'></div>"; -$query = spip_query("SELECT titre FROM spip_rubriques WHERE id_rubrique=$id_parent"); -if ($row = spip_fetch_array($query)) { - $titre_parent = entites_html(typo($row["titre"])); -} else { - $titre_parent = entites_html(_T("info_racine_site")); } -echo "<a href=\"javascript:findObj('selection_rubrique').style.display='block';charger_id_url('ajax_page.php?fonction=aff_parent&id_rubrique=$id_parent&exclus=$id_rubrique','selection_rubrique');\"><img src='img_pack/loupe.png' style='border: 0px; vertical-align: middle;' /></a> "; -echo "<img src='img_pack/searching.gif' id='img_selection_rubrique' style='visibility: hidden;'>"; - -echo "<input type='hidden' id='id_parent' name='id_parent' value='$id_parent' />"; -echo "<input type='text' id='titreparent' name='titreparent' disabled='disabled' class='forml' value=\"$titre_parent\" />"; -echo "<div id='selection_rubrique' style='display: none;'></div>"; - //include_ecrire("inc_mini_nav.php"); //echo mini_nav ($id_parent, "choix-parent", "this.form.id_parent.value=::sel::;this.form.titreparent.value='::sel2::';", $id_rubrique, $aff_racine=true);