diff --git a/inc-admin.php3 b/inc-admin.php3 index 816bc5e08ea5eea932bf37adc16c8ca8f312a578..23cedb86c0d19e5bb17934f7ec9fd9cc6d2f8305 100644 --- a/inc-admin.php3 +++ b/inc-admin.php3 @@ -320,11 +320,13 @@ function debug_page($no_exit = false) { @header("Content-Type: text/html; charset=".lire_meta('charset')); - echo afficher_boutons_admin(); if (!$GLOBALS['debug_objets']['sourcefile']) return; - echo "\n<body>\n<div id='spip_debug'>"; - echo "\n<h1>Structure de la page</h1>\n"; - echo "<ul>\n"; + + $page = "<html><head><title>Debug</title></head>\n"; + $page .= "<body>\n<div id='spip-debug'>"; + echo calcul_admin_page('', $page); + + echo "<ul>\n"; foreach ($debug_objets['sourcefile'] as $nom_skel => $sourcefile) { echo "<li><b>".$sourcefile."</b>"; $link = $GLOBALS['clean_link']; @@ -338,13 +340,16 @@ function debug_page($no_exit = false) { foreach ($debug_objets['pretty'] as $nom => $pretty) if (substr($nom, 0, strlen($nom_skel)) == $nom_skel) { echo "<li>"; - echo "<".$pretty.">"; + $aff = "<".$pretty.">"; + if ($debug_objet == $nom) + $aff = "<b>$aff</b>"; + echo $aff; $link = $GLOBALS['clean_link']; $link->addvar('debug_objet', $nom); $link->delvar('debug_affiche'); echo " <a href='".$link->getUrl()."&debug_affiche=boucle' class='debug_link_boucle'>boucle</a>"; - echo " <a href='".$link->getUrl()."&debug_affiche=code' class='debug_link_code'>code</a>"; echo " <a href='".$link->getUrl()."&debug_affiche=resultat' class='debug_link_resultat'>resultat</a>"; + echo " <a href='".$link->getUrl()."&debug_affiche=code' class='debug_link_code'>code</a>"; echo "</li>\n"; } echo "</ul>\n</li>\n"; @@ -353,10 +358,11 @@ function debug_page($no_exit = false) { if ($debug_objet AND $debug_affiche == 'resultat' AND ($res = $debug_objets['resultats'][$debug_objet])) { echo "<div id=\"debug_boucle\"><fieldset><legend>".$debug_objets['pretty'][$debug_objet]."</legend>"; - echo "<p>les premiers appels à cette boucle ont donné les résultats ci-dessous:</p>"; - foreach ($res as $view) { - echo "<ul>".interdire_scripts($view)."</ul></fieldset></div>"; - } + echo "<p class='spip-admin-bloc'>les premiers appels à cette boucle ont donné :</p>"; + foreach ($res as $view) + echo "<ul><fieldset>".interdire_scripts($view)."</fieldset></ul>"; + echo "</fieldset></div>"; + } else if ($debug_objet AND $debug_affiche == 'code' AND $res = $debug_objets['code'][$debug_objet]) { echo "<div id=\"debug_boucle\"><fieldset><legend>".$debug_objets['pretty'][$debug_objet]."</legend>"; highlight_string("<"."?php\n".$res."\n?".">"); diff --git a/spip_admin.css b/spip_admin.css index ac6b9c88e3c14ca7d729f3ab54d45651fb6461b5..c6b5f3399999a068cb820eb51ba7b35e10aabe93 100644 --- a/spip_admin.css +++ b/spip_admin.css @@ -52,20 +52,21 @@ a:active.spip-admin-boutons { /* Style pour le mode debug */ -#spip_debug { +#spip-debug { background-color: #FFECD9; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; } -#spip_debug ul ul { +#spip-debug ul ul { font-size: 80%; } -#spip_debug fieldset { +#spip-debug fieldset { background-color: #FFF; font-family: "Courier New", Courier, monospace; + font-size: 12; } -#spip_debug legend { +#spip-debug legend { background-color: #FFF; border: solid 1px #F00; padding: 1px 1em; @@ -73,10 +74,10 @@ a:active.spip-admin-boutons { font-weight: bold; } -#spip_debug ul ul a { +#spip-debug ul ul a { text-decoration: none; } -#spip_debug ul ul a:hover { +#spip-debug ul ul a:hover { text-decoration: underline; }