/** * Display a line for a ticket * * @param $id Integer ID of the ticket * @param $followups Boolean show followup columns * @param $output_type Integer type of output (default Search::HTML_OUTPUT) * @param $row_num Integer row number (default 0) * @param $id_for_massaction Integer default 0 means no massive action (default 0) * */ static function showShort($id, $followups, $output_type = Search::HTML_OUTPUT, $row_num = 0, $id_for_massaction = 0) { global $CFG_GLPI; $rand = mt_rand(); /// TODO to be cleaned. Get datas and clean display links // Prints a job in short form // Should be called in a <table>-segment // Print links or not in case of user view // Make new job object and fill it from database, if success, print it $job = new self(); $candelete = Session::haveRight("delete_ticket", "1"); $canupdate = Session::haveRight("update_ticket", "1"); $showprivate = Session::haveRight("show_full_ticket", "1"); $align = "class='center"; $align_desc = "class='left"; if ($followups) { $align .= " top'"; $align_desc .= " top'"; } else { $align .= "'"; $align_desc .= "'"; } if ($job->getFromDB($id)) { $item_num = 1; $bgcolor = $_SESSION["glpipriority_" . $job->fields["priority"]]; echo Search::showNewLine($output_type, $row_num % 2); $check_col = ''; if (($candelete || $canupdate) && $output_type == Search::HTML_OUTPUT && $id_for_massaction) { $check_col = Html::getMassiveActionCheckBox(__CLASS__, $id_for_massaction); } echo Search::showItem($output_type, $check_col, $item_num, $row_num, $align); // First column $first_col = sprintf(__('%1$s: %2$s'), __('ID'), $job->fields["id"]); if ($output_type == Search::HTML_OUTPUT) { $first_col .= "<br><img src='" . self::getStatusIconURL($job->fields["status"]) . "'\n alt=\"" . self::getStatus($job->fields["status"]) . "\" title=\"" . self::getStatus($job->fields["status"]) . "\">"; } else { $first_col = sprintf(__('%1$s - %2$s'), $first_col, self::getStatus($job->fields["status"])); } echo Search::showItem($output_type, $first_col, $item_num, $row_num, $align); // Second column if ($job->fields['status'] == self::CLOSED) { $second_col = sprintf(__('Closed on %s'), ($output_type == Search::HTML_OUTPUT ? '<br>' : '') . Html::convDateTime($job->fields['closedate'])); } else { if ($job->fields['status'] == self::SOLVED) { $second_col = sprintf(__('Solved on %s'), ($output_type == Search::HTML_OUTPUT ? '<br>' : '') . Html::convDateTime($job->fields['solvedate'])); } else { if ($job->fields['begin_waiting_date']) { $second_col = sprintf(__('Put on hold on %s'), ($output_type == Search::HTML_OUTPUT ? '<br>' : '') . Html::convDateTime($job->fields['begin_waiting_date'])); } else { if ($job->fields['due_date']) { $second_col = sprintf(__('%1$s: %2$s'), __('Due date'), ($output_type == Search::HTML_OUTPUT ? '<br>' : '') . Html::convDateTime($job->fields['due_date'])); } else { $second_col = sprintf(__('Opened on %s'), ($output_type == Search::HTML_OUTPUT ? '<br>' : '') . Html::convDateTime($job->fields['date'])); } } } } echo Search::showItem($output_type, $second_col, $item_num, $row_num, $align . " width=130"); // Second BIS column $second_col = Html::convDateTime($job->fields["date_mod"]); echo Search::showItem($output_type, $second_col, $item_num, $row_num, $align . " width=90"); // Second TER column if (count($_SESSION["glpiactiveentities"]) > 1) { $second_col = Dropdown::getDropdownName('glpi_entities', $job->fields['entities_id']); echo Search::showItem($output_type, $second_col, $item_num, $row_num, $align . " width=100"); } // Third Column echo Search::showItem($output_type, "<span class='b'>" . parent::getPriorityName($job->fields["priority"]) . "</span>", $item_num, $row_num, "{$align} bgcolor='{$bgcolor}'"); // Fourth Column $fourth_col = ""; if (isset($job->users[CommonITILActor::REQUESTER]) && count($job->users[CommonITILActor::REQUESTER])) { foreach ($job->users[CommonITILActor::REQUESTER] as $d) { $userdata = getUserName($d["users_id"], 2); $fourth_col .= sprintf(__('%1$s %2$s'), "<span class='b'>" . $userdata['name'] . "</span>", Html::showToolTip($userdata["comment"], array('link' => $userdata["link"], 'display' => false))); $fourth_col .= "<br>"; } } if (isset($job->groups[CommonITILActor::REQUESTER]) && count($job->groups[CommonITILActor::REQUESTER])) { foreach ($job->groups[CommonITILActor::REQUESTER] as $d) { $fourth_col .= Dropdown::getDropdownName("glpi_groups", $d["groups_id"]); $fourth_col .= "<br>"; } } echo Search::showItem($output_type, $fourth_col, $item_num, $row_num, $align); // Fifth column $fifth_col = ""; if (isset($job->users[CommonITILActor::ASSIGN]) && count($job->users[CommonITILActor::ASSIGN])) { foreach ($job->users[CommonITILActor::ASSIGN] as $d) { $userdata = getUserName($d["users_id"], 2); $fifth_col .= sprintf(__('%1$s %2$s'), "<span class='b'>" . $userdata['name'] . "</span>", Html::showToolTip($userdata["comment"], array('link' => $userdata["link"], 'display' => false))); $fifth_col .= "<br>"; } } if (isset($job->groups[CommonITILActor::ASSIGN]) && count($job->groups[CommonITILActor::ASSIGN])) { foreach ($job->groups[CommonITILActor::ASSIGN] as $d) { $fifth_col .= Dropdown::getDropdownName("glpi_groups", $d["groups_id"]); $fifth_col .= "<br>"; } } if (isset($job->suppliers[CommonITILActor::ASSIGN]) && count($job->suppliers[CommonITILActor::ASSIGN])) { foreach ($job->suppliers[CommonITILActor::ASSIGN] as $d) { $fifth_col .= Dropdown::getDropdownName("glpi_suppliers", $d["suppliers_id"]); $fifth_col .= "<br>"; } } echo Search::showItem($output_type, $fifth_col, $item_num, $row_num, $align); // Sixth Colum $sixth_col = ""; $is_deleted = false; if (!empty($job->fields["itemtype"]) && $job->fields["items_id"] > 0) { if ($item = getItemForItemtype($job->fields["itemtype"])) { if ($item->getFromDB($job->fields["items_id"])) { $is_deleted = $item->isDeleted(); $sixth_col .= $item->getTypeName(); $sixth_col .= "<br><span class='b'>"; if ($item->canView()) { $sixth_col .= $item->getLink(array('linkoption' => $output_type == Search::HTML_OUTPUT)); } else { $sixth_col .= $item->getNameID(); } $sixth_col .= "</span>"; } } } else { if (empty($job->fields["itemtype"])) { $sixth_col = __('General'); } } echo Search::showItem($output_type, $sixth_col, $item_num, $row_num, $is_deleted ? " class='center deleted' " : $align); // Seventh column echo Search::showItem($output_type, "<span class='b'>" . Dropdown::getDropdownName('glpi_itilcategories', $job->fields["itilcategories_id"]) . "</span>", $item_num, $row_num, $align); // Eigth column $eigth_column = "<span class='b'>" . $job->fields["name"] . "</span> "; // Add link if ($job->canViewItem()) { $eigth_column = "<a id='ticket" . $job->fields["id"] . "{$rand}' href=\"" . $CFG_GLPI["root_doc"] . "/front/ticket.form.php?id=" . $job->fields["id"] . "\">{$eigth_column}</a>"; if ($followups && $output_type == Search::HTML_OUTPUT) { $eigth_column .= TicketFollowup::showShortForTicket($job->fields["id"]); } else { $eigth_column = sprintf(__('%1$s (%2$s)'), $eigth_column, sprintf(__('%1$s - %2$s'), $job->numberOfFollowups($showprivate), $job->numberOfTasks($showprivate))); } } if ($output_type == Search::HTML_OUTPUT) { $eigth_column = sprintf(__('%1$s %2$s'), $eigth_column, Html::showToolTip($job->fields['content'], array('display' => false, 'applyto' => "ticket" . $job->fields["id"] . $rand))); } echo Search::showItem($output_type, $eigth_column, $item_num, $row_num, $align_desc . "width='300'"); // Finish Line echo Search::showEndLine($output_type); } else { echo "<tr class='tab_bg_2'>"; echo "<td colspan='6' ><i>" . __('No ticket in progress.') . "</i></td></tr>"; } }
/** * Display a line for an object * * @since version 0.85 (befor in each object with differents parameters) * * @param $id Integer ID of the object * @param $options array of options * output_type : Default output type (see Search class / default Search::HTML_OUTPUT) * row_num : row num used for display * type_for_massiveaction : itemtype for massive action * id_for_massaction : default 0 means no massive action * followups : only for Tickets : show followup columns */ static function showShort($id, $options = array()) { global $CFG_GLPI, $DB; $p['output_type'] = Search::HTML_OUTPUT; $p['row_num'] = 0; $p['type_for_massiveaction'] = 0; $p['id_for_massiveaction'] = 0; $p['followups'] = false; if (count($options)) { foreach ($options as $key => $val) { $p[$key] = $val; } } $rand = mt_rand(); /// TODO to be cleaned. Get datas and clean display links // Prints a job in short form // Should be called in a <table>-segment // Print links or not in case of user view // Make new job object and fill it from database, if success, print it $item = new static(); $candelete = static::canDelete(); $canupdate = Session::haveRight(static::$rightname, UPDATE); $showprivate = Session::haveRight('followup', TicketFollowup::SEEPRIVATE); $align = "class='center"; $align_desc = "class='left"; if ($p['followups']) { $align .= " top'"; $align_desc .= " top'"; } else { $align .= "'"; $align_desc .= "'"; } if ($item->getFromDB($id)) { $item_num = 1; $bgcolor = $_SESSION["glpipriority_" . $item->fields["priority"]]; echo Search::showNewLine($p['output_type'], $p['row_num'] % 2); $check_col = ''; if (($candelete || $canupdate) && $p['output_type'] == Search::HTML_OUTPUT && $p['id_for_massiveaction']) { $check_col = Html::getMassiveActionCheckBox($p['type_for_massiveaction'], $p['id_for_massiveaction']); } echo Search::showItem($p['output_type'], $check_col, $item_num, $p['row_num'], $align); // First column $first_col = sprintf(__('%1$s: %2$s'), __('ID'), $item->fields["id"]); if ($p['output_type'] == Search::HTML_OUTPUT) { $first_col .= "<br><img src='" . static::getStatusIconURL($item->fields["status"]) . "'\n alt=\"" . static::getStatus($item->fields["status"]) . "\" title=\"" . static::getStatus($item->fields["status"]) . "\">"; } else { $first_col = sprintf(__('%1$s - %2$s'), $first_col, static::getStatus($item->fields["status"])); } echo Search::showItem($p['output_type'], $first_col, $item_num, $p['row_num'], $align); // Second column if ($item->fields['status'] == static::CLOSED) { $second_col = sprintf(__('Closed on %s'), ($p['output_type'] == Search::HTML_OUTPUT ? '<br>' : '') . Html::convDateTime($item->fields['closedate'])); } else { if ($item->fields['status'] == static::SOLVED) { $second_col = sprintf(__('Solved on %s'), ($p['output_type'] == Search::HTML_OUTPUT ? '<br>' : '') . Html::convDateTime($item->fields['solvedate'])); } else { if ($item->fields['begin_waiting_date']) { $second_col = sprintf(__('Put on hold on %s'), ($p['output_type'] == Search::HTML_OUTPUT ? '<br>' : '') . Html::convDateTime($item->fields['begin_waiting_date'])); } else { if ($item->fields['due_date']) { $second_col = sprintf(__('%1$s: %2$s'), __('Due date'), ($p['output_type'] == Search::HTML_OUTPUT ? '<br>' : '') . Html::convDateTime($item->fields['due_date'])); } else { $second_col = sprintf(__('Opened on %s'), ($p['output_type'] == Search::HTML_OUTPUT ? '<br>' : '') . Html::convDateTime($item->fields['date'])); } } } } echo Search::showItem($p['output_type'], $second_col, $item_num, $p['row_num'], $align . " width=130"); // Second BIS column $second_col = Html::convDateTime($item->fields["date_mod"]); echo Search::showItem($p['output_type'], $second_col, $item_num, $p['row_num'], $align . " width=90"); // Second TER column if (count($_SESSION["glpiactiveentities"]) > 1) { $second_col = Dropdown::getDropdownName('glpi_entities', $item->fields['entities_id']); echo Search::showItem($p['output_type'], $second_col, $item_num, $p['row_num'], $align . " width=100"); } // Third Column echo Search::showItem($p['output_type'], "<span class='b'>" . static::getPriorityName($item->fields["priority"]) . "</span>", $item_num, $p['row_num'], "{$align} bgcolor='{$bgcolor}'"); // Fourth Column $fourth_col = ""; foreach ($item->getUsers(CommonITILActor::REQUESTER) as $d) { $userdata = getUserName($d["users_id"], 2); $fourth_col .= sprintf(__('%1$s %2$s'), "<span class='b'>" . $userdata['name'] . "</span>", Html::showToolTip($userdata["comment"], array('link' => $userdata["link"], 'display' => false))); $fourth_col .= "<br>"; } foreach ($item->getGroups(CommonITILActor::REQUESTER) as $d) { $fourth_col .= Dropdown::getDropdownName("glpi_groups", $d["groups_id"]); $fourth_col .= "<br>"; } echo Search::showItem($p['output_type'], $fourth_col, $item_num, $p['row_num'], $align); // Fifth column $fifth_col = ""; foreach ($item->getUsers(CommonITILActor::ASSIGN) as $d) { $userdata = getUserName($d["users_id"], 2); $fifth_col .= sprintf(__('%1$s %2$s'), "<span class='b'>" . $userdata['name'] . "</span>", Html::showToolTip($userdata["comment"], array('link' => $userdata["link"], 'display' => false))); $fifth_col .= "<br>"; } foreach ($item->getGroups(CommonITILActor::ASSIGN) as $d) { $fifth_col .= Dropdown::getDropdownName("glpi_groups", $d["groups_id"]); $fifth_col .= "<br>"; } foreach ($item->getSuppliers(CommonITILActor::ASSIGN) as $d) { $fifth_col .= Dropdown::getDropdownName("glpi_suppliers", $d["suppliers_id"]); $fifth_col .= "<br>"; } echo Search::showItem($p['output_type'], $fifth_col, $item_num, $p['row_num'], $align); // Sixth Colum // Ticket : simple link to item $sixth_col = ""; $is_deleted = false; $item_ticket = new Item_Ticket(); $data = $item_ticket->find("`tickets_id` = " . $item->fields['id']); if ($item->getType() == 'Ticket') { if (!empty($data)) { foreach ($data as $val) { if (!empty($val["itemtype"]) && $val["items_id"] > 0) { if ($object = getItemForItemtype($val["itemtype"])) { if ($object->getFromDB($val["items_id"])) { $is_deleted = $object->isDeleted(); $sixth_col .= $object->getTypeName(); $sixth_col .= " - <span class='b'>"; if ($item->canView()) { $sixth_col .= $object->getLink(); } else { $sixth_col .= $object->getNameID(); } $sixth_col .= "</span><br>"; } } } } } else { $sixth_col = __('General'); } echo Search::showItem($p['output_type'], $sixth_col, $item_num, $p['row_num'], $is_deleted ? " class='center deleted' " : $align); } // Seventh column echo Search::showItem($p['output_type'], "<span class='b'>" . Dropdown::getDropdownName('glpi_itilcategories', $item->fields["itilcategories_id"]) . "</span>", $item_num, $p['row_num'], $align); // Eigth column $eigth_column = "<span class='b'>" . $item->getName() . "</span> "; // Add link if ($item->canViewItem()) { $eigth_column = "<a id='" . $item->getType() . $item->fields["id"] . "{$rand}' href=\"" . $item->getLinkURL() . "\">{$eigth_column}</a>"; if ($p['followups'] && $p['output_type'] == Search::HTML_OUTPUT) { $eigth_column .= TicketFollowup::showShortForTicket($item->fields["id"]); } else { if (method_exists($item, 'numberOfFollowups')) { $eigth_column = sprintf(__('%1$s (%2$s)'), $eigth_column, sprintf(__('%1$s - %2$s'), $item->numberOfFollowups($showprivate), $item->numberOfTasks($showprivate))); } else { $eigth_column = sprintf(__('%1$s (%2$s)'), $eigth_column, $item->numberOfTasks($showprivate)); } } } if ($p['output_type'] == Search::HTML_OUTPUT) { $eigth_column = sprintf(__('%1$s %2$s'), $eigth_column, Html::showToolTip(Html::clean(Html::entity_decode_deep($item->fields["content"])), array('display' => false, 'applyto' => $item->getType() . $item->fields["id"] . $rand))); } echo Search::showItem($p['output_type'], $eigth_column, $item_num, $p['row_num'], $align_desc . " width='200'"); //tenth column $tenth_column = ''; $planned_infos = ''; $tasktype = $item->getType() . "Task"; $plan = new $tasktype(); $items = array(); foreach ($DB->request($plan->getTable(), array($item->getForeignKeyField() => $item->fields['id'])) as $plan) { if (isset($plan['begin']) && $plan['begin']) { $items[$plan['id']] = $plan['id']; $planned_infos .= sprintf(__('From %s') . ($p['output_type'] == Search::HTML_OUTPUT ? '<br>' : ''), Html::convDateTime($plan['begin'])); $planned_infos .= sprintf(__('To %s') . ($p['output_type'] == Search::HTML_OUTPUT ? '<br>' : ''), Html::convDateTime($plan['end'])); if ($plan['users_id_tech']) { $planned_infos .= sprintf(__('By %s') . ($p['output_type'] == Search::HTML_OUTPUT ? '<br>' : ''), getUserName($plan['users_id_tech'])); } $planned_infos .= "<br>"; } } unset($i, $j); $tenth_column = count($items); if ($tenth_column) { $tenth_column = "<span class='pointer'\n id='" . $item->getType() . $item->fields["id"] . "planning{$rand}'>" . $tenth_column . '</span>'; $tenth_column = sprintf(__('%1$s %2$s'), $tenth_column, Html::showToolTip($planned_infos, array('display' => false, 'applyto' => $item->getType() . $item->fields["id"] . "planning" . $rand))); } echo Search::showItem($p['output_type'], $tenth_column, $item_num, $p['row_num'], $align_desc . " width='150'"); // Finish Line echo Search::showEndLine($p['output_type']); } else { echo "<tr class='tab_bg_2'>"; echo "<td colspan='6' ><i>" . __('No item in progress.') . "</i></td></tr>"; } }
static function showShort($id, $followups, $output_type = HTML_OUTPUT, $row_num = 0) { global $CFG_GLPI, $LANG; $rand = mt_rand(); /// TODO to be cleaned. Get datas and clean display links // Prints a job in short form // Should be called in a <table>-segment // Print links or not in case of user view // Make new job object and fill it from database, if success, print it $job = new self(); $candelete = haveRight("delete_ticket", "1"); $canupdate = haveRight("update_ticket", "1"); $showprivate = haveRight("show_full_ticket", "1"); $align = "class='center"; $align_desc = "class='left"; if ($followups) { $align .= " top'"; $align_desc .= " top'"; } else { $align .= "'"; $align_desc .= "'"; } if ($job->getFromDB($id)) { $item_num = 1; $bgcolor = $_SESSION["glpipriority_" . $job->fields["priority"]]; echo Search::showNewLine($output_type, $row_num % 2); // First column $first_col = "ID : " . $job->fields["id"]; if ($output_type == HTML_OUTPUT) { $first_col .= "<br><img src='" . $CFG_GLPI["root_doc"] . "/pics/" . $job->fields["status"] . ".png'\n alt=\"" . self::getStatus($job->fields["status"]) . "\" title=\"" . self::getStatus($job->fields["status"]) . "\">"; } else { $first_col .= " - " . self::getStatus($job->fields["status"]); } if (($candelete || $canupdate) && $output_type == HTML_OUTPUT) { $sel = ""; if (isset($_GET["select"]) && $_GET["select"] == "all") { $sel = "checked"; } if (isset($_SESSION['glpimassiveactionselected'][$job->fields["id"]])) { $sel = "checked"; } $first_col .= " <input type='checkbox' name='item[" . $job->fields["id"] . "]'\n value='1' {$sel}>"; } echo Search::showItem($output_type, $first_col, $item_num, $row_num, $align); // Second column if ($job->fields['status'] == 'closed') { $second_col = $LANG['joblist'][12]; if ($output_type == HTML_OUTPUT) { $second_col .= " :<br>"; } else { $second_col .= " : "; } $second_col .= convDateTime($job->fields['closedate']); } else { if ($job->fields['status'] == 'solved') { $second_col = $LANG['joblist'][14]; if ($output_type == HTML_OUTPUT) { $second_col .= " :<br>"; } else { $second_col .= " : "; } $second_col .= convDateTime($job->fields['solvedate']); } else { if ($job->fields['begin_waiting_date']) { $second_col = $LANG['joblist'][26]; if ($output_type == HTML_OUTPUT) { $second_col .= " :<br>"; } else { $second_col .= " : "; } $second_col .= convDateTime($job->fields['begin_waiting_date']); } else { if ($job->fields['due_date']) { $second_col = $LANG['sla'][5]; if ($output_type == HTML_OUTPUT) { $second_col .= " :<br>"; } else { $second_col .= " : "; } $second_col .= convDateTime($job->fields['due_date']); } else { $second_col = $LANG['joblist'][11]; if ($output_type == HTML_OUTPUT) { $second_col .= " :<br>"; } else { $second_col .= " : "; } $second_col .= convDateTime($job->fields['date']); } } } } echo Search::showItem($output_type, $second_col, $item_num, $row_num, $align . " width=130"); // Second BIS column $second_col = convDateTime($job->fields["date_mod"]); echo Search::showItem($output_type, $second_col, $item_num, $row_num, $align . " width=90"); // Second TER column if (count($_SESSION["glpiactiveentities"]) > 1) { if ($job->fields['entities_id'] == 0) { $second_col = $LANG['entity'][2]; } else { $second_col = Dropdown::getDropdownName("glpi_entities", $job->fields['entities_id']); } echo Search::showItem($output_type, $second_col, $item_num, $row_num, $align . " width=100"); } // Third Column echo Search::showItem($output_type, "<strong>" . self::getPriorityName($job->fields["priority"]) . "</strong>", $item_num, $row_num, "{$align} bgcolor='{$bgcolor}'"); // Fourth Column $fourth_col = ""; if (isset($job->users[self::REQUESTER]) && count($job->users[self::REQUESTER])) { foreach ($job->users[self::REQUESTER] as $k => $d) { $userdata = getUserName($k, 2); $fourth_col .= "<strong>" . $userdata['name'] . "</strong> "; $fourth_col .= showToolTip($userdata["comment"], array('link' => $userdata["link"], 'display' => false)); $fourth_col .= "<br>"; } } if (isset($job->groups[self::REQUESTER]) && count($job->groups[self::REQUESTER])) { foreach ($job->groups[self::REQUESTER] as $k => $d) { $fourth_col .= Dropdown::getDropdownName("glpi_groups", $k); $fourth_col .= "<br>"; } } echo Search::showItem($output_type, $fourth_col, $item_num, $row_num, $align); // Fifth column $fifth_col = ""; if (isset($job->users[self::ASSIGN]) && count($job->users[self::ASSIGN])) { foreach ($job->users[self::ASSIGN] as $k => $d) { $userdata = getUserName($k, 2); $fifth_col .= "<strong>" . $userdata['name'] . "</strong> "; $fifth_col .= showToolTip($userdata["comment"], array('link' => $userdata["link"], 'display' => false)); $fifth_col .= "<br>"; } } if (isset($job->groups[self::ASSIGN]) && count($job->groups[self::ASSIGN])) { foreach ($job->groups[self::ASSIGN] as $k => $d) { $fourth_col .= Dropdown::getDropdownName("glpi_groups", $k); $fourth_col .= "<br>"; } } if ($job->fields["suppliers_id_assign"] > 0) { if (!empty($fifth_col)) { $fifth_col .= "<br>"; } $fifth_col .= self::getAssignName($job->fields["suppliers_id_assign"], 'Supplier', 1); } echo Search::showItem($output_type, $fifth_col, $item_num, $row_num, $align); // Sixth Colum $sixth_col = ""; $is_deleted = false; if (!empty($job->fields["itemtype"]) && $job->fields["items_id"] > 0) { if (class_exists($job->fields["itemtype"])) { $item = new $job->fields["itemtype"](); if ($item->getFromDB($job->fields["items_id"])) { $is_deleted = $item->isDeleted(); $sixth_col .= $item->getTypeName(); $sixth_col .= "<br><strong>"; if ($item->canView()) { $sixth_col .= $item->getLink($output_type == HTML_OUTPUT); } else { $sixth_col .= $item->getNameID(); } $sixth_col .= "</strong>"; } } } else { if (empty($job->fields["itemtype"])) { $sixth_col = $LANG['help'][30]; } } echo Search::showItem($output_type, $sixth_col, $item_num, $row_num, $is_deleted ? " class='center deleted' " : $align); // Seventh column echo Search::showItem($output_type, "<strong>" . Dropdown::getDropdownName('glpi_ticketcategories', $job->fields["ticketcategories_id"]) . "</strong>", $item_num, $row_num, $align); // ninth column $ninth_column = "<strong>" . $job->fields["name"] . "</strong> "; // Add link if ($job->canViewItem()) { $ninth_column = "<a id='ticket" . $job->fields["id"] . "{$rand}' href=\"" . $CFG_GLPI["root_doc"] . "/front/ticket.form.php?id=" . $job->fields["id"] . "\">{$ninth_column}</a>"; if ($followups && $output_type == HTML_OUTPUT) { $ninth_column .= TicketFollowup::showShortForTicket($job->fields["id"]); } else { $ninth_column .= " (" . $job->numberOfFollowups($showprivate) . "-" . $job->numberOfTasks($showprivate) . ")"; } } if ($output_type == HTML_OUTPUT) { $ninth_column .= " " . showToolTip($job->fields['content'], array('display' => false, 'applyto' => "ticket" . $job->fields["id"] . $rand)); } echo Search::showItem($output_type, $ninth_column, $item_num, $row_num, $align_desc . "width='300'"); // Finish Line echo Search::showEndLine($output_type); } else { echo "<tr class='tab_bg_2'><td colspan='6' ><i>" . $LANG['joblist'][16] . "</i></td></tr>"; } }