Added nl2br in the display of the commit messages.

This commit is contained in:
Loic d'Anterroches 2009-02-16 18:12:21 +01:00
parent 75ec32765c
commit ea55f9f793
3 changed files with 4 additions and 3 deletions

View File

@ -32,7 +32,7 @@ class IDF_Template_IssueComment extends Pluf_Template_Tag
private $request = null;
private $scm = null;
function start($text, $request, $echo=true, $wordwrap=true, $esc=true, $autolink=true)
function start($text, $request, $echo=true, $wordwrap=true, $esc=true, $autolink=true, $nl2br=false)
{
$this->project = $request->project;
$this->request = $request;
@ -53,6 +53,7 @@ class IDF_Template_IssueComment extends Pluf_Template_Tag
$text = preg_replace_callback('#(src:)([^\s\(\)]+)#im',
array($this, 'callbackSource'), $text);
}
if ($nl2br) $text = nl2br($text);
if ($echo) {
echo $text;
} else {

View File

@ -13,7 +13,7 @@
{aurl 'url', 'IDF_Views_Source::commit', array($project.shortname, $change.scm_id)}
<tr class="log">
<td><a href="{$url}">{$change.creation_dtime|dateago:"wihtout"}</a></td>
<td>{issuetext $change.summary, $request}{if $change.fullmessage}<br /><br />{issuetext $change.fullmessage, $request}{/if}</td>
<td>{issuetext $change.summary, $request}{if $change.fullmessage}<br /><br />{issuetext $change.fullmessage, $request, true, false, true, true, true}{/if}</td>
</tr>
<tr class="extra">
<td colspan="2">

View File

@ -13,7 +13,7 @@
<th><strong>{trans 'Commit:'}</strong></th><td class="mono"><a href="{url 'IDF_Views_Source::treeBase', array($project.shortname, $commit)}" title="{trans 'View corresponding source tree'}">{$cobject.commit}</a></td>
</tr>
<tr>
<th><strong>{trans 'Message:'}</strong></th><td>{issuetext $cobject.title, $request}{if isset($cobject.full_message)}<br /><br />{issuetext $cobject.full_message, $request}{/if}</td>
<th><strong>{trans 'Message:'}</strong></th><td>{issuetext $cobject.title, $request}{if isset($cobject.full_message)}<br /><br />{issuetext $cobject.full_message, $request, true, false, true, true, true}{/if}</td>
</tr>
{if count($diff.files)}
<tr>