Fixed a couple of URI escaping related bugs.
[catagits/Gitalist.git] / root / wrapper.tt2
CommitLineData
c8a42dd5 1[%- IF no_wrapper || template.name.match('\.(css|js|txt)'); content; ELSE; -%]
82f94bce 2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
3"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
4<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
d3feefcf 5<head>
f71a83ab 6 <!-- git core binaries version [% git_version %] -->
82f94bce 7 <meta charset="utf-8" />
8 <meta name="generator" content="gitweb/[% version %] git/[% git_version %]" />
9 <meta name="robots" content="index, nofollow" />
a349e797 10 <title>[%# FIXME - MING %][%-
da8f4f82 11 title = BLOCK;
12 c.config.sitename;
87581f05 13 IF Repository; ' - ' _ Repository.name | html; END;
906a2dd2 14 IF c.action; ' / ' _ c.action; END;
15 IF filename; ' - ' _ filename | html; END;
a349e797 16 IF c.action && c.action == 'tree'; '/'; END;
da8f4f82 17 END;
18 title;
19 -%] (Gitalist)</title>
20 [% INCLUDE '_header_feeds.tt2' %]
82f94bce 21
2b686219 22 <link rel="stylesheet" type="text/css" href="[% c.uri_for('/core.css') %]" />
628d42fd 23 <link rel="shortcut icon" href="[% c.uri_for('/static/favicon.ico') %]" />
a2ae6c8d 24 <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
25 <script src="[% c.uri_for('/static/js/site.js') %]"></script>
24701964 26</head>
27
28<body>
29
08d8bb08 30<div id="header_holder">
82f94bce 31 <div class="sub_holder">
08d8bb08 32 <div id="header">
33 <a href="[% c.uri_for('/') %]" id="logo"><img src="[% c.uri_for('/static/i/logo.png') %]" alt="Gitalist" /></a>
9143f8d4 34
08d8bb08 35 <div class="search">
ef0ad44d 36 [% IF Repository; INCLUDE 'nav/search.tt2'; ELSE; %]
37
38 <!--
39 [%# FIXME - Search submits to blank(ish) page %]
40 <form method="get" action="[% c.uri_for_action('/search') %]" enctype="application/x-www-form-urlencoded">
41 <p class="projsearch">Search:
42 <input type="text" name="s" value="[% search_text %]" />
43 </p>
44 </form>
45 -->
08d8bb08 46 [% END %]
47 </div>
82f94bce 48 </div>
49
50
51 <div id="nav_logs" [% 'style="visibility:hidden"' IF c.action.name == "index" %]>
9143f8d4 52
53 [% IF c.req.captures.size == 1; SET path = 'repository'; ELSE; SET path = 'ref'; END %]
54
82f94bce 55 <ul>
03686cdc 56 <li[% ' class="selected"' IF c.action.name.match('tree') %]><a href="[% c.uri_for_action('/ref/tree', c.req.captures) || c.uri_for_action('/repository/tree', c.req.captures) %]" id="tree">Tree</a></li>
9143f8d4 57
80d7575a 58 <li[% ' class="selected"' IF c.action.name.match('longlog') %]><a href="[% c.uri_for_action('/' _ path _ '/longlog', c.req.captures) %]" id="log_full">Long log</a></li>
9143f8d4 59
80d7575a 60 <li[% ' class="selected"' IF c.action.name.match('shortlog') %]><a href="[% c.uri_for_action('/' _ path _ '/shortlog', c.req.captures) %]" id="log_short">Short log</a></li>
9143f8d4 61
62
63 <li id="branch_selector">
9143f8d4 64 Branches
a2ae6c8d 65 <select id='branch-list'>
9143f8d4 66 <option value="">HEAD</option>
a2ae6c8d 67 [% FOREACH branch IN Repository.heads %]
68 <option value="[% branch.name %]">[% branch.name %]</option>
9143f8d4 69 [% END %]
70
71 </select>
72 </li>
73
82f94bce 74 </ul>
75 </div>
76
77 <h1>
78 <a href="[% c.uri_for('/') %]">Home</a>
79
80 [%- IF Repository %]
81 / <a href="[% c.uri_for_action('/repository/summary', [Repository.name]) %]/shortlog">[% Repository.name %]</a>
82 [%- END %]
83 /
9143f8d4 84 [%- IF Repository %]
85 [%# FIXME: output branch name in a nicer way!!! #%]
86 [% FOREACH branch_head IN Repository.heads %]
87 [% IF c.req.path.search(branch_head.name) %]
88 <a href="[% c.uri_for_action('/repository/summary', [Repository.name]) %]/[% branch_head.name %]/shortlog">[% branch_head.name %]</a> /
89 [% END %]
90 [% END %]
91 [%- END %]
82f94bce 92
066e05d3 93
9143f8d4 94 [%-
97bdf7bc 95
96 #FIXME on a history view of a folder, don't show extra actions in dropdown
97 SET on_file_page = 1;
98
0aa355fb 99 SET actions_list = {
100 "blob" => 1,
101 "raw" => 1,
102 "blame" => 1,
103 "history" => 1,
104 };
105
066e05d3 106 SET action_name = c.action.name
107 .replace("_"," ")
108 .replace("log", " log")
109 .replace("fancy","")
110 .replace("index","Repositories");
111 action_name_ucfirst = action_name FILTER ucfirst;
97bdf7bc 112 IF actions_list.$action_name && on_file_page;
0aa355fb 113 '<a href="#" id="actions_nav_link"><span>' _ action_name_ucfirst _ '</span></a>';
114 ELSE;
115 action_name_ucfirst;
116 END;
066e05d3 117
9143f8d4 118 -%]
066e05d3 119
82f94bce 120 </h1>
121
066e05d3 122 [%-
066e05d3 123 IF actions_list.$action_name;
124 '<ul id="actions_nav_list">';
125 FOREACH action IN actions_list;
126 action_output = action.key FILTER ucfirst;
127 NEXT IF action_output == action_name_ucfirst;
128 action = action.key;
7a2c74c3 129 '<li><a href="' _ c.uri_for("/") _ c.req.path.replace(action_name, action) _ '">' _ action_output _ '</a></li>';
066e05d3 130 END;
131 '</ul>';
132 END;
133 -%]
134
82f94bce 135 </div>
136</div>
137
066e05d3 138
82f94bce 139<div id="content_holder">
140 <div id="content" class="sub_holder">
141 <div id="content_inner">
1fd8159c 142
82f94bce 143
d3feefcf 144
10938267 145 [% content %]
10938267 146
82f94bce 147
82f94bce 148 </div>
149 </div>
150</div>
69421cb7 151
eab82ed1 152<div id="footer_holder">
153 <div id="footer" class="sub_holder">
154
8d491fb3 155 <p>[% IF Repository; Repository.description | html IF Repository.description != "Unnamed repository; edit this file to name it for gitweb." ; END; %]</p>
eab82ed1 156
157 <a title="git homepage" href="http://git-scm.org"><img src="[% c.uri_for('/logo.png') %]" id="git_logo" alt="git" /></a>
158
159 <div id="feeds">
160 [% INCLUDE 'inc/footer_feeds.tt2' %]
161 </div>
82f94bce 162 </div>
eab82ed1 163
2cf1e781 164</div>
165
82f94bce 166
9143f8d4 167
eab82ed1 168<div id="debug_holder">
169 <div id="debug" class="sub_holder">
82f94bce 170
eab82ed1 171 <p>Debug:</p>
172
173 [% USE Dumper %]
174 <pre>
175 [% Repository.path %]
a2ae6c8d 176 [% Dumper.dump(c.req.args) %]
eab82ed1 177 </pre>
178
179 </div>
180</div>
ed30bf20 181
5d1190ef 182<span id="current-uri" class="js-data">[%
a2ae6c8d 183 # A bit of smoke and mirrors to get the /repository/shortlog URIs working
184 cur_act = '' _ c.action;
185 cur_uri = cur_act.match("log") || cur_act.match("^ref")
186 ? '/ref/' _ cur_act.replace("^(repository|ref)/", '')
187 : cur_act;
5d1190ef 188 # XXX I just want lists!
a2ae6c8d 189 IF c.req.args.size > 0;
5d1190ef 190 c.uri_for_action(cur_uri, [Repository.name, 'HEAD'], c.req.args.0);
a2ae6c8d 191 ELSE;
192 c.uri_for_action(cur_uri, [Repository.name, 'HEAD']);
193 END;
194%]</span>
195
d3feefcf 196</body>
197</html>
c8a42dd5 198[%- END -%]