showForProblem() static public method

Show tickets for a problem
static public showForProblem ( Problem $problem )
$problem Problem Problem object
Ejemplo n.º 1
0
 static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0)
 {
     switch ($item->getType()) {
         case 'Change':
             Change_Ticket::showForChange($item);
             break;
         case 'Problem':
             Problem_Ticket::showForProblem($item);
             break;
         case __CLASS__:
             switch ($tabnum) {
                 case 2:
                     if (!isset($_POST['load_kb_sol'])) {
                         $_POST['load_kb_sol'] = 0;
                     }
                     $item->showSolutionForm($_POST['load_kb_sol']);
                     if ($item->canApprove()) {
                         $fup = new TicketFollowup();
                         $fup->showApprobationForm($item);
                     }
                     break;
                 case 3:
                     $satisfaction = new TicketSatisfaction();
                     if ($item->fields['status'] == self::CLOSED && $satisfaction->getFromDB($_POST["id"])) {
                         $satisfaction->showSatisfactionForm($item);
                     } else {
                         echo "<p class='center b'>" . __('No generated survey') . "</p>";
                     }
                     break;
                 case 4:
                     $item->showStats();
                     break;
             }
             break;
         case 'Group':
         case 'SLA':
         default:
             self::showListForItem($item);
     }
     return true;
 }