Example #1
0
 static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0)
 {
     $self = new self();
     if ($item->getType() == 'PluginResourcesResource') {
         if (plugin_resources_haveRight('task', 'r')) {
             self::addNewTasks($item, $withtemplate);
             self::showMinimalList(array('id' => $item->getID(), 'withtemplate' => $withtemplate));
         }
     } else {
         if ($item->getType() == 'Central') {
             $self->showCentral(Session::getLoginUserID());
         }
     }
     return true;
 }
Example #2
0
 static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0)
 {
     $self = new self();
     if ($item->getType() == __CLASS__) {
         switch ($tabnum) {
             case 1:
                 PluginProjetTask_Task::showHierarchy($item->getID(), 1);
                 PluginProjetTask_Task::showHierarchy($item->getID());
                 break;
         }
     } else {
         if ($item->getType() == 'PluginProjetProjet') {
             if (plugin_projet_haveRight('task', 'r')) {
                 self::addNewTasks($item, $withtemplate);
                 self::showMinimalList(array('id' => $item->getID(), 'withtemplate' => $withtemplate));
                 self::taskLegend();
             }
         } else {
             if ($item->getType() == 'Central') {
                 $self->showCentral(Session::getLoginUserID());
             }
         }
     }
     return true;
 }