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" />
16 <?php VGPlugin
::call_hooks('header'); ?
>
21 VGPlugin
::call_hooks('page_start');
22 if (isset($page['notices'])) {
23 echo '<div class="notices">';
24 foreach ($page['notices'] as $n) {
25 echo "<p class=\"$n[class]\">$n[message]</p>";
34 if (isset($page['project'])) {
35 echo " » <a href=\"". makelink(array('a' => 'summary', 'p' => $page['project'])) ."\">$page[project]</a>";
37 // TODO: move this out of here
38 if ($page['action'] === 'summary') {
41 elseif ($page['action'] === 'commit') {
42 echo " : Commit ". substr($page['commit_id'], 0, 6);
44 elseif ($page['action'] === 'commitdiff') {
45 echo " : Commitdiff ". substr($page['commit_id'], 0, 6);
47 elseif ($page['action'] === 'shortlog') {
50 elseif ($page['action'] === 'tree') {
51 echo " : Tree ". substr($page['tree_id'], 0, 6);
53 elseif ($page['action'] === 'viewblob') {
54 echo " : Blob ". substr($page['hash'], 0, 6);
57 if (isset($page['path'])) {
58 if (isset($page['pathinfo'])) {
61 foreach ($page['pathinfo'] as $p) {
62 if (strlen($f) > 0) { $f .= '/'; }
64 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> ";
71 <?php
if (isset($page['project'])) { ?
>
76 'shortlog' => array(),
77 'commit' => array('h' => $page['commit_id']),
78 'commitdiff' => array('h' => $page['commit_id']),
79 'tree' => array('h' => $page['tree_id'], 'hb' => $page['commit_id']),
82 foreach ($links as $link => $params) {
83 if (!$first) { echo " | "; }
84 if ($page['action'] === $link) { echo '<span class="cur">'; }
85 echo "<a href=\"". makelink(array_merge(array('a' => $link, 'p' => $page['project']), $params)) ."\">". ucfirst($link) . "</a>";
86 if ($page['action'] === $link) { echo '</span>'; }
89 VGPlugin
::call_hooks('pagenav');
92 <form action
="?" type
="get" class="search">
93 <input type
="hidden" name
="a" value
="search" />
94 <input type
="hidden" name
="p" value
="<?php echo $page['project']; ?>" />
97 $opts = array('commit', 'change', 'author', 'committer');
98 foreach ($opts as $opt) {
100 if (isset($page['search_t']) && $opt == $page['search_t']) {
101 echo ' selected="selected"';
103 echo ">$opt</option>\n";
107 <input type
="text" name
="s"<?php
if (isset($page['search_s'])) { echo ' value="'. htmlentities($page['search_s']) .'"'; } ?
> />