X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=root%2Fwrapper.tt2;h=8426d657f6d6ea80fca8e491b6f55f8f5ce0204a;hb=37412bb3ce5eee4bb31fe48012fe8480f71e1eea;hp=4927bb82cd1813041d05484871118fe7ca935238;hpb=066e05d3af62153865eef6b7be24a72ff4c0bce0;p=catagits%2FGitalist.git diff --git a/root/wrapper.tt2 b/root/wrapper.tt2 index 4927bb8..8426d65 100755 --- a/root/wrapper.tt2 +++ b/root/wrapper.tt2 @@ -20,94 +20,9 @@ [% INCLUDE '_header_feeds.tt2' %] - - + + + @@ -118,13 +33,16 @@ @@ -143,14 +61,11 @@
  • - [%# FIXME: convert to c.uri_for_action #%] - Branches - - - [% FOREACH branch_head IN Repository.heads %] - + [% FOREACH branch IN Repository.heads %] + [% END %] @@ -177,33 +92,41 @@ [%- + + #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, + "blame" => 1, + "history" => 1, + }; + SET action_name = c.action.name .replace("_"," ") .replace("log", " log") .replace("fancy","") .replace("index","Repositories"); action_name_ucfirst = action_name FILTER ucfirst; - '' _ action_name_ucfirst _ ''; + IF actions_list.$action_name && on_file_page; + '' _ action_name_ucfirst _ ''; + ELSE; + action_name_ucfirst; + END; -%] [%- - SET actions_list = { - "blob" => 1, - "raw" => 1, - "blame" => 1, - "history" => 1, - }; - IF actions_list.$action_name; ''; END; @@ -250,12 +173,26 @@ [% 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 an empty list! + IF c.req.args.size > 0; + c.uri_for_action(cur_uri, [Repository.name, 'HEAD'], c.req.args); + ELSE; + c.uri_for_action(cur_uri, [Repository.name, 'HEAD']); + END; +%] + [%- END -%]