2 echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n";
4 <!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
5 <html xmlns
="http://www.w3.org/1999/xhtml" xml
:lang
="en" lang
="en">
7 <title
><?php
echo $page['title']; ?
></title
>
8 <link rel
="stylesheet" href
="default.css" type
="text/css" />
9 <link rel
="icon" type
="image/png" href
="favicon.png" />
11 if (isset($page['project'])) {
12 echo "\t<link rel=\"alternate\" type=\"application/rss+xml\" title=\"". htmlentities($page['project']) ." log\" href=\"". makelink(array('a' => 'rss-log', 'p' => $page['project'])) ."\" />\n";
15 <meta name
="generator" content
="ViewGit" />
22 if (isset($page['project'])) {
23 echo " » <a href=\"". makelink(array('a' => 'summary', 'p' => $page['project'])) ."\">$page[project]</a>";
25 // TODO: move this out of here
26 if ($page['action'] === 'summary') {
29 elseif ($page['action'] === 'commit') {
30 echo " : Commit ". substr($page['commit_id'], 0, 6);
32 elseif ($page['action'] === 'commitdiff') {
33 echo " : Commitdiff ". substr($page['commit_id'], 0, 6);
35 elseif ($page['action'] === 'shortlog') {
38 elseif ($page['action'] === 'tree') {
39 echo " : Tree ". substr($page['tree_id'], 0, 6);
41 elseif ($page['action'] === 'viewblob') {
42 echo " : Blob ". substr($page['hash'], 0, 6);
45 if (isset($page['path'])) {
46 if (isset($page['pathinfo'])) {
49 foreach ($page['pathinfo'] as $p) {
50 if (strlen($f) > 0) { $f .= '/'; }
52 echo "/ <a href=\"". makelink(array('a' => ($p['type'] === 'tree' ?
'tree' : 'viewblob'), 'p' => $page['project'], 'h' => $p['hash'], 'hb' => $page['commit_id'], 'f' => $f)) ."\">$p[name]</a> ";
59 <?php
if (isset($page['project'])) { ?
>
64 'shortlog' => array(),
65 'commit' => array('h' => $page['commit_id']),
66 'commitdiff' => array('h' => $page['commit_id']),
67 'tree' => array('h' => $page['tree_id'], 'hb' => $page['commit_id']),
70 foreach ($links as $link => $params) {
71 if (!$first) { echo " | "; }
72 if ($page['action'] === $link) { echo '<span class="cur">'; }
73 echo "<a href=\"". makelink(array_merge(array('a' => $link, 'p' => $page['project']), $params)) ."\">". ucfirst($link) . "</a>";
74 if ($page['action'] === $link) { echo '</span>'; }