- for_each_branch_ref(print_branch_option, cgit_query_head);
- html("</select>\n");
- html("</td><td>");
- html("<noscript><input type='submit' id='switch-btn' value='..'></noscript>\n");
- html("</td></tr></table>");
- html("</form>\n");
-
- html("<p>\n<h1>search</h1>\n");
- html("<form method='get' action='");
- if (cgit_virtual_root)
- html_attr(cgit_fileurl(cgit_query_repo, "log",
- cgit_query_path, NULL));
+ for_each_branch_ref(print_branch_option, ctx->qry.head);
+ html("</select> ");
+ html("<input type='submit' name='' value='switch'/>");
+ html("</form>");
+ } else
+ html_txt(ctx->cfg.root_title);
+ html("</td></tr>\n");
+
+ html("<tr><td class='sub'>");
+ if (ctx->repo) {
+ html_txt(ctx->repo->desc);
+ html("</td><td class='sub right'>");
+ html_txt(ctx->repo->owner);
+ } else {
+ if (ctx->cfg.root_desc)
+ html_txt(ctx->cfg.root_desc);
+ else if (ctx->cfg.index_info)
+ html_include(ctx->cfg.index_info);
+ }
+ html("</td></tr></table>\n");
+
+ html("<table class='tabs'><tr><td>\n");
+ if (ctx->repo) {
+ cgit_summary_link("summary", NULL, hc(cmd, "summary"),
+ ctx->qry.head);
+ cgit_refs_link("refs", NULL, hc(cmd, "refs"), ctx->qry.head,
+ ctx->qry.sha1, NULL);
+ cgit_log_link("log", NULL, hc(cmd, "log"), ctx->qry.head,
+ NULL, NULL, 0, NULL, NULL);
+ cgit_tree_link("tree", NULL, hc(cmd, "tree"), ctx->qry.head,
+ ctx->qry.sha1, NULL);
+ cgit_commit_link("commit", NULL, hc(cmd, "commit"),
+ ctx->qry.head, ctx->qry.sha1);
+ cgit_diff_link("diff", NULL, hc(cmd, "diff"), ctx->qry.head,
+ ctx->qry.sha1, ctx->qry.sha2, NULL);
+ if (ctx->repo->readme)
+ reporevlink("about", "about", NULL,
+ hc(cmd, "about"), ctx->qry.head, NULL,
+ NULL);
+ html("</td><td class='form'>");
+ html("<form class='right' method='get' action='");
+ if (ctx->cfg.virtual_root)
+ html_url_path(cgit_fileurl(ctx->qry.repo, "log",
+ ctx->qry.path, NULL));