-rw-r--r-- | ui-shared.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/ui-shared.c b/ui-shared.c index 8827fff..0f65474 100644 --- a/ui-shared.c +++ b/ui-shared.c | |||
@@ -709,64 +709,65 @@ void cgit_print_pageheader(struct cgit_context *ctx) | |||
709 | html("<table class='tabs'><tr><td>\n"); | 709 | html("<table class='tabs'><tr><td>\n"); |
710 | if (ctx->repo) { | 710 | if (ctx->repo) { |
711 | cgit_summary_link("summary", NULL, hc(cmd, "summary"), | 711 | cgit_summary_link("summary", NULL, hc(cmd, "summary"), |
712 | ctx->qry.head); | 712 | ctx->qry.head); |
713 | cgit_refs_link("refs", NULL, hc(cmd, "refs"), ctx->qry.head, | 713 | cgit_refs_link("refs", NULL, hc(cmd, "refs"), ctx->qry.head, |
714 | ctx->qry.sha1, NULL); | 714 | ctx->qry.sha1, NULL); |
715 | cgit_log_link("log", NULL, hc(cmd, "log"), ctx->qry.head, | 715 | cgit_log_link("log", NULL, hc(cmd, "log"), ctx->qry.head, |
716 | NULL, NULL, 0, NULL, NULL, ctx->qry.showmsg); | 716 | NULL, NULL, 0, NULL, NULL, ctx->qry.showmsg); |
717 | cgit_tree_link("tree", NULL, hc(cmd, "tree"), ctx->qry.head, | 717 | cgit_tree_link("tree", NULL, hc(cmd, "tree"), ctx->qry.head, |
718 | ctx->qry.sha1, NULL); | 718 | ctx->qry.sha1, NULL); |
719 | cgit_commit_link("commit", NULL, hc(cmd, "commit"), | 719 | cgit_commit_link("commit", NULL, hc(cmd, "commit"), |
720 | ctx->qry.head, ctx->qry.sha1, 0); | 720 | ctx->qry.head, ctx->qry.sha1, 0); |
721 | cgit_diff_link("diff", NULL, hc(cmd, "diff"), ctx->qry.head, | 721 | cgit_diff_link("diff", NULL, hc(cmd, "diff"), ctx->qry.head, |
722 | ctx->qry.sha1, ctx->qry.sha2, NULL, 0); | 722 | ctx->qry.sha1, ctx->qry.sha2, NULL, 0); |
723 | if (ctx->repo->max_stats) | 723 | if (ctx->repo->max_stats) |
724 | cgit_stats_link("stats", NULL, hc(cmd, "stats"), | 724 | cgit_stats_link("stats", NULL, hc(cmd, "stats"), |
725 | ctx->qry.head, NULL); | 725 | ctx->qry.head, NULL); |
726 | if (ctx->repo->readme) | 726 | if (ctx->repo->readme) |
727 | reporevlink("about", "about", NULL, | 727 | reporevlink("about", "about", NULL, |
728 | hc(cmd, "about"), ctx->qry.head, NULL, | 728 | hc(cmd, "about"), ctx->qry.head, NULL, |
729 | NULL); | 729 | NULL); |
730 | html("</td><td class='form'>"); | 730 | html("</td><td class='form'>"); |
731 | html("<form class='right' method='get' action='"); | 731 | html("<form class='right' method='get' action='"); |
732 | if (ctx->cfg.virtual_root) | 732 | if (ctx->cfg.virtual_root) |
733 | html_url_path(cgit_fileurl(ctx->qry.repo, "log", | 733 | html_url_path(cgit_fileurl(ctx->qry.repo, "log", |
734 | ctx->qry.path, NULL)); | 734 | ctx->qry.path, NULL)); |
735 | html("'>\n"); | 735 | html("'>\n"); |
736 | cgit_add_hidden_formfields(1, 0, "log"); | 736 | cgit_add_hidden_formfields(1, 0, "log"); |
737 | html("<select name='qt'>\n"); | 737 | html("<select name='qt'>\n"); |
738 | html_option("grep", "log msg", ctx->qry.grep); | 738 | html_option("grep", "log msg", ctx->qry.grep); |
739 | html_option("author", "author", ctx->qry.grep); | 739 | html_option("author", "author", ctx->qry.grep); |
740 | html_option("committer", "committer", ctx->qry.grep); | 740 | html_option("committer", "committer", ctx->qry.grep); |
741 | html_option("range", "range", ctx->qry.grep); | ||
741 | html("</select>\n"); | 742 | html("</select>\n"); |
742 | html("<input class='txt' type='text' size='10' name='q' value='"); | 743 | html("<input class='txt' type='text' size='10' name='q' value='"); |
743 | html_attr(ctx->qry.search); | 744 | html_attr(ctx->qry.search); |
744 | html("'/>\n"); | 745 | html("'/>\n"); |
745 | html("<input type='submit' value='search'/>\n"); | 746 | html("<input type='submit' value='search'/>\n"); |
746 | html("</form>\n"); | 747 | html("</form>\n"); |
747 | } else { | 748 | } else { |
748 | site_link(NULL, "index", NULL, hc(cmd, "repolist"), NULL, 0); | 749 | site_link(NULL, "index", NULL, hc(cmd, "repolist"), NULL, 0); |
749 | if (ctx->cfg.root_readme) | 750 | if (ctx->cfg.root_readme) |
750 | site_link("about", "about", NULL, hc(cmd, "about"), | 751 | site_link("about", "about", NULL, hc(cmd, "about"), |
751 | NULL, 0); | 752 | NULL, 0); |
752 | html("</td><td class='form'>"); | 753 | html("</td><td class='form'>"); |
753 | html("<form method='get' action='"); | 754 | html("<form method='get' action='"); |
754 | html_attr(cgit_rooturl()); | 755 | html_attr(cgit_rooturl()); |
755 | html("'>\n"); | 756 | html("'>\n"); |
756 | html("<input type='text' name='q' size='10' value='"); | 757 | html("<input type='text' name='q' size='10' value='"); |
757 | html_attr(ctx->qry.search); | 758 | html_attr(ctx->qry.search); |
758 | html("'/>\n"); | 759 | html("'/>\n"); |
759 | html("<input type='submit' value='search'/>\n"); | 760 | html("<input type='submit' value='search'/>\n"); |
760 | html("</form>"); | 761 | html("</form>"); |
761 | } | 762 | } |
762 | html("</td></tr></table>\n"); | 763 | html("</td></tr></table>\n"); |
763 | html("<div class='content'>"); | 764 | html("<div class='content'>"); |
764 | } | 765 | } |
765 | 766 | ||
766 | void cgit_print_filemode(unsigned short mode) | 767 | void cgit_print_filemode(unsigned short mode) |
767 | { | 768 | { |
768 | if (S_ISDIR(mode)) | 769 | if (S_ISDIR(mode)) |
769 | html("d"); | 770 | html("d"); |
770 | else if (S_ISLNK(mode)) | 771 | else if (S_ISLNK(mode)) |
771 | html("l"); | 772 | html("l"); |
772 | else if (S_ISGITLINK(mode)) | 773 | else if (S_ISGITLINK(mode)) |