diff options
author | Freya Murphy <freya@freyacat.org> | 2025-09-04 23:42:18 +0000 |
---|---|---|
committer | Freya Murphy <freya@freyacat.org> | 2025-09-04 23:42:18 +0000 |
commit | e6ad894ba53a185fc19f8563e26aff2ac93edd20 (patch) | |
tree | 6010b57dc2969285d0fcd88617dbaf7909d57fe6 /ui-shared.c | |
parent | repo urls should be case insensitive (diff) | |
download | cgit-e6ad894ba53a185fc19f8563e26aff2ac93edd20.tar.gz cgit-e6ad894ba53a185fc19f8563e26aff2ac93edd20.tar.bz2 cgit-e6ad894ba53a185fc19f8563e26aff2ac93edd20.zip |
Diffstat (limited to 'ui-shared.c')
-rw-r--r-- | ui-shared.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/ui-shared.c b/ui-shared.c index 93ab93c..d3cf24b 100644 --- a/ui-shared.c +++ b/ui-shared.c @@ -10,6 +10,7 @@ #include "cgit.h" #include "ui-shared.h" +#include "ui-blob.h" #include "cmd.h" #include "html.h" #include "version.h" @@ -348,6 +349,12 @@ void cgit_tree_link(const char *name, const char *title, const char *class, reporevlink("tree", name, title, class, head, rev, path); } +void cgit_wiki_link(const char *name, const char *title, const char *class, + const char *head, const char *rev, const char *path) +{ + reporevlink("wiki", name, title, class, head, rev, path); +} + void cgit_plain_link(const char *name, const char *title, const char *class, const char *head, const char *rev, const char *path) { @@ -1099,6 +1106,9 @@ void cgit_print_pageheader(void) else cgit_tree_link("tree", NULL, hc("tree"), ctx.qry.head, ctx.qry.oid, ctx.qry.vpath); + if (cgit_ref_path_exists(".wiki", ctx.qry.head, 0)) + cgit_wiki_link("wiki", NULL, hc("wiki"), ctx.qry.head, + ctx.qry.oid, NULL); cgit_commit_link("commit", NULL, hc("commit"), ctx.qry.head, ctx.qry.oid, ctx.qry.vpath); cgit_diff_link("diff", NULL, hc("diff"), ctx.qry.head, |