Exemplo n.º 1
0
 function breadcrumbs()
 {
     echo "<div class=\"githead\">\n";
     $crumb = "<a href=\"" . sanitized_url() . "\">projects</a> / ";
     if (isset($_GET['p'])) {
         $crumb .= html_ahref(array('p' => $_GET['p'], 'pg' => "")) . $_GET['p'] . "</a> / ";
     }
     if (isset($_GET['b'])) {
         $crumb .= "blob";
     }
     if (isset($_GET['t'])) {
         $crumb .= "tree";
     }
     if ($_GET['a'] == 'commitdiff') {
         $crumb .= 'commitdiff';
     }
     echo $crumb;
     echo "</div>\n";
 }
Exemplo n.º 2
0
function get_project_link($repo, $type = false, $tag = "HEAD")
{
    $path = basename($repo);
    if (!$type) {
        return "<a href=\"" . sanitized_url() . "p={$path}\">{$path}</a>";
    } elseif ($type == "targz") {
        return html_ahref(array('p' => $path, 'dl' => 'targz', 'h' => $tag)) . ".tar.gz</a>";
    } elseif ($type == "zip") {
        return html_ahref(array('p' => $path, 'dl' => 'zip', 'h' => $tag)) . ".zip</a>";
    }
}
Exemplo n.º 3
0
function html_breadcrumbs()
{
    $str = '';
    $str .= "<div class=\"githead\">\n";
    $crumb = "<a href=\"" . sanitized_url() . "\">projects</a> / ";
    if (isset($_GET['p'])) {
        $crumb .= html_ahref(array('p' => $_GET['p']), $_GET['p']) . " / ";
    }
    if ($_GET['a'] == 'commitdiff') {
        $crumb .= 'commitdiff';
    } else {
        if (isset($_GET['b'])) {
            $crumb .= "blob";
        }
    }
    $str .= $crumb;
    $str .= "</div>\n";
    return $str;
}