mirror of
https://gitea.mueller.network/extern/django-helpdesk.git
synced 2024-11-22 07:53:19 +01:00
Merge commit 'fd0ab29dfcfc263be686c8351f4dc5880e3e1b9b' into template-cleanup
Conflicts: helpdesk/templates/helpdesk/dashboard.html helpdesk/templates/helpdesk/kb_category.html helpdesk/templates/helpdesk/ticket_desc_table.html
This commit is contained in:
commit
df32432685
@ -30,17 +30,18 @@ Adding To Your Django Project
|
||||
-----------------------------
|
||||
|
||||
1. Edit your ``settings.py`` file and add ``helpdesk`` to the ``INSTALLED_APPS`` setting. You also need ``django.contrib.admin`` and ``django.contrib.markup`` in ``INSTALLED_APPS`` if you haven't already added it. eg::
|
||||
|
||||
|
||||
INSTALLED_APPS = (
|
||||
'django.contrib.auth',
|
||||
'django.contrib.contenttypes',
|
||||
'django.contrib.sessions',
|
||||
'django.contrib.sites',
|
||||
'django.contrib.admin', # Required for helpdesk admin/maintenance
|
||||
'django.contrib.markup', # Required for helpdesk text display
|
||||
'south', # Highly recommended to make database migrations simpler.
|
||||
'markdown_deux', # Required for Knowledgebase item formatting
|
||||
'helpdesk', # This is new!
|
||||
'django.contrib.admin', # Required for helpdesk admin/maintenance
|
||||
'django.contrib.markup', # Required for helpdesk text display
|
||||
'django.contrib.humanize', # Required for elapsed time formatting
|
||||
'south', # Highly recommended to make database migrations simpler.
|
||||
'markdown_deux', # Required for Knowledgebase item formatting
|
||||
'helpdesk', # This is new!
|
||||
)
|
||||
|
||||
2. Make sure django-helpdesk is accessible via ``urls.py``. Add the following line to ``urls.py``::
|
||||
@ -48,7 +49,7 @@ Adding To Your Django Project
|
||||
(r'helpdesk/', include('helpdesk.urls')),
|
||||
|
||||
Note that you can change 'helpdesk/' to anything you like, such as 'support/' or 'help/'. If you want django-helpdesk to be available at the root of your site (for example at http://support.mysite.tld/) then the line will be as follows::
|
||||
|
||||
|
||||
(r'', include('helpdesk.urls')),
|
||||
|
||||
This line will have to come *after* any other lines in your urls.py such as those used by the Django admin.
|
||||
|
@ -1,4 +1,4 @@
|
||||
{% extends "helpdesk/base.html" %}{% load i18n %}{% load url from future %}
|
||||
{% extends "helpdesk/base.html" %}{% load i18n humanize %}{% load url from future %}
|
||||
{% block helpdesk_title %}{% trans "Helpdesk Dashboard" %}{% endblock %}
|
||||
|
||||
{% block helpdesk_body %}
|
||||
@ -63,7 +63,7 @@
|
||||
<th><a href='{{ ticket.get_absolute_url }}'>{{ ticket.title }}</a></th>
|
||||
<td>{{ ticket.queue }}</td>
|
||||
<td>{{ ticket.get_status }}</td>
|
||||
<td><span title='{{ ticket.modified|date:"r" }}'>{{ ticket.modified|timesince }}</span></td>
|
||||
<td><span title='{{ ticket.modified|date:"r" }}'>{{ ticket.modified|naturaltime }}</span></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
@ -83,7 +83,7 @@
|
||||
<th><a href='{{ ticket.get_absolute_url }}'>{{ ticket.title }}</a></th>
|
||||
<td>{{ ticket.queue }}</td>
|
||||
<td>{{ ticket.get_status }}</td>
|
||||
<td><span title='{{ ticket.modified|date:"r" }}'>{{ ticket.modified|timesince }}</span></td>
|
||||
<td><span title='{{ ticket.modified|date:"r" }}'>{{ ticket.modified|naturaltime }}</span></td>
|
||||
</tr>
|
||||
{% empty %}
|
||||
<tr><td colspan='6'>{% trans "You have no tickets assigned to you." %}</td></tr>
|
||||
@ -103,7 +103,7 @@
|
||||
<td>{{ ticket.get_priority_span }}</td>
|
||||
<th><a href='{{ ticket.get_absolute_url }}'>{{ ticket.title }}</a></th>
|
||||
<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|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>
|
||||
</tr>
|
||||
{% empty %}
|
||||
@ -127,7 +127,7 @@
|
||||
<th><a href='{{ ticket.get_absolute_url }}'>{{ ticket.title }}</a></th>
|
||||
<td>{{ ticket.queue }}</td>
|
||||
<td>{{ ticket.get_status }}</td>
|
||||
<td><span title='{{ ticket.modified|date:"r" }}'>{{ ticket.modified|timesince }}</span></td>
|
||||
<td><span title='{{ ticket.modified|date:"r" }}'>{{ ticket.modified|naturaltime }}</span></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
|
@ -1,4 +1,4 @@
|
||||
{% extends "helpdesk/public_base.html" %}{% load i18n %}
|
||||
{% extends "helpdesk/public_base.html" %}{% load i18n humanize %}
|
||||
|
||||
{% block helpdesk_body %}
|
||||
<h2>{% blocktrans with category.title as kbcat %}Knowledgebase Category: {{ kbcat }}{% endblocktrans %}</h2>
|
||||
@ -14,7 +14,7 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for item in items %}
|
||||
<tr><th><a href='{{ item.get_absolute_url }}'>{{ item.title }}</a></th><td>Rating: {{ item.score }}</td><td>Last Update: {{ item.last_updated|timesince }} ago</td></tr>
|
||||
<tr><th><a href='{{ item.get_absolute_url }}'>{{ item.title }}</a></th><td>Rating: {{ item.score }}</td><td>Last Update: {{ item.last_updated|naturaltime }}</td></tr>
|
||||
<tr><td colspan='3'>{{ item.question }}</td></tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
|
@ -1,4 +1,4 @@
|
||||
{% extends "helpdesk/public_base.html" %}{% load i18n %}
|
||||
{% extends "helpdesk/public_base.html" %}{% load i18n humanize %}
|
||||
{% block helpdesk_title %}{% trans "View a Ticket" %}{% endblock %}
|
||||
|
||||
{% block helpdesk_body %}
|
||||
@ -11,7 +11,7 @@
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>{% trans "Submitted On" %}</th>
|
||||
<td>{{ ticket.created|date:"r" }} ({{ ticket.created|timesince }} ago)</td>
|
||||
<td>{{ ticket.created|date:"r" }} ({{ ticket.created|naturaltime }})</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
@ -58,7 +58,7 @@
|
||||
{% load ticket_to_link %}
|
||||
{% for followup in ticket.followup_set.public_followups %}
|
||||
<div class='followup well'>
|
||||
<div class='title'>{{ followup.title }} <span class='byline text-info'>{% if followup.user %}by {{ followup.user }}{% endif %} <span title='{{ followup.date|date:"r" }}'>{{ followup.date|timesince }} ago</span></span></div>
|
||||
<div class='title'>{{ followup.title }} <span class='byline text-info'>{% if followup.user %}by {{ followup.user }}{% endif %} <span title='{{ followup.date|date:"r" }}'>{{ followup.date|naturaltime }}</span></span></div>
|
||||
{{ followup.comment|force_escape|urlizetrunc:50|num_to_link|linebreaksbr }}
|
||||
{% if followup.ticketchange_set.all %}<div class='changes'><ul>
|
||||
{% for change in followup.ticketchange_set.all %}
|
||||
|
@ -1,4 +1,4 @@
|
||||
{% extends "helpdesk/base.html" %}{% load i18n bootstrap %}{% load url from future %}
|
||||
{% extends "helpdesk/base.html" %}{% load i18n bootstrap humanize %}{% load url from future %}
|
||||
{% block helpdesk_title %}{% trans "View Ticket Details" %}{% endblock %}
|
||||
{% block helpdesk_head %}
|
||||
<script type="text/javascript">
|
||||
@ -8,7 +8,7 @@
|
||||
$("#ShowFurtherOptPara").hide();
|
||||
return false;
|
||||
});
|
||||
|
||||
|
||||
processAddFileClick();
|
||||
$("#ShowFileUpload").click(function() {
|
||||
$("#FileUpload").fadeIn();
|
||||
@ -27,7 +27,7 @@
|
||||
});
|
||||
|
||||
function processAddFileClick() {
|
||||
/* Until jQuery includes some 'livequery' functionality in the core
|
||||
/* Until jQuery includes some 'livequery' functionality in the core
|
||||
distribution, this will have to do. */
|
||||
$(".AddAnotherFile>a").click(function() {
|
||||
$(this).parent().remove();
|
||||
@ -69,7 +69,7 @@ function googleTranslateElementInit() {
|
||||
{% if helpdesk_settings.HELPDESK_FOLLOWUP_MOD %}
|
||||
<div class='followup_mod'>
|
||||
<div class='title'>
|
||||
<span class='byline text-info'>{{ followup.user.get_full_name }} {{ followup.date }} ({{ followup.date|timesince }} ago)</span> <small>{{ followup.title }}</small>
|
||||
<span class='byline text-info'>{{ followup.user.get_full_name }} {{ followup.date }} ({{ followup.date|naturaltime }})</span> <small>{{ followup.title }}</small>
|
||||
{% if not followup.public %} <span class='private'>({% trans "Private" %})</span>{% endif %}
|
||||
{% if helpdesk_settings.HELPDESK_SHOW_EDIT_BUTTON_FOLLOW_UP %}
|
||||
{% if followup.user and request.user == followup.user and not followup.ticketchange_set.all %}
|
||||
@ -83,7 +83,7 @@ function googleTranslateElementInit() {
|
||||
{% else %}
|
||||
<div class='followup well'>
|
||||
<div class='title'>
|
||||
{{ followup.title }} <span class='byline text-info'>{% 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 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 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>
|
||||
@ -141,25 +141,25 @@ function googleTranslateElementInit() {
|
||||
<input type='radio' name='new_status' value='5' id='st_duplicate'><label for='st_duplicate'>{% trans "Duplicate" %}</label></dd>
|
||||
{% endifequal %}
|
||||
{% ifequal ticket.status 2 %}
|
||||
<dd><input type='radio' name='new_status' value='2' id='st_reopened' checked='checked'><label for='st_reopened' class='active'>{% trans "Reopened" %}</label> »
|
||||
<input type='radio' name='new_status' value='3' id='st_resolved'{% if not ticket.can_be_resolved %} disabled='disabled'{% endif %}><label for='st_resolved'>{% trans "Resolved" %}</label> »
|
||||
<input type='radio' name='new_status' value='4' id='st_closed'{% if not ticket.can_be_resolved %} disabled='disabled'{% endif %}><label for='st_closed'>{% trans "Closed" %}</label> »
|
||||
<dd><input type='radio' name='new_status' value='2' id='st_reopened' checked='checked'><label for='st_reopened' class='active'>{% trans "Reopened" %}</label> »
|
||||
<input type='radio' name='new_status' value='3' id='st_resolved'{% if not ticket.can_be_resolved %} disabled='disabled'{% endif %}><label for='st_resolved'>{% trans "Resolved" %}</label> »
|
||||
<input type='radio' name='new_status' value='4' id='st_closed'{% if not ticket.can_be_resolved %} disabled='disabled'{% endif %}><label for='st_closed'>{% trans "Closed" %}</label> »
|
||||
<input type='radio' name='new_status' value='5' id='st_duplicate'><label for='st_duplicate'>{% trans "Duplicate" %}</label></dd>
|
||||
{% endifequal %}
|
||||
{% ifequal ticket.status 3 %}
|
||||
<dd><input type='radio' name='new_status' value='2' id='st_reopened'><label for='st_reopened'>{% trans "Reopened" %}</label> «
|
||||
<input type='radio' name='new_status' value='3' id='st_resolved' checked='checked'><label for='st_resolved' class='active'>{% trans "Resolved" %}</label> »
|
||||
<dd><input type='radio' name='new_status' value='2' id='st_reopened'><label for='st_reopened'>{% trans "Reopened" %}</label> «
|
||||
<input type='radio' name='new_status' value='3' id='st_resolved' checked='checked'><label for='st_resolved' class='active'>{% trans "Resolved" %}</label> »
|
||||
<input type='radio' name='new_status' value='4' id='st_closed'><label for='st_closed'>{% trans "Closed" %}</label></dd>
|
||||
{% endifequal %}
|
||||
{% ifequal ticket.status 4 %}
|
||||
<dd><input type='radio' name='new_status' value='2' id='st_reopened'><label for='st_reopened'>{% trans "Reopened" %}</label> «
|
||||
<dd><input type='radio' name='new_status' value='2' id='st_reopened'><label for='st_reopened'>{% trans "Reopened" %}</label> «
|
||||
<input type='radio' name='new_status' value='4' id='st_closed' checked='checked'><label for='st_closed'>{% trans "Closed" %}</label></dd>
|
||||
{% endifequal %}
|
||||
{% ifequal ticket.status 5 %}
|
||||
<dd><input type='radio' name='new_status' value='2' id='st_reopened'><label for='st_reopened'>{% trans "Reopened" %}</label> «
|
||||
<dd><input type='radio' name='new_status' value='2' id='st_reopened'><label for='st_reopened'>{% trans "Reopened" %}</label> «
|
||||
<input type='radio' name='new_status' value='5' id='st_duplicate' checked='checked'><label for='st_duplicate'>{% trans "Duplicate" %}</label></dd>
|
||||
{% endifequal %}
|
||||
|
||||
|
||||
{% if helpdesk_settings.HELPDESK_UPDATE_PUBLIC_DEFAULT %}
|
||||
<input type='hidden' name='public' value='1'>
|
||||
{% else %}
|
||||
@ -185,7 +185,7 @@ function googleTranslateElementInit() {
|
||||
<dd><select id='id_priority' name='priority'>{% for p in priorities %}<option value='{{ p.0 }}'{% ifequal p.0 ticket.priority %} selected='selected'{% endifequal %}>{{ p.1 }}</option>{% endfor %}</select></dd>
|
||||
<dt><label for='id_due_date'>{% trans "Due on" %}</label></dt>
|
||||
<dd>{{ form.due_date }}</dd>
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
</div>
|
||||
|
@ -1,4 +1,4 @@
|
||||
{% load i18n %}{% load url from future %}
|
||||
{% load i18n humanize %}{% load url from future %}
|
||||
<table class="table table-hover table-bordered table-striped">
|
||||
<thead>
|
||||
<tr class='row_tablehead'><td colspan='2'><h3>{{ ticket.id }}. {{ ticket.title }} [{{ ticket.get_status }}]</h3> <span class='ticket_toolbar'>
|
||||
@ -30,7 +30,7 @@
|
||||
</tr>{% endif %}
|
||||
<tr>
|
||||
<th>{% trans "Submitted On" %}</th>
|
||||
<td>{{ ticket.created|date:"r" }} ({{ ticket.created|timesince }} ago)</td>
|
||||
<td>{{ ticket.created|date:"r" }} ({{ ticket.created|naturaltime }})</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
@ -1,4 +1,4 @@
|
||||
{% extends "helpdesk/base.html" %}{% load i18n %}{% load url from future %}
|
||||
{% extends "helpdesk/base.html" %}{% load i18n humanize %}{% load url from future %}
|
||||
{% block helpdesk_title %}{% trans "Tickets" %}{% endblock %}
|
||||
{% block helpdesk_head %}
|
||||
|
||||
@ -231,7 +231,7 @@ $(document).ready(function() {
|
||||
<th><a href='{{ ticket.get_absolute_url }}'>{{ ticket.title }}</a></th>
|
||||
<td>{{ ticket.queue }}</td>
|
||||
<td>{{ ticket.get_status }}</td>
|
||||
<td><span title='{{ ticket.created|date:"r" }}'>{{ ticket.created|timesince }} ago</span></td>
|
||||
<td><span title='{{ ticket.created|date:"r" }}'>{{ ticket.created|naturaltime }}</span></td>
|
||||
<td>{{ ticket.get_assigned_to }}</td>
|
||||
</tr>
|
||||
{% empty %}
|
||||
|
@ -11,7 +11,7 @@ class QuickDjangoTest(object):
|
||||
|
||||
>>> QuickDjangoTest('app1', 'app2')
|
||||
|
||||
Based on a script published by Lukasz Dziedzia at:
|
||||
Based on a script published by Lukasz Dziedzia at:
|
||||
http://stackoverflow.com/questions/3841725/how-to-launch-tests-for-django-reusable-app
|
||||
"""
|
||||
DIRNAME = os.path.dirname(__file__)
|
||||
@ -22,6 +22,7 @@ class QuickDjangoTest(object):
|
||||
'django.contrib.admin',
|
||||
'django.contrib.staticfiles',
|
||||
'django.contrib.messages',
|
||||
'django.contrib.humanize',
|
||||
'bootstrapform',
|
||||
)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user