diff options
Diffstat (limited to 'ui-shared.c')
-rw-r--r-- | ui-shared.c | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/ui-shared.c b/ui-shared.c index f18b2c7..5e03a7a 100644 --- a/ui-shared.c +++ b/ui-shared.c | |||
@@ -611,14 +611,8 @@ char *hc(struct cgit_cmd *cmd, const char *page) | |||
611 | return (strcmp(cmd ? cmd->name : fallback_cmd, page) ? NULL : "active"); | 611 | return (strcmp(cmd ? cmd->name : fallback_cmd, page) ? NULL : "active"); |
612 | } | 612 | } |
613 | 613 | ||
614 | void cgit_print_pageheader(struct cgit_context *ctx) | 614 | static void print_header(struct cgit_context *ctx) |
615 | { | 615 | { |
616 | struct cgit_cmd *cmd = cgit_get_cmd(ctx); | ||
617 | |||
618 | if (!cmd && ctx->repo) | ||
619 | fallback_cmd = "summary"; | ||
620 | |||
621 | html("<div id='cgit'>"); | ||
622 | html("<table id='header'>\n"); | 616 | html("<table id='header'>\n"); |
623 | html("<tr>\n"); | 617 | html("<tr>\n"); |
624 | html("<td class='logo' rowspan='2'><a href='"); | 618 | html("<td class='logo' rowspan='2'><a href='"); |
@@ -659,6 +653,18 @@ void cgit_print_pageheader(struct cgit_context *ctx) | |||
659 | html_include(ctx->cfg.index_info); | 653 | html_include(ctx->cfg.index_info); |
660 | } | 654 | } |
661 | html("</td></tr></table>\n"); | 655 | html("</td></tr></table>\n"); |
656 | } | ||
657 | |||
658 | void cgit_print_pageheader(struct cgit_context *ctx) | ||
659 | { | ||
660 | struct cgit_cmd *cmd = cgit_get_cmd(ctx); | ||
661 | |||
662 | if (!cmd && ctx->repo) | ||
663 | fallback_cmd = "summary"; | ||
664 | |||
665 | html("<div id='cgit'>"); | ||
666 | if (!ctx->cfg.noheader) | ||
667 | print_header(ctx); | ||
662 | 668 | ||
663 | html("<table class='tabs'><tr><td>\n"); | 669 | html("<table class='tabs'><tr><td>\n"); |
664 | if (ctx->repo) { | 670 | if (ctx->repo) { |