First work on the git browser.

This commit is contained in:
Loic d'Anterroches
2008-07-26 18:42:41 +02:00
parent 2e711bee8d
commit 876e206742
10 changed files with 356 additions and 2 deletions

View File

@@ -41,7 +41,9 @@
<div id="header">
<div id="main-tabs">
{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>
{if $isOwner}
<a href="{url 'IDF_Views_Project::admin', array($project.shortname)}"{block tabadmin}{/block}>{trans 'Administer'}</a>{/if}{/if}
</div>

View File

@@ -0,0 +1,8 @@
{extends "base.html"}
{block tabsource} class="active"{/block}
{block subtabs}
<div id="sub-tabs">
{trans 'Source Tree'}
</div>
{/block}
{block title}{$title}{/block}

View File

@@ -0,0 +1,44 @@
{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>
<table summary="" class="tree-list">
<thead>
<tr>
<th colspan="2">{trans 'File'}</th>
<th>{trans 'Age'}</th>
<th>{trans 'Message'}</th>
<th>{trans 'Size'}</th>
</tr>
</thead>
<tbody>
{if $base}
<tr>
<td>&nbsp;</td>
<td colspan="4">
<a href="{url 'IDF_Views_Source::tree', array($project.shortname, $commit, $prev)}">..</a></td>
</tr>
{/if}
{foreach $files as $file}
{aurl 'url', 'IDF_Views_Source::tree', array($project.shortname, $commit, $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>
{if $file.type == 'blob'}
<td>{$file.size|size}</td>{/if}
</tr>
{/foreach}
</tbody>
</table>
{/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"><a href="{$url}" class="label">{$branch}</a></span><br />
{/foreach}
</p>
{/block}