echo lang('status'); ?> :</strong> <?php $this->assign('properties', get_ticket_statuses()); $this->assign('property_name', 'status'); $this->includeTemplate(get_template_path('filter_links', 'tickets')); ?> </div> <div id="priorityFilters"> <strong><?php echo lang('priority'); ?> :</strong> <?php $this->assign('properties', get_ticket_priorities()); $this->assign('property_name', 'priority'); $this->includeTemplate(get_template_path('filter_links', 'tickets')); ?> </div> <div id="typeFilters"> <strong><?php echo lang('type'); ?> :</strong> <?php $this->assign('properties', get_ticket_types()); $this->assign('property_name', 'type'); $this->includeTemplate(get_template_path('filter_links', 'tickets')); ?> </div>
/** * Render select ticket priority * * @param string $selected priority of ticket * @param array $attributes Additional attributes * @return string */ function select_ticket_priority($name, $selected = null, $attributes = null) { if ($selected == null) { $selected = 'minor'; } $priorities = get_ticket_priorities(); $options = array(); foreach ($priorities as $priority) { $option_attributes = $priority == $selected ? array('selected' => 'selected') : null; $options[] = option_tag(lang($priority), $priority, $option_attributes); } // foreach return select_box($name, $options, $attributes); }