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:
Stefano Brentegani 2014-07-22 07:28:04 +02:00
commit df32432685
8 changed files with 38 additions and 36 deletions

View File

@ -38,6 +38,7 @@ Adding To Your Django Project
'django.contrib.sites',
'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!

View File

@ -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>

View File

@ -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>

View File

@ -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 %}

View File

@ -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">
@ -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 }}&nbsp;&nbsp;&nbsp;&nbsp;{{ followup.date }} ({{ followup.date|timesince }} ago)</span> <small>{{ followup.title }}</small>
<span class='byline text-info'>{{ followup.user.get_full_name }}&nbsp;&nbsp;&nbsp;&nbsp;{{ 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>

View File

@ -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>

View File

@ -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 %}

View File

@ -22,6 +22,7 @@ class QuickDjangoTest(object):
'django.contrib.admin',
'django.contrib.staticfiles',
'django.contrib.messages',
'django.contrib.humanize',
'bootstrapform',
)