2008-05-07 11:04:18 +02:00
{% extends "helpdesk/base.html" %}{% load i18n %}
{% block helpdesk_title %}{% trans "View Ticket Details" %}{% endblock %}
2008-01-16 04:23:43 +01:00
{% block helpdesk_head %}
2007-12-27 01:29:17 +01:00
< script src = "http://media.jutda.com.au/helpdesk/nicEdit.js" type = "text/javascript" > < / script >
< script type = "text/javascript" >
$(document).ready(function() {
2008-01-11 02:00:01 +01:00
nic = new nicEditor({buttonList: ['bold','italic','underline','strikeThrough','undo','redo','subscript','superscript','html']}).panelInstance('commentBox');
2007-12-27 01:29:17 +01:00
$("#ShowFurtherEditOptions").click(function() {
2008-01-15 01:02:06 +01:00
$("#FurtherEditOptions").fadeIn();
$("#ShowFurtherOptPara").hide();
2007-12-27 01:29:17 +01:00
return false;
});
2008-02-08 01:19:58 +01:00
2008-02-08 01:48:23 +01:00
processAddFileClick();
2008-02-08 01:19:58 +01:00
$("#ShowFileUpload").click(function() {
$("#FileUpload").fadeIn();
$("#ShowFileUploadPara").hide();
return false;
});
2008-01-11 02:00:01 +01:00
$('#id_preset').change(function() {
preset = $('#id_preset').val();
if (preset != '') {
$.get("{% url helpdesk_raw "preset" %}?id=" + preset, function(data) {
nic.nicInstances[0].setContent(data);
});
}
});
2007-12-27 01:29:17 +01:00
});
2008-02-08 01:48:23 +01:00
function processAddFileClick() {
/* Until jQuery includes some 'livequery' functionality in the core
distribution, this will have to do. */
$(".AddAnotherFile>a").click(function() {
$(this).parent().hide();
2008-05-07 11:04:18 +02:00
$("#FileUpload>dl").append("< dt > < label > {% trans "Attach another File" %}< / label > < / dt > < dd > < input type = 'file' name = 'attachment' id = 'file' / > < span class = 'AddAnotherFile' > (< a href = '#' > {% trans "Add Another File" %}< / a > )< / span > < / dd > ");
2008-02-08 01:48:23 +01:00
processAddFileClick();
return false;
});
}
2007-12-27 01:29:17 +01:00
< / script >
{% endblock %}
{% block helpdesk_body %}
< table width = '100%' >
2008-05-07 11:04:18 +02:00
< tr class = 'row_tablehead' > < td > {{ ticket.id }}. {{ ticket.title }} [{{ ticket.get_status }}]< / td > < td align = 'right' > < a href = '#edit' > < img src = '{{ MEDIA_URL }}/helpdesk/buttons/edit.png' alt = 'Edit' title = 'Edit' width = '60' height = '15' / > < / a > < a href = '{% url helpdesk_delete ticket.id %}' > < img src = '{{ MEDIA_URL }}/helpdesk/buttons/delete.png' alt = 'Delete' title = 'Delete' width = '60' height = '15' / > < / a > {% if ticket.on_hold %}< a href = 'unhold/' > {% trans "Unhold" %}< / a > {% else %}< a href = 'hold/' > {% trans "Hold" %}< / a > {% endif %}< / td > < / tr >
< tr class = 'row_columnheads' > < th colspan = '2' > {% blocktrans with ticket.queue as queue %}Queue: {{ queue }}{% endblocktrans %}< / th > < / tr >
2007-12-27 01:29:17 +01:00
< tr class = 'row_odd' >
2008-05-07 11:04:18 +02:00
< th > {% trans "Submitted On" %}< / th >
2008-01-07 21:22:13 +01:00
< td > {{ ticket.created|date:"r" }} ({{ ticket.created|timesince }} ago)< / td >
2007-12-27 01:29:17 +01:00
< / tr >
< tr class = 'row_even' >
2008-05-07 11:04:18 +02:00
< th > {% trans "Assigned To" %}< / th >
< td > {{ ticket.get_assigned_to }}{% ifequal ticket.get_assigned_to _('Unassigned') %} < strong > < a href = '?take' > < img src = '{{ MEDIA_URL }}/helpdesk/buttons/take.png' width = '60' height = '15' alt = '{% trans "Take" %}' title = '{% trans "Assign this ticket to yourself" %}' / > < / a > < / strong > {% endifequal %}< / td >
2007-12-27 01:29:17 +01:00
< / tr >
2008-01-07 21:22:13 +01:00
< tr class = 'row_odd' >
2008-05-07 11:04:18 +02:00
< th > {% trans "Submitter E-Mail" %}< / th >
2007-12-27 01:29:17 +01:00
< td > {{ ticket.submitter_email }}< / td >
2008-01-07 21:22:13 +01:00
< / tr >
< tr class = 'row_even' >
2008-05-07 11:04:18 +02:00
< th > {% trans "Priority" %}< / th >
2008-01-10 01:28:45 +01:00
< td > {{ ticket.get_priority_display }}< / td >
2008-01-07 21:22:13 +01:00
< / tr >
2008-01-10 01:28:45 +01:00
2008-01-07 21:22:13 +01:00
< tr class = 'row_odd' >
2008-05-07 11:04:18 +02:00
< th colspan = '2' > {% trans "Description" %}< / th >
2008-01-10 01:28:45 +01:00
< / tr >
< tr class = 'row_even' >
2008-04-17 07:46:55 +02:00
< td colspan = '2' > {{ ticket.description|safe }}< / td >
2008-01-07 21:22:13 +01:00
< / tr >
2008-01-10 01:28:45 +01:00
{% if ticket.resolution %}< tr class = 'row_odd' >
2008-05-07 11:04:18 +02:00
< th colspan = '2' > {% trans "Resolution" %}{% ifequal ticket.get_status_display "Resolved" %} < a href = '?close' > < img src = '{{ MEDIA_URL }}/helpdesk/buttons/accept.png' alt = '{% trans "Accept" %}' title = '{% trans "Accept and Close" %}' width = '60' height = '15' / > < / a > {% endifequal %}< / th >
2008-01-07 21:22:13 +01:00
< / tr >
2008-01-10 01:28:45 +01:00
< tr class = 'row_even' >
2008-04-17 07:46:55 +02:00
< td colspan = '2' > {{ ticket.resolution|safe }}< / td >
2007-12-27 01:29:17 +01:00
< / tr > {% endif %}
< / table >
{% if ticket.followup_set.all %}
2008-05-07 11:04:18 +02:00
< h3 > {% trans "Follow-Ups" %}< / h3 >
2007-12-27 01:29:17 +01:00
{% load ticket_to_link %}
{% for followup in ticket.followup_set.all %}
< div class = 'followup' >
2008-05-07 11:04:18 +02:00
< div class = 'title' > {{ followup.title }} < span class = 'byline' > {% if followup.user %}by {{ followup.user }}{% endif %} < span title = '{{ followup.date|date:"r" }}' > {{ followup.date|timesince }} ago< / span > {% if not followup.public %} < span class = 'private' > ({% trans "Private" %})< / span > {% endif %}< / span > < / div >
2008-04-17 07:46:55 +02:00
{% if followup.comment %}{{ followup.comment|num_to_link|safe }}{% endif %}
2007-12-27 01:29:17 +01:00
{% for change in followup.ticketchange_set.all %}
2008-02-08 01:19:58 +01:00
{% if forloop.first %}< div class = 'changes' > < ul > {% endif %}
2008-05-07 11:04:18 +02:00
< li > {% blocktrans %}Changed {{ change.field }} from {{ change.old_value }} to {{ change.new_value }}.{% endblocktrans %}< / li >
2008-02-08 01:19:58 +01:00
{% if forloop.last %}< / div > < / ul > {% endif %}
{% endfor %}
{% for attachment in followup.attachment_set.all %}{% if forloop.first %}< div class = 'attachments' > < ul > {% endif %}
< li > < a href = '{{ attachment.get_file_url }}' > {{ attachment.filename }}< / a > ({{ attachment.mime_type }}, {{ attachment.size|filesizeformat }})< / li >
{% if forloop.last %}< / ul > < / div > {% endif %}
2007-12-27 01:29:17 +01:00
{% endfor %}
< / div >
{% endfor %}
{% endif %}
2008-05-07 11:04:18 +02:00
< h3 > {% trans "Respond to this ticket" %}< / h3 >
2008-01-11 02:00:01 +01:00
2008-02-08 01:19:58 +01:00
< form method = 'post' action = 'update/' enctype = 'multipart/form-data' >
2008-01-15 01:02:06 +01:00
< fieldset >
< dl >
2008-05-07 11:04:18 +02:00
< dt > < label for = 'id_preset' > {% trans "Use a Pre-set Reply" %}< / label > < span class = 'form_optional' > (Optional)< / span > < / dt >
2008-01-15 01:02:06 +01:00
< dd > < select name = 'preset' id = 'id_preset' > < option value = '' > ------< / option > {% for preset in preset_replies %}< option value = '{{ preset.id }}' > {{ preset.name }}< / option > {% endfor %}< / select > < / dd >
2008-05-07 11:04:18 +02:00
< dd class = 'form_help_text' > {% trans "Selecting a pre-set reply will over-write your comment below. You can then modify the pre-set reply to your liking before saving this update." %}< / dd >
2008-01-15 01:02:06 +01:00
2008-05-07 11:04:18 +02:00
< dt > < label for = 'commentBox' > {% trans "Comment / Resolution" %}< / label > < / dt >
2008-01-15 01:02:06 +01:00
< dd > < textarea rows = '8' cols = '70' name = 'comment' id = 'commentBox' > < / textarea > < / dd >
2008-05-07 11:04:18 +02:00
< dd class = 'form_help_text' > {% trans "You can use the ticket and queue template variables in your message." %}< / dd >
2008-01-15 01:02:06 +01:00
2008-05-07 11:04:18 +02:00
< dt > < label > {% trans "New Status" %}< / label > < / dt >
2008-01-15 01:02:06 +01:00
{% ifequal ticket.status 1 %}
2008-05-07 11:04:18 +02:00
< dd > < input type = 'radio' name = 'new_status' value = '1' id = 'st_open' checked = 'checked' > < label for = 'st_open' class = 'active' > {% trans "Open" %}< / label > »
< input type = 'radio' name = 'new_status' value = '3' id = 'st_resolved' > < label for = 'st_resolved' > {% trans "Resolved" %}< / label > »
< input type = 'radio' name = 'new_status' value = '4' id = 'st_closed' > < label for = 'st_closed' > {% trans "Closed" %}< / label > < / dd >
2008-01-15 01:02:06 +01:00
{% endifequal %}
{% ifequal ticket.status 2 %}
2008-05-07 11:04:18 +02:00
< dd > < input type = 'radio' name = 'new_status' value = '2' id = 'st_reopened' checked = 'checked' > < label for = 'st_reopened' class = 'active' > {% trans "Reopened" %}< / label > »
< input type = 'radio' name = 'new_status' value = '3' id = 'st_resolved' > < label for = 'st_resolved' > {% trans "Resolved" %}< / label > »
< input type = 'radio' name = 'new_status' value = '4' id = 'st_closed' > < label for = 'st_closed' > {% trans "Closed" %}< / label > < / dd >
2008-01-15 01:02:06 +01:00
{% endifequal %}
{% ifequal ticket.status 3 %}
2008-05-07 11:04:18 +02:00
< dd > < input type = 'radio' name = 'new_status' value = '2' id = 'st_reopened' > < label for = 'st_reopened' > {% trans "Reopened" %}< / label > «
< input type = 'radio' name = 'new_status' value = '3' id = 'st_resolved' checked = 'checked' > < label for = 'st_resolved' class = 'active' > {% trans "Resolved" %}< / label > »
< input type = 'radio' name = 'new_status' value = '4' id = 'st_closed' > < label for = 'st_closed' > {% trans "Closed" %}< / label > < / dd >
2008-01-15 01:02:06 +01:00
{% endifequal %}
{% ifequal ticket.status 4 %}
2008-05-07 11:04:18 +02:00
< dd > < input type = 'radio' name = 'new_status' value = '2' id = 'st_reopened' > < label for = 'st_reopened' > {% trans "Reopened" %}< / label > «
< input type = 'radio' name = 'new_status' value = '4' id = 'st_closed' checked = 'checked' > < label for = 'st_closed' > {% trans "Closed" %}< / label > < / dd >
2008-01-15 01:02:06 +01:00
{% endifequal %}
2008-05-07 11:04:18 +02:00
< dt > < label for = 'id_public' > {% trans "Is this update public?" %}< / label > < span class = 'form_optional' > (Optional)< / span > < / dt >
2008-01-15 01:02:06 +01:00
< dd > < input type = 'checkbox' name = 'public' value = '1' checked = 'checked' / > < / dD >
2008-05-07 11:04:18 +02:00
< dd class = 'form_help_text' > {% trans "If this is public, the submitter will be e-mailed your comment or resolution." %}< / dd >
2008-01-15 01:02:06 +01:00
< / dl >
2008-05-07 11:04:18 +02:00
< p id = 'ShowFurtherOptPara' > < a href = '#' id = 'ShowFurtherEditOptions' > {% trans "Change Further Details » " %}< / a > < / p >
2007-12-27 01:29:17 +01:00
< div id = 'FurtherEditOptions' style = 'display: none;' >
2008-01-15 01:02:06 +01:00
< dl >
2007-12-27 01:29:17 +01:00
2008-05-07 11:04:18 +02:00
< dt > < label for = 'id_title' > {% trans "Title" %}< / label > < / dt >
2008-01-15 01:02:06 +01:00
< dd > < input type = 'text' name = 'title' value = '{{ ticket.title|escape }}' / > < / dd >
2007-12-27 01:29:17 +01:00
2008-05-07 11:04:18 +02:00
< dt > < label for = 'id_owner' > {% trans "Owner" %}< / label > < / dt >
< dd > < select id = 'id_owner' name = 'owner' > < option value = '0' > {% trans "Unassign" %}< / option > {% for u in active_users %}< option value = '{{ u.id }}' { % ifequal u . id ticket . assigned_to . id % } selected { % endifequal % } > {{ u }}< / option > {% endfor %}< / select > < / dd >
2008-01-15 01:02:06 +01:00
2008-05-07 11:04:18 +02:00
< dt > < label for = 'id_priority' > {% trans "Priority" %}< / label > < / dt >
2008-01-15 01:02:06 +01:00
< dd > < select id = 'id_priority' name = 'priority' > {% for p in priorities %}< option value = '{{ p.0 }}' { % ifequal p . 0 ticket . priority % } selected = 'selected' { % endifequal % } > {{ p.1 }}< / option > {% endfor %}< / select > < / dd >
< / dl >
2008-01-10 01:28:45 +01:00
2007-12-27 01:29:17 +01:00
< / div >
2008-05-07 11:04:18 +02:00
< p id = 'ShowFileUploadPara' > < a href = '#' id = 'ShowFileUpload' > {% trans "Attach File(s) » " %}< / a > < / p >
2008-02-08 01:19:58 +01:00
< div id = 'FileUpload' style = 'display: none;' >
2008-01-15 01:02:06 +01:00
2008-02-08 01:19:58 +01:00
< dl >
2008-05-07 11:04:18 +02:00
< dt > < label for = 'id_file' > {% trans "Attach a File" %}< / label > < / dt >
< dd > < input type = 'file' name = 'attachment' id = 'file' / > < span class = 'AddAnotherFile' > (< a href = '#' > {% trans "Add Another File" %}< / a > )< / span > < / dd >
2008-02-08 01:19:58 +01:00
< / dl >
< / div >
< / fieldset >
2007-12-27 01:29:17 +01:00
2008-05-07 11:04:18 +02:00
< input type = 'submit' value = '{% trans "Update This Ticket" %}' / >
2007-12-27 01:29:17 +01:00
< / form >
{% endblock %}