[% INCLUDE '_header_feeds.tt2' %]
<link rel="stylesheet" type="text/css" href="[% c.uri_for('/core.css') %]" />
- <link rel="shortcut icon" href="[% c.uri_for('/static/git-favicon.png') %]" type="image/png" />
+ <link rel="shortcut icon" href="[% c.uri_for('/static/favicon.ico') %]" />
<script type="text/javascript">
// FIXME: this should be in an external js file once c.uri_for works in js files
function compareDiffs(repo, path){
}
}
}
- document.location.href = "[% c.uri_for("/") %]" + repo + "/"+ sha1 + "/diff/" + sha2 + "/" + path;
+ document.location.href = "[% c.uri_for("/") %]" + repo + "/"+ sha2 + "/diff/" + sha1 + "/" + path;
}
// handles hover sub menus in IE
startList = function() {
<a href="[% c.uri_for('/') %]" id="logo"><img src="[% c.uri_for('/static/i/logo.png') %]" alt="Gitalist" /></a>
<div class="search">
- [% IF Repository; INCLUDE 'nav/search.tt2'; ELSE; %]
-
- <form method="get" action="[% c.uri_for_action('/search') %]" enctype="application/x-www-form-urlencoded">
- <p class="projsearch">Search:
- <input type="text" name="s" value="[% search_text %]" />
- </p>
- </form>
+ [% IF Repository; INCLUDE 'nav/search.tt2'; ELSE; %]
+
+ <!--
+ [%# FIXME - Search submits to blank(ish) page %]
+ <form method="get" action="[% c.uri_for_action('/search') %]" enctype="application/x-www-form-urlencoded">
+ <p class="projsearch">Search:
+ <input type="text" name="s" value="[% search_text %]" />
+ </p>
+ </form>
+ -->
[% END %]
</div>
</div>
<li id="branch_selector">
- [%# FIXME: convert to c.uri_for_action #%]
-
Branches
- <select onchange="document.location.href='/[% Repository.name %]/'+this.options[this.selectedIndex].text + '/shortlog';">
+ <select onchange="document.location.href='[% c.uri_for("/") %][% Repository.name %]/'+this.options[this.selectedIndex].text + '/shortlog';">
<option value="">HEAD</option>
[% FOREACH branch_head IN Repository.heads %]
[%-
+
+ #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;
- '<a href="#" id="actions_nav_link"><span>' _ action_name_ucfirst _ '</span></a>';
+ IF actions_list.$action_name && on_file_page;
+ '<a href="#" id="actions_nav_link"><span>' _ action_name_ucfirst _ '</span></a>';
+ ELSE;
+ action_name_ucfirst;
+ END;
-%]
</h1>
[%-
- SET actions_list = {
- "blob" => 1,
- "raw" => 1,
- "blame" => 1,
- "history" => 1,
- };
-
IF actions_list.$action_name;
'<ul id="actions_nav_list">';
FOREACH action IN actions_list;
action_output = action.key FILTER ucfirst;
NEXT IF action_output == action_name_ucfirst;
action = action.key;
- '<li><a href="/' _ c.req.path.replace(action_name, action) _ '">' _ action_output _ '</a></li>';
+ '<li><a href="' _ c.uri_for("/") _ c.req.path.replace(action_name, action) _ '">' _ action_output _ '</a></li>';
END;
'</ul>';
END;
[% USE Dumper %]
<pre>
[% Repository.path %]
- [%# Dumper.dump(c.req.path) %]
+ [%# Dumper.dump(Commit) %]
</pre>
</div>