-rw-r--r-- | ui-shared.c | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/ui-shared.c b/ui-shared.c index bb08c4a..8a804c2 100644 --- a/ui-shared.c +++ b/ui-shared.c | |||
@@ -475,66 +475,53 @@ void cgit_print_pageheader(struct cgit_context *ctx) | |||
475 | { | 475 | { |
476 | struct cgit_cmd *cmd = cgit_get_cmd(ctx); | 476 | struct cgit_cmd *cmd = cgit_get_cmd(ctx); |
477 | 477 | ||
478 | html("<table id='header'>\n"); | 478 | html("<table id='header'>\n"); |
479 | html("<tr>\n"); | 479 | html("<tr>\n"); |
480 | html("<td class='logo' rowspan='2'><a href='"); | 480 | html("<td class='logo' rowspan='2'><a href='"); |
481 | if (ctx->cfg.logo_link) | 481 | if (ctx->cfg.logo_link) |
482 | html_attr(ctx->cfg.logo_link); | 482 | html_attr(ctx->cfg.logo_link); |
483 | else | 483 | else |
484 | html_attr(cgit_rooturl()); | 484 | html_attr(cgit_rooturl()); |
485 | html("'><img src='"); | 485 | html("'><img src='"); |
486 | html_attr(ctx->cfg.logo); | 486 | html_attr(ctx->cfg.logo); |
487 | html("'/></a></td>\n"); | 487 | html("' alt='cgit logo'/></a></td>\n"); |
488 | 488 | ||
489 | html("<td class='main'>"); | 489 | html("<td class='main'>"); |
490 | if (ctx->repo) { | 490 | if (ctx->repo) { |
491 | /* | ||
492 | html("<a href='"); | ||
493 | html_attr(cgit_rooturl()); | ||
494 | html("'>index</a> : "); | ||
495 | */ | ||
496 | reporevlink(NULL, ctx->repo->name, NULL, hc(cmd, "summary"), | 491 | reporevlink(NULL, ctx->repo->name, NULL, hc(cmd, "summary"), |
497 | ctx->qry.head, NULL, NULL); | 492 | ctx->qry.head, NULL, NULL); |
498 | html(" : "); | 493 | html(" : "); |
499 | html_txt(ctx->qry.page); | 494 | html_txt(ctx->qry.page); |
500 | html("</td><td class='form'>"); | 495 | html("</td><td class='form'>"); |
501 | html("<form method='get' action=''>\n"); | 496 | html("<form method='get' action=''>\n"); |
502 | add_hidden_formfields(0, 1, ctx->qry.page); | 497 | add_hidden_formfields(0, 1, ctx->qry.page); |
503 | html("<select name='h' onchange='this.form.submit();'>\n"); | 498 | html("<select name='h' onchange='this.form.submit();'>\n"); |
504 | for_each_branch_ref(print_branch_option, ctx->qry.head); | 499 | for_each_branch_ref(print_branch_option, ctx->qry.head); |
505 | html("</select> "); | 500 | html("</select> "); |
506 | html("<input type='submit' name='' value='switch'/>"); | 501 | html("<input type='submit' name='' value='switch'/>"); |
507 | html("</form>"); | 502 | html("</form>"); |
508 | } else | 503 | } else |
509 | html_txt(ctx->cfg.root_title); | 504 | html_txt(ctx->cfg.root_title); |
510 | html("</td>\n"); | 505 | html("</td></tr>\n"); |
511 | 506 | ||
512 | html("<tr><td class='sub'"); | 507 | html("<tr><td class='sub'"); |
513 | if (ctx->repo) { | 508 | if (ctx->repo) { |
514 | html(" colspan='2'>"); | 509 | html(" colspan='2'>"); |
515 | html_txt(ctx->repo->desc); | 510 | html_txt(ctx->repo->desc); |
516 | } | 511 | } else { |
517 | /* | ||
518 | else if (ctx->cfg.root_subtitle) | ||
519 | html_txt(ctx->cfg.root_subtitle); | ||
520 | */ | ||
521 | else { | ||
522 | html(">"); | 512 | html(">"); |
523 | html_txt("a fast webinterface for the git dscm"); | 513 | html_txt("a fast webinterface for the git dscm"); |
524 | } | 514 | } |
525 | html("</td></tr>\n"); | 515 | html("</td></tr></table>\n"); |
526 | |||
527 | html("</tr>\n"); | ||
528 | html("</table>\n"); | ||
529 | 516 | ||
530 | html("<table class='tabs'><tr><td>\n"); | 517 | html("<table class='tabs'><tr><td>\n"); |
531 | if (ctx->repo) { | 518 | if (ctx->repo) { |
532 | reporevlink(NULL, "summary", NULL, hc(cmd, "summary"), | 519 | reporevlink(NULL, "summary", NULL, hc(cmd, "summary"), |
533 | ctx->qry.head, NULL, NULL); | 520 | ctx->qry.head, NULL, NULL); |
534 | cgit_refs_link("refs", NULL, hc(cmd, "refs"), ctx->qry.head, | 521 | cgit_refs_link("refs", NULL, hc(cmd, "refs"), ctx->qry.head, |
535 | ctx->qry.sha1, NULL); | 522 | ctx->qry.sha1, NULL); |
536 | cgit_log_link("log", NULL, hc(cmd, "log"), ctx->qry.head, | 523 | cgit_log_link("log", NULL, hc(cmd, "log"), ctx->qry.head, |
537 | NULL, NULL, 0, NULL, NULL); | 524 | NULL, NULL, 0, NULL, NULL); |
538 | cgit_tree_link("tree", NULL, hc(cmd, "tree"), ctx->qry.head, | 525 | cgit_tree_link("tree", NULL, hc(cmd, "tree"), ctx->qry.head, |
539 | ctx->qry.sha1, NULL); | 526 | ctx->qry.sha1, NULL); |
540 | cgit_commit_link("commit", NULL, hc(cmd, "commit"), | 527 | cgit_commit_link("commit", NULL, hc(cmd, "commit"), |