mirror of
https://github.com/django-helpdesk/django-helpdesk.git
synced 2025-01-19 04:19:54 +01:00
using helpdesk
app_name and droping helpdesk_
prefix
This commit is contained in:
parent
4347d1ec61
commit
3a0f08046e
@ -495,7 +495,7 @@ class Ticket(models.Model):
|
|||||||
site = Site(domain='configure-django-sites.com')
|
site = Site(domain='configure-django-sites.com')
|
||||||
return u"http://%s%s?ticket=%s&email=%s" % (
|
return u"http://%s%s?ticket=%s&email=%s" % (
|
||||||
site.domain,
|
site.domain,
|
||||||
reverse('helpdesk_public_view'),
|
reverse('helpdesk:public_view'),
|
||||||
self.ticket_for_url,
|
self.ticket_for_url,
|
||||||
self.submitter_email
|
self.submitter_email
|
||||||
)
|
)
|
||||||
@ -514,7 +514,7 @@ class Ticket(models.Model):
|
|||||||
site = Site(domain='configure-django-sites.com')
|
site = Site(domain='configure-django-sites.com')
|
||||||
return u"http://%s%s" % (
|
return u"http://%s%s" % (
|
||||||
site.domain,
|
site.domain,
|
||||||
reverse('helpdesk_view',
|
reverse('helpdesk:view',
|
||||||
args=[self.id])
|
args=[self.id])
|
||||||
)
|
)
|
||||||
staff_url = property(_get_staff_url)
|
staff_url = property(_get_staff_url)
|
||||||
|
@ -17,9 +17,9 @@
|
|||||||
<!--link rel='stylesheet' href='{% static "helpdesk/jquery-smoothness-theme/jquery-ui-1.8.9.custom.css" %}' type='text/css' /-->
|
<!--link rel='stylesheet' href='{% static "helpdesk/jquery-smoothness-theme/jquery-ui-1.8.9.custom.css" %}' type='text/css' /-->
|
||||||
<script src="//netdna.bootstrapcdn.com/bootstrap/3.0.2/js/bootstrap.min.js"></script>
|
<script src="//netdna.bootstrapcdn.com/bootstrap/3.0.2/js/bootstrap.min.js"></script>
|
||||||
<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.2/css/bootstrap.min.css" rel="stylesheet">
|
<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.2/css/bootstrap.min.css" rel="stylesheet">
|
||||||
<link rel='alternate' href='{% url 'helpdesk_rss_user' user.get_username %}' type='application/rss+xml' title='{% trans "My Open Tickets" %}' />
|
<link rel='alternate' href='{% url 'helpdesk:rss_user' user.get_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" %}' />
|
||||||
|
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
/* hide google translate top bar */
|
/* hide google translate top bar */
|
||||||
@ -59,9 +59,9 @@
|
|||||||
|
|
||||||
<div id='footer' class="row">
|
<div id='footer' class="row">
|
||||||
<div class="col-md-2">{% include "helpdesk/attribution.html" %}</div>
|
<div class="col-md-2">{% include "helpdesk/attribution.html" %}</div>
|
||||||
<div class="col-md-2"><a href='{% url 'helpdesk_rss_index' %}'><img src='{% static "helpdesk/rss_icon.png" %}' width='14' height='14' alt='{% trans "RSS Icon" %}' title='{% trans "RSS Feeds" %}' border='0' />{% trans "RSS Feeds" %}</a></div>
|
<div class="col-md-2"><a href='{% url 'helpdesk:rss_index' %}'><img src='{% static "helpdesk/rss_icon.png" %}' width='14' height='14' alt='{% trans "RSS Icon" %}' title='{% trans "RSS Feeds" %}' border='0' />{% trans "RSS Feeds" %}</a></div>
|
||||||
<div class="col-md-2"><s><a href='{% url 'helpdesk_api_help' %}'>{% trans "API" %}</a></s></div>
|
<div class="col-md-2"><s><a href='{% url 'helpdesk:api_help' %}'>{% trans "API" %}</a></s></div>
|
||||||
{% if user.is_superuser %}<div class="col-md-2"><a href='{% url 'helpdesk_system_settings' %}'>{% trans "System Settings" %}</a></div>{% endif %}
|
{% if user.is_superuser %}<div class="col-md-2"><a href='{% url 'helpdesk:system_settings' %}'>{% trans "System Settings" %}</a></div>{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% include "helpdesk/debug.html" %}
|
{% include "helpdesk/debug.html" %}
|
||||||
|
@ -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 %}{% empty %}{% trans "All" %}{% endfor %}</td>
|
<td>{% for queue in ignore.queues.all %}{{ queue.slug }}{% if not forloop.last %}, {% endif %}{% empty %}{% trans "All" %}{% endfor %}</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>
|
||||||
|
@ -50,14 +50,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>
|
||||||
@ -67,13 +67,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&password=fido&ticket=31794"</pre>
|
<pre>/usr/bin/curl {% url 'helpdesk:api' "hold_ticket" %} --data "user=susan&password=fido&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><?php
|
<pre><?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&password=fido&ticket=31794");
|
curl_setopt($api, CURLOPT_POSTFIELDS, "user=susan&password=fido&ticket=31794");
|
||||||
$result = curl_exec($api);
|
$result = curl_exec($api);
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
<thead>
|
<thead>
|
||||||
<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><th>{% trans "Days since opened" %}</th><th>{% trans "Number of open tickets" %}</th></tr>
|
<tr><th>{% trans "Days since opened" %}</th><th>{% trans "Number of open tickets" %}</th></tr>
|
||||||
</thead>
|
</thead>
|
||||||
@ -12,7 +12,7 @@
|
|||||||
{% for entry in basic_ticket_stats.open_ticket_stats %}
|
{% for entry in basic_ticket_stats.open_ticket_stats %}
|
||||||
<tr>
|
<tr>
|
||||||
<th>{{ entry.0 }}</th>
|
<th>{{ entry.0 }}</th>
|
||||||
<td><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><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 %}
|
||||||
</tbody>
|
</tbody>
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{% for queue in dash_tickets %}
|
{% for queue in dash_tickets %}
|
||||||
<tr>{% url 'helpdesk_list' as hdlist %}
|
<tr>{% url 'helpdesk:list' as hdlist %}
|
||||||
<th><a href='{{ hdlist }}?queue={{ queue.queue }}&status=1&status=2'>{{ queue.name }}</a></th>
|
<th><a href='{{ hdlist }}?queue={{ queue.queue }}&status=1&status=2'>{{ queue.name }}</a></th>
|
||||||
<td align="center">{% if queue.open %}<a href='{{ hdlist }}?queue={{ queue.queue }}&status=1&status=2'>{% endif %}{{ queue.open }}{% if queue.open %}</a>{% endif %}</td>
|
<td align="center">{% if queue.open %}<a href='{{ hdlist }}?queue={{ queue.queue }}&status=1&status=2'>{% endif %}{{ queue.open }}{% if queue.open %}</a>{% endif %}</td>
|
||||||
<td align="center">{% if queue.resolved %}<a href='{{ hdlist }}?queue={{ queue.queue }}&status=3'>{% endif %}{{ queue.resolved }}{% if queue.resolved %}</a>{% endif %}</td>
|
<td align="center">{% if queue.resolved %}<a href='{{ hdlist }}?queue={{ queue.queue }}&status=3'>{% endif %}{{ queue.resolved }}{% if queue.resolved %}</a>{% endif %}</td>
|
||||||
|
@ -12,7 +12,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|naturaltime }}</span></td>
|
<td><span title='{{ ticket.created|date:"r" }}'>{{ ticket.created|naturaltime }}</span></td>
|
||||||
<th><a href='{{ ticket.get_absolute_url }}?take'><span class='button button_take'>{% trans "Take" %}</span></a> | <a href='{% url 'helpdesk_delete' ticket.id %}'><span class='button button_delete'>{% trans "Delete" %}</span></a></th>
|
<th><a href='{{ ticket.get_absolute_url }}?take'><span class='button button_take'>{% trans "Take" %}</span></a> | <a href='{% url 'helpdesk:delete' ticket.id %}'><span class='button button_delete'>{% trans "Delete" %}</span></a></th>
|
||||||
</tr>
|
</tr>
|
||||||
{% empty %}
|
{% empty %}
|
||||||
<tr><td colspan='6'>{% trans "There are no unassigned tickets." %}</td></tr>
|
<tr><td colspan='6'>{% trans "There are no unassigned tickets." %}</td></tr>
|
||||||
|
@ -13,18 +13,18 @@
|
|||||||
<div class="collapse navbar-collapse" id="helpdesk-nav-collapse">
|
<div class="collapse navbar-collapse" id="helpdesk-nav-collapse">
|
||||||
{% 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 class="nav navbar-nav">
|
<ul class="nav navbar-nav">
|
||||||
<li><a href='{% url 'helpdesk_dashboard' %}'><span class="glyphicon glyphicon-dashboard"></span> <span class="nav-text">{% trans "Dashboard" %}</span></a></li>
|
<li><a href='{% url 'helpdesk:dashboard' %}'><span class="glyphicon glyphicon-dashboard"></span> <span class="nav-text">{% trans "Dashboard" %}</span></a></li>
|
||||||
<li><a href='{% url 'helpdesk_list' %}'><span class="glyphicon glyphicon-tags"></span> <span class="nav-text">{% trans "Tickets" %}</span></a></li>
|
<li><a href='{% url 'helpdesk:list' %}'><span class="glyphicon glyphicon-tags"></span> <span class="nav-text">{% trans "Tickets" %}</span></a></li>
|
||||||
<li><a href='{% url 'helpdesk_submit' %}'><span class="glyphicon glyphicon-plus"></span> <span class="nav-text">{% trans "New Ticket" %}</span></a></li>
|
<li><a href='{% url 'helpdesk:submit' %}'><span class="glyphicon glyphicon-plus"></span> <span class="nav-text">{% trans "New Ticket" %}</span></a></li>
|
||||||
<li><a href='{% url 'helpdesk_report_index' %}'><span class="glyphicon glyphicon-stats"></span> <span class="nav-text"> {% trans "Stats" %}</span></a></li>
|
<li><a href='{% url 'helpdesk:report_index' %}'><span class="glyphicon glyphicon-stats"></span> <span class="nav-text"> {% trans "Stats" %}</span></a></li>
|
||||||
{% if helpdesk_settings.HELPDESK_KB_ENABLED %}
|
{% if helpdesk_settings.HELPDESK_KB_ENABLED %}
|
||||||
<li><a href='{% url 'helpdesk_kb_index' %}'><span class="glyphicon glyphicon-tree-deciduous"></span> <span class="nav-text">{% trans "Knowledgebase" %}</span></a></li>
|
<li><a href='{% url 'helpdesk:kb_index' %}'><span class="glyphicon glyphicon-tree-deciduous"></span> <span class="nav-text">{% trans "Knowledgebase" %}</span></a></li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if user_saved_queries_ %}
|
{% if user_saved_queries_ %}
|
||||||
<li class="headerlink dropdown"><a class="dropdown-toggle" data-toggle="dropdown" href="#"><span class="glyphicon glyphicon-filter"></span> <span class="nav-text">{% trans "Saved Query" %} <b class="caret"></b></span></a>
|
<li class="headerlink dropdown"><a class="dropdown-toggle" data-toggle="dropdown" href="#"><span class="glyphicon glyphicon-filter"></span> <span class="nav-text">{% trans "Saved Query" %} <b class="caret"></b></span></a>
|
||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
{% 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.get_username }}{% endifnotequal %})
|
(Shared{% ifnotequal user q.user %} by {{ q.user.get_username }}{% endifnotequal %})
|
||||||
{% endif %}</a></li>
|
{% endif %}</a></li>
|
||||||
@ -34,18 +34,18 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
<li class="headerlink dropdown"><a class="dropdown-toggle" data-toggle="dropdown" href="#"><span class="glyphicon glyphicon-user"></span> <span class="nav-text">{{ user.get_full_name|default:user.get_username }} <b class="caret"></b></span></a>
|
<li class="headerlink dropdown"><a class="dropdown-toggle" data-toggle="dropdown" href="#"><span class="glyphicon glyphicon-user"></span> <span class="nav-text">{{ user.get_full_name|default:user.get_username }} <b class="caret"></b></span></a>
|
||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
<li><a href='{% url 'helpdesk_user_settings' %}'>{% trans "User Settings" %}</a></li>
|
<li><a href='{% url 'helpdesk:user_settings' %}'>{% trans "User Settings" %}</a></li>
|
||||||
{% if helpdesk_settings.HELPDESK_SHOW_CHANGE_PASSWORD and user.has_usable_password %}
|
{% if helpdesk_settings.HELPDESK_SHOW_CHANGE_PASSWORD and user.has_usable_password %}
|
||||||
<li><a href='{% url 'auth_password_change' %}'>{% trans "Change password" %}</a></li>
|
<li><a href='{% url 'auth_password_change' %}'>{% trans "Change password" %}</a></li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<li class="divider"></li>
|
<li class="divider"></li>
|
||||||
<li><a href='{% url 'logout' %}'>{#<span class="glyphicon glyphicon-log-out"></span> #}{% trans "Logout" %}</a></li>
|
<li><a href='{% url 'helpdesk:logout' %}'>{#<span class="glyphicon glyphicon-log-out"></span> #}{% trans "Logout" %}</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
{% if not query %}
|
{% if not query %}
|
||||||
<form class="navbar-form navbar-left" id='searchform' method='get' action="{% url 'helpdesk_list' %}">
|
<form class="navbar-form navbar-left" id='searchform' method='get' action="{% url 'helpdesk:list' %}">
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<input type='text' name='q' size='15' class='input form-control' placeholder='{% trans "Search..." %}' id='search_query' title='{% trans "Enter a keyword, or a ticket number to jump straight to that ticket." %}'/>
|
<input type='text' name='q' size='15' class='input form-control' placeholder='{% trans "Search..." %}' id='search_query' 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='status' value='1' /><input type='hidden' name='status' value='2' /><input type='hidden' name='status' value='3' />
|
||||||
@ -61,16 +61,16 @@
|
|||||||
{# Public menu #}
|
{# Public menu #}
|
||||||
<ul id="dropdown" class="nav navbar-nav">
|
<ul id="dropdown" class="nav navbar-nav">
|
||||||
{% if helpdesk_settings.HELPDESK_ALLOW_NON_STAFF_TICKET_UPDATE %}
|
{% if helpdesk_settings.HELPDESK_ALLOW_NON_STAFF_TICKET_UPDATE %}
|
||||||
<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_submit' %}'>{% trans "Submit a Ticket" %}</a></li>
|
<li><a href='{% url 'helpdesk:submit' %}'>{% trans "Submit a Ticket" %}</a></li>
|
||||||
{% else %}
|
{% else %}
|
||||||
{% 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 %}
|
||||||
{% 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 'helpdesk:logout' %}'>{% trans "Logout" %}</a>{% else %}<a href='{% url 'helpdesk:login' %}?next={% if next %}{{ next|escape }}{% else %}{% url 'helpdesk:home' %}{% endif %}'>{% trans "Log In" %}</a>{% endif %}</li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</ul>
|
</ul>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -72,7 +72,7 @@
|
|||||||
<div class="panel-body">
|
<div class="panel-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' %}">
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<div class="form-group {% if field.errors %}has-error{% endif %}">
|
<div class="form-group {% if field.errors %}has-error{% endif %}">
|
||||||
<label for='id_ticket'>{% trans "Ticket" %}</label>
|
<label for='id_ticket'>{% trans "Ticket" %}</label>
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
{% 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 %}
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
{% 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 %}
|
||||||
<div class="col-xs-6">
|
<div class="col-xs-6">
|
||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
|
@ -7,13 +7,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.get_username %}'><img src='{% static "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.get_username %}'><img src='{% static "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 "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 "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 "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 "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>
|
||||||
|
|
||||||
@ -28,8 +28,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 "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 "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.get_username queue.slug %}'><img src='{% static "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.get_username queue.slug %}'><img src='{% static "helpdesk/rss_icon.png" %}' width='14' height='14' alt='{% trans "RSS Icon" %}' title='{% trans "My Open Tickets" %}' border='0' /></a></td>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
<p>{% blocktrans %}The following items can be maintained by you or other superusers:{% endblocktrans %}</p>
|
<p>{% blocktrans %}The following items can be maintained by you or other superusers:{% endblocktrans %}</p>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href='{% url 'helpdesk_email_ignore' %}'>{% trans "E-Mail Ignore list" %}</a></li>
|
<li><a href='{% url 'helpdesk:email_ignore' %}'>{% trans "E-Mail Ignore list" %}</a></li>
|
||||||
<li><a href='{% url 'admin:helpdesk_queue_changelist' %}'>{% trans "Maintain Queues" %}</a></li>
|
<li><a href='{% url 'admin:helpdesk_queue_changelist' %}'>{% trans "Maintain Queues" %}</a></li>
|
||||||
<li><a href='{% url 'admin:helpdesk_presetreply_changelist' %}'>{% trans "Maintain Pre-Set Replies" %}</a></li>
|
<li><a href='{% url 'admin:helpdesk_presetreply_changelist' %}'>{% trans "Maintain Pre-Set Replies" %}</a></li>
|
||||||
<li><a href='{% url 'admin:helpdesk_kbcategory_changelist' %}'>{% trans "Maintain Knowledgebase Categories" %}</a></li>
|
<li><a href='{% url 'admin:helpdesk_kbcategory_changelist' %}'>{% trans "Maintain Knowledgebase Categories" %}</a></li>
|
||||||
|
@ -21,7 +21,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)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -77,11 +77,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 "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 "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 "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 "helpdesk/buttons/delete.png" %}"></a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% else %}
|
{% else %}
|
||||||
@ -90,11 +90,11 @@ function googleTranslateElementInit() {
|
|||||||
{{ followup.title }} <span class='byline text-info'>{% if followup.user %}by {{ followup.user }}{% endif %} <span title='{{ followup.date|date:"r" }}'>{{ followup.date|naturaltime }}</span>{% if not followup.public %} <span class='private'>({% trans "Private" %})</span>{% endif %}</span>
|
{{ followup.title }} <span class='byline text-info'>{% if followup.user %}by {{ followup.user }}{% endif %} <span title='{{ followup.date|date:"r" }}'>{{ followup.date|naturaltime }}</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 "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 "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 "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 "helpdesk/buttons/delete.png" %}"></a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@ -107,7 +107,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 %}
|
||||||
|
@ -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 %}
|
||||||
|
@ -3,9 +3,9 @@
|
|||||||
<table class="table table-hover table-bordered table-striped">
|
<table class="table table-hover table-bordered table-striped">
|
||||||
<thead>
|
<thead>
|
||||||
<tr class='row_tablehead'><td colspan='2'><h3>{{ ticket.id }}. {{ ticket.title }} [{{ ticket.get_status }}]</h3> <span class='ticket_toolbar'>
|
<tr class='row_tablehead'><td colspan='2'><h3>{{ ticket.id }}. {{ ticket.title }} [{{ ticket.get_status }}]</h3> <span class='ticket_toolbar'>
|
||||||
<a href='{% url 'helpdesk_edit' ticket.id %}' class="ticket-edit"><span class="glyphicon glyphicon-pencil"></span> Edit</a>
|
<a href='{% url 'helpdesk:edit' ticket.id %}' class="ticket-edit"><span class="glyphicon glyphicon-pencil"></span> Edit</a>
|
||||||
| <a href='{% url 'helpdesk_delete' ticket.id %}' class="ticket-delete"><span class="glyphicon glyphicon-remove"></span> Delete</a>
|
| <a href='{% url 'helpdesk:delete' ticket.id %}' class="ticket-delete"><span class="glyphicon glyphicon-remove"></span> Delete</a>
|
||||||
{% if ticket.on_hold %} | <a href='{% url 'helpdesk_unhold' ticket.id %}' class="ticket-hold">{% trans "Unhold" %}</a>{% else %} | <a href='{% url 'helpdesk_hold' ticket.id %}' class="ticket-hold">{% trans "Hold" %}</a>{% endif %}
|
{% if ticket.on_hold %} | <a href='{% url 'helpdesk:unhold' ticket.id %}' class="ticket-hold">{% trans "Unhold" %}</a>{% else %} | <a href='{% url 'helpdesk:hold' ticket.id %}' class="ticket-hold">{% trans "Hold" %}</a>{% endif %}
|
||||||
</span></td></tr>
|
</span></td></tr>
|
||||||
<tr><th colspan='2'>{% blocktrans with ticket.queue as queue %}Queue: {{ queue }}{% endblocktrans %}</th></tr>
|
<tr><th colspan='2'>{% blocktrans with ticket.queue as queue %}Queue: {{ queue }}{% endblocktrans %}</th></tr>
|
||||||
</thead>
|
</thead>
|
||||||
@ -41,7 +41,7 @@
|
|||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<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>
|
<tr>
|
||||||
@ -51,19 +51,19 @@
|
|||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<th>{% trans "Copies To" %}</th>
|
<th>{% trans "Copies To" %}</th>
|
||||||
<td>{{ ticketcc_string }} <a data-toggle='tooltip' href='{% url 'helpdesk_ticket_cc' ticket.id %}' title='{% trans "Click here to add / remove people who should receive an e-mail whenever this ticket is updated." %}'><strong>{% trans "Manage" %}</strong></a>{% if SHOW_SUBSCRIBE %}, <strong><a data-toggle='tooltip' href='?subscribe' title='{% trans "Click here to subscribe yourself to this ticket, if you want to receive an e-mail whenever this ticket is updated." %}'>{% trans "Subscribe" %}</a></strong>{% endif %}</td>
|
<td>{{ ticketcc_string }} <a data-toggle='tooltip' href='{% url 'helpdesk:ticket_cc' ticket.id %}' title='{% trans "Click here to add / remove people who should receive an e-mail whenever this ticket is updated." %}'><strong>{% trans "Manage" %}</strong></a>{% if SHOW_SUBSCRIBE %}, <strong><a data-toggle='tooltip' href='?subscribe' title='{% trans "Click here to subscribe yourself to this ticket, if you want to receive an e-mail whenever this ticket is updated." %}'>{% trans "Subscribe" %}</a></strong>{% endif %}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<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 data-toggle='tooltip' href='{% url 'helpdesk_ticket_dependency_add' ticket.id %}' title="{% 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." %}">{% trans "Add Dependency" %}</a></p>
|
<p><a data-toggle='tooltip' href='{% url 'helpdesk:ticket_dependency_add' ticket.id %}' title="{% 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." %}">{% trans "Add Dependency" %}</a></p>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
@ -143,7 +143,7 @@ $(document).ready(function() {
|
|||||||
<hr style='clear: both;' />
|
<hr style='clear: both;' />
|
||||||
<input class="btn btn-primary" type='submit' value='{% trans "Apply Filter" %}' />
|
<input class="btn btn-primary" 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 <strong>"{{ query_name }}"</strong>.{% 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 <strong>"{{ query_name }}"</strong>.{% 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>
|
||||||
@ -164,7 +164,7 @@ $(document).ready(function() {
|
|||||||
</div>
|
</div>
|
||||||
<div id="collapseTwo" class="panel-collapse collapse">
|
<div id="collapseTwo" class="panel-collapse collapse">
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
<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>
|
||||||
@ -198,7 +198,7 @@ $(document).ready(function() {
|
|||||||
</div>
|
</div>
|
||||||
<div id="collapseThree" class="panel-collapse collapse">
|
<div id="collapseThree" class="panel-collapse collapse">
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
<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.get_username }}{% endifnotequal %}){% endif %}</option>
|
<option value='{{ q.id }}'>{{ q.title }}{% if q.shared %} (Shared{% ifnotequal user q.user %} by {{ q.user.get_username }}{% endifnotequal %}){% endif %}</option>
|
||||||
@ -218,7 +218,7 @@ $(document).ready(function() {
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
||||||
{{ 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 class="table table-hover table-bordered table-striped">
|
<table class="table table-hover table-bordered table-striped">
|
||||||
<caption>{% trans "Tickets" %}</caption>
|
<caption>{% trans "Tickets" %}</caption>
|
||||||
<thead>
|
<thead>
|
||||||
|
@ -44,7 +44,7 @@ def num_to_link(text):
|
|||||||
start = match.start()
|
start = match.start()
|
||||||
end = match.end()
|
end = match.end()
|
||||||
number = match.groups()[0]
|
number = match.groups()[0]
|
||||||
url = reverse('helpdesk_view', args=[number])
|
url = reverse('helpdesk:view', args=[number])
|
||||||
try:
|
try:
|
||||||
ticket = Ticket.objects.get(id=number)
|
ticket = Ticket.objects.get(id=number)
|
||||||
except Ticket.DoesNotExist:
|
except Ticket.DoesNotExist:
|
||||||
|
@ -28,7 +28,7 @@ class TestKBDisabled(TestCase):
|
|||||||
self.client.login(username=get_staff_user().get_username(), password='password')
|
self.client.login(username=get_staff_user().get_username(), password='password')
|
||||||
self.assertRaises(NoReverseMatch, reverse, 'helpdesk_kb_index')
|
self.assertRaises(NoReverseMatch, reverse, 'helpdesk_kb_index')
|
||||||
try:
|
try:
|
||||||
response = self.client.get(reverse('helpdesk_dashboard'))
|
response = self.client.get(reverse('helpdesk:dashboard'))
|
||||||
except NoReverseMatch as e:
|
except NoReverseMatch as e:
|
||||||
if 'helpdesk_kb_index' in e.message:
|
if 'helpdesk_kb_index' in e.message:
|
||||||
self.fail("Please verify any unchecked references to helpdesk_kb_index (start with navigation.html)")
|
self.fail("Please verify any unchecked references to helpdesk_kb_index (start with navigation.html)")
|
||||||
|
@ -75,7 +75,7 @@ class PerQueueStaffMembershipTestCase(TestCase):
|
|||||||
# Regular users
|
# Regular users
|
||||||
for identifier in self.IDENTIFIERS:
|
for identifier in self.IDENTIFIERS:
|
||||||
self.client.login(username='User_%d' % identifier, password=identifier)
|
self.client.login(username='User_%d' % identifier, password=identifier)
|
||||||
response = self.client.get(reverse('helpdesk_dashboard'))
|
response = self.client.get(reverse('helpdesk:dashboard'))
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
len(response.context['unassigned_tickets']),
|
len(response.context['unassigned_tickets']),
|
||||||
identifier,
|
identifier,
|
||||||
@ -99,7 +99,7 @@ class PerQueueStaffMembershipTestCase(TestCase):
|
|||||||
|
|
||||||
# Superuser
|
# Superuser
|
||||||
self.client.login(username='superuser', password='superuser')
|
self.client.login(username='superuser', password='superuser')
|
||||||
response = self.client.get(reverse('helpdesk_dashboard'))
|
response = self.client.get(reverse('helpdesk:dashboard'))
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
len(response.context['unassigned_tickets']),
|
len(response.context['unassigned_tickets']),
|
||||||
3,
|
3,
|
||||||
@ -132,7 +132,7 @@ class PerQueueStaffMembershipTestCase(TestCase):
|
|||||||
# Regular users
|
# Regular users
|
||||||
for identifier in self.IDENTIFIERS:
|
for identifier in self.IDENTIFIERS:
|
||||||
self.client.login(username='User_%d' % identifier, password=identifier)
|
self.client.login(username='User_%d' % identifier, password=identifier)
|
||||||
response = self.client.get(reverse('helpdesk_list'))
|
response = self.client.get(reverse('helpdesk:list'))
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
len(response.context['tickets']),
|
len(response.context['tickets']),
|
||||||
identifier * 2,
|
identifier * 2,
|
||||||
@ -151,7 +151,7 @@ class PerQueueStaffMembershipTestCase(TestCase):
|
|||||||
|
|
||||||
# Superuser
|
# Superuser
|
||||||
self.client.login(username='superuser', password='superuser')
|
self.client.login(username='superuser', password='superuser')
|
||||||
response = self.client.get(reverse('helpdesk_list'))
|
response = self.client.get(reverse('helpdesk:list'))
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
len(response.context['tickets']),
|
len(response.context['tickets']),
|
||||||
6,
|
6,
|
||||||
@ -168,7 +168,7 @@ class PerQueueStaffMembershipTestCase(TestCase):
|
|||||||
for identifier in self.IDENTIFIERS:
|
for identifier in self.IDENTIFIERS:
|
||||||
self.client.login(username='User_%d' % identifier, password=identifier)
|
self.client.login(username='User_%d' % identifier, password=identifier)
|
||||||
response = self.client.get(
|
response = self.client.get(
|
||||||
reverse('helpdesk_run_report', kwargs={'report': 'userqueue'})
|
reverse('helpdesk:run_report', kwargs={'report': 'userqueue'})
|
||||||
)
|
)
|
||||||
# Only two columns of data should be present: ticket counts for
|
# Only two columns of data should be present: ticket counts for
|
||||||
# unassigned and this user only
|
# unassigned and this user only
|
||||||
@ -199,7 +199,7 @@ class PerQueueStaffMembershipTestCase(TestCase):
|
|||||||
# Superuser
|
# Superuser
|
||||||
self.client.login(username='superuser', password='superuser')
|
self.client.login(username='superuser', password='superuser')
|
||||||
response = self.client.get(
|
response = self.client.get(
|
||||||
reverse('helpdesk_run_report', kwargs={'report': 'userqueue'})
|
reverse('helpdesk:run_report', kwargs={'report': 'userqueue'})
|
||||||
)
|
)
|
||||||
# Superuser should see ticket counts for all two queues, which includes
|
# Superuser should see ticket counts for all two queues, which includes
|
||||||
# three columns: unassigned and both user 1 and user 2
|
# three columns: unassigned and both user 1 and user 2
|
||||||
|
@ -21,7 +21,7 @@ class PublicActionsTestCase(TestCase):
|
|||||||
self.client = Client()
|
self.client = Client()
|
||||||
|
|
||||||
def test_public_view_ticket(self):
|
def test_public_view_ticket(self):
|
||||||
response = self.client.get('%s?ticket=%s&email=%s' % (reverse('helpdesk_public_view'), self.ticket.ticket_for_url, 'test.submitter@example.com'))
|
response = self.client.get('%s?ticket=%s&email=%s' % (reverse('helpdesk:public_view'), self.ticket.ticket_for_url, 'test.submitter@example.com'))
|
||||||
self.assertEqual(response.status_code, 200)
|
self.assertEqual(response.status_code, 200)
|
||||||
self.assertTemplateNotUsed(response, 'helpdesk/public_view_form.html')
|
self.assertTemplateNotUsed(response, 'helpdesk/public_view_form.html')
|
||||||
|
|
||||||
@ -38,7 +38,7 @@ class PublicActionsTestCase(TestCase):
|
|||||||
|
|
||||||
current_followups = ticket.followup_set.all().count()
|
current_followups = ticket.followup_set.all().count()
|
||||||
|
|
||||||
response = self.client.get('%s?ticket=%s&email=%s&close' % (reverse('helpdesk_public_view'), ticket.ticket_for_url, 'test.submitter@example.com'))
|
response = self.client.get('%s?ticket=%s&email=%s&close' % (reverse('helpdesk:public_view'), ticket.ticket_for_url, 'test.submitter@example.com'))
|
||||||
|
|
||||||
ticket = Ticket.objects.get(id=self.ticket.id)
|
ticket = Ticket.objects.get(id=self.ticket.id)
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@ class TicketBasicsTestCase(TestCase):
|
|||||||
def test_create_ticket_public(self):
|
def test_create_ticket_public(self):
|
||||||
email_count = len(mail.outbox)
|
email_count = len(mail.outbox)
|
||||||
|
|
||||||
response = self.client.get(reverse('helpdesk_home'))
|
response = self.client.get(reverse('helpdesk:home'))
|
||||||
self.assertEqual(response.status_code, 200)
|
self.assertEqual(response.status_code, 200)
|
||||||
|
|
||||||
post_data = {
|
post_data = {
|
||||||
@ -46,7 +46,7 @@ class TicketBasicsTestCase(TestCase):
|
|||||||
'priority': 3,
|
'priority': 3,
|
||||||
}
|
}
|
||||||
|
|
||||||
response = self.client.post(reverse('helpdesk_home'), post_data, follow=True)
|
response = self.client.post(reverse('helpdesk:home'), post_data, follow=True)
|
||||||
last_redirect = response.redirect_chain[-1]
|
last_redirect = response.redirect_chain[-1]
|
||||||
last_redirect_url = last_redirect[0]
|
last_redirect_url = last_redirect[0]
|
||||||
last_redirect_status = last_redirect[1]
|
last_redirect_status = last_redirect[1]
|
||||||
@ -55,7 +55,7 @@ class TicketBasicsTestCase(TestCase):
|
|||||||
# Django 1.9 compatible way of testing this
|
# Django 1.9 compatible way of testing this
|
||||||
# https://docs.djangoproject.com/en/1.9/releases/1.9/#http-redirects-no-longer-forced-to-absolute-uris
|
# https://docs.djangoproject.com/en/1.9/releases/1.9/#http-redirects-no-longer-forced-to-absolute-uris
|
||||||
urlparts = urlparse(last_redirect_url)
|
urlparts = urlparse(last_redirect_url)
|
||||||
self.assertEqual(urlparts.path, reverse('helpdesk_public_view'))
|
self.assertEqual(urlparts.path, reverse('helpdesk:public_view'))
|
||||||
|
|
||||||
# Ensure submitter, new-queue + update-queue were all emailed.
|
# Ensure submitter, new-queue + update-queue were all emailed.
|
||||||
self.assertEqual(email_count+3, len(mail.outbox))
|
self.assertEqual(email_count+3, len(mail.outbox))
|
||||||
@ -70,7 +70,7 @@ class TicketBasicsTestCase(TestCase):
|
|||||||
'priority': 3,
|
'priority': 3,
|
||||||
}
|
}
|
||||||
|
|
||||||
response = self.client.post(reverse('helpdesk_home'), post_data)
|
response = self.client.post(reverse('helpdesk:home'), post_data)
|
||||||
self.assertEqual(response.status_code, 200)
|
self.assertEqual(response.status_code, 200)
|
||||||
self.assertEqual(email_count, len(mail.outbox))
|
self.assertEqual(email_count, len(mail.outbox))
|
||||||
self.assertContains(response, 'Select a valid choice.')
|
self.assertContains(response, 'Select a valid choice.')
|
||||||
@ -88,7 +88,7 @@ class TicketBasicsTestCase(TestCase):
|
|||||||
'custom_textfield': 'This is my custom text.',
|
'custom_textfield': 'This is my custom text.',
|
||||||
}
|
}
|
||||||
|
|
||||||
response = self.client.post(reverse('helpdesk_home'), post_data, follow=True)
|
response = self.client.post(reverse('helpdesk:home'), post_data, follow=True)
|
||||||
|
|
||||||
custom_field_1.delete()
|
custom_field_1.delete()
|
||||||
last_redirect = response.redirect_chain[-1]
|
last_redirect = response.redirect_chain[-1]
|
||||||
@ -99,7 +99,7 @@ class TicketBasicsTestCase(TestCase):
|
|||||||
# Django 1.9 compatible way of testing this
|
# Django 1.9 compatible way of testing this
|
||||||
# https://docs.djangoproject.com/en/1.9/releases/1.9/#http-redirects-no-longer-forced-to-absolute-uris
|
# https://docs.djangoproject.com/en/1.9/releases/1.9/#http-redirects-no-longer-forced-to-absolute-uris
|
||||||
urlparts = urlparse(last_redirect_url)
|
urlparts = urlparse(last_redirect_url)
|
||||||
self.assertEqual(urlparts.path, reverse('helpdesk_public_view'))
|
self.assertEqual(urlparts.path, reverse('helpdesk:public_view'))
|
||||||
|
|
||||||
# Ensure only two e-mails were sent - submitter & updated.
|
# Ensure only two e-mails were sent - submitter & updated.
|
||||||
self.assertEqual(email_count+2, len(mail.outbox))
|
self.assertEqual(email_count+2, len(mail.outbox))
|
||||||
|
@ -32,161 +32,163 @@ class DirectTemplateView(TemplateView):
|
|||||||
context[key] = value
|
context[key] = value
|
||||||
return context
|
return context
|
||||||
|
|
||||||
|
app_name = 'helpdesk'
|
||||||
|
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
url(r'^dashboard/$',
|
url(r'^dashboard/$',
|
||||||
staff.dashboard,
|
staff.dashboard,
|
||||||
name='helpdesk_dashboard'),
|
name='dashboard'),
|
||||||
|
|
||||||
url(r'^tickets/$',
|
url(r'^tickets/$',
|
||||||
staff.ticket_list,
|
staff.ticket_list,
|
||||||
name='helpdesk_list'),
|
name='list'),
|
||||||
|
|
||||||
url(r'^tickets/update/$',
|
url(r'^tickets/update/$',
|
||||||
staff.mass_update,
|
staff.mass_update,
|
||||||
name='helpdesk_mass_update'),
|
name='mass_update'),
|
||||||
|
|
||||||
url(r'^tickets/submit/$',
|
url(r'^tickets/submit/$',
|
||||||
staff.create_ticket,
|
staff.create_ticket,
|
||||||
name='helpdesk_submit'),
|
name='submit'),
|
||||||
|
|
||||||
url(r'^tickets/(?P<ticket_id>[0-9]+)/$',
|
url(r'^tickets/(?P<ticket_id>[0-9]+)/$',
|
||||||
staff.view_ticket,
|
staff.view_ticket,
|
||||||
name='helpdesk_view'),
|
name='view'),
|
||||||
|
|
||||||
url(r'^tickets/(?P<ticket_id>[0-9]+)/followup_edit/(?P<followup_id>[0-9]+)/$',
|
url(r'^tickets/(?P<ticket_id>[0-9]+)/followup_edit/(?P<followup_id>[0-9]+)/$',
|
||||||
staff.followup_edit,
|
staff.followup_edit,
|
||||||
name='helpdesk_followup_edit'),
|
name='followup_edit'),
|
||||||
|
|
||||||
url(r'^tickets/(?P<ticket_id>[0-9]+)/followup_delete/(?P<followup_id>[0-9]+)/$',
|
url(r'^tickets/(?P<ticket_id>[0-9]+)/followup_delete/(?P<followup_id>[0-9]+)/$',
|
||||||
staff.followup_delete,
|
staff.followup_delete,
|
||||||
name='helpdesk_followup_delete'),
|
name='followup_delete'),
|
||||||
|
|
||||||
url(r'^tickets/(?P<ticket_id>[0-9]+)/edit/$',
|
url(r'^tickets/(?P<ticket_id>[0-9]+)/edit/$',
|
||||||
staff.edit_ticket,
|
staff.edit_ticket,
|
||||||
name='helpdesk_edit'),
|
name='edit'),
|
||||||
|
|
||||||
url(r'^tickets/(?P<ticket_id>[0-9]+)/update/$',
|
url(r'^tickets/(?P<ticket_id>[0-9]+)/update/$',
|
||||||
staff.update_ticket,
|
staff.update_ticket,
|
||||||
name='helpdesk_update'),
|
name='update'),
|
||||||
|
|
||||||
url(r'^tickets/(?P<ticket_id>[0-9]+)/delete/$',
|
url(r'^tickets/(?P<ticket_id>[0-9]+)/delete/$',
|
||||||
staff.delete_ticket,
|
staff.delete_ticket,
|
||||||
name='helpdesk_delete'),
|
name='delete'),
|
||||||
|
|
||||||
url(r'^tickets/(?P<ticket_id>[0-9]+)/hold/$',
|
url(r'^tickets/(?P<ticket_id>[0-9]+)/hold/$',
|
||||||
staff.hold_ticket,
|
staff.hold_ticket,
|
||||||
name='helpdesk_hold'),
|
name='hold'),
|
||||||
|
|
||||||
url(r'^tickets/(?P<ticket_id>[0-9]+)/unhold/$',
|
url(r'^tickets/(?P<ticket_id>[0-9]+)/unhold/$',
|
||||||
staff.unhold_ticket,
|
staff.unhold_ticket,
|
||||||
name='helpdesk_unhold'),
|
name='unhold'),
|
||||||
|
|
||||||
url(r'^tickets/(?P<ticket_id>[0-9]+)/cc/$',
|
url(r'^tickets/(?P<ticket_id>[0-9]+)/cc/$',
|
||||||
staff.ticket_cc,
|
staff.ticket_cc,
|
||||||
name='helpdesk_ticket_cc'),
|
name='ticket_cc'),
|
||||||
|
|
||||||
url(r'^tickets/(?P<ticket_id>[0-9]+)/cc/add/$',
|
url(r'^tickets/(?P<ticket_id>[0-9]+)/cc/add/$',
|
||||||
staff.ticket_cc_add,
|
staff.ticket_cc_add,
|
||||||
name='helpdesk_ticket_cc_add'),
|
name='ticket_cc_add'),
|
||||||
|
|
||||||
url(r'^tickets/(?P<ticket_id>[0-9]+)/cc/delete/(?P<cc_id>[0-9]+)/$',
|
url(r'^tickets/(?P<ticket_id>[0-9]+)/cc/delete/(?P<cc_id>[0-9]+)/$',
|
||||||
staff.ticket_cc_del,
|
staff.ticket_cc_del,
|
||||||
name='helpdesk_ticket_cc_del'),
|
name='ticket_cc_del'),
|
||||||
|
|
||||||
url(r'^tickets/(?P<ticket_id>[0-9]+)/dependency/add/$',
|
url(r'^tickets/(?P<ticket_id>[0-9]+)/dependency/add/$',
|
||||||
staff.ticket_dependency_add,
|
staff.ticket_dependency_add,
|
||||||
name='helpdesk_ticket_dependency_add'),
|
name='ticket_dependency_add'),
|
||||||
|
|
||||||
url(r'^tickets/(?P<ticket_id>[0-9]+)/dependency/delete/(?P<dependency_id>[0-9]+)/$',
|
url(r'^tickets/(?P<ticket_id>[0-9]+)/dependency/delete/(?P<dependency_id>[0-9]+)/$',
|
||||||
staff.ticket_dependency_del,
|
staff.ticket_dependency_del,
|
||||||
name='helpdesk_ticket_dependency_del'),
|
name='ticket_dependency_del'),
|
||||||
|
|
||||||
url(r'^tickets/(?P<ticket_id>[0-9]+)/attachment_delete/(?P<attachment_id>[0-9]+)/$',
|
url(r'^tickets/(?P<ticket_id>[0-9]+)/attachment_delete/(?P<attachment_id>[0-9]+)/$',
|
||||||
staff.attachment_del,
|
staff.attachment_del,
|
||||||
name='helpdesk_attachment_del'),
|
name='attachment_del'),
|
||||||
|
|
||||||
url(r'^raw/(?P<type>\w+)/$',
|
url(r'^raw/(?P<type>\w+)/$',
|
||||||
staff.raw_details,
|
staff.raw_details,
|
||||||
name='helpdesk_raw'),
|
name='raw'),
|
||||||
|
|
||||||
url(r'^rss/$',
|
url(r'^rss/$',
|
||||||
staff.rss_list,
|
staff.rss_list,
|
||||||
name='helpdesk_rss_index'),
|
name='rss_index'),
|
||||||
|
|
||||||
url(r'^reports/$',
|
url(r'^reports/$',
|
||||||
staff.report_index,
|
staff.report_index,
|
||||||
name='helpdesk_report_index'),
|
name='report_index'),
|
||||||
|
|
||||||
url(r'^reports/(?P<report>\w+)/$',
|
url(r'^reports/(?P<report>\w+)/$',
|
||||||
staff.run_report,
|
staff.run_report,
|
||||||
name='helpdesk_run_report'),
|
name='run_report'),
|
||||||
|
|
||||||
url(r'^save_query/$',
|
url(r'^save_query/$',
|
||||||
staff.save_query,
|
staff.save_query,
|
||||||
name='helpdesk_savequery'),
|
name='savequery'),
|
||||||
|
|
||||||
url(r'^delete_query/(?P<id>[0-9]+)/$',
|
url(r'^delete_query/(?P<id>[0-9]+)/$',
|
||||||
staff.delete_saved_query,
|
staff.delete_saved_query,
|
||||||
name='helpdesk_delete_query'),
|
name='delete_query'),
|
||||||
|
|
||||||
url(r'^settings/$',
|
url(r'^settings/$',
|
||||||
staff.user_settings,
|
staff.user_settings,
|
||||||
name='helpdesk_user_settings'),
|
name='user_settings'),
|
||||||
|
|
||||||
url(r'^ignore/$',
|
url(r'^ignore/$',
|
||||||
staff.email_ignore,
|
staff.email_ignore,
|
||||||
name='helpdesk_email_ignore'),
|
name='email_ignore'),
|
||||||
|
|
||||||
url(r'^ignore/add/$',
|
url(r'^ignore/add/$',
|
||||||
staff.email_ignore_add,
|
staff.email_ignore_add,
|
||||||
name='helpdesk_email_ignore_add'),
|
name='email_ignore_add'),
|
||||||
|
|
||||||
url(r'^ignore/delete/(?P<id>[0-9]+)/$',
|
url(r'^ignore/delete/(?P<id>[0-9]+)/$',
|
||||||
staff.email_ignore_del,
|
staff.email_ignore_del,
|
||||||
name='helpdesk_email_ignore_del'),
|
name='email_ignore_del'),
|
||||||
]
|
]
|
||||||
|
|
||||||
urlpatterns += [
|
urlpatterns += [
|
||||||
url(r'^$',
|
url(r'^$',
|
||||||
public.homepage,
|
public.homepage,
|
||||||
name='helpdesk_home'),
|
name='home'),
|
||||||
|
|
||||||
url(r'^view/$',
|
url(r'^view/$',
|
||||||
public.view_ticket,
|
public.view_ticket,
|
||||||
name='helpdesk_public_view'),
|
name='public_view'),
|
||||||
|
|
||||||
url(r'^change_language/$',
|
url(r'^change_language/$',
|
||||||
public.change_language,
|
public.change_language,
|
||||||
name='helpdesk_public_change_language'),
|
name='public_change_language'),
|
||||||
]
|
]
|
||||||
|
|
||||||
urlpatterns += [
|
urlpatterns += [
|
||||||
url(r'^rss/user/(?P<user_name>[^/]+)/$',
|
url(r'^rss/user/(?P<user_name>[^/]+)/$',
|
||||||
login_required(feeds.OpenTicketsByUser()),
|
login_required(feeds.OpenTicketsByUser()),
|
||||||
name='helpdesk_rss_user'),
|
name='rss_user'),
|
||||||
|
|
||||||
url(r'^rss/user/(?P<user_name>[^/]+)/(?P<queue_slug>[A-Za-z0-9_-]+)/$',
|
url(r'^rss/user/(?P<user_name>[^/]+)/(?P<queue_slug>[A-Za-z0-9_-]+)/$',
|
||||||
login_required(feeds.OpenTicketsByUser()),
|
login_required(feeds.OpenTicketsByUser()),
|
||||||
name='helpdesk_rss_user_queue'),
|
name='rss_user_queue'),
|
||||||
|
|
||||||
url(r'^rss/queue/(?P<queue_slug>[A-Za-z0-9_-]+)/$',
|
url(r'^rss/queue/(?P<queue_slug>[A-Za-z0-9_-]+)/$',
|
||||||
login_required(feeds.OpenTicketsByQueue()),
|
login_required(feeds.OpenTicketsByQueue()),
|
||||||
name='helpdesk_rss_queue'),
|
name='rss_queue'),
|
||||||
|
|
||||||
url(r'^rss/unassigned/$',
|
url(r'^rss/unassigned/$',
|
||||||
login_required(feeds.UnassignedTickets()),
|
login_required(feeds.UnassignedTickets()),
|
||||||
name='helpdesk_rss_unassigned'),
|
name='rss_unassigned'),
|
||||||
|
|
||||||
url(r'^rss/recent_activity/$',
|
url(r'^rss/recent_activity/$',
|
||||||
login_required(feeds.RecentFollowUps()),
|
login_required(feeds.RecentFollowUps()),
|
||||||
name='helpdesk_rss_activity'),
|
name='rss_activity'),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
urlpatterns += [
|
urlpatterns += [
|
||||||
url(r'^api/(?P<method>[a-z_-]+)/$',
|
url(r'^api/(?P<method>[a-z_-]+)/$',
|
||||||
api.api,
|
api.api,
|
||||||
name='helpdesk_api'),
|
name='api'),
|
||||||
|
|
||||||
url(r'^login/$',
|
url(r'^login/$',
|
||||||
auth_views.login,
|
auth_views.login,
|
||||||
@ -203,31 +205,31 @@ if helpdesk_settings.HELPDESK_KB_ENABLED:
|
|||||||
urlpatterns += [
|
urlpatterns += [
|
||||||
url(r'^kb/$',
|
url(r'^kb/$',
|
||||||
kb.index,
|
kb.index,
|
||||||
name='helpdesk_kb_index'),
|
name='kb_index'),
|
||||||
|
|
||||||
url(r'^kb/(?P<item>[0-9]+)/$',
|
url(r'^kb/(?P<item>[0-9]+)/$',
|
||||||
kb.item,
|
kb.item,
|
||||||
name='helpdesk_kb_item'),
|
name='kb_item'),
|
||||||
|
|
||||||
url(r'^kb/(?P<item>[0-9]+)/vote/$',
|
url(r'^kb/(?P<item>[0-9]+)/vote/$',
|
||||||
kb.vote,
|
kb.vote,
|
||||||
name='helpdesk_kb_vote'),
|
name='kb_vote'),
|
||||||
|
|
||||||
url(r'^kb/(?P<slug>[A-Za-z0-9_-]+)/$',
|
url(r'^kb/(?P<slug>[A-Za-z0-9_-]+)/$',
|
||||||
kb.category,
|
kb.category,
|
||||||
name='helpdesk_kb_category'),
|
name='kb_category'),
|
||||||
]
|
]
|
||||||
|
|
||||||
urlpatterns += [
|
urlpatterns += [
|
||||||
url(r'^api/$',
|
url(r'^api/$',
|
||||||
TemplateView.as_view(template_name='helpdesk/help_api.html'),
|
TemplateView.as_view(template_name='helpdesk/help_api.html'),
|
||||||
name='helpdesk_api_help'),
|
name='api_help'),
|
||||||
|
|
||||||
url(r'^help/context/$',
|
url(r'^help/context/$',
|
||||||
TemplateView.as_view(template_name='helpdesk/help_context.html'),
|
TemplateView.as_view(template_name='helpdesk/help_context.html'),
|
||||||
name='helpdesk_help_context'),
|
name='help_context'),
|
||||||
|
|
||||||
url(r'^system_settings/$',
|
url(r'^system_settings/$',
|
||||||
DirectTemplateView.as_view(template_name='helpdesk/system_settings.html'),
|
DirectTemplateView.as_view(template_name='helpdesk/system_settings.html'),
|
||||||
name='helpdesk_system_settings'),
|
name='system_settings'),
|
||||||
]
|
]
|
||||||
|
@ -59,13 +59,13 @@ class OpenTicketsByUser(Feed):
|
|||||||
def link(self, obj):
|
def link(self, obj):
|
||||||
if obj['queue']:
|
if obj['queue']:
|
||||||
return u'%s?assigned_to=%s&queue=%s' % (
|
return u'%s?assigned_to=%s&queue=%s' % (
|
||||||
reverse('helpdesk_list'),
|
reverse('helpdesk:list'),
|
||||||
obj['user'].id,
|
obj['user'].id,
|
||||||
obj['queue'].id,
|
obj['queue'].id,
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
return u'%s?assigned_to=%s' % (
|
return u'%s?assigned_to=%s' % (
|
||||||
reverse('helpdesk_list'),
|
reverse('helpdesk:list'),
|
||||||
obj['user'].id,
|
obj['user'].id,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -101,7 +101,7 @@ class UnassignedTickets(Feed):
|
|||||||
|
|
||||||
title = _('Helpdesk: Unassigned Tickets')
|
title = _('Helpdesk: Unassigned Tickets')
|
||||||
description = _('Unassigned Open and Reopened tickets')
|
description = _('Unassigned Open and Reopened tickets')
|
||||||
link = ''#%s?assigned_to=' % reverse('helpdesk_list')
|
link = ''#%s?assigned_to=' % reverse('helpdesk:list')
|
||||||
|
|
||||||
def items(self, obj):
|
def items(self, obj):
|
||||||
return Ticket.objects.filter(
|
return Ticket.objects.filter(
|
||||||
@ -127,7 +127,7 @@ class RecentFollowUps(Feed):
|
|||||||
|
|
||||||
title = _('Helpdesk: Recent Followups')
|
title = _('Helpdesk: Recent Followups')
|
||||||
description = _('Recent FollowUps, such as e-mail replies, comments, attachments and resolutions')
|
description = _('Recent FollowUps, such as e-mail replies, comments, attachments and resolutions')
|
||||||
link = '/tickets/' # reverse('helpdesk_list')
|
link = '/tickets/' # reverse('helpdesk:list')
|
||||||
|
|
||||||
def items(self):
|
def items(self):
|
||||||
return FollowUp.objects.order_by('-date')[:20]
|
return FollowUp.objects.order_by('-date')[:20]
|
||||||
@ -152,7 +152,7 @@ class OpenTicketsByQueue(Feed):
|
|||||||
|
|
||||||
def link(self, obj):
|
def link(self, obj):
|
||||||
return '%s?queue=%s' % (
|
return '%s?queue=%s' % (
|
||||||
reverse('helpdesk_list'),
|
reverse('helpdesk:list'),
|
||||||
obj.id,
|
obj.id,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -21,16 +21,16 @@ from helpdesk.models import Ticket, Queue, UserSettings, KBCategory
|
|||||||
|
|
||||||
def homepage(request):
|
def homepage(request):
|
||||||
if not request.user.is_authenticated() and helpdesk_settings.HELPDESK_REDIRECT_TO_LOGIN_BY_DEFAULT:
|
if not request.user.is_authenticated() and helpdesk_settings.HELPDESK_REDIRECT_TO_LOGIN_BY_DEFAULT:
|
||||||
return HttpResponseRedirect(reverse('login'))
|
return HttpResponseRedirect(reverse('helpdesk:login'))
|
||||||
|
|
||||||
if (request.user.is_staff or (request.user.is_authenticated() and helpdesk_settings.HELPDESK_ALLOW_NON_STAFF_TICKET_UPDATE)):
|
if (request.user.is_staff or (request.user.is_authenticated() and helpdesk_settings.HELPDESK_ALLOW_NON_STAFF_TICKET_UPDATE)):
|
||||||
try:
|
try:
|
||||||
if getattr(request.user.usersettings.settings, 'login_view_ticketlist', False):
|
if getattr(request.user.usersettings.settings, 'login_view_ticketlist', False):
|
||||||
return HttpResponseRedirect(reverse('helpdesk_list'))
|
return HttpResponseRedirect(reverse('helpdesk:list'))
|
||||||
else:
|
else:
|
||||||
return HttpResponseRedirect(reverse('helpdesk_dashboard'))
|
return HttpResponseRedirect(reverse('helpdesk:dashboard'))
|
||||||
except UserSettings.DoesNotExist:
|
except UserSettings.DoesNotExist:
|
||||||
return HttpResponseRedirect(reverse('helpdesk_dashboard'))
|
return HttpResponseRedirect(reverse('helpdesk:dashboard'))
|
||||||
|
|
||||||
if request.method == 'POST':
|
if request.method == 'POST':
|
||||||
form = PublicTicketForm(request.POST, request.FILES)
|
form = PublicTicketForm(request.POST, request.FILES)
|
||||||
@ -42,7 +42,7 @@ def homepage(request):
|
|||||||
else:
|
else:
|
||||||
ticket = form.save()
|
ticket = form.save()
|
||||||
return HttpResponseRedirect('%s?ticket=%s&email=%s'% (
|
return HttpResponseRedirect('%s?ticket=%s&email=%s'% (
|
||||||
reverse('helpdesk_public_view'),
|
reverse('helpdesk:public_view'),
|
||||||
ticket.ticket_for_url,
|
ticket.ticket_for_url,
|
||||||
ticket.submitter_email)
|
ticket.submitter_email)
|
||||||
)
|
)
|
||||||
@ -91,7 +91,7 @@ def view_ticket(request):
|
|||||||
if ticket:
|
if ticket:
|
||||||
|
|
||||||
if request.user.is_staff:
|
if request.user.is_staff:
|
||||||
redirect_url = reverse('helpdesk_view', args=[ticket_id])
|
redirect_url = reverse('helpdesk:view', args=[ticket_id])
|
||||||
if 'close' in request.GET:
|
if 'close' in request.GET:
|
||||||
redirect_url += '?close'
|
redirect_url += '?close'
|
||||||
return HttpResponseRedirect(redirect_url)
|
return HttpResponseRedirect(redirect_url)
|
||||||
@ -115,7 +115,7 @@ def view_ticket(request):
|
|||||||
# redirect user back to this ticket if possible.
|
# redirect user back to this ticket if possible.
|
||||||
redirect_url = ''
|
redirect_url = ''
|
||||||
if helpdesk_settings.HELPDESK_NAVIGATION_ENABLED:
|
if helpdesk_settings.HELPDESK_NAVIGATION_ENABLED:
|
||||||
redirect_url = reverse('helpdesk_view', args=[ticket_id])
|
redirect_url = reverse('helpdesk:view', args=[ticket_id])
|
||||||
|
|
||||||
return render_to_response('helpdesk/public_view_ticket.html',
|
return render_to_response('helpdesk/public_view_ticket.html',
|
||||||
RequestContext(request, {
|
RequestContext(request, {
|
||||||
|
@ -174,7 +174,7 @@ def delete_ticket(request, ticket_id):
|
|||||||
}))
|
}))
|
||||||
else:
|
else:
|
||||||
ticket.delete()
|
ticket.delete()
|
||||||
return HttpResponseRedirect(reverse('helpdesk_home'))
|
return HttpResponseRedirect(reverse('helpdesk:home'))
|
||||||
delete_ticket = staff_member_required(delete_ticket)
|
delete_ticket = staff_member_required(delete_ticket)
|
||||||
|
|
||||||
def followup_edit(request, ticket_id, followup_id):
|
def followup_edit(request, ticket_id, followup_id):
|
||||||
@ -223,7 +223,7 @@ def followup_edit(request, ticket_id, followup_id):
|
|||||||
attachment.save()
|
attachment.save()
|
||||||
# delete old followup
|
# delete old followup
|
||||||
followup.delete()
|
followup.delete()
|
||||||
return HttpResponseRedirect(reverse('helpdesk_view', args=[ticket.id]))
|
return HttpResponseRedirect(reverse('helpdesk:view', args=[ticket.id]))
|
||||||
followup_edit = staff_member_required(followup_edit)
|
followup_edit = staff_member_required(followup_edit)
|
||||||
|
|
||||||
def followup_delete(request, ticket_id, followup_id):
|
def followup_delete(request, ticket_id, followup_id):
|
||||||
@ -231,11 +231,11 @@ def followup_delete(request, ticket_id, followup_id):
|
|||||||
|
|
||||||
ticket = get_object_or_404(Ticket, id=ticket_id)
|
ticket = get_object_or_404(Ticket, id=ticket_id)
|
||||||
if not request.user.is_superuser:
|
if not request.user.is_superuser:
|
||||||
return HttpResponseRedirect(reverse('helpdesk_view', args=[ticket.id]))
|
return HttpResponseRedirect(reverse('helpdesk:view', args=[ticket.id]))
|
||||||
|
|
||||||
followup = get_object_or_404(FollowUp, id=followup_id)
|
followup = get_object_or_404(FollowUp, id=followup_id)
|
||||||
followup.delete()
|
followup.delete()
|
||||||
return HttpResponseRedirect(reverse('helpdesk_view', args=[ticket.id]))
|
return HttpResponseRedirect(reverse('helpdesk:view', args=[ticket.id]))
|
||||||
followup_delete = staff_member_required(followup_delete)
|
followup_delete = staff_member_required(followup_delete)
|
||||||
|
|
||||||
|
|
||||||
@ -262,7 +262,7 @@ def view_ticket(request, ticket_id):
|
|||||||
ticketcc_string, SHOW_SUBSCRIBE = return_ticketccstring_and_show_subscribe(request.user, ticket)
|
ticketcc_string, SHOW_SUBSCRIBE = return_ticketccstring_and_show_subscribe(request.user, ticket)
|
||||||
if SHOW_SUBSCRIBE:
|
if SHOW_SUBSCRIBE:
|
||||||
subscribe_staff_member_to_ticket(ticket, request.user)
|
subscribe_staff_member_to_ticket(ticket, request.user)
|
||||||
return HttpResponseRedirect(reverse('helpdesk_view', args=[ticket.id]))
|
return HttpResponseRedirect(reverse('helpdesk:view', args=[ticket.id]))
|
||||||
|
|
||||||
if 'close' in request.GET and ticket.status == Ticket.RESOLVED_STATUS:
|
if 'close' in request.GET and ticket.status == Ticket.RESOLVED_STATUS:
|
||||||
if not ticket.assigned_to:
|
if not ticket.assigned_to:
|
||||||
@ -351,7 +351,7 @@ def subscribe_staff_member_to_ticket(ticket, user):
|
|||||||
|
|
||||||
def update_ticket(request, ticket_id, public=False):
|
def update_ticket(request, ticket_id, public=False):
|
||||||
if not (public or (request.user.is_authenticated() and request.user.is_active and (request.user.is_staff or helpdesk_settings.HELPDESK_ALLOW_NON_STAFF_TICKET_UPDATE))):
|
if not (public or (request.user.is_authenticated() and request.user.is_active and (request.user.is_staff or helpdesk_settings.HELPDESK_ALLOW_NON_STAFF_TICKET_UPDATE))):
|
||||||
return HttpResponseRedirect('%s?next=%s' % (reverse('login'), request.path))
|
return HttpResponseRedirect('%s?next=%s' % (reverse('helpdesk:login'), request.path))
|
||||||
|
|
||||||
ticket = get_object_or_404(Ticket, id=ticket_id)
|
ticket = get_object_or_404(Ticket, id=ticket_id)
|
||||||
|
|
||||||
@ -618,7 +618,7 @@ def mass_update(request):
|
|||||||
tickets = request.POST.getlist('ticket_id')
|
tickets = request.POST.getlist('ticket_id')
|
||||||
action = request.POST.get('action', None)
|
action = request.POST.get('action', None)
|
||||||
if not (tickets and action):
|
if not (tickets and action):
|
||||||
return HttpResponseRedirect(reverse('helpdesk_list'))
|
return HttpResponseRedirect(reverse('helpdesk:list'))
|
||||||
|
|
||||||
if action.startswith('assign_'):
|
if action.startswith('assign_'):
|
||||||
parts = action.split('_')
|
parts = action.split('_')
|
||||||
@ -704,7 +704,7 @@ def mass_update(request):
|
|||||||
elif action == 'delete':
|
elif action == 'delete':
|
||||||
t.delete()
|
t.delete()
|
||||||
|
|
||||||
return HttpResponseRedirect(reverse('helpdesk_list'))
|
return HttpResponseRedirect(reverse('helpdesk:list'))
|
||||||
mass_update = staff_member_required(mass_update)
|
mass_update = staff_member_required(mass_update)
|
||||||
|
|
||||||
def ticket_list(request):
|
def ticket_list(request):
|
||||||
@ -766,9 +766,9 @@ def ticket_list(request):
|
|||||||
try:
|
try:
|
||||||
saved_query = SavedSearch.objects.get(pk=request.GET.get('saved_query'))
|
saved_query = SavedSearch.objects.get(pk=request.GET.get('saved_query'))
|
||||||
except SavedSearch.DoesNotExist:
|
except SavedSearch.DoesNotExist:
|
||||||
return HttpResponseRedirect(reverse('helpdesk_list'))
|
return HttpResponseRedirect(reverse('helpdesk:list'))
|
||||||
if not (saved_query.shared or saved_query.user == request.user):
|
if not (saved_query.shared or saved_query.user == request.user):
|
||||||
return HttpResponseRedirect(reverse('helpdesk_list'))
|
return HttpResponseRedirect(reverse('helpdesk:list'))
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import pickle
|
import pickle
|
||||||
@ -941,7 +941,7 @@ def create_ticket(request):
|
|||||||
if _has_access_to_queue(request.user, ticket.queue):
|
if _has_access_to_queue(request.user, ticket.queue):
|
||||||
return HttpResponseRedirect(ticket.get_absolute_url())
|
return HttpResponseRedirect(ticket.get_absolute_url())
|
||||||
else:
|
else:
|
||||||
return HttpResponseRedirect(reverse('helpdesk_dashboard'))
|
return HttpResponseRedirect(reverse('helpdesk:dashboard'))
|
||||||
else:
|
else:
|
||||||
initial_data = {}
|
initial_data = {}
|
||||||
if request.user.usersettings.settings.get('use_email_as_submitter', False) and request.user.email:
|
if request.user.usersettings.settings.get('use_email_as_submitter', False) and request.user.email:
|
||||||
@ -1048,9 +1048,9 @@ def run_report(request, report):
|
|||||||
try:
|
try:
|
||||||
saved_query = SavedSearch.objects.get(pk=request.GET.get('saved_query'))
|
saved_query = SavedSearch.objects.get(pk=request.GET.get('saved_query'))
|
||||||
except SavedSearch.DoesNotExist:
|
except SavedSearch.DoesNotExist:
|
||||||
return HttpResponseRedirect(reverse('helpdesk_report_index'))
|
return HttpResponseRedirect(reverse('helpdesk:report_index'))
|
||||||
if not (saved_query.shared or saved_query.user == request.user):
|
if not (saved_query.shared or saved_query.user == request.user):
|
||||||
return HttpResponseRedirect(reverse('helpdesk_report_index'))
|
return HttpResponseRedirect(reverse('helpdesk:report_index'))
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import pickle
|
import pickle
|
||||||
@ -1215,12 +1215,12 @@ def save_query(request):
|
|||||||
query_encoded = request.POST.get('query_encoded', None)
|
query_encoded = request.POST.get('query_encoded', None)
|
||||||
|
|
||||||
if not title or not query_encoded:
|
if not title or not query_encoded:
|
||||||
return HttpResponseRedirect(reverse('helpdesk_list'))
|
return HttpResponseRedirect(reverse('helpdesk:list'))
|
||||||
|
|
||||||
query = SavedSearch(title=title, shared=shared, query=query_encoded, user=request.user)
|
query = SavedSearch(title=title, shared=shared, query=query_encoded, user=request.user)
|
||||||
query.save()
|
query.save()
|
||||||
|
|
||||||
return HttpResponseRedirect('%s?saved_query=%s' % (reverse('helpdesk_list'), query.id))
|
return HttpResponseRedirect('%s?saved_query=%s' % (reverse('helpdesk:list'), query.id))
|
||||||
save_query = staff_member_required(save_query)
|
save_query = staff_member_required(save_query)
|
||||||
|
|
||||||
|
|
||||||
@ -1229,7 +1229,7 @@ def delete_saved_query(request, id):
|
|||||||
|
|
||||||
if request.method == 'POST':
|
if request.method == 'POST':
|
||||||
query.delete()
|
query.delete()
|
||||||
return HttpResponseRedirect(reverse('helpdesk_list'))
|
return HttpResponseRedirect(reverse('helpdesk:list'))
|
||||||
else:
|
else:
|
||||||
return render_to_response('helpdesk/confirm_delete_saved_query.html',
|
return render_to_response('helpdesk/confirm_delete_saved_query.html',
|
||||||
RequestContext(request, {
|
RequestContext(request, {
|
||||||
@ -1268,7 +1268,7 @@ def email_ignore_add(request):
|
|||||||
form = EmailIgnoreForm(request.POST)
|
form = EmailIgnoreForm(request.POST)
|
||||||
if form.is_valid():
|
if form.is_valid():
|
||||||
ignore = form.save()
|
ignore = form.save()
|
||||||
return HttpResponseRedirect(reverse('helpdesk_email_ignore'))
|
return HttpResponseRedirect(reverse('helpdesk:email_ignore'))
|
||||||
else:
|
else:
|
||||||
form = EmailIgnoreForm(request.GET)
|
form = EmailIgnoreForm(request.GET)
|
||||||
|
|
||||||
@ -1283,7 +1283,7 @@ def email_ignore_del(request, id):
|
|||||||
ignore = get_object_or_404(IgnoreEmail, id=id)
|
ignore = get_object_or_404(IgnoreEmail, id=id)
|
||||||
if request.method == 'POST':
|
if request.method == 'POST':
|
||||||
ignore.delete()
|
ignore.delete()
|
||||||
return HttpResponseRedirect(reverse('helpdesk_email_ignore'))
|
return HttpResponseRedirect(reverse('helpdesk:email_ignore'))
|
||||||
else:
|
else:
|
||||||
return render_to_response('helpdesk/email_ignore_del.html',
|
return render_to_response('helpdesk/email_ignore_del.html',
|
||||||
RequestContext(request, {
|
RequestContext(request, {
|
||||||
@ -1315,7 +1315,7 @@ def ticket_cc_add(request, ticket_id):
|
|||||||
ticketcc = form.save(commit=False)
|
ticketcc = form.save(commit=False)
|
||||||
ticketcc.ticket = ticket
|
ticketcc.ticket = ticket
|
||||||
ticketcc.save()
|
ticketcc.save()
|
||||||
return HttpResponseRedirect(reverse('helpdesk_ticket_cc', kwargs={'ticket_id': ticket.id}))
|
return HttpResponseRedirect(reverse('helpdesk:ticket_cc', kwargs={'ticket_id': ticket.id}))
|
||||||
else:
|
else:
|
||||||
form = TicketCCForm()
|
form = TicketCCForm()
|
||||||
return render_to_response('helpdesk/ticket_cc_add.html',
|
return render_to_response('helpdesk/ticket_cc_add.html',
|
||||||
@ -1330,7 +1330,7 @@ def ticket_cc_del(request, ticket_id, cc_id):
|
|||||||
|
|
||||||
if request.method == 'POST':
|
if request.method == 'POST':
|
||||||
cc.delete()
|
cc.delete()
|
||||||
return HttpResponseRedirect(reverse('helpdesk_ticket_cc', kwargs={'ticket_id': cc.ticket.id}))
|
return HttpResponseRedirect(reverse('helpdesk:ticket_cc', kwargs={'ticket_id': cc.ticket.id}))
|
||||||
return render_to_response('helpdesk/ticket_cc_del.html',
|
return render_to_response('helpdesk/ticket_cc_del.html',
|
||||||
RequestContext(request, {
|
RequestContext(request, {
|
||||||
'cc': cc,
|
'cc': cc,
|
||||||
@ -1348,7 +1348,7 @@ def ticket_dependency_add(request, ticket_id):
|
|||||||
ticketdependency.ticket = ticket
|
ticketdependency.ticket = ticket
|
||||||
if ticketdependency.ticket != ticketdependency.depends_on:
|
if ticketdependency.ticket != ticketdependency.depends_on:
|
||||||
ticketdependency.save()
|
ticketdependency.save()
|
||||||
return HttpResponseRedirect(reverse('helpdesk_view', args=[ticket.id]))
|
return HttpResponseRedirect(reverse('helpdesk:view', args=[ticket.id]))
|
||||||
else:
|
else:
|
||||||
form = TicketDependencyForm()
|
form = TicketDependencyForm()
|
||||||
return render_to_response('helpdesk/ticket_dependency_add.html',
|
return render_to_response('helpdesk/ticket_dependency_add.html',
|
||||||
@ -1362,7 +1362,7 @@ def ticket_dependency_del(request, ticket_id, dependency_id):
|
|||||||
dependency = get_object_or_404(TicketDependency, ticket__id=ticket_id, id=dependency_id)
|
dependency = get_object_or_404(TicketDependency, ticket__id=ticket_id, id=dependency_id)
|
||||||
if request.method == 'POST':
|
if request.method == 'POST':
|
||||||
dependency.delete()
|
dependency.delete()
|
||||||
return HttpResponseRedirect(reverse('helpdesk_view', args=[ticket_id]))
|
return HttpResponseRedirect(reverse('helpdesk:view', args=[ticket_id]))
|
||||||
return render_to_response('helpdesk/ticket_dependency_del.html',
|
return render_to_response('helpdesk/ticket_dependency_del.html',
|
||||||
RequestContext(request, {
|
RequestContext(request, {
|
||||||
'dependency': dependency,
|
'dependency': dependency,
|
||||||
@ -1375,7 +1375,7 @@ def attachment_del(request, ticket_id, attachment_id):
|
|||||||
raise PermissionDenied()
|
raise PermissionDenied()
|
||||||
attachment = get_object_or_404(Attachment, id=attachment_id)
|
attachment = get_object_or_404(Attachment, id=attachment_id)
|
||||||
attachment.delete()
|
attachment.delete()
|
||||||
return HttpResponseRedirect(reverse('helpdesk_view', args=[ticket_id]))
|
return HttpResponseRedirect(reverse('helpdesk:view', args=[ticket_id]))
|
||||||
attachment_del = staff_member_required(attachment_del)
|
attachment_del = staff_member_required(attachment_del)
|
||||||
|
|
||||||
def calc_average_nbr_days_until_ticket_resolved(Tickets):
|
def calc_average_nbr_days_until_ticket_resolved(Tickets):
|
||||||
|
Loading…
Reference in New Issue
Block a user