From f897d5bcb4475d28f4793d26de74bbb2368f06d9 Mon Sep 17 00:00:00 2001 From: Andreas Kotowicz Date: Mon, 21 Nov 2011 20:04:05 +0100 Subject: [PATCH] add option to override default look of followups - this is work in progress. --- helpdesk/settings.py | 4 ++++ helpdesk/static/helpdesk/helpdesk.css | 18 +++++++++++--- helpdesk/templates/helpdesk/ticket.html | 31 ++++++++++++++++++------- 3 files changed, 41 insertions(+), 12 deletions(-) diff --git a/helpdesk/settings.py b/helpdesk/settings.py index ea3662ae..fa61e230 100644 --- a/helpdesk/settings.py +++ b/helpdesk/settings.py @@ -52,6 +52,10 @@ HELPDESK_TRANSLATE_TICKET_COMMENTS = getattr(settings, 'HELPDESK_TRANSLATE_TICKE # list of languages to offer. if set to false, all default google translate languages will be shown. HELPDESK_TRANSLATE_TICKET_COMMENTS_LANG = getattr(settings, 'HELPDESK_TRANSLATE_TICKET_COMMENTS_LANG', ["en", "de", "fr", "ru"]) +# allow user to override default layout for 'followups' - work in progress. +HELPDESK_FOLLOWUP_MOD = getattr(settings, 'HELPDESK_FOLLOWUP_MOD', False) + + ''' options for public pages ''' # show 'view a ticket' section on public page? diff --git a/helpdesk/static/helpdesk/helpdesk.css b/helpdesk/static/helpdesk/helpdesk.css index 638ee98d..d52f420d 100644 --- a/helpdesk/static/helpdesk/helpdesk.css +++ b/helpdesk/static/helpdesk/helpdesk.css @@ -153,22 +153,34 @@ td { background-color: #bcd4ec; } -div.followup { +div.followup, div.followup_mod { width: 100%; border-top: solid #666 1px; padding:0 0 2px; } -div.followup .title { +div.followup_mod { + border: solid #666 1px; + padding: 5px; + margin: 0px 0px 10px; +} + +div.followup .title, div.followup_mod .title { font-weight: bold; font-size: 10pt; } -div.followup .title span { +div.followup .title span, div.followup_mod .title span { color: #aaa; font-weight: normal; } +div.followup_mod small { + float: right; + font-weight: bold; + font-style: italic; +} + span.private { color: #aaa; font-style: italic; diff --git a/helpdesk/templates/helpdesk/ticket.html b/helpdesk/templates/helpdesk/ticket.html index 5f7fbc36..e3f4cb15 100644 --- a/helpdesk/templates/helpdesk/ticket.html +++ b/helpdesk/templates/helpdesk/ticket.html @@ -52,15 +52,28 @@

{% trans "Follow-Ups" %}

{% load ticket_to_link %} {% for followup in ticket.followup_set.all %} -
-
- {{ 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 helpdesk_settings.HELPDESK_FOLLOWUP_MOD %} +
+
+ {{ followup.title }} + {% 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 %} +
+{% else %} +
+
+ {{ 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 %} +
+{% endif %} {% if followup.comment %}{{ followup.comment|force_escape|urlizetrunc:50|num_to_link|linebreaksbr }}{% endif %} {% for change in followup.ticketchange_set.all %} {% if forloop.first %}
    {% endif %}