diff options
| author | Freya Murphy <freya@freyacat.org> | 2025-09-04 23:42:18 +0000 |
|---|---|---|
| committer | Freya Murphy <freya@freyacat.org> | 2026-05-27 04:16:27 +0000 |
| commit | 320fef638c07224b1abd681af1cbbd623f1b51c2 (patch) | |
| tree | 58fc4b78c86344e2fda6d724469cf26243d74024 /ui-shared.c | |
| parent | repo urls should be case insensitive (diff) | |
| download | cgit-320fef638c07224b1abd681af1cbbd623f1b51c2.tar.gz cgit-320fef638c07224b1abd681af1cbbd623f1b51c2.tar.bz2 cgit-320fef638c07224b1abd681af1cbbd623f1b51c2.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 16c9f1b..bd5e377 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) { @@ -1103,6 +1110,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, |