Merge pull request #172 from dack/master

django 1.5 compatibility fixes thanks to @dack
This commit is contained in:
Ross Poulton 2013-03-21 00:31:55 -07:00
commit 85c419af30
23 changed files with 103 additions and 93 deletions

View File

@ -5,6 +5,7 @@ python:
env: env:
- DJANGO=1.4.3 - DJANGO=1.4.3
- DJANGO=1.3.5 - DJANGO=1.3.5
- DJANGO=1.5.0
install: install:
- pip install argparse --use-mirrors - pip install argparse --use-mirrors
- pip install -q Django==$DJANGO --use-mirrors - pip install -q Django==$DJANGO --use-mirrors

View File

@ -1,4 +1,5 @@
{% load i18n %} {% load i18n %}
{% load url from future %}
{% load saved_queries %} {% load saved_queries %}
{% load load_helpdesk_settings %} {% load load_helpdesk_settings %}
{% with request|load_helpdesk_settings as helpdesk_settings %} {% with request|load_helpdesk_settings as helpdesk_settings %}
@ -15,9 +16,9 @@
<link rel='stylesheet' href='{{ STATIC_URL }}helpdesk/helpdesk.css' type='text/css' media="screen" /> <link rel='stylesheet' href='{{ STATIC_URL }}helpdesk/helpdesk.css' type='text/css' media="screen" />
<link rel='stylesheet' href='{{ STATIC_URL }}helpdesk/helpdesk-print.css' type='text/css' media="print" /> <link rel='stylesheet' href='{{ STATIC_URL }}helpdesk/helpdesk-print.css' type='text/css' media="print" />
<link rel='stylesheet' href='{{ STATIC_URL }}helpdesk/jquery-smoothness-theme/jquery-ui-1.8.9.custom.css' type='text/css' /> <link rel='stylesheet' href='{{ STATIC_URL }}helpdesk/jquery-smoothness-theme/jquery-ui-1.8.9.custom.css' type='text/css' />
<link rel='alternate' href='{% url helpdesk_rss_user user.username %}' type='application/rss+xml' title='{% trans "My Open Tickets" %}' /> <link rel='alternate' href='{% url 'helpdesk_rss_user' user.username %}' type='application/rss+xml' title='{% trans "My Open Tickets" %}' />
<link rel='alternate' href='{% url helpdesk_rss_activity %}' type='application/rss+xml' title='{% trans "All Recent Activity" %}' /> <link rel='alternate' href='{% url 'helpdesk_rss_activity' %}' type='application/rss+xml' title='{% trans "All Recent Activity" %}' />
<link rel='alternate' href='{% url helpdesk_rss_unassigned %}' type='application/rss+xml' title='{% trans "Unassigned Tickets" %}' /> <link rel='alternate' href='{% url 'helpdesk_rss_unassigned' %}' type='application/rss+xml' title='{% trans "Unassigned Tickets" %}' />
{% comment %} {% comment %}
<script type="text/javascript"> <script type="text/javascript">
@ -106,13 +107,13 @@
<div id='footer'> <div id='footer'>
<p>{% include "helpdesk/attribution.html" %} <p>{% include "helpdesk/attribution.html" %}
<a href='{% url helpdesk_rss_index %}'><img src='{{ STATIC_URL }}helpdesk/rss_icon.png' width='14' height='14' alt='{% trans "RSS Icon" %}' title='{% trans "RSS Feeds" %}' border='0' />{% trans "RSS Feeds" %}</a> <a href='{% url 'helpdesk_rss_index' %}'><img src='{{ STATIC_URL }}helpdesk/rss_icon.png' width='14' height='14' alt='{% trans "RSS Icon" %}' title='{% trans "RSS Feeds" %}' border='0' />{% trans "RSS Feeds" %}</a>
{% if helpdesk_settings.HELPDESK_FOOTER_SHOW_API_LINK %}<a href='{% url helpdesk_api_help %}'>{% trans "API" %}</a>{% endif %} {% if helpdesk_settings.HELPDESK_FOOTER_SHOW_API_LINK %}<a href='{% url 'helpdesk_api_help' %}'>{% trans "API" %}</a>{% endif %}
<a href='{% url helpdesk_user_settings %}'>{% trans "User Settings" %}</a> <a href='{% url 'helpdesk_user_settings' %}'>{% trans "User Settings" %}</a>
{% if helpdesk_settings.HELPDESK_FOOTER_SHOW_CHANGE_LANGUAGE_LINK %} {% if helpdesk_settings.HELPDESK_FOOTER_SHOW_CHANGE_LANGUAGE_LINK %}
<a href='{% url helpdesk_public_change_language %}?return_to={{ request.path }}'>{% trans "Change Language" %}</a> <a href='{% url 'helpdesk_public_change_language' %}?return_to={{ request.path }}'>{% trans "Change Language" %}</a>
{% endif %} {% endif %}
{% if user.is_superuser %}<a href='{% url helpdesk_system_settings %}'>{% trans "System Settings" %}</a>{% endif %}</p> {% if user.is_superuser %}<a href='{% url 'helpdesk_system_settings' %}'>{% trans "System Settings" %}</a>{% endif %}</p>
</div> </div>
</div> </div>
{% include "helpdesk/debug.html" %} {% include "helpdesk/debug.html" %}

View File

@ -1,4 +1,4 @@
{% extends "helpdesk/base.html" %}{% load i18n %} {% extends "helpdesk/base.html" %}{% load i18n %}{% load url from future %}
{% block helpdesk_title %}{{ helpdesk_settings.HELPDESK_PREPEND_ORG_NAME|default:'' }} {% trans "Helpdesk Dashboard" %}{% endblock %} {% block helpdesk_title %}{{ helpdesk_settings.HELPDESK_PREPEND_ORG_NAME|default:'' }} {% trans "Helpdesk Dashboard" %}{% endblock %}
{% block helpdesk_head %} {% block helpdesk_head %}
<script type='text/javascript' language='javascript' src='{{ STATIC_URL }}helpdesk/hover.js'></script> <script type='text/javascript' language='javascript' src='{{ STATIC_URL }}helpdesk/hover.js'></script>
@ -11,10 +11,10 @@
<tr class='row_columnheads'><th>{% trans "Queue" %}</th><th>{% trans "Open" %}</th><th>{% trans "Resolved" %}</th><th>{% trans "Closed" %}</th></tr> <tr class='row_columnheads'><th>{% trans "Queue" %}</th><th>{% trans "Open" %}</th><th>{% trans "Resolved" %}</th><th>{% trans "Closed" %}</th></tr>
{% for queue in dash_tickets %} {% for queue in dash_tickets %}
<tr class='row_{% cycle odd,even %} row_hover '> <tr class='row_{% cycle odd,even %} row_hover '>
<th><a href='{% url helpdesk_list %}?queue={{ queue.queue }}&status=1&status=2'>{{ queue.name }}</a></th> <th><a href='{% url 'helpdesk_list' %}?queue={{ queue.queue }}&status=1&status=2'>{{ queue.name }}</a></th>
<td align="center">{% if queue.open %}<a href='{% url helpdesk_list %}?queue={{ queue.queue }}&status=1&status=2'>{% endif %}{{ queue.open }}{% if queue.open %}</a>{% endif %}</td> <td align="center">{% if queue.open %}<a href='{% url 'helpdesk_list' %}?queue={{ queue.queue }}&status=1&status=2'>{% endif %}{{ queue.open }}{% if queue.open %}</a>{% endif %}</td>
<td align="center">{% if queue.resolved %}<a href='{% url helpdesk_list %}?queue={{ queue.queue }}&status=3'>{% endif %}{{ queue.resolved }}{% if queue.resolved %}</a>{% endif %}</td> <td align="center">{% if queue.resolved %}<a href='{% url 'helpdesk_list' %}?queue={{ queue.queue }}&status=3'>{% endif %}{{ queue.resolved }}{% if queue.resolved %}</a>{% endif %}</td>
<td align="center">{% if queue.closed %}<a href='{% url helpdesk_list %}?queue={{ queue.queue }}&status=4'>{% endif %}{{ queue.closed }}{% if queue.closed %}</a>{% endif %}</td> <td align="center">{% if queue.closed %}<a href='{% url 'helpdesk_list' %}?queue={{ queue.queue }}&status=4'>{% endif %}{{ queue.closed }}{% if queue.closed %}</a>{% endif %}</td>
</tr> </tr>
{% endfor %} {% endfor %}
</table> </table>
@ -36,14 +36,14 @@
<tr class='row_tablehead' style="color: #fbff00;"><td colspan='2'><i>{% trans "Current Ticket Stats" %}</i></td></tr> <tr class='row_tablehead' style="color: #fbff00;"><td colspan='2'><i>{% trans "Current Ticket Stats" %}</i></td></tr>
<tr><td colspan='2'>- {% trans "Average number of days until ticket is closed (all tickets): " %}<strong style="color: red;">{{ basic_ticket_stats.average_nbr_days_until_ticket_closed }}</strong>.</td></tr> <tr><td colspan='2'>- {% trans "Average number of days until ticket is closed (all tickets): " %}<strong style="color: red;">{{ basic_ticket_stats.average_nbr_days_until_ticket_closed }}</strong>.</td></tr>
<tr><td colspan='2'>- {% trans "Average number of days until ticket is closed (tickets opened in last 60 days): " %}<strong style="color: red;">{{ basic_ticket_stats.average_nbr_days_until_ticket_closed_last_60_days }}</strong>. <tr><td colspan='2'>- {% trans "Average number of days until ticket is closed (tickets opened in last 60 days): " %}<strong style="color: red;">{{ basic_ticket_stats.average_nbr_days_until_ticket_closed_last_60_days }}</strong>.
{% trans "Click" %} <strong><a href="{% url helpdesk_report_index %}daysuntilticketclosedbymonth">here</a></strong> {% trans "for detailed average by month." %} </td></tr> {% trans "Click" %} <strong><a href="{% url 'helpdesk_report_index' %}daysuntilticketclosedbymonth">here</a></strong> {% trans "for detailed average by month." %} </td></tr>
<tr><td colspan='2'>- {% trans "Distribution of open tickets, grouped by time period:" %}</td></tr> <tr><td colspan='2'>- {% trans "Distribution of open tickets, grouped by time period:" %}</td></tr>
<tr class='row_columnheads'><th>{% trans "Days since opened" %}</th><th>{% trans "Number of open tickets" %}</th></tr> <tr class='row_columnheads'><th>{% trans "Days since opened" %}</th><th>{% trans "Number of open tickets" %}</th></tr>
{% for entry in basic_ticket_stats.open_ticket_stats %} {% for entry in basic_ticket_stats.open_ticket_stats %}
<tr class='row_{% cycle odd,even %} row_hover'> <tr class='row_{% cycle odd,even %} row_hover'>
<th style="padding-left: 20px;">{{ entry.0 }}</th> <th style="padding-left: 20px;">{{ entry.0 }}</th>
<td style="padding-left: 20px;"><span style="color: {{ entry.2 }};">{% if entry.1 > 0 %}<a href="{% url helpdesk_list %}?{{ entry.3 }}">{{ entry.1 }}</a>{% else %}{{ entry.1 }}{% endif %}</span></td> <td style="padding-left: 20px;"><span style="color: {{ entry.2 }};">{% if entry.1 > 0 %}<a href="{% url 'helpdesk_list' %}?{{ entry.3 }}">{{ entry.1 }}</a>{% else %}{{ entry.1 }}{% endif %}</span></td>
</tr> </tr>
{% endfor %} {% endfor %}
@ -104,7 +104,7 @@
<th><a href='{{ ticket.get_absolute_url }}'>{{ ticket.title }}</a></th> <th><a href='{{ ticket.get_absolute_url }}'>{{ ticket.title }}</a></th>
<td>{{ ticket.queue }}</td> <td>{{ ticket.queue }}</td>
<td><span title='{{ ticket.created|date:"r" }}'>{{ ticket.created|timesince }} ago</span></td> <td><span title='{{ ticket.created|date:"r" }}'>{{ ticket.created|timesince }} ago</span></td>
<th><a href='{{ ticket.get_absolute_url }}?take'><span class='button button_take'>{% trans "Take" %}</span></a> {% if helpdesk_settings.HELPDESK_DASHBOARD_SHOW_DELETE_UNASSIGNED %}| <a href='{% url helpdesk_delete ticket.id %}'><span class='button button_delete'>{% trans "Delete" %}</span></a>{% endif %}</th> <th><a href='{{ ticket.get_absolute_url }}?take'><span class='button button_take'>{% trans "Take" %}</span></a> {% if helpdesk_settings.HELPDESK_DASHBOARD_SHOW_DELETE_UNASSIGNED %}| <a href='{% url 'helpdesk_delete' ticket.id %}'><span class='button button_delete'>{% trans "Delete" %}</span></a>{% endif %}</th>
</tr> </tr>
{% endfor %} {% endfor %}
{% if not unassigned_tickets %} {% if not unassigned_tickets %}

View File

@ -1,4 +1,4 @@
{% extends "helpdesk/base.html" %}{% load i18n %} {% extends "helpdesk/base.html" %}{% load i18n %}{% load url from future %}
{% block helpdesk_title %}{% trans "Ignored E-Mail Addresses" %}{% endblock %} {% block helpdesk_title %}{% trans "Ignored E-Mail Addresses" %}{% endblock %}
@ -20,7 +20,7 @@
<td>{{ ignore.date }}</td> <td>{{ ignore.date }}</td>
<td>{% for queue in ignore.queues.all %}{{ queue.slug }}{% if not forloop.last %}, {% endif %}{% endfor %}{% if not ignore.queues.all %}{% trans "All" %}{% endif %}</td> <td>{% for queue in ignore.queues.all %}{{ queue.slug }}{% if not forloop.last %}, {% endif %}{% endfor %}{% if not ignore.queues.all %}{% trans "All" %}{% endif %}</td>
<td>{% if ignore.keep_in_mailbox %}{% trans "Keep" %}{% endif %}</td> <td>{% if ignore.keep_in_mailbox %}{% trans "Keep" %}{% endif %}</td>
<td><a href='{% url helpdesk_email_ignore_del ignore.id %}'>{% trans "Delete" %}</a></td> <td><a href='{% url 'helpdesk_email_ignore_del' ignore.id %}'>{% trans "Delete" %}</a></td>
</tr> </tr>
{% endfor %} {% endfor %}
</tbody> </tbody>

View File

@ -1,4 +1,4 @@
{% extends "helpdesk/help_base.html" %} {% extends "helpdesk/help_base.html" %}{% load url from future %}
{% block title %}django-helpdesk API Documentation{% endblock %} {% block title %}django-helpdesk API Documentation{% endblock %}
{% block heading %}django-helpdesk API Documentation{% endblock %} {% block heading %}django-helpdesk API Documentation{% endblock %}
@ -44,14 +44,14 @@
<li>A set of <em>data</em> to be saved into the database. This data will vary from request to request, and is outlined in <a href='#methods'>Methods</a> below.</li> <li>A set of <em>data</em> to be saved into the database. This data will vary from request to request, and is outlined in <a href='#methods'>Methods</a> below.</li>
</ol> </ol>
<p>To build your request, send a HTTP POST request to <em>{% url helpdesk_api "method" %}</em>, where <em>method</em> is the name of a <a href='#methods'>valid method</a> from the list below.</p> <p>To build your request, send a HTTP POST request to <em>{% url 'helpdesk_api' "method" %}</em>, where <em>method</em> is the name of a <a href='#methods'>valid method</a> from the list below.</p>
<p>Your POST must include both <em>user</em> and <em>password</em> parameters.</p> <p>Your POST must include both <em>user</em> and <em>password</em> parameters.</p>
<p>A sample request for the method <em>hold_ticket</em> may look like this:</p> <p>A sample request for the method <em>hold_ticket</em> may look like this:</p>
<ul> <ul>
<li>A HTTP POST to <em>{% url helpdesk_api "hold_ticket" %}</em></li> <li>A HTTP POST to <em>{% url 'helpdesk_api' "hold_ticket" %}</em></li>
<li>A set of POST data containing:<ul> <li>A set of POST data containing:<ul>
<li>username=susan</li> <li>username=susan</li>
<li>password=fido</li> <li>password=fido</li>
@ -61,13 +61,13 @@
<p>To complete this from a command-line using the <a href='http://curl.haxx.se/'>cURL</a> application, you may use a command such as this:</p> <p>To complete this from a command-line using the <a href='http://curl.haxx.se/'>cURL</a> application, you may use a command such as this:</p>
<pre>/usr/bin/curl {% url helpdesk_api "hold_ticket" %} --data "user=susan&amp;password=fido&amp;ticket=31794"</pre> <pre>/usr/bin/curl {% url 'helpdesk_api' "hold_ticket" %} --data "user=susan&amp;password=fido&amp;ticket=31794"</pre>
<p>In <a href='http://www.php.net/'>PHP</a>, providing you have access to the <a href='http://www.php.net/curl'>cURL libraries</a>, you may use code such as this:</p> <p>In <a href='http://www.php.net/'>PHP</a>, providing you have access to the <a href='http://www.php.net/curl'>cURL libraries</a>, you may use code such as this:</p>
<pre>&lt;?php <pre>&lt;?php
$api = curl_init(); $api = curl_init();
curl_setopt($api, CURLOPT_URL, "{% url helpdesk_api "hold_ticket" %}"); curl_setopt($api, CURLOPT_URL, "{% url 'helpdesk_api' "hold_ticket" %}");
curl_setopt($api, CURLOPT_POST, 1); curl_setopt($api, CURLOPT_POST, 1);
curl_setopt($api, CURLOPT_POSTFIELDS, "user=susan&amp;password=fido&amp;ticket=31794"); curl_setopt($api, CURLOPT_POSTFIELDS, "user=susan&amp;password=fido&amp;ticket=31794");
$result = curl_exec($api); $result = curl_exec($api);

View File

@ -1,3 +1,4 @@
{% load url from future %}
<html> <html>
<head> <head>
<style type='text/css'> <style type='text/css'>

View File

@ -1,20 +1,20 @@
{% load i18n %} {% load i18n %}{% load url from future %}
{% if helpdesk_settings.HELPDESK_NAVIGATION_ENABLED and user.is_authenticated or user.is_staff %} {% if helpdesk_settings.HELPDESK_NAVIGATION_ENABLED and user.is_authenticated or user.is_staff %}
<ul id="dropdown"> <ul id="dropdown">
<li><a href='{% url helpdesk_dashboard %}'>{% trans "Dashboard" %}</a></li> <li><a href='{% url 'helpdesk_dashboard' %}'>{% trans "Dashboard" %}</a></li>
<li><a href='{% url helpdesk_list %}'>{% trans "Tickets" %}</a></li> <li><a href='{% url 'helpdesk_list' %}'>{% trans "Tickets" %}</a></li>
<li><a href='{% url helpdesk_submit %}'>{% trans "New Ticket" %}</a></li> <li><a href='{% url 'helpdesk_submit' %}'>{% trans "New Ticket" %}</a></li>
{% if helpdesk_settings.HELPDESK_NAVIGATION_STATS_ENABLED %} {% if helpdesk_settings.HELPDESK_NAVIGATION_STATS_ENABLED %}
<li><a href='{% url helpdesk_report_index %}'>{% trans "Stats" %}</a></li> <li><a href='{% url 'helpdesk_report_index' %}'>{% trans "Stats" %}</a></li>
{% endif %} {% endif %}
{% if helpdesk_settings.HELPDESK_KB_ENABLED_STAFF %} {% if helpdesk_settings.HELPDESK_KB_ENABLED_STAFF %}
<li><a href='{% url helpdesk_kb_index %}'>{% trans "Knowledgebase" %}</a></li> <li><a href='{% url 'helpdesk_kb_index' %}'>{% trans "Knowledgebase" %}</a></li>
{% endif %} {% endif %}
{% if user_saved_queries_ %} {% if user_saved_queries_ %}
<li class="headerlink"><a>{% trans "Load Saved Query" %}</a> <li class="headerlink"><a>{% trans "Load Saved Query" %}</a>
<ul> <ul>
{% for q in user_saved_queries_ %} {% for q in user_saved_queries_ %}
<li><a href="{% url helpdesk_list %}?saved_query={{ q.id }}">{{ q.title }} <li><a href="{% url 'helpdesk_list' %}?saved_query={{ q.id }}">{{ q.title }}
{% if q.shared %} {% if q.shared %}
(Shared{% ifnotequal user q.user %} by {{ q.user.username }}{% endifnotequal %}) (Shared{% ifnotequal user q.user %} by {{ q.user.username }}{% endifnotequal %})
{% endif %}</a></li> {% endif %}</a></li>
@ -22,17 +22,17 @@
</ul> </ul>
</li> </li>
{% endif %} {% endif %}
<li><a href='{% url logout %}'>{% trans "Logout" %}</a></li> <li><a href='{% url 'logout' %}'>{% trans "Logout" %}</a></li>
{% if not query %}<li><form id='searchform' method='get' action='{% url helpdesk_list %}'><input type='text' name='q' size='4' class='input' value='{% trans "Search..." %}' id='search_query' onFocus='s=document.getElementById("search_query");if (s.value == "{% trans "Search..." %}") { s.value = ""; }' title='{% trans "Enter a keyword, or a ticket number to jump straight to that ticket." %}'/><input type='hidden' name='status' value='1' /><input type='hidden' name='status' value='2' /><input type='hidden' name='status' value='3' /><input type='hidden' name='search_type' value='header' />{% csrf_token %}</form></li>{% endif %} {% if not query %}<li><form id='searchform' method='get' action='{% url 'helpdesk_list' %}'><input type='text' name='q' size='4' class='input' value='{% trans "Search..." %}' id='search_query' onFocus='s=document.getElementById("search_query");if (s.value == "{% trans "Search..." %}") { s.value = ""; }' title='{% trans "Enter a keyword, or a ticket number to jump straight to that ticket." %}'/><input type='hidden' name='status' value='1' /><input type='hidden' name='status' value='2' /><input type='hidden' name='status' value='3' /><input type='hidden' name='search_type' value='header' />{% csrf_token %}</form></li>{% endif %}
</ul> </ul>
{% else %} {% else %}
<ul> <ul>
{% if helpdesk_settings.HELPDESK_SUBMIT_A_TICKET_PUBLIC %} {% if helpdesk_settings.HELPDESK_SUBMIT_A_TICKET_PUBLIC %}
<li><a href='{% url helpdesk_home %}'>{% trans "Submit A Ticket" %}</a></li> <li><a href='{% url 'helpdesk_home' %}'>{% trans "Submit A Ticket" %}</a></li>
{% endif %} {% endif %}
{% if helpdesk_settings.HELPDESK_KB_ENABLED %}<li><a href='{% url helpdesk_kb_index %}'>{% trans "Knowledgebase" %}</a></li>{% endif %} {% if helpdesk_settings.HELPDESK_KB_ENABLED %}<li><a href='{% url 'helpdesk_kb_index' %}'>{% trans "Knowledgebase" %}</a></li>{% endif %}
{% if not request.path == '/helpdesk/login/' or user.is_authenticated %} {% if not request.path == '/helpdesk/login/' or user.is_authenticated %}
<li>{% if user.is_authenticated %}<a href='{% url logout %}'>{% trans "Logout" %}</a>{% else %}<a href='{% url login %}?next={% if next %}{{ next|escape }}{% else %}{% url helpdesk_home %}{% endif %}'>{% trans "Log In" %}</a>{% endif %}</li> <li>{% if user.is_authenticated %}<a href='{% url 'logout' %}'>{% trans "Logout" %}</a>{% else %}<a href='{% url 'login' %}?next={% if next %}{{ next|escape }}{% else %}{% url 'helpdesk_home' %}{% endif %}'>{% trans "Log In" %}</a>{% endif %}</li>
{% endif %} {% endif %}
</ul> </ul>
{% endif %} {% endif %}

View File

@ -1,4 +1,4 @@
{% load i18n %} {% load i18n %}{% load url from future %}
{% load load_helpdesk_settings %} {% load load_helpdesk_settings %}
{% with request|load_helpdesk_settings as helpdesk_settings %} {% with request|load_helpdesk_settings as helpdesk_settings %}
<html> <html>

View File

@ -1,4 +1,4 @@
{% extends "helpdesk/public_base.html" %}{% load i18n %} {% extends "helpdesk/public_base.html" %}{% load i18n %}{% load url from future %}
{% block helpdesk_body %} {% block helpdesk_body %}
@ -20,7 +20,7 @@
{% if helpdesk_settings.HELPDESK_VIEW_A_TICKET_PUBLIC %} {% if helpdesk_settings.HELPDESK_VIEW_A_TICKET_PUBLIC %}
<h2>{% trans "View a Ticket" %}</h2> <h2>{% trans "View a Ticket" %}</h2>
<form method='get' action='{% url helpdesk_public_view %}'> <form method='get' action='{% url 'helpdesk_public_view' %}'>
<fieldset> <fieldset>
<dl> <dl>
<dt><label for='id_ticket'>{% trans "Ticket" %}</label></dt> <dt><label for='id_ticket'>{% trans "Ticket" %}</label></dt>

View File

@ -1,9 +1,9 @@
{% extends "helpdesk/public_base.html" %}{% load i18n %} {% extends "helpdesk/public_base.html" %}{% load i18n %}{% load url from future %}
{% block helpdesk_body %} {% block helpdesk_body %}
<h2>{% trans "View a Ticket" %}</h2> <h2>{% trans "View a Ticket" %}</h2>
<form method='get' action='{% url helpdesk_public_view %}'> <form method='get' action='{% url 'helpdesk_public_view' %}'>
{% if error_message %}<p><strong>{% trans "Error:" %}</strong> {{ error_message }}</p>{% endif %} {% if error_message %}<p><strong>{% trans "Error:" %}</strong> {{ error_message }}</p>{% endif %}

View File

@ -1,10 +1,10 @@
{% extends "helpdesk/public_base.html" %}{% load i18n %} {% extends "helpdesk/public_base.html" %}{% load i18n %}{% load url from future %}
{% block helpdesk_title %}{{ helpdesk_settings.HELPDESK_PREPEND_ORG_NAME|default:'' }} {% trans "Helpdesk Login" %}{% endblock %} {% block helpdesk_title %}{{ helpdesk_settings.HELPDESK_PREPEND_ORG_NAME|default:'' }} {% trans "Helpdesk Login" %}{% endblock %}
{% block helpdesk_body %} {% block helpdesk_body %}
{% if request.user.is_authenticated %} {% if request.user.is_authenticated %}
<meta http-equiv="REFRESH" content="0;url={% url helpdesk_home %}"> <meta http-equiv="REFRESH" content="0;url={% url 'helpdesk_home' %}">
{% else %} {% else %}
<h2>{% trans "Login" %}</h2> <h2>{% trans "Login" %}</h2>

View File

@ -1,4 +1,4 @@
{% extends "helpdesk/base.html" %}{% load i18n %} {% extends "helpdesk/base.html" %}{% load i18n %}{% load url from future %}
{% block helpdesk_title %}{% trans "RSS Feeds" %}{% endblock %} {% block helpdesk_title %}{% trans "RSS Feeds" %}{% endblock %}
{% block helpdesk_body %} {% block helpdesk_body %}
<h2>{% trans "RSS Feeds" %}</h2> <h2>{% trans "RSS Feeds" %}</h2>
@ -6,13 +6,13 @@
<p>{% trans "The following RSS feeds are available for you to monitor using your preferred RSS software. With the exception of the 'Latest Activity' feed, all feeds provide information only on Open and Reopened cases. This ensures your RSS reader isn't full of information about closed or historical tasks." %}</p> <p>{% trans "The following RSS feeds are available for you to monitor using your preferred RSS software. With the exception of the 'Latest Activity' feed, all feeds provide information only on Open and Reopened cases. This ensures your RSS reader isn't full of information about closed or historical tasks." %}</p>
<dl> <dl>
<dt><a href='{% url helpdesk_rss_user user.username %}'><img src='{{ STATIC_URL }}helpdesk/rss_icon.png' width='14' height='14' alt='{% trans "RSS Icon" %}' title='{% trans "My Open Tickets" %}' border='0' />{% trans "My Open Tickets" %}</a></dt> <dt><a href='{% url 'helpdesk_rss_user' user.username %}'><img src='{{ STATIC_URL }}helpdesk/rss_icon.png' width='14' height='14' alt='{% trans "RSS Icon" %}' title='{% trans "My Open Tickets" %}' border='0' />{% trans "My Open Tickets" %}</a></dt>
<dd>{% trans "A summary of your open tickets - useful for getting alerted to new tickets opened for you" %}</dd> <dd>{% trans "A summary of your open tickets - useful for getting alerted to new tickets opened for you" %}</dd>
<dt><a href='{% url helpdesk_rss_activity %}'><img src='{{ STATIC_URL }}helpdesk/rss_icon.png' width='14' height='14' alt='{% trans "RSS Icon" %}' title='{% trans "Latest Activity" %}' border='0' />{% trans "Latest Activity" %}</a></dt> <dt><a href='{% url 'helpdesk_rss_activity' %}'><img src='{{ STATIC_URL }}helpdesk/rss_icon.png' width='14' height='14' alt='{% trans "RSS Icon" %}' title='{% trans "Latest Activity" %}' border='0' />{% trans "Latest Activity" %}</a></dt>
<dd>{% trans "A summary of all helpdesk activity - including comments, emails, attachments, and more" %}</dd> <dd>{% trans "A summary of all helpdesk activity - including comments, emails, attachments, and more" %}</dd>
<dt><a href='{% url helpdesk_rss_unassigned %}'><img src='{{ STATIC_URL }}helpdesk/rss_icon.png' width='14' height='14' alt='{% trans "RSS Icon" %}' title='{% trans "Unassigned Tickets" %}' border='0' />{% trans "Unassigned Tickets" %}</a></dt> <dt><a href='{% url 'helpdesk_rss_unassigned' %}'><img src='{{ STATIC_URL }}helpdesk/rss_icon.png' width='14' height='14' alt='{% trans "RSS Icon" %}' title='{% trans "Unassigned Tickets" %}' border='0' />{% trans "Unassigned Tickets" %}</a></dt>
<dd>{% trans "All unassigned tickets - useful for being alerted to new tickets opened by the public via the web or via e-mail" %}</dd> <dd>{% trans "All unassigned tickets - useful for being alerted to new tickets opened by the public via the web or via e-mail" %}</dd>
</dl> </dl>
@ -24,8 +24,8 @@
{% for queue in queues %} {% for queue in queues %}
<tr> <tr>
<td>{{ queue.title }}</td> <td>{{ queue.title }}</td>
<td align='center'><a href='{% url helpdesk_rss_queue queue.slug %}'><img src='{{ STATIC_URL }}helpdesk/rss_icon.png' width='14' height='14' alt='{% trans "RSS Icon" %}' title='{% trans "Open Tickets" %}' border='0' /></a></td> <td align='center'><a href='{% url 'helpdesk_rss_queue' queue.slug %}'><img src='{{ STATIC_URL }}helpdesk/rss_icon.png' width='14' height='14' alt='{% trans "RSS Icon" %}' title='{% trans "Open Tickets" %}' border='0' /></a></td>
<td align='center'><a href='{% url helpdesk_rss_user_queue user.username queue.slug %}'><img src='{{ STATIC_URL }}helpdesk/rss_icon.png' width='14' height='14' alt='{% trans "RSS Icon" %}' title='{% trans "My Open Tickets" %}' border='0' /></a></td> <td align='center'><a href='{% url 'helpdesk_rss_user_queue' user.username queue.slug %}'><img src='{{ STATIC_URL }}helpdesk/rss_icon.png' width='14' height='14' alt='{% trans "RSS Icon" %}' title='{% trans "My Open Tickets" %}' border='0' /></a></td>
{% endfor %} {% endfor %}
</table> </table>
{% endblock %} {% endblock %}

View File

@ -1,4 +1,4 @@
{% extends "helpdesk/base.html" %}{% load i18n %} {% extends "helpdesk/base.html" %}{% load i18n %}{% load url from future %}
{% block helpdesk_title %}{% trans "Change System Settings" %}{% endblock %} {% block helpdesk_title %}{% trans "Change System Settings" %}{% endblock %}

View File

@ -1,4 +1,4 @@
{% extends "helpdesk/base.html" %}{% load i18n %} {% extends "helpdesk/base.html" %}{% load i18n %}{% load url from future %}
{% block helpdesk_title %}{% trans "View Ticket Details" %}{% endblock %} {% block helpdesk_title %}{% trans "View Ticket Details" %}{% endblock %}
{% block helpdesk_head %} {% block helpdesk_head %}
<script type="text/javascript"> <script type="text/javascript">
@ -19,7 +19,7 @@
$('#id_preset').change(function() { $('#id_preset').change(function() {
preset = $('#id_preset').val(); preset = $('#id_preset').val();
if (preset != '') { if (preset != '') {
$.get("{% url helpdesk_raw "preset" %}?id=" + preset, function(data) { $.get("{% url 'helpdesk_raw' "preset" %}?id=" + preset, function(data) {
$("#commentBox").val(data) $("#commentBox").val(data)
}); });
} }
@ -71,11 +71,11 @@ function googleTranslateElementInit() {
{% if not followup.public %} <span class='private'>({% trans "Private" %})</span>{% endif %} {% if not followup.public %} <span class='private'>({% trans "Private" %})</span>{% endif %}
{% if helpdesk_settings.HELPDESK_SHOW_EDIT_BUTTON_FOLLOW_UP %} {% if helpdesk_settings.HELPDESK_SHOW_EDIT_BUTTON_FOLLOW_UP %}
{% if followup.user and request.user == followup.user and not followup.ticketchange_set.all %} {% if followup.user and request.user == followup.user and not followup.ticketchange_set.all %}
<a href="{% url helpdesk_followup_edit ticket.id followup.id %}" class='followup-edit'><img width="60" height="15" title="Edit" alt="Edit" src="{{ STATIC_URL }}helpdesk/buttons/edit.png"></a> <a href="{% url 'helpdesk_followup_edit' ticket.id followup.id %}" class='followup-edit'><img width="60" height="15" title="Edit" alt="Edit" src="{{ STATIC_URL }}helpdesk/buttons/edit.png"></a>
{% endif %} {% endif %}
{% endif %} {% endif %}
{% if user.is_superuser and helpdesk_settings.HELPDESK_SHOW_DELETE_BUTTON_SUPERUSER_FOLLOW_UP %} {% if user.is_superuser and helpdesk_settings.HELPDESK_SHOW_DELETE_BUTTON_SUPERUSER_FOLLOW_UP %}
<a href="{% url helpdesk_followup_delete ticket.id followup.id %}" class='followup-edit'><img width="60" height="15" title="Delete" alt="Delete" src="{{ STATIC_URL }}helpdesk/buttons/delete.png"></a> <a href="{% url 'helpdesk_followup_delete' ticket.id followup.id %}" class='followup-edit'><img width="60" height="15" title="Delete" alt="Delete" src="{{ STATIC_URL }}helpdesk/buttons/delete.png"></a>
{% endif %} {% endif %}
</div> </div>
{% else %} {% else %}
@ -84,11 +84,11 @@ function googleTranslateElementInit() {
{{ 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> {{ 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>
{% if helpdesk_settings.HELPDESK_SHOW_EDIT_BUTTON_FOLLOW_UP %} {% if helpdesk_settings.HELPDESK_SHOW_EDIT_BUTTON_FOLLOW_UP %}
{% if followup.user and request.user == followup.user and not followup.ticketchange_set.all %} {% if followup.user and request.user == followup.user and not followup.ticketchange_set.all %}
<a href="{% url helpdesk_followup_edit ticket.id followup.id %}" class='followup-edit'><img width="60" height="15" title="Edit" alt="Edit" src="{{ STATIC_URL }}helpdesk/buttons/edit.png"></a> <a href="{% url 'helpdesk_followup_edit' ticket.id followup.id %}" class='followup-edit'><img width="60" height="15" title="Edit" alt="Edit" src="{{ STATIC_URL }}helpdesk/buttons/edit.png"></a>
{% endif %} {% endif %}
{% endif %} {% endif %}
{% if user.is_superuser and helpdesk_settings.HELPDESK_SHOW_DELETE_BUTTON_SUPERUSER_FOLLOW_UP %} {% if user.is_superuser and helpdesk_settings.HELPDESK_SHOW_DELETE_BUTTON_SUPERUSER_FOLLOW_UP %}
<a href="{% url helpdesk_followup_delete ticket.id followup.id %}" class='followup-edit'><img width="60" height="15" title="Delete" alt="Delete" src="{{ STATIC_URL }}helpdesk/buttons/delete.png"></a> <a href="{% url 'helpdesk_followup_delete' ticket.id followup.id %}" class='followup-edit'><img width="60" height="15" title="Delete" alt="Delete" src="{{ STATIC_URL }}helpdesk/buttons/delete.png"></a>
{% endif %} {% endif %}
</div> </div>
{% endif %} {% endif %}
@ -101,7 +101,7 @@ function googleTranslateElementInit() {
{% for attachment in followup.attachment_set.all %}{% if forloop.first %}<div class='attachments'><ul>{% endif %} {% for attachment in followup.attachment_set.all %}{% if forloop.first %}<div class='attachments'><ul>{% endif %}
<li><a href='{{ attachment.file.url }}'>{{ attachment.filename }}</a> ({{ attachment.mime_type }}, {{ attachment.size|filesizeformat }}) <li><a href='{{ attachment.file.url }}'>{{ attachment.filename }}</a> ({{ attachment.mime_type }}, {{ attachment.size|filesizeformat }})
{% if followup.user and request.user == followup.user %} {% if followup.user and request.user == followup.user %}
<a href='{% url helpdesk_attachment_del ticket.id attachment.id %}'>delete</a> <a href='{% url 'helpdesk_attachment_del' ticket.id attachment.id %}'>delete</a>
{% endif %} {% endif %}
</li> </li>
{% if forloop.last %}</ul></div>{% endif %} {% if forloop.last %}</ul></div>{% endif %}

View File

@ -1,4 +1,4 @@
{% extends "helpdesk/base.html" %}{% load i18n %} {% extends "helpdesk/base.html" %}{% load i18n %}{% load url from future %}
{% block helpdesk_title %}{% trans "Add Ticket CC" %}{% endblock %} {% block helpdesk_title %}{% trans "Add Ticket CC" %}{% endblock %}

View File

@ -1,4 +1,4 @@
{% extends "helpdesk/base.html" %}{% load i18n %} {% extends "helpdesk/base.html" %}{% load i18n %}{% load url from future %}
{% block helpdesk_title %}{% trans "Delete Ticket CC" %}{% endblock %} {% block helpdesk_title %}{% trans "Delete Ticket CC" %}{% endblock %}

View File

@ -1,4 +1,4 @@
{% extends "helpdesk/base.html" %}{% load i18n %} {% extends "helpdesk/base.html" %}{% load i18n %}{% load url from future %}
{% block helpdesk_title %}{% trans "Ticket CC Settings" %}{% endblock %} {% block helpdesk_title %}{% trans "Ticket CC Settings" %}{% endblock %}
@ -20,12 +20,12 @@
<td>{{ person.display }}</td> <td>{{ person.display }}</td>
<td>{{ person.can_view }}</td> <td>{{ person.can_view }}</td>
<td>{{ person.can_update }}</td> <td>{{ person.can_update }}</td>
<td><a href='{% url helpdesk_ticket_cc_del ticket.id person.id %}'>{% trans "Delete" %}</a></td> <td><a href='{% url 'helpdesk_ticket_cc_del' ticket.id person.id %}'>{% trans "Delete" %}</a></td>
</tr> </tr>
{% endfor %} {% endfor %}
</tbody> </tbody>
</table> </table>
<p><a href='{% url helpdesk_view ticket.id %}'>{% blocktrans with ticket.title as ticket_title %}Return to <em>{{ ticket_title }}</em>{% endblocktrans %}</a></p> <p><a href='{% url 'helpdesk_view' ticket.id %}'>{% blocktrans with ticket.title as ticket_title %}Return to <em>{{ ticket_title }}</em>{% endblocktrans %}</a></p>
{% endblock %} {% endblock %}

View File

@ -1,4 +1,4 @@
{% extends "helpdesk/base.html" %}{% load i18n %} {% extends "helpdesk/base.html" %}{% load i18n %}{% load url from future %}
{% block helpdesk_title %}{% trans "Add Ticket Dependency" %}{% endblock %} {% block helpdesk_title %}{% trans "Add Ticket Dependency" %}{% endblock %}

View File

@ -1,4 +1,4 @@
{% extends "helpdesk/base.html" %}{% load i18n %} {% extends "helpdesk/base.html" %}{% load i18n %}{% load url from future %}
{% block helpdesk_title %}{% trans "Delete Ticket Dependency" %}{% endblock %} {% block helpdesk_title %}{% trans "Delete Ticket Dependency" %}{% endblock %}

View File

@ -1,11 +1,11 @@
{% load i18n %} {% load i18n %}{% load url from future %}
<table width='100%'> <table width='100%'>
<tr class='row_tablehead'><td colspan='2'>{{ ticket.id }}. {{ ticket.title }} [{{ ticket.get_status }}] <span class='ticket_toolbar'> <tr class='row_tablehead'><td colspan='2'>{{ ticket.id }}. {{ ticket.title }} [{{ ticket.get_status }}] <span class='ticket_toolbar'>
{% if helpdesk_settings.HELPDESK_SHOW_EDIT_BUTTON_TICKET_TOP %} {% if helpdesk_settings.HELPDESK_SHOW_EDIT_BUTTON_TICKET_TOP %}
<a href='{% url helpdesk_edit ticket.id %}' class="ticket-edit"><img src='{{ STATIC_URL }}helpdesk/buttons/edit.png' alt='Edit' title='Edit' width='60' height='15' /></a> <a href='{% url 'helpdesk_edit' ticket.id %}' class="ticket-edit"><img src='{{ STATIC_URL }}helpdesk/buttons/edit.png' alt='Edit' title='Edit' width='60' height='15' /></a>
{% endif %} {% endif %}
{% if helpdesk_settings.HELPDESK_SHOW_DELETE_BUTTON_TICKET_TOP %} {% if helpdesk_settings.HELPDESK_SHOW_DELETE_BUTTON_TICKET_TOP %}
<a href='{% url helpdesk_delete ticket.id %}' class="ticket-delete"><img src='{{ STATIC_URL }}helpdesk/buttons/delete.png' alt='Delete' title='Delete' width='60' height='15' /></a> <a href='{% url 'helpdesk_delete' ticket.id %}' class="ticket-delete"><img src='{{ STATIC_URL }}helpdesk/buttons/delete.png' alt='Delete' title='Delete' width='60' height='15' /></a>
{% endif %} {% endif %}
{% if helpdesk_settings.HELPDESK_SHOW_HOLD_BUTTON_TICKET_TOP %} {% if helpdesk_settings.HELPDESK_SHOW_HOLD_BUTTON_TICKET_TOP %}
{% if ticket.on_hold %}<a href='unhold/' class="ticket-hold">{% trans "Unhold" %}</a>{% else %}<a href='hold/' class="ticket-hold">{% trans "Hold" %}</a>{% endif %} {% if ticket.on_hold %}<a href='unhold/' class="ticket-hold">{% trans "Unhold" %}</a>{% else %}<a href='hold/' class="ticket-hold">{% trans "Hold" %}</a>{% endif %}
@ -24,7 +24,7 @@
<tr class='{% cycle rowcolors %}'> <tr class='{% cycle rowcolors %}'>
<th>{% trans "Submitter E-Mail" %}</th> <th>{% trans "Submitter E-Mail" %}</th>
<td>{{ ticket.submitter_email }}{% if user.is_superuser %} <strong><a href='{% url helpdesk_email_ignore_add %}?email={{ ticket.submitter_email }}'>{% trans "Ignore" %}</a></strong>{% endif %}</td> <td>{{ ticket.submitter_email }}{% if user.is_superuser %} <strong><a href='{% url 'helpdesk_email_ignore_add' %}?email={{ ticket.submitter_email }}'>{% trans "Ignore" %}</a></strong>{% endif %}</td>
</tr> </tr>
<tr class='{% cycle rowcolors %}'> <tr class='{% cycle rowcolors %}'>
@ -34,7 +34,7 @@
<tr class='{% cycle rowcolors %}'> <tr class='{% cycle rowcolors %}'>
<th>{% trans "Copies To" %}</th> <th>{% trans "Copies To" %}</th>
<td>{{ ticketcc_string }} <strong><a class='tooltip' href='{% url helpdesk_ticket_cc ticket.id %}'>{% trans "Manage" %}<span>{% trans "Click here to add / remove people who should receive an e-mail whenever this ticket is updated." %}</span></a></strong>{% if SHOW_SUBSCRIBE %}, <strong><a class='tooltip' href='?subscribe'>{% trans "Subscribe" %}<span>{% trans "Click here to subscribe yourself to this ticket, if you want to receive an e-mail whenever this ticket is updated." %}</span></a></strong>{% endif %}</td> <td>{{ ticketcc_string }} <strong><a class='tooltip' href='{% url 'helpdesk_ticket_cc' ticket.id %}'>{% trans "Manage" %}<span>{% trans "Click here to add / remove people who should receive an e-mail whenever this ticket is updated." %}</span></a></strong>{% if SHOW_SUBSCRIBE %}, <strong><a class='tooltip' href='?subscribe'>{% trans "Subscribe" %}<span>{% trans "Click here to subscribe yourself to this ticket, if you want to receive an e-mail whenever this ticket is updated." %}</span></a></strong>{% endif %}</td>
</tr> </tr>
{% if tags_enabled %} {% if tags_enabled %}
@ -48,12 +48,12 @@
<th>{% trans "Dependencies" %}</th> <th>{% trans "Dependencies" %}</th>
<td>{% for dep in ticket.ticketdependency.all %} <td>{% for dep in ticket.ticketdependency.all %}
{% if forloop.first %}<p>{% trans "This ticket cannot be resolved until the following ticket(s) are resolved" %}</p><ul>{% endif %} {% if forloop.first %}<p>{% trans "This ticket cannot be resolved until the following ticket(s) are resolved" %}</p><ul>{% endif %}
<li><a href='{{ dep.depends_on.get_absolute_url }}'>{{ dep.depends_on.ticket }} {{ dep.depends_on.title }}</a> ({{ dep.depends_on.get_status_display }}) <a href='{% url helpdesk_ticket_dependency_del ticket.id dep.id %}'>{% trans "Remove Dependency" %}</a></li> <li><a href='{{ dep.depends_on.get_absolute_url }}'>{{ dep.depends_on.ticket }} {{ dep.depends_on.title }}</a> ({{ dep.depends_on.get_status_display }}) <a href='{% url 'helpdesk_ticket_dependency_del' ticket.id dep.id %}'>{% trans "Remove Dependency" %}</a></li>
{% if forloop.last %}</ul>{% endif %} {% if forloop.last %}</ul>{% endif %}
{% empty %} {% empty %}
<p>{% trans "This ticket has no dependencies." %}</p> <p>{% trans "This ticket has no dependencies." %}</p>
{% endfor %} {% endfor %}
<p><a class='tooltip' href='{% url helpdesk_ticket_dependency_add ticket.id %}'>{% trans "Add Dependency" %}<span>{% trans "Click on 'Add Dependency', if you want to make this ticket dependent on another ticket. A ticket may not be closed until all tickets it depends on are closed." %}</span></a></p> <p><a class='tooltip' href='{% url 'helpdesk_ticket_dependency_add' ticket.id %}'>{% trans "Add Dependency" %}<span>{% trans "Click on 'Add Dependency', if you want to make this ticket dependent on another ticket. A ticket may not be closed until all tickets it depends on are closed." %}</span></a></p>
</td> </td>
</tr> </tr>

View File

@ -1,4 +1,4 @@
{% extends "helpdesk/base.html" %}{% load i18n %} {% extends "helpdesk/base.html" %}{% load i18n %}{% load url from future %}
{% block helpdesk_title %}{% trans "Ticket Listing" %}{% endblock %} {% block helpdesk_title %}{% trans "Ticket Listing" %}{% endblock %}
{% block helpdesk_head %} {% block helpdesk_head %}
<script type='text/javascript' language='javascript' src='{{ STATIC_URL }}helpdesk/filter.js'></script> <script type='text/javascript' language='javascript' src='{{ STATIC_URL }}helpdesk/filter.js'></script>
@ -141,7 +141,7 @@ $(document).ready(function() {
<hr style='clear: both;' /> <hr style='clear: both;' />
<input type='submit' value='{% trans "Apply Filter" %}' /> <input type='submit' value='{% trans "Apply Filter" %}' />
{% if from_saved_query and saved_query.user = user %} {% if from_saved_query and saved_query.user = user %}
<p>{% blocktrans with saved_query.title as query_name %}You are currently viewing saved query <em>{{ query_name }}</em>.{% endblocktrans %} <a href='{% url helpdesk_delete_query saved_query.id %}'>{% trans "Delete Saved Query" %}</a></p> <p>{% blocktrans with saved_query.title as query_name %}You are currently viewing saved query <em>{{ query_name }}</em>.{% endblocktrans %} <a href='{% url 'helpdesk_delete_query' saved_query.id %}'>{% trans "Delete Saved Query" %}</a></p>
{% endif %} {% endif %}
{% if from_saved_query %} {% if from_saved_query %}
<p>{% blocktrans with saved_query.id as query_id %}<a href='../reports/?saved_query={{ query_id }}'>Run a report</a> on this query to see stats and charts for the data listed below.{% endblocktrans %}</p> <p>{% blocktrans with saved_query.id as query_id %}<a href='../reports/?saved_query={{ query_id }}'>Run a report</a> on this query to see stats and charts for the data listed below.{% endblocktrans %}</p>
@ -152,7 +152,7 @@ $(document).ready(function() {
{% if not from_saved_query %} {% if not from_saved_query %}
<div class='tab' id='tabsave'> <div class='tab' id='tabsave'>
<h3>{% trans "Save Query" %}</h3> <h3>{% trans "Save Query" %}</h3>
<form method='post' action='{% url helpdesk_savequery %}'> <form method='post' action='{% url 'helpdesk_savequery' %}'>
<input type='hidden' name='query_encoded' value='{{ urlsafe_query }}' /> <input type='hidden' name='query_encoded' value='{{ urlsafe_query }}' />
<dl> <dl>
<dt><label for='id_title'>{% trans "Query Name" %}</label></dt> <dt><label for='id_title'>{% trans "Query Name" %}</label></dt>
@ -174,7 +174,7 @@ $(document).ready(function() {
<div id='tabload'> <div id='tabload'>
<h3>{% trans "Use Saved Query" %}</h3> <h3>{% trans "Use Saved Query" %}</h3>
<form method='get' action='{% url helpdesk_list %}'> <form method='get' action='{% url 'helpdesk_list' %}'>
<p><label for='id_query_selector'>{% trans "Query" %}</label> <select name='saved_query' id='id_query_selector'> <p><label for='id_query_selector'>{% trans "Query" %}</label> <select name='saved_query' id='id_query_selector'>
{% for q in user_saved_queries %} {% 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> <option value='{{ q.id }}'>{{ q.title }}{% if q.shared %} (Shared{% ifnotequal user q.user %} by {{ q.user.username }}{% endifnotequal %}){% endif %}</option>
@ -193,7 +193,7 @@ $(document).ready(function() {
{{ search_message|safe }} {{ search_message|safe }}
<form method='post' action='{% url helpdesk_mass_update %}' id="ticket_mass_update"> <form method='post' action='{% url 'helpdesk_mass_update' %}' id="ticket_mass_update">
<table width='100%'> <table width='100%'>
<tr class='row_tablehead'><td colspan='9'>{% trans "Tickets" %}</td></tr> <tr class='row_tablehead'><td colspan='9'>{% trans "Tickets" %}</td></tr>
<tr class='row_columnheads'><th>#</th><th>&nbsp;</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>{% if tags_enabled %}<th>{% trans "Tags" %}</th>{% endif %}</tr> <tr class='row_columnheads'><th>#</th><th>&nbsp;</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>{% if tags_enabled %}<th>{% trans "Tags" %}</th>{% endif %}</tr>

View File

@ -1,10 +1,10 @@
{% extends "helpdesk/base.html" %}{% load i18n %} {% extends "helpdesk/base.html" %}{% load i18n %}{% load url from future %}
{% block helpdesk_title %}{% trans "Change User Settings" %}{% endblock %} {% block helpdesk_title %}{% trans "Change User Settings" %}{% endblock %}
{% block helpdesk_body %} {% block helpdesk_body %}
{% if show_password_change_link %} {% if show_password_change_link %}
{% url auth_password_change as password_change_url %} {% url 'auth_password_change' as password_change_url %}
<h2>Change Password</h2> <h2>Change Password</h2>
<p> <p>
Change your password <a href="{{ password_change_url }}" title="change your password">here</a>. Change your password <a href="{{ password_change_url }}" title="change your password">here</a>.

View File

@ -8,12 +8,29 @@ urls.py - Mapping of URL's to our various views. Note we always used NAMED
""" """
from django.conf import settings from django.conf import settings
import django
if django.get_version().startswith("1.3"):
from django.conf.urls.defaults import * from django.conf.urls.defaults import *
else:
from django.conf.urls import *
from django.contrib.auth.decorators import login_required from django.contrib.auth.decorators import login_required
from helpdesk import settings as helpdesk_settings from helpdesk import settings as helpdesk_settings
from helpdesk.views import feeds from helpdesk.views import feeds
from django.views.generic import TemplateView
class DirectTemplateView(TemplateView):
extra_context = None
def get_context_data(self, **kwargs):
context = super(self.__class__, self).get_context_data(**kwargs)
if self.extra_context is not None:
for key, value in self.extra_context.items():
if callable(value):
context[key] = value()
else:
context[key] = value
return context
urlpatterns = patterns('helpdesk.views.staff', urlpatterns = patterns('helpdesk.views.staff',
url(r'^dashboard/$', url(r'^dashboard/$',
'dashboard', 'dashboard',
@ -198,23 +215,13 @@ if helpdesk_settings.HELPDESK_KB_ENABLED:
) )
urlpatterns += patterns('', urlpatterns += patterns('',
url(r'^api/$', url(r'^api/$',TemplateView.as_view(template_name='helpdesk/help_api.html'),
'django.views.generic.simple.direct_to_template',
{'template': 'helpdesk/help_api.html',},
name='helpdesk_api_help'), name='helpdesk_api_help'),
url(r'^help/context/$', url(r'^help/context/$',TemplateView.as_view(template_name='helpdesk/help_context.html'),
'django.views.generic.simple.direct_to_template',
{'template': 'helpdesk/help_context.html',},
name='helpdesk_help_context'), name='helpdesk_help_context'),
url(r'^system_settings/$', url(r'^system_settings/$',DirectTemplateView.as_view(template_name='helpdesk/system_settings.html',
'django.views.generic.simple.direct_to_template', extra_context={'ADMIN_URL': getattr(settings, 'ADMIN_URL', '/admin/')}),
{
'template': 'helpdesk/system_settings.html',
'extra_context': {
'ADMIN_URL': getattr(settings, 'ADMIN_URL', '/admin/'),
},
},
name='helpdesk_system_settings'), name='helpdesk_system_settings'),
) )