1 [%- IF no_wrapper || template.name.match('\.(css|js|txt)'); content; ELSE; -%]
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">
6 <!-- git core binaries version [% git_version %] -->
7 <meta charset="utf-8" />
8 <meta name="generator" content="gitweb/[% version %] git/[% git_version %]" />
9 <meta name="robots" content="index, nofollow" />
10 <title>[%# FIXME - MING %][%-
13 IF Repository; ' - ' _ Repository.name | html; END;
14 IF c.action; ' / ' _ c.action; END;
15 IF filename; ' - ' _ filename | html; END;
16 IF c.action && c.action == 'tree'; '/'; END;
19 -%] (Gitalist)</title>
20 [% INCLUDE '_header_feeds.tt2' %]
22 <link rel="stylesheet" type="text/css" href="[% c.uri_for('/core.css') %]" />
23 <link rel="shortcut icon" href="[% c.uri_for('/static/git-favicon.png') %]" type="image/png" />
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;
35 for(var i=0,len=f.length;i<len;i++){
36 if(f[i].name == "sha1_a"){
41 if(f[i].name == "sha1_b"){
47 document.location.href = "[% c.uri_for("/") %]" + repo + "/"+ sha1 + "/diff/" + sha2 + "/" + path;
49 // handles hover sub menus in IE
50 startList = function() {
51 if (document.getElementById && document.getElementById("actions_nav_link")) {
52 var navList = document.getElementById("actions_nav_list");
53 var navLink = document.getElementById("actions_nav_link");
54 // assign event handlers to each element
55 navLink.onmouseover=function() {
58 navList.onmouseover=function() {
61 navList.onmouseout=function() {
62 navList.className=navList.className.replace(" actions_nav_list_over", "");
64 navLink.onmouseout=function() {
65 navList.className=navList.className.replace(" actions_nav_list_over", "");
70 function setNavClass(el){
71 var link_el = document.getElementById("actions_nav_link");
72 var offsetAry = findPos(link_el);
73 // set position of list
74 el.style.left = offsetAry[0]+"px";
75 el.style.top = offsetAry[1]+30 +"px";
76 el.className+=" actions_nav_list_over";
79 function addLoadListener(fn){
80 if (typeof window.addEventListener != 'undefined') {
81 window.addEventListener('load', fn, false);
82 }else if (typeof document.addEventListener != 'undefined'){
83 document.addEventListener('load', fn, false);
84 }else if (typeof window.attachEvent != 'undefined'){
85 window.attachEvent('onload', fn);
87 var oldfn = window.onload;
88 if (typeof window.onload != 'function'){
91 window.onload = function(){
98 function findPos(obj) {
99 var curleft = curtop = 0;
100 if (obj.offsetParent) {
102 curleft += obj.offsetLeft;
103 curtop += obj.offsetTop;
105 while (obj = obj.offsetParent);
106 return [curleft,curtop];
109 addLoadListener(startList);
115 <div id="header_holder">
116 <div class="sub_holder">
118 <a href="[% c.uri_for('/') %]" id="logo"><img src="[% c.uri_for('/static/i/logo.png') %]" alt="Gitalist" /></a>
121 [% IF Repository; INCLUDE 'nav/search.tt2'; ELSE; %]
123 <form method="get" action="[% c.uri_for_action('/search') %]" enctype="application/x-www-form-urlencoded">
124 <p class="projsearch">Search:
125 <input type="text" name="s" value="[% search_text %]" />
133 <div id="nav_logs" [% 'style="visibility:hidden"' IF c.action.name == "index" %]>
135 [% IF c.req.captures.size == 1; SET path = 'repository'; ELSE; SET path = 'ref'; END %]
138 <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>
140 <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>
142 <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>
145 <li id="branch_selector">
146 [%# FIXME: convert to c.uri_for_action #%]
149 <select onchange="document.location.href='/[% Repository.name %]/'+this.options[this.selectedIndex].text + '/shortlog';">
150 <option value="">HEAD</option>
152 [% FOREACH branch_head IN Repository.heads %]
153 <option [% "selected" IF c.req.path.search(branch_head.name) %]>[% branch_head.name %]</option>
163 <a href="[% c.uri_for('/') %]">Home</a>
166 / <a href="[% c.uri_for_action('/repository/summary', [Repository.name]) %]/shortlog">[% Repository.name %]</a>
170 [%# FIXME: output branch name in a nicer way!!! #%]
171 [% FOREACH branch_head IN Repository.heads %]
172 [% IF c.req.path.search(branch_head.name) %]
173 <a href="[% c.uri_for_action('/repository/summary', [Repository.name]) %]/[% branch_head.name %]/shortlog">[% branch_head.name %]</a> /
187 SET action_name = c.action.name
189 .replace("log", " log")
191 .replace("index","Repositories");
192 action_name_ucfirst = action_name FILTER ucfirst;
193 IF actions_list.$action_name;
194 '<a href="#" id="actions_nav_link"><span>' _ action_name_ucfirst _ '</span></a>';
204 IF actions_list.$action_name;
205 '<ul id="actions_nav_list">';
206 FOREACH action IN actions_list;
207 action_output = action.key FILTER ucfirst;
208 NEXT IF action_output == action_name_ucfirst;
210 '<li><a href="/' _ c.req.path.replace(action_name, action) _ '">' _ action_output _ '</a></li>';
220 <div id="content_holder">
221 <div id="content" class="sub_holder">
222 <div id="content_inner">
233 <div id="footer_holder">
234 <div id="footer" class="sub_holder">
236 <p>[% IF Repository; Repository.description | html IF Repository.description != "Unnamed repository; edit this file to name it for gitweb." ; END; %]</p>
238 <a title="git homepage" href="http://git-scm.org"><img src="[% c.uri_for('/logo.png') %]" id="git_logo" alt="git" /></a>
241 [% INCLUDE 'inc/footer_feeds.tt2' %]
249 <div id="debug_holder">
250 <div id="debug" class="sub_holder">
256 [% Repository.path %]
257 [%# Dumper.dump(c.req.path) %]