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 %}
< 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 >
{% endblock %}
2007-12-27 01:29:17 +01:00
{% block helpdesk_body %}
{% load in_list %}
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-01-15 06:07:19 +01:00
< div class = 'filterBox{% if sort %} filterBoxShow{% endif %}' id = 'filterBoxSort' >
2007-12-27 01:29:17 +01:00
< label for = 'id_sort' > Sorting< / label > < select id = 'id_sort' name = 'sort' >
2008-05-07 11:04:18 +02:00
< option value = 'created' { % ifequal sort " created " % } selected = 'selected' { % endifequal % } > {% trans "Created" %}< / option >
< option value = 'title' { % ifequal sort " title " % } selected = 'selected' { % endifequal % } > {% trans "Title" %}< / option >
< option value = 'queue' { % ifequal sort " queue " % } selected = 'selected' { % endifequal % } > {% trans "Queue" %}< / option >
< option value = 'status' { % ifequal sort " status " % } selected = 'selected' { % endifequal % } > {% trans "Status" %}< / option >
< option value = 'priority' { % ifequal sort " priority " % } selected = 'selected' { % endifequal % } > {% trans "Priority" %}< / option >
< option value = 'assigned_to' { % ifequal sort " assigned_to " % } selected = 'selected' { % endifequal % } > {% trans "Owner" %}< / option >
2007-12-27 01:29:17 +01:00
< / select >
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 owners %} filterBoxShow{% endif %}' id = 'filterBoxOwner' >
2008-05-07 11:04:18 +02:00
< 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:owners % } selected = 'selected' { % endif % } > {{ u.username }}< / option > {% endfor %}< / select >
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 queues %} filterBoxShow{% endif %}' id = 'filterBoxQueue' >
2008-05-07 11:04:18 +02:00
< 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:queues % } selected = 'selected' { % endif % } > {{ q.title }}< / option > {% endfor %}< / select >
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 statuses %} filterBoxShow{% endif %}' id = 'filterBoxStatus' >
2008-05-07 11:04:18 +02:00
< label for = 'id_statuses' > {% trans "Status(es)" %}< / label > {% for s in status_choices %}< input type = 'checkbox' name = 'status' value = '{{ s.0 }}' { % if s . 0 | in_list:statuses % } checked = 'checked' { % endif % } > {{ s.1 }}{% endfor %}
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-05-07 11:04:18 +02:00
< label for = 'id_query' > {% trans "Keywords" %}< / label > < input type = 'text' name = 'q' value = '{{ query }}' id = 'id_query' / >
2008-01-15 06:07:19 +01:00
< input type = 'button' class = 'filterBuilderRemove' value = '-' / >
< / div >
2008-01-07 21:22:13 +01:00
2008-05-07 11:04:18 +02:00
< input type = 'submit' value = '{% trans "Apply Filter" %}' / >
2007-12-27 01:29:17 +01:00
< / form >
< table width = '100%' >
2008-05-07 11:04:18 +02:00
< tr class = 'row_tablehead' > < td colspan = '7' > {% trans "Tickets" %}< / td > < / tr >
< tr class = 'row_columnheads' > < 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 >
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 >
{% endblock %}