You are not logged in.
Bonjour,
Nouvel inscrit sur le forum,
je vous soumets un patch pour ceux qui voudraient afficher l'onglet "Tous" en premier.
Version GLPI testée : 0.80.61
diff inc/commonglpi.class.php.orig inc/commonglpi.class.php
279c279
< $tabs[-1] = array('title' => $LANG['common'][66],
---
> array_unshift($tabs,array('title' => $LANG['common'][66],
282c282,283
< "&glpi_tab=-1&id=$ID$extraparam");
---
> "&glpi_tab=-1&id=$ID$extraparam")
> );
Si cela peut vous être utile.
Amicalement,
Niarf
Last edited by Niarf (2012-08-13 13:50:43)
Offline
Bonjour,
La version actualisée pour GLPI 0.83.4
A appliquer sur inc/commonglpi.class.php
--- commonglpi.class.php.orig 2012-08-13 13:08:37.000000000 +0200
+++ commonglpi.class.php 2012-08-13 13:40:09.000000000 +0200
@@ -503,6 +503,18 @@
if (count($onglets)) {
$tabpage = $this->getTabsURL();
$tabs = array();
+
+ // Plugin with plugin_get_headings_xxx
+ $plug_tabs = Plugin::getTabs($target,$this, $withtemplate);
+
+ // Not all tab for templates and if only 1 tab
+ if ($display_all && empty($withtemplate) && (count($onglets) + count($plug_tabs)) >1) {
+ $tabs[-1] = array('title' => $LANG['common'][66],
+# array_unshift($tabs, array('title' => $LANG['common'][66],
+ 'url' => $tabpage,
+ 'params' => "target=$target&itemtype=".$this->getType().
+ "&glpi_tab=-1&id=$ID$extraparam");
+ }
foreach ($onglets as $key => $val ) {
$tabs[$key] = array('title' => $val,
@@ -511,18 +523,8 @@
"&glpi_tab=$key&id=$ID$extraparam");
}
- // Plugin with plugin_get_headings_xxx
- $plug_tabs = Plugin::getTabs($target,$this, $withtemplate);
$tabs += $plug_tabs;
- // Not all tab for templates and if only 1 tab
- if ($display_all && empty($withtemplate) && count($tabs)>1) {
- $tabs[-1] = array('title' => $LANG['common'][66],
- 'url' => $tabpage,
- 'params' => "target=$target&itemtype=".$this->getType().
- "&glpi_tab=-1&id=$ID$extraparam");
- }
-
Ajax::createTabs('tabspanel', 'tabcontent', $tabs, $this->getType());
}
}
@@ -604,4 +606,4 @@
}
-?>
\ Pas de fin de ligne à la fin du fichier.
+?>
Bonne journée.
Niarf
Offline