aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/ui-shared.c
diff options
context:
space:
mode:
authorCameron Katri <me@cameronkatri.com>2021-06-14 19:38:46 -0400
committerCameron Katri <me@cameronkatri.com>2021-06-15 11:45:44 -0400
commit09631f5ed55f51b686814a31340c2fa80ac48b3d (patch)
treeceabc9840c327a95b90c74b8239ab2e8cf2df84f /ui-shared.c
parent5258c297ba6fb604ae1415fbc19a3fe42457e49e (diff)
downloadcgit-ck/license.tar.gz
cgit-ck/license.tar.zst
cgit-ck/license.zip
Add a license tabck/license
This tab is nearly identical to the about tab, use the license field in cgitrc to set a list of files to check for or use repo.license or cgit.license as a git-config key.
Diffstat (limited to 'ui-shared.c')
-rw-r--r--ui-shared.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ui-shared.c b/ui-shared.c
index acd8ab5..207bf69 100644
--- a/ui-shared.c
+++ b/ui-shared.c
@@ -1056,6 +1056,10 @@ void cgit_print_pageheader(void)
if (ctx.repo->max_stats)
cgit_stats_link("stats", NULL, hc("stats"),
ctx.qry.head, ctx.qry.vpath);
+ if (ctx.repo->license.nr)
+ reporevlink("license", "license", NULL,
+ hc("license"), ctx.qry.head, NULL,
+ NULL);
if (ctx.repo->homepage) {
html("<a href='");
html_attr(ctx.repo->homepage);