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