summaryrefslogtreecommitdiffabout
path: root/ui-shared.c
Side-by-side diff
Diffstat (limited to 'ui-shared.c') (more/less context) (show whitespace changes)
-rw-r--r--ui-shared.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/ui-shared.c b/ui-shared.c
index a959224..9b120ae 100644
--- a/ui-shared.c
+++ b/ui-shared.c
@@ -241,48 +241,54 @@ static char *repolink(char *title, char *class, char *page, char *head,
return fmt("%s", delim);
}
static void reporevlink(char *page, char *name, char *title, char *class,
char *head, char *rev, char *path)
{
char *delim;
delim = repolink(title, class, page, head, path);
if (rev && strcmp(rev, ctx.qry.head)) {
html(delim);
html("id=");
html_url_arg(rev);
}
html("'>");
html_txt(name);
html("</a>");
}
void cgit_summary_link(char *name, char *title, char *class, char *head)
{
reporevlink(NULL, name, title, class, head, NULL, NULL);
}
+void cgit_tag_link(char *name, char *title, char *class, char *head,
+ char *rev)
+{
+ reporevlink("tag", name, title, class, head, rev, NULL);
+}
+
void cgit_tree_link(char *name, char *title, char *class, char *head,
char *rev, char *path)
{
reporevlink("tree", name, title, class, head, rev, path);
}
void cgit_plain_link(char *name, char *title, char *class, char *head,
char *rev, char *path)
{
reporevlink("plain", name, title, class, head, rev, path);
}
void cgit_log_link(char *name, char *title, char *class, char *head,
char *rev, char *path, int ofs, char *grep, char *pattern)
{
char *delim;
delim = repolink(title, class, "log", head, path);
if (rev && strcmp(rev, ctx.qry.head)) {
html(delim);
html("id=");
html_url_arg(rev);
delim = "&";
}