author | Lars Hjemli <hjemli@gmail.com> | 2008-04-12 17:59:41 (UTC) |
---|---|---|
committer | Lars Hjemli <hjemli@gmail.com> | 2008-04-12 18:01:41 (UTC) |
commit | 7c0d2d9fbd3a29d295c8067f7798507853759eae (patch) (side-by-side diff) | |
tree | 0222feabc277488cb052b74be449b42a88ae42f4 | |
parent | 89aa3c0d0a4c6d9885272602005975b763ea1604 (diff) | |
download | cgit-7c0d2d9fbd3a29d295c8067f7798507853759eae.zip cgit-7c0d2d9fbd3a29d295c8067f7798507853759eae.tar.gz cgit-7c0d2d9fbd3a29d295c8067f7798507853759eae.tar.bz2 |
Add fixed link to index page from repo header
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>
-rw-r--r-- | ui-shared.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/ui-shared.c b/ui-shared.c index 7287956..03d147f 100644 --- a/ui-shared.c +++ b/ui-shared.c @@ -477,16 +477,22 @@ void cgit_print_pageheader(struct cgit_context *ctx) html("<table id='header'>\n"); html("<tr>\n"); html("<td class='logo' rowspan='2'><a href='"); + 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'>"); if (ctx->repo) |