diff --git a/helpdesk/models.py b/helpdesk/models.py index 8599093a..9ac917b6 100644 --- a/helpdesk/models.py +++ b/helpdesk/models.py @@ -461,12 +461,6 @@ class Ticket(models.Model): return u"%s-%s" % (self.queue.slug, self.id) ticket_for_url = property(_get_ticket_for_url) - def _get_priority_img(self): - """ Image-based representation of the priority """ - from django.conf import settings - return u"%shelpdesk/priorities/priority%s.png" % (settings.MEDIA_URL, self.priority) - get_priority_img = property(_get_priority_img) - def _get_priority_css_class(self): """ Return the boostrap class corresponding to the priority. @@ -475,6 +469,8 @@ class Ticket(models.Model): return "warning" elif self.priority == 1: return "danger" + elif self.priority == 5: + return "success" else: return "" get_priority_css_class = property(_get_priority_css_class) diff --git a/helpdesk/static/helpdesk/buttons/accept.png b/helpdesk/static/helpdesk/buttons/accept.png deleted file mode 100644 index 68dcd1be..00000000 Binary files a/helpdesk/static/helpdesk/buttons/accept.png and /dev/null differ diff --git a/helpdesk/static/helpdesk/buttons/button_template.psd b/helpdesk/static/helpdesk/buttons/button_template.psd deleted file mode 100644 index e2f86273..00000000 Binary files a/helpdesk/static/helpdesk/buttons/button_template.psd and /dev/null differ diff --git a/helpdesk/static/helpdesk/buttons/button_template.txt b/helpdesk/static/helpdesk/buttons/button_template.txt deleted file mode 100644 index dd602c55..00000000 --- a/helpdesk/static/helpdesk/buttons/button_template.txt +++ /dev/null @@ -1,5 +0,0 @@ -* Use this template to create new buttons -* Typeface: Delicious, Roman, 12pt, Sharp Anti-Aliasing - http://www.josbuivenga.demon.nl/delicious.html -* Icons: Diagona (10px versions) - http://www.pinvoke.com/ - I purchased these before they were creative-commons, I believe this gives me rights to use them without attribution. diff --git a/helpdesk/static/helpdesk/buttons/delete.png b/helpdesk/static/helpdesk/buttons/delete.png deleted file mode 100644 index 3168bf9f..00000000 Binary files a/helpdesk/static/helpdesk/buttons/delete.png and /dev/null differ diff --git a/helpdesk/static/helpdesk/buttons/edit.png b/helpdesk/static/helpdesk/buttons/edit.png deleted file mode 100644 index 5b9fe73b..00000000 Binary files a/helpdesk/static/helpdesk/buttons/edit.png and /dev/null differ diff --git a/helpdesk/static/helpdesk/buttons/take.png b/helpdesk/static/helpdesk/buttons/take.png deleted file mode 100644 index cea725f4..00000000 Binary files a/helpdesk/static/helpdesk/buttons/take.png and /dev/null differ diff --git a/helpdesk/static/helpdesk/priorities/priority1.png b/helpdesk/static/helpdesk/priorities/priority1.png deleted file mode 100644 index c09c1954..00000000 Binary files a/helpdesk/static/helpdesk/priorities/priority1.png and /dev/null differ diff --git a/helpdesk/static/helpdesk/priorities/priority2.png b/helpdesk/static/helpdesk/priorities/priority2.png deleted file mode 100644 index c109d039..00000000 Binary files a/helpdesk/static/helpdesk/priorities/priority2.png and /dev/null differ diff --git a/helpdesk/static/helpdesk/priorities/priority3.png b/helpdesk/static/helpdesk/priorities/priority3.png deleted file mode 100644 index d0c27dff..00000000 Binary files a/helpdesk/static/helpdesk/priorities/priority3.png and /dev/null differ diff --git a/helpdesk/static/helpdesk/priorities/priority4.png b/helpdesk/static/helpdesk/priorities/priority4.png deleted file mode 100644 index 25264968..00000000 Binary files a/helpdesk/static/helpdesk/priorities/priority4.png and /dev/null differ diff --git a/helpdesk/static/helpdesk/priorities/priority5.png b/helpdesk/static/helpdesk/priorities/priority5.png deleted file mode 100644 index 24f9680c..00000000 Binary files a/helpdesk/static/helpdesk/priorities/priority5.png and /dev/null differ diff --git a/helpdesk/static/helpdesk/priorities/readme.txt b/helpdesk/static/helpdesk/priorities/readme.txt deleted file mode 100644 index a468323b..00000000 --- a/helpdesk/static/helpdesk/priorities/readme.txt +++ /dev/null @@ -1,4 +0,0 @@ -* Typeface: Delicious, Roman, 14pt, Sharp Anti-Aliasing - http://www.josbuivenga.demon.nl/delicious.html -* Icons: Diagona (16px versions) - http://www.pinvoke.com/ - I purchased these before they were creative-commons, I believe this gives me rights to use them without attribution. diff --git a/helpdesk/templates/helpdesk/create_ticket.html b/helpdesk/templates/helpdesk/create_ticket.html index fbf63de1..be2472d6 100644 --- a/helpdesk/templates/helpdesk/create_ticket.html +++ b/helpdesk/templates/helpdesk/create_ticket.html @@ -3,35 +3,44 @@ {% block helpdesk_title %}{% trans "Create Ticket" %}{% endblock %} {% block helpdesk_body %} -
-
-
-

{% trans "Submit a Ticket" %}

-

{% trans "Unless otherwise stated, all fields are required." %} {% trans "Please provide as descriptive a title and description as possible." %}

-
-
- {{ form|bootstrap }} - {% comment %}{% for field in form %} - {% if field.is_hidden %} - {{ field }} - {% else %} -
{% if not field.field.required %} {% trans "(Optional)" %}{% endif %}
-
{{ field }}
- {% if field.errors %}
{{ field.errors }}
{% endif %} - {% if field.help_text %}
{% trans field.help_text %}
{% endif %} - {% endif %} - {% endfor %} - {% endcomment %} +
+
+
+
+ {% trans "Submit a Ticket" %} +
+ +
+

{% trans "Submit a Ticket" %}

+

{% trans "Unless otherwise stated, all fields are required." %} {% trans "Please provide as descriptive a title and description as possible." %}

+ +
+ {{ form|bootstrap }} + {% comment %}{% for field in form %} + {% if field.is_hidden %} + {{ field }} + {% else %} +
{% if not field.field.required %} {% trans "(Optional)" %}{% endif %}
+
{{ field }}
+ {% if field.errors %}
{{ field.errors }}
{% endif %} + {% if field.help_text %}
{% trans field.help_text %}
{% endif %} + {% endif %} + {% endfor %} + {% endcomment %} -
- -
-
+
+ +
+
+ {% csrf_token %}
+ +
+ +
+ +
+ -{% csrf_token %} - - - {% endblock %} diff --git a/helpdesk/templates/helpdesk/dashboard.html b/helpdesk/templates/helpdesk/dashboard.html index df65d793..45bba448 100644 --- a/helpdesk/templates/helpdesk/dashboard.html +++ b/helpdesk/templates/helpdesk/dashboard.html @@ -7,8 +7,6 @@

{% trans "Welcome to your Helpdesk Dashboard! From here you can quickly see tickets submitted by you, tickets you are working on, and those tickets that have no owner." %}

-{% include 'helpdesk/include/summary.html' %} - {% include 'helpdesk/include/stats.html' %} {% if all_tickets_reported_by_current_user %} diff --git a/helpdesk/templates/helpdesk/include/summary.html b/helpdesk/templates/helpdesk/include/summary.html deleted file mode 100644 index f6388e5d..00000000 --- a/helpdesk/templates/helpdesk/include/summary.html +++ /dev/null @@ -1,42 +0,0 @@ -{% load i18n %} - -
-
-
-
- {% trans "Helpdesk Summary" %} -
- -
-
- - - - - - - - - - - {% for queue in dash_tickets %} - {% url 'helpdesk_list' as hdlist %} - - - - - - {% empty %} - - {% endfor %} - -
{% trans "Queue" %}{% trans "Open" %}{% trans "Resolved" %}{% trans "Closed" %}
{{ queue.name }}{% if queue.open %}{% endif %}{{ queue.open }}{% if queue.open %}{% endif %}{% if queue.resolved %}{% endif %}{{ queue.resolved }}{% if queue.resolved %}{% endif %}{% if queue.closed %}{% endif %}{{ queue.closed }}{% if queue.closed %}{% endif %}
{% trans "There are no unassigned tickets." %}
-
- -
- -
- -
-
- diff --git a/helpdesk/templates/helpdesk/public_view_ticket.html b/helpdesk/templates/helpdesk/public_view_ticket.html index 9ee787b9..c107f560 100644 --- a/helpdesk/templates/helpdesk/public_view_ticket.html +++ b/helpdesk/templates/helpdesk/public_view_ticket.html @@ -46,7 +46,7 @@ {% if ticket.resolution %} - {% trans "Resolution" %}{% ifequal ticket.get_status_display "Resolved" %} {% trans "Accept" %}{% endifequal %} + {% trans "Resolution" %}{% ifequal ticket.get_status_display "Resolved" %} {% endifequal %} {{ ticket.resolution|urlizetrunc:50|linebreaksbr }} diff --git a/helpdesk/templates/helpdesk/report_index.html b/helpdesk/templates/helpdesk/report_index.html index 6e6ef907..c7793322 100644 --- a/helpdesk/templates/helpdesk/report_index.html +++ b/helpdesk/templates/helpdesk/report_index.html @@ -11,7 +11,7 @@
-
+
{% trans "Current Ticket Stats" %}
diff --git a/helpdesk/templates/helpdesk/ticket.html b/helpdesk/templates/helpdesk/ticket.html index 254449d1..5f095b6d 100644 --- a/helpdesk/templates/helpdesk/ticket.html +++ b/helpdesk/templates/helpdesk/ticket.html @@ -69,11 +69,11 @@ function processAddFileClick() { {% if not followup.public %} ({% trans "Private" %}){% endif %} {% if helpdesk_settings.HELPDESK_SHOW_EDIT_BUTTON_FOLLOW_UP %} {% if followup.user and request.user == followup.user and not followup.ticketchange_set.all %} - Edit + {% endif %} {% endif %} {% if user.is_superuser and helpdesk_settings.HELPDESK_SHOW_DELETE_BUTTON_SUPERUSER_FOLLOW_UP %} - Delete + {% endif %}
{% else %} @@ -82,11 +82,11 @@ function processAddFileClick() { {{ followup.title }} {% if helpdesk_settings.HELPDESK_SHOW_EDIT_BUTTON_FOLLOW_UP %} {% if followup.user and request.user == followup.user and not followup.ticketchange_set.all %} - Edit + {% endif %} {% endif %} {% if user.is_superuser and helpdesk_settings.HELPDESK_SHOW_DELETE_BUTTON_SUPERUSER_FOLLOW_UP %} - Delete + {% endif %}
{% endif %} diff --git a/helpdesk/templates/helpdesk/ticket_desc_table.html b/helpdesk/templates/helpdesk/ticket_desc_table.html index 2289f01f..7717f961 100644 --- a/helpdesk/templates/helpdesk/ticket_desc_table.html +++ b/helpdesk/templates/helpdesk/ticket_desc_table.html @@ -1,71 +1,88 @@ {% load i18n humanize %} {% load static from staticfiles %} - - - - - - -{% for customfield in ticket.ticketcustomfieldvalue_set.all %} - - - -{% endfor %} - - - - - - +
+
+
+
+ {% trans "Ticket Summary" %} +
+ +
+
+

{{ ticket.id }}. {{ ticket.title }} [{{ ticket.get_status }}]

- Edit - | Delete - {% if ticket.on_hold %} | {% trans "Unhold" %}{% else %} | {% trans "Hold" %}{% endif %} -
{% blocktrans with ticket.queue as queue %}Queue: {{ queue }}{% endblocktrans %}
{{ customfield.field.label }}{% ifequal customfield.field.data_type "url" %}{{ customfield.value }}{% else %}{{ customfield.value }}{% endifequal %}
{% trans "Description" %}
{{ ticket.description|force_escape|urlizetrunc:50|linebreaksbr }}
+ + + + + + {% for customfield in ticket.ticketcustomfieldvalue_set.all %} + + + + {% endfor %} + + + + + + -{% if ticket.resolution %} - - - - -{% endif %} - - - - + {% if ticket.resolution %} + + + + + {% endif %} + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + + +

{{ ticket.id }}. {{ ticket.title }} [{{ ticket.get_status }}]

+ {% trans "Edit" %} + | {% trans "Delete" %} + {% if ticket.on_hold %} | {% trans "Unhold" %}{% else %} | {% trans "Hold" %}{% endif %} +
{% blocktrans with ticket.queue as queue %}Queue: {{ queue }}{% endblocktrans %}
{{ customfield.field.label }}{% ifequal customfield.field.data_type "url" %}{{ customfield.value }}{% else %}{{ customfield.value }}{% endifequal %}
{% trans "Description" %}
{{ ticket.description|force_escape|urlizetrunc:50|linebreaksbr }}
{% trans "Resolution" %}{% ifequal ticket.get_status_display "Resolved" %} {% trans "Accept" %}{% endifequal %}
{{ ticket.resolution|force_escape|urlizetrunc:50|linebreaksbr }}
{% trans "Submitted On" %}{{ ticket.created|date:"r" }} ({{ ticket.created|naturaltime }})
{% trans "Resolution" %}{% ifequal ticket.get_status_display "Resolved" %} {% endifequal %}
{{ ticket.resolution|force_escape|urlizetrunc:50|linebreaksbr }}
{% trans "Submitted On" %}{{ ticket.created|date:"r" }} ({{ ticket.created|naturaltime }})
{% trans "Assigned To" %}{{ ticket.get_assigned_to }}{% ifequal ticket.get_assigned_to _('Unassigned') %} {% trans "Take" %}{% endifequal %}
{% trans "Assigned To" %}{{ ticket.get_assigned_to }}{% ifequal ticket.get_assigned_to _('Unassigned') %} {% endifequal %}
{% trans "Submitter E-Mail" %}{{ ticket.submitter_email }}{% if user.is_superuser %} {% trans "Ignore" %}{% endif %}
{% trans "Submitter E-Mail" %}{{ ticket.submitter_email }}{% if user.is_superuser %} {% endif %}
{% trans "Priority" %}{{ ticket.get_priority_display }}
{% trans "Priority" %}{{ ticket.get_priority_display }}
{% trans "Copies To" %}{{ ticketcc_string }} {% trans "Manage" %}{% if SHOW_SUBSCRIBE %}, {% trans "Subscribe" %}{% endif %}
{% trans "Copies To" %}{{ ticketcc_string }} {% if SHOW_SUBSCRIBE %}, {% endif %}
{% trans "Dependencies" %}{% for dep in ticket.ticketdependency.all %} - {% if forloop.first %}

{% trans "This ticket cannot be resolved until the following ticket(s) are resolved" %}

{% endif %} - {% empty %} -

{% trans "This ticket has no dependencies." %}

- {% endfor %} -

{% trans "Add Dependency" %}

-
{% trans "Dependencies" %}{% for dep in ticket.ticketdependency.all %} + {% if forloop.first %}

{% trans "This ticket cannot be resolved until the following ticket(s) are resolved" %}

{% endif %} + {% empty %} +

{% trans "This ticket has no dependencies." %}

+ {% endfor %} +

+
+
+ +
+ + + + + - - diff --git a/helpdesk/views/staff.py b/helpdesk/views/staff.py index afd1f797..e9d3e288 100644 --- a/helpdesk/views/staff.py +++ b/helpdesk/views/staff.py @@ -122,44 +122,12 @@ def dashboard(request): ) basic_ticket_stats = calc_basic_ticket_stats(Tickets) - # The following query builds a grid of queues & ticket statuses, - # to be displayed to the user. EG: - # Open Resolved - # Queue 1 10 4 - # Queue 2 4 12 - - queues = _get_user_queues(request.user).values_list('id', flat=True) - - from_clause = """FROM helpdesk_ticket t, - helpdesk_queue q""" - if queues: - where_clause = """WHERE q.id = t.queue_id AND - q.id IN (%s)""" % (",".join(("%d" % pk for pk in queues))) - else: - where_clause = """WHERE q.id = t.queue_id""" - - cursor = connection.cursor() - cursor.execute(""" - SELECT q.id as queue, - q.title AS name, - COUNT(CASE t.status WHEN '1' THEN t.id WHEN '2' THEN t.id END) AS open, - COUNT(CASE t.status WHEN '3' THEN t.id END) AS resolved, - COUNT(CASE t.status WHEN '4' THEN t.id END) AS closed - %s - %s - GROUP BY queue, name - ORDER BY q.id; - """ % (from_clause, where_clause)) - - dash_tickets = query_to_dict(cursor.fetchall(), cursor.description) - return render(request, 'helpdesk/dashboard.html', { 'user_tickets': tickets, 'user_tickets_closed_resolved': tickets_closed_resolved, 'unassigned_tickets': unassigned_tickets, 'all_tickets_reported_by_current_user': all_tickets_reported_by_current_user, - 'dash_tickets': dash_tickets, 'basic_ticket_stats': basic_ticket_stats, }) dashboard = staff_member_required(dashboard)