mirror of
https://git.zx2c4.com/cgit
synced 2024-11-22 16:38:42 +00:00
ui-repolist + ui-shared: Use cgit_summary_link()
This makes is possible to use cgit with repository urls containing special url characters like '#' and '?'. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
This commit is contained in:
parent
e9d3bd544f
commit
49ecbbddf0
@ -131,9 +131,7 @@ void cgit_print_repolist()
|
|||||||
}
|
}
|
||||||
htmlf("<tr><td class='%s'>",
|
htmlf("<tr><td class='%s'>",
|
||||||
ctx.repo->group ? "sublevel-repo" : "toplevel-repo");
|
ctx.repo->group ? "sublevel-repo" : "toplevel-repo");
|
||||||
html_link_open(cgit_repourl(ctx.repo->url), NULL, NULL);
|
cgit_summary_link(ctx.repo->name, ctx.repo->name, NULL, NULL);
|
||||||
html_txt(ctx.repo->name);
|
|
||||||
html_link_close();
|
|
||||||
html("</td><td>");
|
html("</td><td>");
|
||||||
html_link_open(cgit_repourl(ctx.repo->url), NULL, NULL);
|
html_link_open(cgit_repourl(ctx.repo->url), NULL, NULL);
|
||||||
html_ntxt(ctx.cfg.max_repodesc_len, ctx.repo->desc);
|
html_ntxt(ctx.cfg.max_repodesc_len, ctx.repo->desc);
|
||||||
@ -145,9 +143,7 @@ void cgit_print_repolist()
|
|||||||
html("</td>");
|
html("</td>");
|
||||||
if (ctx.cfg.enable_index_links) {
|
if (ctx.cfg.enable_index_links) {
|
||||||
html("<td>");
|
html("<td>");
|
||||||
html_link_open(cgit_repourl(ctx.repo->url),
|
cgit_summary_link("summary", NULL, "button", NULL);
|
||||||
NULL, "button");
|
|
||||||
html("summary</a>");
|
|
||||||
cgit_log_link("log", NULL, "button", NULL, NULL, NULL,
|
cgit_log_link("log", NULL, "button", NULL, NULL, NULL,
|
||||||
0, NULL, NULL);
|
0, NULL, NULL);
|
||||||
cgit_tree_link("tree", NULL, "button", NULL, NULL, NULL);
|
cgit_tree_link("tree", NULL, "button", NULL, NULL, NULL);
|
||||||
|
@ -603,8 +603,7 @@ void cgit_print_pageheader(struct cgit_context *ctx)
|
|||||||
if (ctx->repo) {
|
if (ctx->repo) {
|
||||||
cgit_index_link("index", NULL, NULL, NULL, 0);
|
cgit_index_link("index", NULL, NULL, NULL, 0);
|
||||||
html(" : ");
|
html(" : ");
|
||||||
reporevlink(NULL, ctx->repo->name, NULL, hc(cmd, "summary"),
|
cgit_summary_link(ctx->repo->name, ctx->repo->name, NULL, NULL);
|
||||||
ctx->qry.head, NULL, NULL);
|
|
||||||
html("</td><td class='form'>");
|
html("</td><td class='form'>");
|
||||||
html("<form method='get' action=''>\n");
|
html("<form method='get' action=''>\n");
|
||||||
add_hidden_formfields(0, 1, ctx->qry.page);
|
add_hidden_formfields(0, 1, ctx->qry.page);
|
||||||
@ -632,8 +631,8 @@ void cgit_print_pageheader(struct cgit_context *ctx)
|
|||||||
|
|
||||||
html("<table class='tabs'><tr><td>\n");
|
html("<table class='tabs'><tr><td>\n");
|
||||||
if (ctx->repo) {
|
if (ctx->repo) {
|
||||||
reporevlink(NULL, "summary", NULL, hc(cmd, "summary"),
|
cgit_summary_link(ctx->repo->name, ctx->repo->name, NULL,
|
||||||
ctx->qry.head, NULL, NULL);
|
ctx->qry.head);
|
||||||
cgit_refs_link("refs", NULL, hc(cmd, "refs"), ctx->qry.head,
|
cgit_refs_link("refs", NULL, hc(cmd, "refs"), ctx->qry.head,
|
||||||
ctx->qry.sha1, NULL);
|
ctx->qry.sha1, NULL);
|
||||||
cgit_log_link("log", NULL, hc(cmd, "log"), ctx->qry.head,
|
cgit_log_link("log", NULL, hc(cmd, "log"), ctx->qry.head,
|
||||||
|
Loading…
Reference in New Issue
Block a user