mirror of
https://git.zx2c4.com/cgit
synced 2024-11-22 16:38:42 +00:00
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>
This commit is contained in:
parent
00ecfaadea
commit
c30a42306a
@ -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);
|
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,
|
void cgit_plain_link(const char *name, const char *title, const char *class,
|
||||||
const char *head, const char *rev, const char *path)
|
const char *head, const char *rev, const char *path)
|
||||||
{
|
{
|
||||||
|
@ -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,
|
extern void cgit_tree_link(const char *name, const char *title,
|
||||||
const char *class, const char *head,
|
const char *class, const char *head,
|
||||||
const char *rev, const char *path);
|
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,
|
extern void cgit_plain_link(const char *name, const char *title,
|
||||||
const char *class, const char *head,
|
const char *class, const char *head,
|
||||||
const char *rev, const char *path);
|
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();
|
cgit_print_layout_start();
|
||||||
htmlf("blob: %s (", oid_to_hex(oid));
|
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,
|
cgit_plain_link("plain", NULL, NULL, ctx.qry.head,
|
||||||
rev, path);
|
rev, path);
|
||||||
if (ctx.repo->enable_blame && !is_binary) {
|
if (ctx.repo->enable_blame && !is_binary) {
|
||||||
|
Loading…
Reference in New Issue
Block a user