From adfee38439c6157e78d15f12261849a76db0cf87 Mon Sep 17 00:00:00 2001 From: Ross Poulton Date: Wed, 2 Feb 2011 08:31:51 +0000 Subject: [PATCH] Push the description, resolution, and followup text through urlizetrunc to turn urls into hyperlinks. --- helpdesk/templates/helpdesk/public_view_ticket.html | 6 +++--- helpdesk/templates/helpdesk/ticket.html | 2 +- helpdesk/templates/helpdesk/ticket_desc_table.html | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/helpdesk/templates/helpdesk/public_view_ticket.html b/helpdesk/templates/helpdesk/public_view_ticket.html index 56bb9723..526a83f3 100644 --- a/helpdesk/templates/helpdesk/public_view_ticket.html +++ b/helpdesk/templates/helpdesk/public_view_ticket.html @@ -33,14 +33,14 @@ {% trans "Description" %} - {{ ticket.description|linebreaksbr }} + {{ ticket.description|force_escape|urlizetrunc:50|linebreaksbr }} {% if ticket.resolution %} {% trans "Resolution" %}{% ifequal ticket.get_status_display "Resolved" %} {% trans "Accept" %}{% endifequal %} - {{ ticket.resolution }} + {{ ticket.resolution|urlizetrunc:50|linebreaksbr }} {% endif %} @@ -51,7 +51,7 @@ {% for followup in ticket.followup_set.public_followups %}
{{ followup.title }}
-{{ followup.comment|force_escape|num_to_link|linebreaksbr }} +{{ followup.comment|force_escape|urlizetrunc:50|num_to_link|linebreaksbr }} {% if followup.ticketchange_set.all %}
    {% for change in followup.ticketchange_set.all %}
  • {% blocktrans with change.field as field and change.old_value as old_value and change.new_value as new_value %}Changed {{ field }} from {{ old_value }} to {{ new_value }}.{% endblocktrans %}
  • diff --git a/helpdesk/templates/helpdesk/ticket.html b/helpdesk/templates/helpdesk/ticket.html index 924530b9..653a2f55 100644 --- a/helpdesk/templates/helpdesk/ticket.html +++ b/helpdesk/templates/helpdesk/ticket.html @@ -53,7 +53,7 @@ {{ followup.title }} Edit
-{% if followup.comment %}{{ followup.comment|force_escape|num_to_link|linebreaksbr }}{% 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 %}
  • {% blocktrans with change.field as field and change.old_value as old_value and change.new_value as new_value %}Changed {{ field }} from {{ old_value }} to {{ new_value }}.{% endblocktrans %}
  • diff --git a/helpdesk/templates/helpdesk/ticket_desc_table.html b/helpdesk/templates/helpdesk/ticket_desc_table.html index 7a257dee..d985f28e 100644 --- a/helpdesk/templates/helpdesk/ticket_desc_table.html +++ b/helpdesk/templates/helpdesk/ticket_desc_table.html @@ -40,14 +40,14 @@ {% trans "Description" %} - {{ ticket.description|force_escape|linebreaksbr }} + {{ ticket.description|force_escape|urlizetrunc:50|linebreaksbr }} {% if ticket.resolution %} {% trans "Resolution" %}{% ifequal ticket.get_status_display "Resolved" %} {% trans "Accept" %}{% endifequal %} - {{ ticket.resolution|force_escape }} + {{ ticket.resolution|force_escape|urlizetrunc:50|linebreaksbr }} {% endif %} - \ No newline at end of file +