示例#1
0
<h1>Heads</h1>

<table class="heads">
<thead>
<tr>
	<th class="date">Date</th>
	<th class="branch">Branch</th>
	<th class="actions">Actions</th>
</tr>
</thead>
<tbody>
<?php 
$tr_class = 'even';
foreach ($page['heads'] as $h) {
    $tr_class = $tr_class == "odd" ? "even" : "odd";
    echo "<tr class=\"{$tr_class}\">\n";
    echo "\t<td>{$h['date']}</td>\n";
    echo "\t<td><a href=\"" . makelink(array('a' => 'shortlog', 'p' => $page['project'], 'h' => $h['fullname'])) . "\">{$h['name']}</a></td>\n";
    echo "\t<td></td>\n";
    echo "</tr>\n";
}
?>
</tbody>
</table>

<?php 
// call plugins that register "summary" hook
if (in_array('summary', array_keys(VGPlugin::$plugin_hooks))) {
    VGPlugin::call_hooks('summary');
}
示例#2
0
            $f .= "{$p['name']}";
            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> ";
        }
    }
}
?>
</div>
<div id="page_body">

<?php 
if (isset($page['project'])) {
    ?>
<div class="pagenav">
<?php 
    $page['links'] = array('summary' => array(), 'shortlog' => array(), 'commit' => array('h' => $page['commit_id']), 'commitdiff' => array('h' => $page['commit_id']), 'tree' => array('h' => $page['tree_id'], 'hb' => $page['commit_id']));
    VGPlugin::call_hooks('pagenav');
    $first = true;
    foreach ($page['links'] as $link => $params) {
        if (!$first) {
            echo " | ";
        }
        if ($page['action'] === $link) {
            echo '<span class="cur">';
        }
        echo "<a href=\"" . makelink(array_merge(array('a' => $link, 'p' => $page['project']), $params)) . "\">" . ucfirst($link) . "</a>";
        if ($page['action'] === $link) {
            echo '</span>';
        }
        $first = false;
    }
    $cP = $conf['projects'][$page['project']];
示例#3
0
文件: footer.php 项目: schipa/viewgit
            <?php 
if ($conf['ad']) {
    echo "<div class=\"ad\"><a href=\"http://viewgit.fealdia.org/\" title=\"Visit the ViewGit homepage\">ViewGit</a></div>";
}
VGPlugin::call_hooks('footer');
?>
        </div>
    </body>
</html>