From de8b5aa74c0cb92be7463ddb5940563784a13b4d Mon Sep 17 00:00:00 2001 From: Loic d'Anterroches Date: Tue, 11 Nov 2008 22:55:35 +0100 Subject: [PATCH] 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. --- src/IDF/templates/source/git/file.html | 10 ++++++++++ src/IDF/templates/source/svn/file.html | 21 +++++++++++++++++++++ www/media/idf/css/style.css | 12 +++++++++--- 3 files changed, 40 insertions(+), 3 deletions(-) diff --git a/src/IDF/templates/source/git/file.html b/src/IDF/templates/source/git/file.html index 5607344..a147c59 100644 --- a/src/IDF/templates/source/git/file.html +++ b/src/IDF/templates/source/git/file.html @@ -4,7 +4,17 @@

{trans 'Root'}/{if $breadcrumb}{$breadcrumb|safe}{/if}

+{if !$tree_in} +{aurl 'url', 'IDF_Views_Source::commit', array($project.shortname, $commit)} + + + +{/if} + {$file} +
{blocktrans}Source at commit {$commit} created {$cobject.date|dateago}.{/blocktrans}
+{blocktrans}By {$cobject.author|strip_tags|trim}, {$cobject.title}{/blocktrans} +
{aurl 'url', 'IDF_Views_Source::getFile', array($project.shortname, $commit, $fullpath)}

{trans 'Archive'} {trans 'Download this file'}

diff --git a/src/IDF/templates/source/svn/file.html b/src/IDF/templates/source/svn/file.html index fcd7213..fc78c4d 100644 --- a/src/IDF/templates/source/svn/file.html +++ b/src/IDF/templates/source/svn/file.html @@ -4,7 +4,28 @@

{trans 'Root'}/{if $breadcrumb}{$breadcrumb|safe}{/if}

+{if !$tree_in || $props} + {aurl 'url', 'IDF_Views_Source::commit', array($project.shortname, $commit)} + + {if $props} + + {/if} + {if !$tree_in} + + {/if} + + {/if} + {$file} +
+
    + {foreach $props as $prop => $val} +
  • {trans 'Property'} {$prop} {trans 'set to:'} {$val}
  • + {/foreach} +
+
{blocktrans}Source at commit {$commit} created {$cobject.date|dateago}.{/blocktrans}
+ {blocktrans}By {$cobject.author|strip_tags|trim}, {$cobject.title}{/blocktrans} +
{aurl 'url', 'IDF_Views_Source::getFile', array($project.shortname, $commit, $fullpath)}

{trans 'Archive'} {trans 'Download this file'}

diff --git a/www/media/idf/css/style.css b/www/media/idf/css/style.css index b350285..656daaf 100644 --- a/www/media/idf/css/style.css +++ b/www/media/idf/css/style.css @@ -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;