-rw-r--r-- | ui-shared.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ui-shared.c b/ui-shared.c index 44269a7..cd98387 100644 --- a/ui-shared.c +++ b/ui-shared.c | |||
@@ -524,52 +524,52 @@ void add_hidden_formfields(int incl_head, int incl_search, char *page) | |||
524 | } | 524 | } |
525 | 525 | ||
526 | char *hc(struct cgit_cmd *cmd, const char *page) | 526 | char *hc(struct cgit_cmd *cmd, const char *page) |
527 | { | 527 | { |
528 | return (strcmp(cmd->name, page) ? NULL : "active"); | 528 | return (strcmp(cmd->name, page) ? NULL : "active"); |
529 | } | 529 | } |
530 | 530 | ||
531 | void cgit_print_pageheader(struct cgit_context *ctx) | 531 | void cgit_print_pageheader(struct cgit_context *ctx) |
532 | { | 532 | { |
533 | struct cgit_cmd *cmd = cgit_get_cmd(ctx); | 533 | struct cgit_cmd *cmd = cgit_get_cmd(ctx); |
534 | 534 | ||
535 | html("<table id='header'>\n"); | 535 | html("<table id='header'>\n"); |
536 | html("<tr>\n"); | 536 | html("<tr>\n"); |
537 | html("<td class='logo' rowspan='2'><a href='"); | 537 | html("<td class='logo' rowspan='2'><a href='"); |
538 | if (ctx->cfg.logo_link) | 538 | if (ctx->cfg.logo_link) |
539 | html_attr(ctx->cfg.logo_link); | 539 | html_attr(ctx->cfg.logo_link); |
540 | else | 540 | else |
541 | html_attr(cgit_rooturl()); | 541 | html_attr(cgit_rooturl()); |
542 | html("'><img src='"); | 542 | html("'><img src='"); |
543 | html_attr(ctx->cfg.logo); | 543 | html_attr(ctx->cfg.logo); |
544 | html("' alt='cgit logo'/></a></td>\n"); | 544 | html("' alt='cgit logo'/></a></td>\n"); |
545 | 545 | ||
546 | html("<td class='main'>"); | 546 | html("<td class='main'>"); |
547 | if (ctx->repo) { | 547 | if (ctx->repo) { |
548 | cgit_index_link("index", NULL, NULL, NULL, 0); | ||
549 | html(" : "); | ||
548 | reporevlink(NULL, ctx->repo->name, NULL, hc(cmd, "summary"), | 550 | reporevlink(NULL, ctx->repo->name, NULL, hc(cmd, "summary"), |
549 | ctx->qry.head, NULL, NULL); | 551 | ctx->qry.head, NULL, NULL); |
550 | html(" : "); | ||
551 | html_txt(ctx->qry.page); | ||
552 | html("</td><td class='form'>"); | 552 | html("</td><td class='form'>"); |
553 | html("<form method='get' action=''>\n"); | 553 | html("<form method='get' action=''>\n"); |
554 | add_hidden_formfields(0, 1, ctx->qry.page); | 554 | add_hidden_formfields(0, 1, ctx->qry.page); |
555 | html("<select name='h' onchange='this.form.submit();'>\n"); | 555 | html("<select name='h' onchange='this.form.submit();'>\n"); |
556 | for_each_branch_ref(print_branch_option, ctx->qry.head); | 556 | for_each_branch_ref(print_branch_option, ctx->qry.head); |
557 | html("</select> "); | 557 | html("</select> "); |
558 | html("<input type='submit' name='' value='switch'/>"); | 558 | html("<input type='submit' name='' value='switch'/>"); |
559 | html("</form>"); | 559 | html("</form>"); |
560 | } else | 560 | } else |
561 | html_txt(ctx->cfg.root_title); | 561 | html_txt(ctx->cfg.root_title); |
562 | html("</td></tr>\n"); | 562 | html("</td></tr>\n"); |
563 | 563 | ||
564 | html("<tr><td class='sub'"); | 564 | html("<tr><td class='sub'"); |
565 | if (ctx->repo) { | 565 | if (ctx->repo) { |
566 | html(" colspan='2'>"); | 566 | html(" colspan='2'>"); |
567 | html_txt(ctx->repo->desc); | 567 | html_txt(ctx->repo->desc); |
568 | } else { | 568 | } else { |
569 | html(">"); | 569 | html(">"); |
570 | if (ctx->cfg.root_desc) | 570 | if (ctx->cfg.root_desc) |
571 | html_txt(ctx->cfg.root_desc); | 571 | html_txt(ctx->cfg.root_desc); |
572 | else if (ctx->cfg.index_info) | 572 | else if (ctx->cfg.index_info) |
573 | html_include(ctx->cfg.index_info); | 573 | html_include(ctx->cfg.index_info); |
574 | } | 574 | } |
575 | html("</td></tr></table>\n"); | 575 | html("</td></tr></table>\n"); |