Remove the description if it is the default "Unnamed repo..."
[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') %]" />
82f94bce 23 <link rel="shortcut icon" href="[% c.uri_for('/static/git-favicon.png') %]" type="image/png" />
71eba67c 24 <script type="text/javascript">
25 // FIXME: this should be in an external js file once c.uri_for works in js files
26 function compareDiffs(repo, path){
27 var f = document.theform;
28 if(!repo){
29 var repo = "";
30 }
31 if(!path){
32 var path = "";
33 }
34 var sha1,sha2;
35 for(var i=0,len=f.length;i<len;i++){
36 if(f[i].name == "sha1_a"){
37 if(f[i].checked){
38 sha1 = f[i].value;
39 }
40 }
41 if(f[i].name == "sha1_b"){
42 if(f[i].checked){
43 sha2 = f[i].value;
44 }
45 }
46 }
47 document.location.href = "[% c.uri_for("/") %]" + repo + "/"+ sha1 + "/diff/" + sha2 + "/" + path;
48 }
49 </script>
24701964 50</head>
51
52<body>
53
08d8bb08 54<div id="header_holder">
82f94bce 55 <div class="sub_holder">
08d8bb08 56 <div id="header">
57 <a href="[% c.uri_for('/') %]" id="logo"><img src="[% c.uri_for('/static/i/logo.png') %]" alt="Gitalist" /></a>
9143f8d4 58
08d8bb08 59 <div class="search">
60 [% IF Repository; INCLUDE 'nav/search.tt2'; ELSE; %]
61
62 <form method="get" action="[% c.uri_for_action('/search') %]" enctype="application/x-www-form-urlencoded">
63 <p class="projsearch">Search:
64 <input type="text" name="s" value="[% search_text %]" />
65 </p>
66 </form>
67 [% END %]
68 </div>
82f94bce 69 </div>
70
71
72 <div id="nav_logs" [% 'style="visibility:hidden"' IF c.action.name == "index" %]>
9143f8d4 73
74 [% IF c.req.captures.size == 1; SET path = 'repository'; ELSE; SET path = 'ref'; END %]
75
82f94bce 76 <ul>
80d7575a 77 <li[% ' class="selected"' IF c.action.name.match('tree') %]><a href="[% c.uri_for_action('/ref/tree', c.req.captures) %]" id="tree">Tree</a></li>
9143f8d4 78
80d7575a 79 <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 80
80d7575a 81 <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 82
83
84 <li id="branch_selector">
85 [%# FIXME: convert to c.uri_for_action #%]
86
87 Branches
88 <select onchange="document.location.href='/[% Repository.name %]/'+this.options[this.selectedIndex].text + '/shortlog';">
89 <option value="">HEAD</option>
90
91 [% FOREACH branch_head IN Repository.heads %]
92 <option [% "selected" IF c.req.path.search(branch_head.name) %]>[% branch_head.name %]</option>
93 [% END %]
94
95 </select>
96 </li>
97
82f94bce 98 </ul>
99 </div>
100
101 <h1>
102 <a href="[% c.uri_for('/') %]">Home</a>
103
104 [%- IF Repository %]
105 / <a href="[% c.uri_for_action('/repository/summary', [Repository.name]) %]/shortlog">[% Repository.name %]</a>
106 [%- END %]
107 /
9143f8d4 108 [%- IF Repository %]
109 [%# FIXME: output branch name in a nicer way!!! #%]
110 [% FOREACH branch_head IN Repository.heads %]
111 [% IF c.req.path.search(branch_head.name) %]
112 <a href="[% c.uri_for_action('/repository/summary', [Repository.name]) %]/[% branch_head.name %]/shortlog">[% branch_head.name %]</a> /
113 [% END %]
114 [% END %]
115 [%- END %]
82f94bce 116
9143f8d4 117 [%-
118 c.action.name
119 .replace("_"," ")
120 .replace("log", " log")
121 .replace("fancy","")
122 .replace("index","Repositories")
123 FILTER ucfirst
124 -%]
eab82ed1 125
126
127
82f94bce 128 </h1>
129
130 </div>
131</div>
132
133
82f94bce 134<div id="content_holder">
135 <div id="content" class="sub_holder">
136 <div id="content_inner">
1fd8159c 137
82f94bce 138
d3feefcf 139
10938267 140 [% content %]
10938267 141
82f94bce 142
82f94bce 143 </div>
144 </div>
145</div>
69421cb7 146
eab82ed1 147<div id="footer_holder">
148 <div id="footer" class="sub_holder">
149
8d491fb3 150 <p>[% IF Repository; Repository.description | html IF Repository.description != "Unnamed repository; edit this file to name it for gitweb." ; END; %]</p>
eab82ed1 151
152 <a title="git homepage" href="http://git-scm.org"><img src="[% c.uri_for('/logo.png') %]" id="git_logo" alt="git" /></a>
153
154 <div id="feeds">
155 [% INCLUDE 'inc/footer_feeds.tt2' %]
156 </div>
82f94bce 157 </div>
eab82ed1 158
2cf1e781 159</div>
160
82f94bce 161
9143f8d4 162
eab82ed1 163<div id="debug_holder">
164 <div id="debug" class="sub_holder">
82f94bce 165
eab82ed1 166 <p>Debug:</p>
167
168 [% USE Dumper %]
169 <pre>
170 [% Repository.path %]
71eba67c 171 [%# Dumper.dump(c.req.arguments.0) %]
eab82ed1 172 </pre>
173
174 </div>
175</div>
ed30bf20 176
d3feefcf 177</body>
178</html>
c8a42dd5 179[%- END -%]