示例#1
0
 * Copyright: dtbaker 2012
 * Licence: Please check CodeCanyon.net for licence details. 
 * More licence clarification available here:  http://codecanyon.net/wiki/support/legal-terms/licensing-terms/ 
 * Deploy: 9809 f200f46c2a19bb98d112f2d32a8de0c4
 * Envato: 4ffca17e-861e-4921-86c3-8931978c40ca
 * Package Date: 2015-11-25 02:55:20 
 * IP Address: 67.79.165.254
 */
$ticket_count = 0;
switch (module_config::c('ticket_show_summary_type', 'unread')) {
    case 'unread':
        $ticket_count = module_ticket::get_unread_ticket_count();
        break;
    case 'total':
    default:
        $ticket_count = module_ticket::get_total_ticket_count();
        break;
}
if ($ticket_count > 0) {
    $module->page_title = _l('Tickets (%s)', $ticket_count);
} else {
    $module->page_title = _l('Tickets');
}
// hack to add a "group" option to the pagination results.
if (class_exists('module_group', false) && module_config::c('ticket_enable_groups', 1)) {
    module_group::enable_pagination_hook(array('fields' => array('owner_id' => 'ticket_id', 'owner_table' => 'ticket'), 'bulk_actions' => array('delete' => array('label' => 'Delete selected tickets', 'type' => 'delete', 'callback' => 'module_ticket::bulk_handle_delete'), 'unread' => array('label' => 'Mark selected tickets as unread', 'type' => 'button', 'callback' => 'module_ticket::bulk_handle_unread'), 'read' => array('label' => 'Mark selected tickets as read', 'type' => 'button', 'callback' => 'module_ticket::bulk_handle_read'), 'status_resolved' => array('label' => 'Change status to:', 'type' => 'form', 'callback' => 'module_ticket::bulk_handle_status', 'elements' => array(array('type' => 'select', 'name' => 'bulk_change_status_id', 'options' => module_ticket::get_statuses()))), 'change_assigned' => array('label' => 'Change Assigned:', 'type' => 'form', 'callback' => 'module_ticket::bulk_handle_staff_change', 'elements' => array(array('type' => 'select', 'name' => 'bulk_change_staff_id', 'options' => module_ticket::get_ticket_staff_rel(), 'blank' => _l(' - Unassigned - ')))))));
}
if (class_exists('module_table_sort', false)) {
    module_table_sort::enable_pagination_hook(array('table_id' => 'ticket_list', 'sortable' => array()));
}
/*module_form::enable_pagination_bulk_operations(