X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=root%2Fwrapper.tt2;h=e4a90571d4244987ddd7afe0e73eacc42ad4dece;hb=b7b5f98eaa67e9968382a34934e64a2330ea4d23;hp=7f482d1e6ce82c6a0d14ffb311f00544d4e0f22c;hpb=0aa355fbb67d188af146454d5f5f8900e496aae4;p=catagits%2FGitalist.git diff --git a/root/wrapper.tt2 b/root/wrapper.tt2 index 7f482d1..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' %] - - + + + @@ -118,13 +32,16 @@ @@ -143,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 -%]
  • @@ -163,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, @@ -190,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; @@ -207,7 +129,7 @@ action_output = action.key FILTER ucfirst; NEXT IF action_output == action_name_ucfirst; action = action.key; - '
  • ' _ action_output _ '
  • '; + '
  • ' _ action_output _ '
  • '; END; ''; END; @@ -254,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 -%]