]> granicus.if.org Git - cgit/commitdiff
Add fixed link to index page from repo header
authorLars Hjemli <hjemli@gmail.com>
Sat, 12 Apr 2008 17:59:41 +0000 (19:59 +0200)
committerLars Hjemli <hjemli@gmail.com>
Sat, 12 Apr 2008 18:01:41 +0000 (20:01 +0200)
This makes it easier to get back to the index page, and also re-enables
the usage of logo-link in cgitrc.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
ui-shared.c

index 72879567b43a32e853e7daac96a2b44a85635b6d..03d147f615201b1a588cfa41de25d0e9d0cafdde 100644 (file)
@@ -478,14 +478,20 @@ void cgit_print_pageheader(struct cgit_context *ctx)
        html("<table id='header'>\n");
        html("<tr>\n");
        html("<td class='logo' rowspan='2'><a href='");
-       html_attr(cgit_rooturl());
+       if (ctx->cfg.logo_link)
+               html_attr(ctx->cfg.logo_link);
+       else
+               html_attr(cgit_rooturl());
        html("'><img src='");
        html_attr(ctx->cfg.logo);
        html("'/></a></td>\n");
        html("<td class='main'>");
-       if (ctx->repo)
+       if (ctx->repo) {
+               html("<a href='");
+               html_attr(cgit_rooturl());
+               html("'>index</a> / ");
                html_txt(ctx->repo->name);
-       else
+       else
                html_txt(ctx->cfg.root_title);
        html("</td></tr>\n");
        html("<tr><td class='sub'>");