Added the visualisation of a commit.

This commit is contained in:
Loic d'Anterroches
2008-07-28 22:09:17 +02:00
parent 3fb47562ce
commit a6716c7716
9 changed files with 118 additions and 8 deletions

View File

@@ -4,6 +4,7 @@
<div id="sub-tabs">
<a {if $inSourceTree}class="active" {/if}href="{url 'IDF_Views_Source::treeBase', array($project.shortname, 'master')}">{trans 'Source Tree'}</a> |
<a {if $inChangeLog}class="active" {/if}href="{url 'IDF_Views_Source::changeLog', array($project.shortname, 'master')}">{trans 'Change Log'}</a>
{if $inCommit}| {trans 'Commit'}{/if}
</div>
{/block}
{block title}{$title}{/block}

View File

@@ -11,7 +11,7 @@
</thead>
<tbody>
{foreach $changes as $change}
{aurl 'url', 'IDF_Views_Source::treeBase', array($project.shortname, $change.commit)}
{aurl 'url', 'IDF_Views_Source::commit', array($project.shortname, $change.commit)}
<tr class="log">
<td><a href="{$url}">{$change.date|dateago:"wihtout"}</a></td>
<td>{$change.title}{if $change.full_message}<br /><br />{$change.full_message}{/if}</td>
@@ -23,9 +23,6 @@
</div>
</td>
{* <td><span class="smaller">{trans 'Tree:'}&nbsp;<a href="{$url}">{$change.commit}</a><br />
{trans 'By:'} {$change.author|strip_tags}
</span></td> *}
</tr>
{/foreach}
</tbody>

View File

@@ -0,0 +1,32 @@
{extends "source/base.html"}
{block docclass}yui-t1{assign $inCommit=true}{/block}
{block body}
<table class="commit" summary="">
<tr>
<th><strong>{trans 'Date:'}</strong></th><td>{$cobject.date|date:"%Y-%m-%d %H:%M:%S"} ({$cobject.date|dateago})</td>
</tr>
<tr>
<th><strong>{trans 'Author:'}</strong></th><td>{$cobject.author|strip_tags}</td>
</tr>
<tr>
<th><strong>{trans 'Commit:'}</strong></th><td class="mono">{$cobject.commit}</td>
</tr>
<tr>
<th><strong>{trans 'Tree:'}</strong></th><td class="mono"><a href="{url 'IDF_Views_Source::treeBase', array($project.shortname, $commit)}">{$cobject.tree}</a><br /><br /></td>
</tr>
<tr>
<th><strong>{trans 'Message:'}</strong></th><td>{issuetext $cobject.title, $project}{if isset($cobject.full_message)}<br /><br />{issuetext $cobject.full_message, $project}{/if}</td>
</tr>
</table>
<h2>{trans 'Change Details'}</h2>
{$changes|safe}
{/block}
{block context}
<p><strong>{trans 'Branches:'}</strong><br />
{foreach $branches as $branch}
{aurl 'url', 'IDF_Views_Source::treeBase', array($project.shortname, $branch)}
<span class="label{if $commit == $branch} active{/if}"><a href="{$url}" class="label">{$branch}</a></span><br />
{/foreach}
</p>
{/block}

View File

@@ -11,9 +11,9 @@
<th>{trans 'Size'}</th>
</tr>
</thead>{if !$tree_in}
{aurl 'url', 'IDF_Views_Source::treeBase', array($project.shortname, $commit)}
{aurl 'url', 'IDF_Views_Source::commit', array($project.shortname, $commit)}
<tfoot>
<tr><th colspan="5">{blocktrans}In commit <a class="mono" href="{$url}">{$commit}</a> created {$cobject.date|dateago}.{/blocktrans}<br />
<tr><th colspan="5">{blocktrans}Source at commit <a class="mono" href="{$url}">{$commit}</a> created {$cobject.date|dateago}.{/blocktrans}<br />
<span class="smaller">{blocktrans}By {$cobject.author|strip_tags|trim}, {$cobject.title}{/blocktrans}</span>
</th></tr>
</tfoot>