From 2e711bee8d2b7c6680d6d44cb796f2cc67c9ed68 Mon Sep 17 00:00:00 2001 From: Loic d'Anterroches Date: Fri, 25 Jul 2008 14:25:50 +0200 Subject: [PATCH] Added a nice formatting of the issue comments. --- src/IDF/IssueComment.php | 5 +++++ src/IDF/templates/issues/view.html | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/IDF/IssueComment.php b/src/IDF/IssueComment.php index 8d82b94..bf1f179 100644 --- a/src/IDF/IssueComment.php +++ b/src/IDF/IssueComment.php @@ -116,4 +116,9 @@ class IDF_IssueComment extends Pluf_Model $q->lock = 0; $q->create(); } +} + +function IDF_IssueComment_Filter($text) +{ + return wordwrap($text, 80, "\n", true); } \ No newline at end of file diff --git a/src/IDF/templates/issues/view.html b/src/IDF/templates/issues/view.html index f08ae6c..14cab4a 100644 --- a/src/IDF/templates/issues/view.html +++ b/src/IDF/templates/issues/view.html @@ -13,7 +13,7 @@

{blocktrans}Comment {$i} by {$who}, {$c.creation_dtime|date}{/blocktrans}

{/if} -

{if strlen($c.content) > 0}{$c.content|nl2br}{else}{trans '(No comments were given for this change.)'}{/if}

+
{if strlen($c.content) > 0}{$c.content|issuetext}{else}{trans '(No comments were given for this change.)'}{/if}
{if $i> 0 and $c.changedIssue()}