2008-05-07 11:04:18 +02:00
{% extends "helpdesk/base.html" %}{% load i18n %}
{% block helpdesk_title %}{% trans "Ticket Listing" %}{% endblock %}
2008-01-15 06:07:19 +01:00
{% block helpdesk_head %}
2008-10-28 11:29:47 +01:00
< script type = 'text/javascript' language = 'javascript' src = '{{ MEDIA_URL }}helpdesk/filter.js' > < / script >
< script type = 'text/javascript' language = 'javascript' src = '{{ MEDIA_URL }}helpdesk/hover.js' > < / script >
2008-08-28 11:06:24 +02:00
< script type = 'text/javascript' language = 'javascript' >
$(document).ready(function() {
$("#tabset > ul").tabs();
2009-03-08 07:03:55 +01:00
$("#select_all").click(function() {
$(".ticket_multi_select").attr('checked', true);
return false;
});
$("#select_none").click(function() {
$(".ticket_multi_select").attr('checked', false);
return false;
});
$("#select_inverse").click(function() {
$(".ticket_multi_select").each(function() {
$(this).attr('checked', !$(this).attr('checked'));
});
return false;
});
2008-08-28 11:06:24 +02:00
});
< / script >
2008-01-15 06:07:19 +01:00
{% endblock %}
2007-12-27 01:29:17 +01:00
{% block helpdesk_body %}
{% load in_list %}
2008-08-28 11:06:24 +02:00
< div id = 'tabset' >
< ul >
< li class = 'ui-tabs-nav-item' > < a href = '#tabfilter' > < span > Query Options< / span > < / a > < / li >
{% if not from_saved_query %}< li class = 'ui-tabs-nav-item' > < a href = '#tabsave' > < span > Save This Query< / span > < / a > < / li > {% endif %}
< li class = 'ui-tabs-nav-item' > < a href = '#tabload' > < span > Load Saved Query< / span > < / a > < / li >
< / ul >
< div id = 'tabfilter' >
< h3 > {% trans "Change Query" %}< / h3 >
2008-01-15 06:07:19 +01:00
< form > < select name = 'select' id = 'filterBuilderSelect' >
2008-05-07 11:04:18 +02:00
< option value = 'Sort' > {% trans "Sorting" %}< / option >
< option value = 'Owner' > {% trans "Owner" %}< / option >
< option value = 'Queue' > {% trans "Queue" %}< / option >
< option value = 'Status' > {% trans "Status" %}< / option >
< option value = 'Keywords' > {% trans "Keywords" %}< / option >
2008-01-15 06:07:19 +01:00
< / select >
< input type = 'button' id = 'filterBuilderButton' value = '+' / > < / form >
2007-12-27 01:29:17 +01:00
< form method = 'get' action = './' >
2008-08-28 11:06:24 +02:00
< div class = 'filterBox{% if query_params.sorting %} filterBoxShow{% endif %}' id = 'filterBoxSort' >
< label for = 'id_sort' > Sorting< / label > < select id = 'id_sort' name = 'sort' >
< option value = 'created' { % ifequal query_params . sorting " created " % } selected = 'selected' { % endifequal % } > {% trans "Created" %}< / option >
< option value = 'title' { % ifequal query_params . sorting " title " % } selected = 'selected' { % endifequal % } > {% trans "Title" %}< / option >
< option value = 'queue' { % ifequal query_params . sorting " queue " % } selected = 'selected' { % endifequal % } > {% trans "Queue" %}< / option >
< option value = 'status' { % ifequal query_params . sorting " status " % } selected = 'selected' { % endifequal % } > {% trans "Status" %}< / option >
< option value = 'priority' { % ifequal query_params . sorting " priority " % } selected = 'selected' { % endifequal % } > {% trans "Priority" %}< / option >
< option value = 'assigned_to' { % ifequal query_params . sorting " assigned_to " % } selected = 'selected' { % endifequal % } > {% trans "Owner" %}< / option >
2007-12-27 01:29:17 +01:00
< / select >
2008-10-25 00:52:34 +02:00
< label for = 'id_sortreverse' > Reverse< / label > < input type = 'checkbox' name = 'sortreverse' id = 'id_sortreverse' { % if query_params . sortreverse % } checked = 'checked' { % endif % } / >
2008-08-28 11:06:24 +02:00
< p class = 'filterHelp' > Ordering applied to tickets< / p >
2008-01-15 06:07:19 +01:00
< input type = 'button' class = 'filterBuilderRemove' value = '-' / >
< / div >
2007-12-27 01:29:17 +01:00
2008-08-28 11:06:24 +02:00
< div class = 'filterBox{% if query_params.filtering.assigned_to__id__in %} filterBoxShow{% endif %}' id = 'filterBoxOwner' >
< label for = 'id_owners' > {% trans "Owner(s)" %}< / label > < select id = 'id_owners' name = 'assigned_to' multiple = 'selected' size = '5' > {% for u in user_choices %}< option value = '{{ u.id }}' { % if u . id | in_list:query_params . filtering . assigned_to__id__in % } selected = 'selected' { % endif % } > {{ u.username }}{% ifequal u user %} (ME){% endifequal %}< / option > {% endfor %}< / select >
< p class = 'filterHelp' > Ctrl-Click to select multiple options< / p >
2008-01-15 06:07:19 +01:00
< input type = 'button' class = 'filterBuilderRemove' value = '-' / >
< / div >
2007-12-27 01:29:17 +01:00
2008-08-28 11:06:24 +02:00
< div class = 'filterBox{% if query_params.filtering.queue__id__in %} filterBoxShow{% endif %}' id = 'filterBoxQueue' >
< label for = 'id_queues' > {% trans "Queue(s)" %}< / label > < select id = 'id_queues' name = 'queue' multiple = 'selected' size = '5' > {% for q in queue_choices %}< option value = '{{ q.id }}' { % if q . id | in_list:query_params . filtering . queue__id__in % } selected = 'selected' { % endif % } > {{ q.title }}< / option > {% endfor %}< / select >
< p class = 'filterHelp' > Ctrl-click to select multiple options< / p >
2008-01-15 06:07:19 +01:00
< input type = 'button' class = 'filterBuilderRemove' value = '-' / >
< / div >
2007-12-27 01:29:17 +01:00
2008-08-28 11:06:24 +02:00
< div class = 'filterBox{% if query_params.filtering.status__in %} filterBoxShow{% endif %}' id = 'filterBoxStatus' >
< label for = 'id_statuses' > {% trans "Status(es)" %}< / label > < select id = 'id_statuses' name = 'status' multiple = 'selected' size = '5' > {% for s in status_choices %}< option value = '{{ s.0 }}' { % if s . 0 | in_list:query_params . filtering . status__in % } selected = 'selected' { % endif % } > {{ s.1 }}< / option > {% endfor %}< / select >
< p class = 'filterHelp' > Ctrl-click to select multiple options< / p >
2008-01-15 06:07:19 +01:00
< input type = 'button' class = 'filterBuilderRemove' value = '-' / >
< / div >
2007-12-27 01:29:17 +01:00
2008-01-15 06:07:19 +01:00
< div class = 'filterBox{% if query %} filterBoxShow{% endif %}' id = 'filterBoxKeywords' >
2008-08-28 11:06:24 +02:00
< label for = 'id_query' > {% trans "Keywords" %}< / label > < input type = 'text' name = 'q' value = '{{ query }}' id = 'id_query' / >
< p class = 'filterHelp' > Keywords are case-insensitive, and will be looked for in the title, body and submitter fields.< / p >
2008-01-15 06:07:19 +01:00
< input type = 'button' class = 'filterBuilderRemove' value = '-' / >
< / div >
2008-08-28 11:06:24 +02:00
< hr style = 'clear: both;' / >
2008-05-07 11:04:18 +02:00
< input type = 'submit' value = '{% trans "Apply Filter" %}' / >
2007-12-27 01:29:17 +01:00
< / form >
2008-08-28 11:06:24 +02:00
< / div >
{% if not from_saved_query %}< div class = 'tab' id = 'tabsave' >
< h3 > {% trans "Save Query" %}< / h3 >
< form method = 'post' action = '{% url helpdesk_savequery %}' >
< input type = 'hidden' name = 'query_encoded' value = '{{ urlsafe_query }}' / >
< dl >
< dt > < label for = 'id_title' > {% trans "Query Name" %}< / label > < / dt >
< dd > < input type = 'text' name = 'title' id = 'id_title' / > < / dd >
< dd class = 'form_help_text' > {% trans "This name appears in the drop-down list of saved queries. If you share your query, other users will see this name, so choose something clear and descriptive!" %}< / dd >
< dt > < label for = 'id_shared' > {% trans "Shared?" %}< / label > < / dt >
< dd > < input type = 'checkbox' name = 'shared' id = 'id_shared' / > {% trans "Yes, share this query with other users." %}< / dd >
< dd class = 'form_help_text' > {% trans "If you share this query, it will be visible by < em > all< / em > other logged-in users." %}< / dd >
< / dl >
< div class = 'buttons' >
< input type = 'submit' value = '{% trans "Save Query" %}' >
< / div >
< / form >
< / div > {% endif %}
< div id = 'tabload' >
< h3 > {% trans "Use Saved Query" %}< / h3 >
< form method = 'get' action = '{% url helpdesk_list %}' >
< p > < label for = 'id_query_selector' > {% trans "Query" %}< / label > < select name = 'saved_query' id = 'id_query_selector' / >
{% for q in user_saved_queries %}
< option value = '{{ q.id }}' > {{ q.title }}{% if q.shared %} (Shared{% ifnotequal user q.user %} by {{ q.user.username }}{% endifnotequal %}){% endif %}< / option >
{% endfor %}
< / select > < / p >
< input type = 'submit' value = '{% trans "Run Query" %}' >
< / form >
< / div >
2007-12-27 01:29:17 +01:00
2009-03-08 06:49:08 +01:00
{{ search_message|safe }}
2009-03-08 07:03:55 +01:00
< form method = 'post' action = '{% url helpdesk_mass_update %}' >
2007-12-27 01:29:17 +01:00
< table width = '100%' >
2009-03-08 07:03:55 +01:00
< tr class = 'row_tablehead' > < td colspan = '8' > {% trans "Tickets" %}< / td > < / tr >
< tr class = 'row_columnheads' > < th > #< / th > < th > < / th > < th > {% trans "Pr" %}< / th > < th > {% trans "Title" %}< / th > < th > {% trans "Queue" %}< / th > < th > {% trans "Status" %}< / th > < th > {% trans "Created" %}< / th > < th > {% trans "Owner" %}< / th > < / tr >
2007-12-27 01:29:17 +01:00
{% if tickets %}{% for ticket in tickets %}
< tr class = 'row_{% cycle odd,even %} row_hover' >
2008-01-12 06:37:45 +01:00
< th > < a href = '{{ ticket.get_absolute_url }}' > {{ ticket.ticket }}< / a > < / th >
2009-03-08 07:03:55 +01:00
< td > < input type = 'checkbox' name = 'ticket_id' value = '{{ ticket.id }}' class = 'ticket_multi_select' / > < / td >
2008-08-12 01:24:18 +02:00
< td > {{ ticket.get_priority_span }}< / td >
2007-12-27 01:29:17 +01:00
< th > < a href = '{{ ticket.get_absolute_url }}' > {{ ticket.title }}< / a > < / th >
< td > {{ ticket.queue }}< / td >
2008-01-21 00:31:27 +01:00
< td > {{ ticket.get_status }}< / td >
2008-01-07 21:22:13 +01:00
< td > < span title = '{{ ticket.created|date:"r" }}' > {{ ticket.created|timesince }} ago< / span > < / td >
2007-12-27 01:29:17 +01:00
< td > {{ ticket.get_assigned_to }}< / td >
< / tr >
{% endfor %}{% else %}
2008-05-07 11:04:18 +02:00
< tr class = 'row_odd' > < td colspan = '5' > {% trans "No Tickets Match Your Selection" %}< / td > < / tr >
2007-12-27 01:29:17 +01:00
{% endif %}
< / table >
2009-03-08 07:03:55 +01:00
< p > < label > Select: < / label > < a href = '#select_all' id = 'select_all' > All< / a > < a href = '#select_none' id = 'select_none' > None< / a > < a href = '#select_inverse' id = 'select_inverse' > Inverse< / a > < / p >
< p > < label for = 'id_mass_action' > With Selected Tickets:< / label > < select name = 'action' id = 'id_mass_action' > < option value = 'take' > Take (Assign to me)< / option > < option value = 'delete' > Delete< / option > < optgroup label = 'Close' > < option value = 'close' > Close (Don't Send E-Mail)< / option > < option value = 'close_public' > Close (Send E-Mail)< / option > < / optgroup > < optgroup label = 'Assign To' > < option value = 'unassign' > Nobody (Unassign)< / option > {% for u in user_choices %}< option value = 'assign_{{ u.id }}' > {{ u.username }}< / option > {% endfor %}< / optgroup > < / select > < input type = 'submit' value = 'Go' / > < / p >
< / form >
2007-12-27 01:29:17 +01:00
{% endblock %}