Skip to content
Extraits de code Groupes Projets
Valider 415faf12 rédigé par esj's avatar esj
Parcourir les fichiers

Petit confort: les "No nnn" des articles et des breves dans les tranches et le...

Petit confort: les "No nnn" des articles et des breves dans les tranches et le cartouche Dans_la_meme_rubrique sont des liens vers le formulaire d'édition.
parent f2c86c81
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -27,9 +27,7 @@ function inc_formater_article_dist($row)
$chercher_logo = charger_fonction('chercher_logo', 'inc');
$formater_auteur = charger_fonction('formater_auteur', 'inc');
$img_admin = http_img_pack("admin-12.gif", "", " width='12' height='12'", _T('titre_image_admin_article'));
$nb = ($options != "avancees")
? ''
: _T('info_numero_abbreviation');
$nb = ($options == "avancees");
if (($GLOBALS['meta']['multi_rubriques'] == 'oui' AND (!isset($GLOBALS['id_rubrique']))) OR $GLOBALS['meta']['multi_articles'] == 'oui') {
$afficher_langue = true;
$langue_defaut = !isset($GLOBALS['langue_rubrique'])
......@@ -88,7 +86,7 @@ function inc_formater_article_dist($row)
$s = affdate_jourcourt($date);
$vals[] = $s ? $s : ' ';
if ($nb) $vals[]= "<b>" . $nb . $id_article . '</b>';
if ($nb) $vals[]= afficher_numero_edit($id_article, 'id_article', 'articles_edit');
if ($options == "avancees") { // Afficher le numero (JMB)
$largeurs = array(11, '', 80, 100, 50);
......
......@@ -929,7 +929,7 @@ function afficher_breves_boucle($row, &$tous_id, $voir_logo, $own)
$vals[] = $s;
if ($options == "avancees") {
$vals[] = "<b>"._T('info_numero_abbreviation')."$id_breve</b>";
$vals[] = afficher_numero_edit($id_breve, 'id_breve', 'breves_edit');
}
return $vals;
......@@ -1775,29 +1775,28 @@ function debloquer_article($arg, $texte) {
// http://doc.spip.org/@meme_rubrique
function meme_rubrique($id_rubrique, $id, $type, $order='date', $limit=30)
{
global $spip_lang_right, $spip_lang_left, $options;
global $options;
if ($options != "avancees") return '';
$table = $type . 's';
$script = $type . 's_edit';
$key = 'id_' . $type;
$voss = spip_query("SELECT $key AS id, titre, statut FROM spip_$table WHERE id_rubrique=$id_rubrique AND (statut = 'publie' OR statut = 'prop') AND ($key != $id) ORDER BY $order DESC LIMIT $limit");
if (!spip_num_rows($voss)) return '';
$numero = _T('info_numero_abbreviation');
$style = "float: $spip_lang_right; color: black; padding-$spip_lang_left: 4px;";
$retour = '';
while($row = spip_fetch_array($voss)) {
$ze = $row['id'];
$retour .= "<a class='"
$n = $row['id'];
$retour .= afficher_numero_edit($n, $key, $script)
. "<a class='"
. $row['statut']
. "' style='font-size: 10px;' href='"
. generer_url_ecrire($table,"$key=$ze")
. generer_url_ecrire($table,"$key=$n")
. "'>"
. "<span class='arial1' style='$style'><b>$numero$ze</b></span>"
. typo($row['titre'])
. "</a>";
}
......@@ -1810,6 +1809,25 @@ function meme_rubrique($id_rubrique, $id, $type, $order='date', $limit=30)
. "</div></div>";
}
function afficher_numero_edit($id, $key, $script)
{
global $spip_lang_right, $spip_lang_left;
static $numero , $style='' ;
if (!$style) {
$style = " style='float: $spip_lang_right; padding-$spip_lang_left: 4px;font-size: 10px; color: black; '";
$numero = _T('info_numero_abbreviation');
}
return "<a$style\nhref='"
. generer_url_ecrire($script,"$key=$id")
. "'><b>"
. $numero
. $id
. "</b></a>";
}
//
// Afficher la hierarchie des rubriques
//
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter