From 76ba6287bfb533baca7285b107b5d975581d449d Mon Sep 17 00:00:00 2001 From: Lars Hjemli Date: Sun, 13 Apr 2008 10:48:44 +0000 Subject: Merge branch 'lh/layout' * lh/layout: Make repository search case insensitive Remove 'patch' link from tab, add to commit view Implement minimal freetext search in the repolist More layout fixes Minor fixup in tree-view css Reintroduce the branch switcher Add fixed link to index page from repo header Include diff in commit view Replace sidebar/logo --- (limited to 'ui-shared.c') diff --git a/ui-shared.c b/ui-shared.c index aa65988..bb08c4a 100644 --- a/ui-shared.c +++ b/ui-shared.c @@ -7,6 +7,7 @@ */ #include "cgit.h" +#include "cmd.h" #include "html.h" const char cgit_doctype[] = @@ -388,7 +389,7 @@ void cgit_print_docstart(struct cgit_context *ctx) void cgit_print_docend() { - html("\n\n\n\n\n"); + html("\n\n\n"); } int print_branch_option(const char *refname, const unsigned char *sha1, @@ -465,75 +466,83 @@ void add_hidden_formfields(int incl_head, int incl_search, char *page) } } +char *hc(struct cgit_cmd *cmd, const char *page) +{ + return (strcmp(cmd->name, page) ? NULL : "active"); +} + void cgit_print_pageheader(struct cgit_context *ctx) { - static const char *default_info = "This is cgit, a fast webinterface for git repositories"; - int header = 0; - char *url; + struct cgit_cmd *cmd = cgit_get_cmd(ctx); - html("\n"); - html("