add option to override default look of followups - this is work in progress.

This commit is contained in:
Andreas Kotowicz 2011-11-21 20:04:05 +01:00
parent 2cee519d1c
commit f897d5bcb4
3 changed files with 41 additions and 12 deletions

View File

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

View File

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

View File

@ -52,15 +52,28 @@
<h3>{% trans "Follow-Ups" %}</h3>
{% load ticket_to_link %}
{% for followup in ticket.followup_set.all %}
<div class='followup'>
<div class='title'>
{% if helpdesk_settings.HELPDESK_FOLLOWUP_MOD %}
<div class='followup_mod'>
<div class='title'>
<span class='byline'>{{ followup.user.get_full_name }}&nbsp;&nbsp;&nbsp;&nbsp;{{ followup.date }} ({{ followup.date|timesince }} ago)</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 %}
<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>
{% endif %}
{% endif %}
</div>
{% else %}
<div class='followup'>
<div class='title'>
{{ followup.title }} <span class='byline'>{% 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>
{% 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>
{% endif %}
{% endif %}
</div>
</div>
{% endif %}
<span class='followup-desc'>{% if followup.comment %}{{ followup.comment|force_escape|urlizetrunc:50|num_to_link|linebreaksbr }}{% endif %}</span>
{% for change in followup.ticketchange_set.all %}
{% if forloop.first %}<div class='changes'><ul>{% endif %}