Added the changelog and fixed the source browser.

The source browser is normally a little bit more robust.
This commit is contained in:
Loic d'Anterroches
2008-07-27 01:31:10 +02:00
parent f57a0ec08b
commit c915f8fccf
8 changed files with 237 additions and 39 deletions

View File

@@ -43,7 +43,7 @@
{if $project}
{* <a href="{url 'IDF_Views_Project::home', array($project.shortname)}"{block tabhome}{/block}>{trans 'Project Home'}</a> *}
<a href="{url 'IDF_Views_Issue::index', array($project.shortname)}"{block tabissues}{/block}>{trans 'Issues'}</a>
<a href="{url 'IDF_Views_Source::index', array($project.shortname)}"{block tabsource}{/block}>{trans 'Source'}</a>
<a href="{url 'IDF_Views_Source::treeBase', array($project.shortname, 'master')}"{block tabsource}{/block}>{trans 'Source'}</a>
{if $isOwner}
<a href="{url 'IDF_Views_Project::admin', array($project.shortname)}"{block tabadmin}{/block}>{trans 'Administer'}</a>{/if}{/if}
</div>

View File

@@ -2,7 +2,8 @@
{block tabsource} class="active"{/block}
{block subtabs}
<div id="sub-tabs">
{trans 'Source Tree'}
{trans 'Source Tree'} |
<a href="{url 'IDF_Views_Source::changeLog', array($project.shortname, 'master')}">{trans 'Change Log'}</a>
</div>
{/block}
{block title}{$title}{/block}

View File

@@ -0,0 +1,34 @@
{extends "source/base.html"}
{block docclass}yui-t1{/block}
{block body}
<table summary="" class="tree-list">
<thead>
<tr>
<th>{trans 'Age'}</th>
<th>{trans 'Message'}</th>
<th>{trans 'Details'}</th>
</tr>
</thead>
<tbody>
{foreach $changes as $change}
{aurl 'url', 'IDF_Views_Source::treeBase', array($project.shortname, $change.tree)}
<tr>
<td><a href="{$url}">{$change.date|dateago:"wihtout"}</a></td>
<td>{$change.title}{if $change.full_message}<br /><span class="smaller">{$change.full_message}</span>{/if}</td>
<td><span class="smaller">{trans 'Tree:'}&nbsp;<a href="{$url}">{$change.tree}</a><br />
{trans 'By:'} {$change.author|strip_tags} {* this remove the email address *}
</span></td>
</tr>
{/foreach}
</tbody>
</table>
{/block}
{block context}
<p><strong>{trans 'Branches:'}</strong><br />
{foreach $branches as $branch}
{aurl 'url', 'IDF_Views_Source::changeLog', 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

@@ -1,7 +1,7 @@
{extends "source/base.html"}
{block docclass}yui-t1{/block}
{block body}
<h2><a href="{url 'IDF_Views_Source::treeBase', array($project.shortname, $commit)}">{trans 'Root'}</a><span class="sep">/</span>{if $breadcrumb}{$breadcrumb|safe}{/if}</h2>
<h2><a href="{url 'IDF_Views_Source::treeBase', array($project.shortname, $tree)}">{trans 'Root'}</a><span class="sep">/</span>{if $breadcrumb}{$breadcrumb|safe}{/if}</h2>
<table summary="" class="tree-list">
<thead>
<tr>
@@ -10,23 +10,27 @@
<th>{trans 'Message'}</th>
<th>{trans 'Size'}</th>
</tr>
</thead>
<tbody>
</thead>{if !$tree_in}
{aurl 'url', 'IDF_Views_Source::treeBase', array($project.shortname, $tree)}
<tfoot>
<tr><th colspan="5">{blocktrans}In tree <a href="{$url}">{$tree}</a> created {$cobject.date|dateago}.{/blocktrans}</th></tr>
</tfoot>
{/if}<tbody>
{if $base}
<tr>
<td>&nbsp;</td>
<td colspan="4">
<a href="{url 'IDF_Views_Source::tree', array($project.shortname, $commit, $prev)}">..</a></td>
<a href="{url 'IDF_Views_Source::tree', array($project.shortname, $tree, $prev)}">..</a></td>
</tr>
{/if}
{foreach $files as $file}
{aurl 'url', 'IDF_Views_Source::tree', array($project.shortname, $commit, $file.fullpath)}
{aurl 'url', 'IDF_Views_Source::tree', array($project.shortname, $tree, $file.fullpath)}
<tr>
<td><img src="{media '/idf/img/'~$file.type~'.png'}" alt="{$file.type}" /></td>
<td><a href="{$url}">{$file.file}</a></td>
<td><span class="smaller">{$file.time|timeago:"wihtout"}</span></td>
<td{if $file.type != 'blob'} colspan="2"{/if}><span class="smaller">{$file.log}</span></td>
<td{if $file.type != 'blob'} colspan="4"{/if}><a href="{$url}">{$file.file}</a></td>
{if $file.type == 'blob'}
<td><span class="smaller">{$file.date|dateago:"wihtout"}</span></td>
<td><span class="smaller">{$file.log}</span></td>
<td>{$file.size|size}</td>{/if}
</tr>
{/foreach}
@@ -38,7 +42,7 @@
<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 />
<span class="label{if $tree == $branch} active{/if}"><a href="{$url}" class="label">{$branch}</a></span><br />
{/foreach}
</p>
{/block}