X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=root%2Fwrapper.tt2;h=e4a90571d4244987ddd7afe0e73eacc42ad4dece;hb=eef1fb14f8acced2937e0f7f75fca40f51154036;hp=a44a2e4febc7860d708b9b0ac7fce011162a1246;hpb=7a2c74c3e474cee1c9250b01c4be8ff607216181;p=catagits%2FGitalist.git diff --git a/root/wrapper.tt2 b/root/wrapper.tt2 index a44a2e4..e4a9057 100755 --- a/root/wrapper.tt2 +++ b/root/wrapper.tt2 @@ -1,7 +1,6 @@ [%- IF no_wrapper || template.name.match('\.(css|js|txt)'); content; ELSE; -%] - - + + @@ -20,94 +19,9 @@ [% INCLUDE '_header_feeds.tt2' %] - - + + + @@ -146,15 +60,16 @@
  • - [%# FIXME: convert to c.uri_for_action #%] - Branches - - - [% FOREACH branch_head IN Repository.heads %] - - [% END %] + [%- FOREACH branch IN Repository.heads -%] + + [% IF loop.count == c.config.paging.summary %] + + [% LAST %] + [% END %] + [% END -%]
  • @@ -166,20 +81,24 @@ Home [%- IF Repository %] - / [% Repository.name %] + / [% Repository.name %] [%- END %] / [%- IF Repository %] [%# FIXME: output branch name in a nicer way!!! #%] - [% FOREACH branch_head IN Repository.heads %] - [% IF c.req.path.search(branch_head.name) %] + [%- FOREACH branch_head IN Repository.heads %] + [%- IF c.req.path.search(branch_head.name) %] [% branch_head.name %] / - [% END %] - [% END %] + [% END -%] + [% END -%] [%- END %] [%- + + #FIXME on a history view of a folder, don't show extra actions in dropdown + SET on_file_page = 1; + SET actions_list = { "blob" => 1, "raw" => 1, @@ -193,7 +112,7 @@ .replace("fancy","") .replace("index","Repositories"); action_name_ucfirst = action_name FILTER ucfirst; - IF actions_list.$action_name; + IF actions_list.$action_name && on_file_page; '' _ action_name_ucfirst _ ''; ELSE; action_name_ucfirst; @@ -257,12 +176,27 @@ [% USE Dumper %]
     	[% Repository.path %]
    -	[%# Dumper.dump(c.req.path) %]
    +	[% Dumper.dump(c.req.args) %]
     	
    +[% + # A bit of smoke and mirrors to get the /repository/shortlog URIs working + cur_act = '' _ c.action; + cur_uri = cur_act.match("log") || cur_act.match("^ref") + ? '/ref/' _ cur_act.replace("^(repository|ref)/", '') + : cur_act; + # XXX I just want lists! + IF c.req.args.size > 0; + c.uri_for_action(cur_uri, [Repository.name, 'HEAD'], c.req.args.0); + ELSE; + c.uri_for_action(cur_uri, [Repository.name, 'HEAD']); + END; +%] +[% c.uri_for_action('/repository/heads', [Repository.name]) %] + [%- END -%]