Пример #1
0
 /**
  * @see CommonGLPI::getTabNameForItem()
  **/
 function getTabNameForItem(CommonGLPI $item, $withtemplate = 0)
 {
     if (Session::haveRight("reminder_public", "r")) {
         switch ($item->getType()) {
             case 'Reminder':
                 if ($item->canUpdate()) {
                     if ($_SESSION['glpishow_count_on_tabs']) {
                         return array(1 => self::createTabEntry(__('Targets'), $item->countVisibilities()));
                     }
                     return array(1 => __('Targets'));
                 }
         }
     }
     return '';
 }
Пример #2
0
 /**
  * @see CommonGLPI::getTabNameForItem()
  **/
 function getTabNameForItem(CommonGLPI $item, $withtemplate = 0)
 {
     if (self::canView()) {
         $nb = 0;
         switch ($item->getType()) {
             case 'RSSFeed':
                 $showtab = array(1 => __('Content'));
                 if (session::haveRight('rssfeed_public', UPDATE)) {
                     if ($_SESSION['glpishow_count_on_tabs']) {
                         $nb = $item->countVisibilities();
                     }
                     $showtab[2] = self::createTabEntry(_n('Target', 'Targets', Session::getPluralNumber()), $nb);
                 }
                 return $showtab;
         }
     }
     return '';
 }
Пример #3
0
 function getTabNameForItem(CommonGLPI $item, $withtemplate = 0)
 {
     if (!$withtemplate) {
         switch ($item->getType()) {
             case __CLASS__:
                 $ong[1] = $this->getTypeName(1);
                 if ($item->canUpdate()) {
                     if ($_SESSION['glpishow_count_on_tabs']) {
                         $ong[2] = self::createTabEntry(__('Targets'), $item->countVisibilities());
                     } else {
                         $ong[2] = __('Targets');
                     }
                 }
                 return $ong;
         }
     }
     return '';
 }
Пример #4
0
 function getTabNameForItem(CommonGLPI $item, $withtemplate = 0)
 {
     if (!$withtemplate) {
         $nb = 0;
         switch ($item->getType()) {
             case __CLASS__:
                 $ong[1] = $this->getTypeName(1);
                 if ($item->canUpdateItem()) {
                     if ($_SESSION['glpishow_count_on_tabs']) {
                         $nb = $item->countVisibilities();
                     }
                     $ong[2] = self::createTabEntry(_n('Target', 'Targets', Session::getPluralNumber()), $nb);
                     $ong[3] = __('Edit');
                 }
                 return $ong;
         }
     }
     return '';
 }
Пример #5
0
 /**
  * @see CommonGLPI::getTabNameForItem()
  **/
 function getTabNameForItem(CommonGLPI $item, $withtemplate = 0)
 {
     if (self::canView()) {
         switch ($item->getType()) {
             case 'Reminder':
                 if ($item->canUpdate()) {
                     if ($_SESSION['glpishow_count_on_tabs']) {
                         $nb = $item->countVisibilities();
                         return array(1 => self::createTabEntry(_n('Target', 'Targets', $nb), $nb));
                     }
                     return array(1 => _n('Target', 'Targets', Session::getPluralNumber()));
                 }
         }
     }
     return '';
 }