Started on issue 544, extended commit details
* Scm.php: new SCM method "getChanges" which returns all available change information grouped by type * Monotone.php: implement getChanges via get_revision * <other scms>: rename "changes" member for getCommit to "diff" which matches better * Source.php: query the commit's changes and set them in the template * commit.html: render the changes, type-by-type. Link to the tree or the individual diff if applicable * styles.css: some initial style sheet work
This commit is contained in:
@@ -18,20 +18,45 @@
|
||||
<tr>
|
||||
<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>
|
||||
<th><strong>{trans 'Files:'}</strong></th>
|
||||
<th><strong>{trans 'Changes:'}</strong></th>
|
||||
<td>
|
||||
{foreach $diff.files as $filename=>$diffdef}
|
||||
{assign $ndiff = count($diffdef['chunks'])}
|
||||
<a href="{url 'IDF_Views_Source::tree', array($project.shortname, $commit, $filename)}">{$filename}</a> (<a href="#diff-{$filename|md5}">{blocktrans $ndiff}{$ndiff} diff{plural}{$ndiff} diffs{/blocktrans}</a>)<br/>
|
||||
<table class="changes">
|
||||
{foreach $changes.deletions as $filename}
|
||||
<tr><td>D</td><td>{$filename}{if !empty($diff.files[$filename])} (<a href="#diff-{$filename|md5}">{trans 'full'}</a>){/if}</td></tr>
|
||||
{/foreach}
|
||||
{foreach $changes.renames as $oldname => $newname}
|
||||
<tr><td>R</td><td><a href="{url 'IDF_Views_Source::tree', array($project.shortname, $commit, $newname)}">{$oldname} -> {$newname}</a></td></tr>
|
||||
{/foreach}
|
||||
{foreach $changes.additions as $filename}
|
||||
<tr><td>A</td><td><a href="{url 'IDF_Views_Source::tree', array($project.shortname, $commit, $filename)}">{$filename}</a>{if !empty($diff.files[$filename])} (<a href="#diff-{$filename|md5}">{trans 'full'}</a>){/if}</td></tr>
|
||||
{/foreach}
|
||||
{foreach $changes.patches as $filename}
|
||||
{assign $ndiff = count($diff.files[$filename]['chunks'])}
|
||||
<tr><td>M</td><td><a href="{url 'IDF_Views_Source::tree', array($project.shortname, $commit, $filename)}">{$filename}</a>{if !empty($diff.files[$filename])} (<a href="#diff-{$filename|md5}">{blocktrans $ndiff}{$ndiff} diff{plural}{$ndiff} diffs{/blocktrans}</a>){/if}</td></tr>
|
||||
{/foreach}
|
||||
{foreach $changes.properties as $filename => $properties}
|
||||
<tr><td>P</td><td><a href="{url 'IDF_Views_Source::tree', array($project.shortname, $commit, $filename)}">{$filename}</a>
|
||||
<table class="properties">
|
||||
{foreach $properties as $key => $value}
|
||||
<tr><td>{$key}</td>
|
||||
{if $value == null}
|
||||
<td class="removed">{trans 'removed'}</td>
|
||||
{else}
|
||||
<td>{$value}</td>
|
||||
{/if}
|
||||
</tr>
|
||||
{/foreach}
|
||||
</table>
|
||||
</td></tr>
|
||||
{/foreach}
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
</table>
|
||||
|
||||
{if count($diff.files)}
|
||||
<h2>{trans 'Change Details'}</h2>
|
||||
<h2>{trans 'File differences'}</h2>
|
||||
|
||||
{$diff.as_html()}
|
||||
{/if}{if count($diff.files) or $large_commit}
|
||||
|
Reference in New Issue
Block a user