Update of /home/spip-cvs/spip/ecrire
In directory alan:/tmp/cvs-serv13645
Modified Files:
articles.php3 articles_edit.php3 breves_voir.php3
inc_presentation.php3 inc_sites.php3 naviguer.php3
Log Message:
Modifs pour affichage /ecrire/oo: beaucoup plus automatise.
Index: naviguer.php3
RCS file: /home/spip-cvs/spip/ecrire/naviguer.php3,v
retrieving revision 1.84
retrieving revision 1.85
diff -u -d -r1.84 -r1.85
--- naviguer.php3 3 Oct 2004 14:27:01 -0000 1.84
+++ naviguer.php3 3 Oct 2004 15:15:23 -0000 1.85
@@ -298,61 +298,62 @@
debut_gauche();
-if ($coll > 0) {
- debut_boite_info();
- echo "<CENTER>";
- echo "<FONT FACE='Verdana,Arial,Sans,sans-serif' SIZE=1><B>"._T('titre_numero_rubrique')."</B></FONT>";
- echo "<BR><FONT FACE='Verdana,Arial,Sans,sans-serif' SIZE=6><B>$coll</B></FONT>";
- echo "</CENTER>";
-
- voir_en_ligne ('rubrique', $coll, $statut);
-
- fin_boite_info();
-}
-
-//
-// Logos de la rubrique
-//
-
-$rubon = "rubon$coll";
-$ruboff = "ruboff$coll";
-
-if ($connect_statut == '0minirezo' AND acces_rubrique($coll)) {
- if ($coll > 0)
- afficher_boite_logo($rubon, $ruboff, _T('logo_rubrique')." ".aide ("rublogo"), _T('logo_survol'));
- else
- afficher_boite_logo($rubon, $ruboff, _T('logo_standard_rubrique')." ".aide ("rublogo"), _T('logo_survol'));
-}
-
-
-//
-// Afficher les boutons de creation d'article et de breve
-//
-debut_raccourcis();
-
-$query = "SELECT id_rubrique FROM spip_rubriques LIMIT 0,1";
-$result = spip_query($query);
-
-icone_horizontale(_T('icone_tous_articles'), "articles_page.php3", "article-24.gif");
-
-if (spip_num_rows($result) > 0) {
- if ($coll > 0)
- icone_horizontale(_T('icone_ecrire_article'), "articles_edit.php3?id_rubrique=$coll&new=oui", "article-24.gif","creer.gif");
-
- $activer_breves = lire_meta("activer_breves");
- if ($activer_breves != "non" AND $id_parent == "0" AND $coll != "0") {
- icone_horizontale(_T('icone_nouvelle_breve'), "breves_edit.php3?id_rubrique=$coll&new=oui", "breve-24.gif","creer.gif");
+if ($spip_display != 4) {
+ if ($coll > 0) {
+ debut_boite_info();
+ echo "<CENTER>";
+ echo "<FONT FACE='Verdana,Arial,Sans,sans-serif' SIZE=1><B>"._T('titre_numero_rubrique')."</B></FONT>";
+ echo "<BR><FONT FACE='Verdana,Arial,Sans,sans-serif' SIZE=6><B>$coll</B></FONT>";
+ echo "</CENTER>";
+
+ voir_en_ligne ('rubrique', $coll, $statut);
+
+ fin_boite_info();
}
-}
-else {
- if ($connect_statut == '0minirezo') {
- echo "<p>"._T('info_creation_rubrique');
+
+ //
+ // Logos de la rubrique
+ //
+
+ $rubon = "rubon$coll";
+ $ruboff = "ruboff$coll";
+
+ if ($connect_statut == '0minirezo' AND acces_rubrique($coll)) {
+ if ($coll > 0)
+ afficher_boite_logo($rubon, $ruboff, _T('logo_rubrique')." ".aide ("rublogo"), _T('logo_survol'));
+ else
+ afficher_boite_logo($rubon, $ruboff, _T('logo_standard_rubrique')." ".aide ("rublogo"), _T('logo_survol'));
}
+
+
+ //
+ // Afficher les boutons de creation d'article et de breve
+ //
+ debut_raccourcis();
+
+ $query = "SELECT id_rubrique FROM spip_rubriques LIMIT 0,1";
+ $result = spip_query($query);
+
+ icone_horizontale(_T('icone_tous_articles'), "articles_page.php3", "article-24.gif");
+
+ if (spip_num_rows($result) > 0) {
+ if ($coll > 0)
+ icone_horizontale(_T('icone_ecrire_article'), "articles_edit.php3?id_rubrique=$coll&new=oui", "article-24.gif","creer.gif");
+
+ $activer_breves = lire_meta("activer_breves");
+ if ($activer_breves != "non" AND $id_parent == "0" AND $coll != "0") {
+ icone_horizontale(_T('icone_nouvelle_breve'), "breves_edit.php3?id_rubrique=$coll&new=oui", "breve-24.gif","creer.gif");
+ }
+ }
+ else {
+ if ($connect_statut == '0minirezo') {
+ echo "<p>"._T('info_creation_rubrique');
+ }
+ }
+
+ fin_raccourcis();
}
-fin_raccourcis();
-
-
debut_droite();
@@ -377,7 +378,7 @@
echo "</td>";
if ($coll > 0 AND $flag_editable) {
- echo "<td><img src='img_pack/rien.gif' width=5></td>\n";
+ echo "<td><img src='img_pack/rien.gif' alt='' width=5></td>\n";
echo "<td align='right' valign='top'>";
icone(_T('icone_modifier_rubrique'), "rubriques_edit.php3?id_rubrique=$id_rubrique&retour=nav", $ze_logo, "edit.gif");
echo "</td>";
@@ -468,7 +469,7 @@
// Afficher les sous-rubriques
echo "<table cellpadding=0 cellspacing=0 border=0 width='100%'>";
echo "<tr><td valign='top' width=50% rowspan=2>$les_enfants1</td>";
-echo "<td width=20 rowspan=2><img src='img_pack/rien.gif' width=20></td>";
+echo "<td width=20 rowspan=2><img src='img_pack/rien.gif' alt='' width=20></td>";
echo "<td valign='top' width=50%>$les_enfants2 ";
if (strlen($les_enfants2) > 0) echo "<p>";
echo "</td></tr>";
Index: articles.php3
RCS file: /home/spip-cvs/spip/ecrire/articles.php3,v
retrieving revision 1.196
retrieving revision 1.197
diff -u -d -r1.196 -r1.197
--- articles.php3 23 Sep 2004 15:05:22 -0000 1.196
+++ articles.php3 3 Oct 2004 15:15:23 -0000 1.197
@@ -773,7 +773,7 @@
if ($flag_editable) {
- echo "<td><img src='img_pack/rien.gif' width=5></td>\n";
+ echo "<td><img src='img_pack/rien.gif' alt='' width=5></td>\n";
echo "<td align='center'>";
$flag_modif = false;
@@ -1582,7 +1582,7 @@
// Documents associes a l'article
//
-afficher_documents_non_inclus($id_article, "article", $flag_editable);
+if ($spip_display != 4) afficher_documents_non_inclus($id_article, "article", $flag_editable);
//
// "Demander la publication"
Index: articles_edit.php3
RCS file: /home/spip-cvs/spip/ecrire/articles_edit.php3,v
retrieving revision 1.94
retrieving revision 1.95
diff -u -d -r1.94 -r1.95
--- articles_edit.php3 23 Sep 2004 15:05:23 -0000 1.94
+++ articles_edit.php3 3 Oct 2004 15:15:23 -0000 1.95
@@ -345,7 +345,7 @@
else icone(_T('icone_retour'), "articles.php3?id_article=$id_article", "article-24.gif", "rien.gif");
echo "</td>";
- echo "<td><img src='img_pack/rien.gif' width=10></td>\n";
+ echo "<td><img src='img_pack/rien.gif' alt='' width=10></td>\n";
echo "<td width='100%'>";
echo _T('texte_modifier_article');
gros_titre($titre);
Index: inc_presentation.php3
RCS file: /home/spip-cvs/spip/ecrire/inc_presentation.php3,v
retrieving revision 1.457
retrieving revision 1.458
diff -u -d -r1.457 -r1.458
--- inc_presentation.php3 2 Oct 2004 22:24:41 -0000 1.457
+++ inc_presentation.php3 3 Oct 2004 15:15:23 -0000 1.458
@@ -13,9 +13,9 @@
// Aide
//
function aide($aide='') {
- global $couleur_foncee, $spip_lang, $spip_lang_rtl, $dir_ecrire;
+ global $couleur_foncee, $spip_lang, $spip_lang_rtl, $dir_ecrire, $spip_display;
- if (!$aide) return;
+ if (!$aide OR $spip_display == 4) return;
return " <a class='aide' href=\"".$dir_ecrire
."aide_index.php3?aide=$aide&var_lang=$spip_lang\" target=\"spip_aide\" ".
@@ -114,7 +114,7 @@
}
if (strlen($titre) > 0) {
- $ret .= "<div class='cadre-titre'$style_gauche>$titre</div>";
+ $ret .= "<h3 class='cadre-titre'$style_gauche>$titre</h3>";
}
@@ -371,35 +371,54 @@
function afficher_liste($largeurs, $table, $styles = '') {
global $couleur_claire;
global $browser_name;
+ global $spip_display;
+ global $spip_lang_left;
if (!is_array($table)) return;
reset($table);
echo "\n";
- while (list(, $t) = each($table)) {
- // $couleur_fond = ($ifond ^= 1) ? '#FFFFFF' : $couleur_claire;
- //echo "<tr bgcolor=\"$couleur_fond\">";
- if (eregi("msie", $browser_name)) $msover = " onMouseOver=\"changeclass(this,'tr_liste_over');\" onMouseOut=\"changeclass(this,'tr_liste');\"";
- echo "<tr class='tr_liste'$msover>";
- reset($largeurs);
- if ($styles) reset($styles);
- while (list(, $texte) = each($t)) {
- $style = $largeur = "";
- list(, $largeur) = each($largeurs);
- if ($styles) list(, $style) = each($styles);
- if (!trim($texte)) $texte .= " ";
- echo "<td";
- if ($largeur) echo " width=\"$largeur\"";
- if ($style) echo " class=\"$style\"";
- echo ">$texte</td>";
+ if ($spip_display != 4) {
+ while (list(, $t) = each($table)) {
+ if (eregi("msie", $browser_name)) $msover = " onMouseOver=\"changeclass(this,'tr_liste_over');\" onMouseOut=\"changeclass(this,'tr_liste');\"";
+ echo "<tr class='tr_liste'$msover>";
+ reset($largeurs);
+ if ($styles) reset($styles);
+ while (list(, $texte) = each($t)) {
+ $style = $largeur = "";
+ list(, $largeur) = each($largeurs);
+ if ($styles) list(, $style) = each($styles);
+ if (!trim($texte)) $texte .= " ";
+ echo "<td";
+ if ($largeur) echo " width=\"$largeur\"";
+ if ($style) echo " class=\"$style\"";
+ echo ">$texte</td>";
+ }
+ echo "</tr>\n";
}
- echo "</tr>\n";
+ } else {
+ echo "<ul style='text-align: $spip_lang_left;'>";
+ while (list(, $t) = each($table)) {
+ echo "<li>";
+ reset($largeurs);
+ if ($styles) reset($styles);
+ while (list(, $texte) = each($t)) {
+ $style = $largeur = "";
+ list(, $largeur) = each($largeurs);
+
+ if (!$largeur) {
+ echo $texte." ";
+ }
+ }
+ echo "</li>\n";
+ }
+ echo "</ul>";
}
echo "\n";
}
function afficher_tranches_requete(&$query, $colspan) {
static $ancre = 0;
- global $spip_lang_right;
+ global $spip_lang_right, $spip_display;
$query = trim($query);
$query_count = eregi_replace('^(SELECT)[[:space:]].*[[:space:]](FROM)[[:space:]]', '\\1 COUNT(*) \\2 ', $query);
@@ -422,7 +441,7 @@
$ancre++;
$texte .= "<a name='a$ancre'></a>";
- $texte .= "<tr style='background-color: #dddddd;'><td class=\"arial2\" style='border-bottom: 1px solid #444444;' colspan=\"".($colspan - 1)."\">";
+ if ($spip_display != 4) $texte .= "<tr style='background-color: #dddddd;'><td class=\"arial2\" style='border-bottom: 1px solid #444444;' colspan=\"".($colspan - 1)."\">";
for ($i = 0; $i < $num_rows; $i += $nb_aff){
$deb = $i + 1;
@@ -438,8 +457,8 @@
$texte .= "<A HREF=\"".$link->getUrl()."#a$ancre\">$deb</A>";
}
}
- $texte .= "</td>\n";
- $texte .= "<td class=\"arial2\" style='border-bottom: 1px solid #444444; text-align: $spip_lang_right;' colspan=\"1\" align=\"right\" valign=\"top\">";
+ if ($spip_display != 4) $texte .= "</td>\n";
+ if ($spip_display != 4) $texte .= "<td class=\"arial2\" style='border-bottom: 1px solid #444444; text-align: $spip_lang_right;' colspan=\"1\" align=\"right\" valign=\"top\">";
if ($deb_aff == -1) {
$texte .= "<B>"._T('info_tout_afficher')."</B>";
} else {
@@ -448,8 +467,8 @@
$texte .= "<A HREF=\"".$link->getUrl()."#a$ancre\">"._T('lien_tout_afficher')."</A>";
}
- $texte .= "</td>\n";
- $texte .= "</tr>\n";
+ if ($spip_display != 4) $texte .= "</td>\n";
+ if ($spip_display != 4) $texte .= "</tr>\n";
if ($deb_aff != -1) {
@@ -462,6 +481,17 @@
}
+function afficher_liste_debut_tableau() {
+ global $spip_display;
+
+ if ($spip_display != 4) return "<table width='100%' cellpadding='2' cellspacing='0' border='0'>";
+}
+
+function afficher_liste_fin_tableau() {
+ global $spip_display;
+ if ($spip_display != 4) return "</table>";
+}
+
//
// Afficher tableau d'articles
@@ -497,7 +527,7 @@
}
- if ($spip_display == 4) {
+/* if ($spip_display == 4) {
$requete = str_replace("FROM spip_articles AS articles ", "FROM spip_articles AS articles LEFT JOIN spip_petitions AS petitions USING (id_article)", $requete);
$result = spip_query($requete);
@@ -528,7 +558,7 @@
echo "</ul>";
}
}
- else {
+ else {*/
if ($options == "avancees") $ajout_col = 1;
else $ajout_col = 0;
@@ -547,8 +577,8 @@
echo "<div class='liste'>";
bandeau_titre_boite2($titre_table, "article-24.gif");
- echo "<table width='100%' cellpadding='2' cellspacing='0' border='0'>";
-
+ //echo "<table width='100%' cellpadding='2' cellspacing='0' border='0'>";
+ echo afficher_liste_debut_tableau();
echo $tranches;
@@ -622,7 +652,7 @@
$s .= "<img src='img_pack/admin-12.gif' alt='' width='12' height='12' title='"._T('titre_image_admin_article')."'> ";
$s .= "<a href=\"articles.php3?id_article=$id_article\"$descriptif$dir_lang style=\"display:block;\">";
- if ($spip_display != 1 AND lire_meta('image_process') != "non") {
+ if ($spip_display != 1 AND $spip_display != 4 AND lire_meta('image_process') != "non") {
$logo = get_image("arton$id_article");
if ($logo) {
$fichier = $logo[0];
@@ -691,12 +721,13 @@
}
afficher_liste($largeurs, $table, $styles);
- echo "</table>";
+ //echo "</table>";
+ echo afficher_liste_fin_tableau();
echo "</div>";
//if ($afficher_cadre) fin_cadre_gris_clair();
}
- }
+ //}
return $tous_id;
}
@@ -1946,7 +1977,7 @@
$compteur_survol ++;
$icone .= "\n<table cellpadding='0' class='pointeur' cellspacing='0' border='0' $aligner width='$largeur'>";
$icone .= "<tr><td class='icone36$style' style='text-align:center;'><a href='$lien'>";
- if ($spip_display != 1){
+ if ($spip_display != 1 AND $spip_display != 4){
if ($fonction != "rien.gif"){
$icone .= "<img src='img_pack/$fonction'$alt$title style='background: url(img_pack/$fond) no-repeat center center;' width='24' height='24' border='0'>";
}
@@ -2780,9 +2811,8 @@
function gros_titre($titre, $ze_logo=''){
global $couleur_foncee, $spip_display;
-
if ($spip_display == 4) {
- echo "<h1>".typo($titre)."</h1>";
+ echo "\n<h1>".typo($titre)."</h1> \n";
}
else {
echo "<div class='verdana2' style='font-size: 18px; color: $couleur_foncee; font-weight: bold;'>";
@@ -2830,7 +2860,7 @@
function debut_gauche($rubrique = "asuivre") {
global $connect_statut, $cookie_admin;
- global $options;
+ global $options, $spip_display;
global $connect_id_auteur;
global $spip_ecran;
global $flag_3_colonnes, $flag_centre_large;
@@ -2858,6 +2888,8 @@
echo "<br><table width='$largeur_ecran' cellpadding=0 cellspacing=0 border=0>
<tr><td width='$largeur' valign='top' class='serif' $rspan>\n";
+
+ if ($spip_display == 4) echo "<!-- ";
}
@@ -2902,11 +2934,13 @@
}
function debut_droite($rubrique="") {
- global $options, $spip_ecran, $deja_colonne_droite;
+ global $options, $spip_ecran, $deja_colonne_droite, $spip_display;
global $connect_id_auteur, $connect_statut, $connect_toutes_rubriques, $clean_link;
global $flag_3_colonnes, $flag_centre_large, $couleur_foncee, $couleur_claire;
global $lang_left;
+ if ($spip_display == 4) echo " -->";
+
if ($options == "avancees") {
// liste des articles bloques
if (lire_meta("articles_modif") != "non") {
Index: breves_voir.php3
RCS file: /home/spip-cvs/spip/ecrire/breves_voir.php3,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -d -r1.42 -r1.43
--- breves_voir.php3 23 Sep 2004 15:05:23 -0000 1.42
+++ breves_voir.php3 3 Oct 2004 15:15:23 -0000 1.43
@@ -216,7 +216,7 @@
echo "</td>";
if ($flag_editable) {
- echo "<td><img src='img_pack/rien.gif' width=5></td>\n";
+ echo "<td><img src='img_pack/rien.gif' alt='' width=5></td>\n";
echo "<td align='right'>";
icone(_T('icone_modifier_breve'), "breves_edit.php3?id_breve=$id_breve&retour=nav", "breve-24.gif", "edit.gif");
echo "</td>";
@@ -344,7 +344,7 @@
icone(_T('icone_publier_breve'), "breves.php3?id_breve=$id_breve&statut=publie", "breve-24.gif", "racine-24.gif");
echo "</td>";
- echo "<td><img src='img_pack/rien.gif' width=5></td>\n";
+ echo "<td><img src='img_pack/rien.gif' alt='' width=5></td>\n";
echo "<td align='right'>";
icone(_T('icone_refuser_breve'), "breves.php3?id_breve=$id_breve&statut=refuse", "breve-24.gif", "supprimer.gif");
echo "</td>";
Index: inc_sites.php3
RCS file: /home/spip-cvs/spip/ecrire/inc_sites.php3,v
retrieving revision 1.73
retrieving revision 1.74
diff -u -d -r1.73 -r1.74
--- inc_sites.php3 1 Oct 2004 08:48:12 -0000 1.73
+++ inc_sites.php3 3 Oct 2004 15:15:23 -0000 1.74
@@ -477,7 +477,7 @@
}
$s = "<a href=\"".$link->getUrl()."\" title=\"$title\">";
- $s .= "<img src='img_pack/$puce' width='7' height='7' border='0'> ";
+ $s .= "<img src='img_pack/$puce' alt='' width='7' height='7' border='0'> ";
$s .= typo($nom_site);
/*if ($moderation == 'oui')