diff options
author | Christian Hesse <mail@eworm.de> | 2018-12-29 02:13:54 +0300 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2024-01-30 11:08:38 +0300 |
commit | c30a42306ad379fa2d843486804b4a976cdb2d64 (patch) | |
tree | 5651af5f611cdb06dca28560874168babb4ad087 | |
parent | 00ecfaadea2c40cc62b7a43e246384329e6ddb98 (diff) |
ui-tree: provide link to about page for pretty formatting
We have an ongoing discussion about display filters and pretty
formatting in tree view. How about providing a link to about page
for pretty formatting?
Signed-off-by: Christian Hesse <mail@eworm.de>
-rw-r--r-- | ui-shared.c | 6 | ||||
-rw-r--r-- | ui-shared.h | 3 | ||||
-rw-r--r-- | ui-tree.c | 3 |
3 files changed, 12 insertions, 0 deletions
diff --git a/ui-shared.c b/ui-shared.c index baea6f2..ea460e0 100644 --- a/ui-shared.c +++ b/ui-shared.c @@ -346,6 +346,12 @@ void cgit_tree_link(const char *name, const char *title, const char *class, reporevlink("tree", name, title, class, head, rev, path); } +void cgit_about_link(const char *name, const char *title, const char *class, + const char *head, const char *rev, const char *path) +{ + reporevlink("about", 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) { diff --git a/ui-shared.h b/ui-shared.h index 6964873..e01d5d8 100644 --- a/ui-shared.h +++ b/ui-shared.h @@ -24,6 +24,9 @@ extern void cgit_tag_link(const char *name, const char *title, extern void cgit_tree_link(const char *name, const char *title, const char *class, const char *head, const char *rev, const char *path); +extern void cgit_about_link(const char *name, const char *title, + const char *class, const char *head, + const char *rev, const char *path); extern void cgit_plain_link(const char *name, const char *title, const char *class, const char *head, const char *rev, const char *path); @@ -110,6 +110,9 @@ static void print_object(const struct object_id *oid, const char *path, const ch cgit_print_layout_start(); htmlf("blob: %s (", oid_to_hex(oid)); + cgit_about_link("about", NULL, NULL, ctx.qry.head, + rev, path); + html(") ("); cgit_plain_link("plain", NULL, NULL, ctx.qry.head, rev, path); if (ctx.repo->enable_blame && !is_binary) { |