Improved the visualisation of text files in the source.

If the visualized version is not at the head of a branch, the details of
the corresponding commit are given.
This commit is contained in:
Loic d'Anterroches 2008-11-11 22:55:35 +01:00
parent 9ac6e38e81
commit de8b5aa74c
3 changed files with 40 additions and 3 deletions

View File

@ -4,7 +4,17 @@
<h2 class="top"><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 class="code" summary=" ">
{if !$tree_in}
{aurl 'url', 'IDF_Views_Source::commit', array($project.shortname, $commit)}
<tfoot>
<tr><th colspan="2">{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>
{/if}
<tbody>
{$file}
</tbody>
</table>
{aurl 'url', 'IDF_Views_Source::getFile', array($project.shortname, $commit, $fullpath)}
<p class="right soft"><a href="{$url}"><img style="vertical-align: text-bottom;" src="{media '/idf/img/package-grey.png'}" alt="{trans 'Archive'}" align="bottom" /></a> <a href="{$url}">{trans 'Download this file'}</a></p>

View File

@ -4,7 +4,28 @@
<h2 class="top"><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 class="code" summary=" ">
{if !$tree_in || $props}
{aurl 'url', 'IDF_Views_Source::commit', array($project.shortname, $commit)}
<tfoot>
{if $props}
<tr><th colspan="2">
<ul>
{foreach $props as $prop => $val}
<li>{trans 'Property'} <strong>{$prop}</strong> {trans 'set to:'} <em>{$val}</em></li>
{/foreach}
</ul>
</th></tr>
{/if}
{if !$tree_in}
<tr><th colspan="2">{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>
{/if}
</tfoot>
{/if}
<tbody>
{$file}
</tbody>
</table>
{aurl 'url', 'IDF_Views_Source::getFile', array($project.shortname, $commit, $fullpath)}
<p class="right soft"><a href="{$url}"><img style="vertical-align: text-bottom;" src="{media '/idf/img/package-grey.png'}" alt="{trans 'Archive'}" align="bottom" /></a> <a href="{$url}">{trans 'Download this file'}</a></p>

View File

@ -324,17 +324,17 @@ table.tree-list td {
vertical-align: top;
}
table.tree-list tfoot th {
table.tree-list tfoot th, table.code tfoot th {
text-align: right;
font-weight: normal;
}
table.tree-list tfoot th a {
table.tree-list tfoot th a, table.code tfoot th a {
color: #000;
font-weight: normal;
}
table.tree-list tfoot th ul {
table.tree-list tfoot th ul, table.code tfoot th ul {
text-align: left;
font-size: 85%;
}
@ -493,6 +493,12 @@ table.code {
width: 100%;
}
table.code th {
background-color: #e4e8E0;
vertical-align: top;
border-color: #d3d7cf;
}
table.code tr {
border-left: 1px solid #d3d7cf;
border-right: 1px solid #d3d7cf;