X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=root%2Fwrapper.tt2;h=b8db7d9c90867756e99f4d97bc45267952040507;hb=3620aa21666f20c634edcf3a6ec6f16580bbda1f;hp=545e7b3246305e5368beac531f4ebb54111b6e92;hpb=03686cdc7927a63853a4399c04e8c9cd1fa68014;p=catagits%2FGitalist.git
diff --git a/root/wrapper.tt2 b/root/wrapper.tt2
index 545e7b3..b8db7d9 100755
--- a/root/wrapper.tt2
+++ b/root/wrapper.tt2
@@ -1,7 +1,6 @@
[%- IF no_wrapper || template.name.match('\.(css|js|txt)'); content; ELSE; -%]
-
-
+
+
@@ -18,35 +17,11 @@
title;
-%] (Gitalist)
[% INCLUDE '_header_feeds.tt2' %]
-
+
-
-
+
+
+
@@ -57,76 +32,109 @@
- [% IF Repository; INCLUDE 'nav/search.tt2'; ELSE; %]
-
-
+ [% IF Repository; INCLUDE 'nav/search.tt2'; ELSE; %]
+
+
[% END %]
-
-
+
+
-
+
[% IF c.req.captures.size == 1; SET path = 'repository'; ELSE; SET path = 'ref'; END %]
-
+
- Tree
- Long log
-
+
- Short log
-
+
-
- [%# FIXME: convert to c.uri_for_action #%]
-
- Branches
-
-
+
-
+
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 %]
-
- [%-
- c.action.name
- .replace("_"," ")
- .replace("log", " log")
- .replace("fancy","")
- .replace("index","Repositories")
- FILTER ucfirst
+
+
+ [%-
+
+ #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;
+ IF actions_list.$action_name && on_file_page;
+ '' _ action_name_ucfirst _ '';
+ ELSE;
+ action_name_ucfirst;
+ END;
+
-%]
-
-
-
+
-
+
+ [%-
+ IF actions_list.$action_name;
+ '';
+ FOREACH action IN actions_list;
+ action_output = action.key FILTER ucfirst;
+ NEXT IF action_output == action_name_ucfirst;
+ action = action.key;
+ '- ' _ action_output _ '
';
+ END;
+ '
';
+ END;
+ -%]
+
@@ -135,22 +143,22 @@