From: Foxtons Web Design Date: Thu, 8 Apr 2010 14:18:03 +0000 (+0100) Subject: added compare diffs feature and fixed a couple of css issues X-Git-Tag: 0.000006~8 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FGitalist.git;a=commitdiff_plain;h=71eba67cc0f4d557d942d46911f503cca73bc77f added compare diffs feature and fixed a couple of css issues --- diff --git a/root/fragment/ref/history.tt2 b/root/fragment/ref/history.tt2 index 92b22b1..0e5ee10 100755 --- a/root/fragment/ref/history.tt2 +++ b/root/fragment/ref/history.tt2 @@ -1,6 +1,8 @@ [% BLOCK history_table_headfoot %] [% SET cell = type == 'head' ? 'th' : 'td' %] +[%# FIXME: should c.req.arguments.0 be path instead? %] +<[% cell %] colspan="2">Compare <[% cell %]>sha1 <[% cell %]>time <[% cell %]>message @@ -8,12 +10,15 @@ <[% cell %]>actions [% END %] +
[% PROCESS history_table_headfoot type = 'head' %] [% FOREACH line IN log_lines %] + + @@ -35,8 +40,13 @@ [% END %] + + + +
[% INCLUDE 'inc/chroma_hash.tt2' sha1 = line.sha1.substr(0, 7) %] [% time_since(line.authored_time) %]
Compare
+
[% INCLUDE 'inc/log_pager.tt2'; %] diff --git a/root/fragment/repository/shortlog.tt2 b/root/fragment/repository/shortlog.tt2 index 68167b8..bd9f16d 100755 --- a/root/fragment/repository/shortlog.tt2 +++ b/root/fragment/repository/shortlog.tt2 @@ -1,6 +1,7 @@ [% BLOCK shortlog_table_headfoot %] [% SET cell = type == 'head' ? 'th' : 'td' %] + <[% cell %] colspan="2">Compare <[% cell %]>ID (sha1) <[% cell %]>Last change <[% cell %]>Message @@ -9,11 +10,14 @@ [% END %] +
[% PROCESS shortlog_table_headfoot type = 'head' %] [% FOREACH line IN log_lines %] + + [% END %] + + + +
[% INCLUDE 'inc/chroma_hash.tt2' sha1 = line.sha1.substr(0, 7) %] [% time_since(line.authored_time) %] @@ -32,7 +36,12 @@
Compare
+
[% INCLUDE 'inc/log_pager.tt2' %] diff --git a/root/static/css/core.css b/root/static/css/core.css index 698445d..37e4762 100755 --- a/root/static/css/core.css +++ b/root/static/css/core.css @@ -1,6 +1,6 @@ #debug_holder{ - display:none; + adisplay:none; clear:both; padding-top:30px; @@ -79,7 +79,7 @@ a img{ /* nav tabs */ #nav_logs{ - width:80%; + width:100%; clear:both; float:right; margin:-5px 10px 0 0; @@ -303,6 +303,9 @@ th{ th a{ color:#fff; } +th a:hover{ + color:#f0f0f0; +} .summary tr{ background-color:#FAFAFA; border-bottom:1px solid #fff; @@ -310,6 +313,12 @@ th a{ .summary td{ vertical-align:middle !important; } +tr{ + background-color:#fff; +} +thead tr{ + background-color:transparent !important; +} tr.invert{ background-color:#f0f0f0; } @@ -369,6 +378,7 @@ table.listing{ padding:10px; border:1px solid #ddd; background-color:#f0f0f0; + min-height:40px; } .diff-head{ background-color:#666; diff --git a/root/static/i/bg_top.png b/root/static/i/bg_top.png index 39b765f..65601c4 100755 Binary files a/root/static/i/bg_top.png and b/root/static/i/bg_top.png differ diff --git a/root/static/i/icons/Thumbs.db b/root/static/i/icons/Thumbs.db index bdf3302..cb41d4c 100644 Binary files a/root/static/i/icons/Thumbs.db and b/root/static/i/icons/Thumbs.db differ diff --git a/root/static/js/common.js b/root/static/js/common.js new file mode 100755 index 0000000..921c4f4 --- /dev/null +++ b/root/static/js/common.js @@ -0,0 +1,24 @@ +function compareDiffs(repo, path){ + var f = document.theform; + if(!repo){ + var repo = ""; + } + if(!path){ + var path = ""; + } + var sha1,sha2; + for(var i=0,len=f.length;i + @@ -142,7 +168,7 @@ [% USE Dumper %]
 	[% Repository.path %]
-	[%# Dumper.dump(c.req.path) %]
+	[%# Dumper.dump(c.req.arguments.0) %]