hydra/src/Hydra/root/layout.tt

123 lines
4.3 KiB
Plaintext
Raw Normal View History

[% USE date -%]
2008-11-18 12:48:58 +00:00
[% USE HTML -%]
2008-11-13 12:11:18 +00:00
<?xml version="1.0" encoding="UTF-8"?>
2008-11-13 09:48:10 +00:00
[% BLOCK makeLink %]
<li [% IF curUri == uri %]class="active"[% END %]>
<div class="title"><a href="[% uri %]">[% title %]</a></div>
</li>
[% END %]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>[% title %]</title>
2008-11-18 16:45:23 +00:00
<link rel="stylesheet" href="/static/css/hydra.css" type="text/css" />
<link rel="stylesheet" href="/static/css/logfile.css" type="text/css" />
2008-11-17 13:36:58 +00:00
<script type="text/javascript" src="/static/js/jquery-pack.js"></script>
2008-10-28 15:34:29 +00:00
<script type="text/javascript" src="/static/js/tablesorter/jquery.tablesorter.js"></script>
2008-10-28 15:34:29 +00:00
<script type="text/javascript">
2008-11-18 12:48:58 +00:00
$(document).ready(function() {
$("table.tablesorter").tablesorter();
/* Set the appearance of the toggle depending on whether the
corresponding subtree is initially shown or hidden. */
$(".logTreeToggle").map(function() {
if ($(this).siblings("ul:hidden").length == 0) {
$(this).text("-");
} else {
$(this).text("+");
}
});
/* When a toggle is clicked, show or hide the subtree. */
$(".logTreeToggle").click(function() {
if ($(this).siblings("ul:hidden").length != 0) {
$(this).siblings("ul").show();
$(this).text("-");
} else {
$(this).siblings("ul").hide();
$(this).text("+");
}
});
/* Implementation of the expand all link. */
$(".logTreeExpandAll").click(function() {
$(".logTreeToggle", $(this).siblings(".toplevel")).map(function() {
$(this).siblings("ul").show();
$(this).text("-");
});
});
/* Implementation of the collapse all link. */
$(".logTreeCollapseAll").click(function() {
$(".logTreeToggle", $(this).siblings(".toplevel")).map(function() {
$(this).siblings("ul").hide();
$(this).text("+");
});
});
2008-11-18 12:48:58 +00:00
});
2008-10-28 15:34:29 +00:00
</script>
</head>
<body>
2008-11-12 23:45:11 +00:00
<div id="container">
<div id="leftnavbar">
2008-11-13 12:11:18 +00:00
<ul class="menu">
<li>
2008-11-12 23:45:11 +00:00
<div class="title">Hydra</div>
2008-11-13 12:11:18 +00:00
<ul class="submenu">
2008-11-13 09:48:10 +00:00
[% INCLUDE makeLink uri = c.uri_for('/') title = "Overview" %]
[% INCLUDE makeLink uri = c.uri_for('/queue') title = "Queue" %]
[% INCLUDE makeLink uri = c.uri_for('/latest') title = "Latest builds" %]
[% INCLUDE makeLink uri = c.uri_for('/all') title = "All builds" %]
[% INCLUDE makeLink uri = c.uri_for('/search') title = "Search builds" %]
2008-11-12 23:45:11 +00:00
</ul>
</li>
2008-11-13 12:11:18 +00:00
<li>
2008-11-12 23:45:11 +00:00
<div class="title">Projects</div>
2008-11-13 12:11:18 +00:00
<ul class="submenu">
2008-11-12 23:45:11 +00:00
[% FOREACH project IN projects %]
2008-11-13 12:11:18 +00:00
<li [% IF curUri == c.uri_for('/project' project.name) %]class="active"[% END %]>
2008-11-18 12:48:58 +00:00
<div class="title"><a href="[% c.uri_for('/project' project.name) %]">[% HTML.escape(project.displayname) %]</a></div>
2008-11-13 12:11:18 +00:00
[% IF curProject.name == project.name %]
<ul class="subsubmenu">
2008-11-13 14:54:50 +00:00
[% INCLUDE makeLink uri = c.uri_for('/project' project.name 'edit') title = "Edit" %]
2008-11-13 12:11:18 +00:00
[% INCLUDE makeLink uri = c.uri_for('/project' project.name 'status') title = "Status" %]
[% INCLUDE makeLink uri = c.uri_for('/project' project.name 'all') title = "All builds" %]
</ul>
[% END %]
</li>
2008-11-12 23:45:11 +00:00
[% END %]
</ul>
</li>
2008-11-13 12:11:18 +00:00
<li>
2008-11-12 23:45:11 +00:00
<div class="title">Admin</div>
2008-11-13 12:11:18 +00:00
<ul class="submenu">
2008-11-13 09:48:10 +00:00
[% INCLUDE makeLink uri = c.uri_for('/users') title = "Users" %]
2008-11-13 14:54:50 +00:00
[% INCLUDE makeLink uri = c.uri_for('/createproject') title = "Create a project" %]
2008-11-12 23:45:11 +00:00
</ul>
</li>
</ul>
</div>
<div id="content">
[% content %]
<div id="footer">
<hr />
2008-11-25 11:09:15 +00:00
Generated on [% date.format %].
2008-11-12 23:45:11 +00:00
</div>
</div>
</div>
</body>
</html>