X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=root%2Fwrapper.tt2;h=e4a90571d4244987ddd7afe0e73eacc42ad4dece;hb=b7b5f98eaa67e9968382a34934e64a2330ea4d23;hp=593246a50a1205cb1a1df639dab393beb5132da7;hpb=189f3b00a6f99a59268fd89d67d7f5fde9b0e519;p=catagits%2FGitalist.git
diff --git a/root/wrapper.tt2 b/root/wrapper.tt2
index 593246a..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; -%]
-
-
+
+
+
+ [% IF c.req.captures.size == 1; SET path = 'repository'; ELSE; SET path = 'ref'; END %]
+
- [% IF c.req.captures.size == 1; SET path = 'repository'; ELSE; SET path = 'ref'; END %]
+ - Tree
+
+ - Long log
+
+ - Short log
+
+
+ -
+ Branches
+
+
- - Long log
- - Short log
@@ -56,22 +81,64 @@
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) %]
+
[% branch_head.name %] /
+ [% 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;
+ -%]
+
-
-
+