author | Lars Hjemli <hjemli@gmail.com> | 2008-10-05 15:16:36 (UTC) |
---|---|---|
committer | Lars Hjemli <hjemli@gmail.com> | 2008-10-05 15:16:36 (UTC) |
commit | 49ecbbddf0659c6409befcfe8989f92196133cda (patch) (side-by-side diff) | |
tree | 3de50775a83ee69b7cb24034ac68ac538e27ed84 /ui-repolist.c | |
parent | e9d3bd544fe94ba5ade9ccf185328fcc2414814b (diff) | |
download | cgit-49ecbbddf0659c6409befcfe8989f92196133cda.zip cgit-49ecbbddf0659c6409befcfe8989f92196133cda.tar.gz cgit-49ecbbddf0659c6409befcfe8989f92196133cda.tar.bz2 |
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>
-rw-r--r-- | ui-repolist.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/ui-repolist.c b/ui-repolist.c index 725338b..ab050c7 100644 --- a/ui-repolist.c +++ b/ui-repolist.c @@ -102,69 +102,65 @@ void cgit_print_repolist() ctx.page.title = ctx.cfg.root_title; cgit_print_http_headers(&ctx); cgit_print_docstart(&ctx); cgit_print_pageheader(&ctx); if (ctx.cfg.index_header) html_include(ctx.cfg.index_header); html("<table summary='repository list' class='list nowrap'>"); for (i=0; i<cgit_repolist.count; i++) { ctx.repo = &cgit_repolist.repos[i]; if (!(is_match(ctx.repo) && is_in_url(ctx.repo))) continue; hits++; if (hits <= ctx.qry.ofs) continue; if (hits > ctx.qry.ofs + ctx.cfg.max_repo_count) continue; if (!header++) print_header(columns); if ((last_group == NULL && ctx.repo->group != NULL) || (last_group != NULL && ctx.repo->group == NULL) || (last_group != NULL && ctx.repo->group != NULL && strcmp(ctx.repo->group, last_group))) { htmlf("<tr class='nohover'><td colspan='%d' class='repogroup'>", columns); html_txt(ctx.repo->group); html("</td></tr>"); last_group = ctx.repo->group; } htmlf("<tr><td class='%s'>", ctx.repo->group ? "sublevel-repo" : "toplevel-repo"); - html_link_open(cgit_repourl(ctx.repo->url), NULL, NULL); - html_txt(ctx.repo->name); - html_link_close(); + cgit_summary_link(ctx.repo->name, ctx.repo->name, NULL, NULL); html("</td><td>"); html_link_open(cgit_repourl(ctx.repo->url), NULL, NULL); html_ntxt(ctx.cfg.max_repodesc_len, ctx.repo->desc); html_link_close(); html("</td><td>"); html_txt(ctx.repo->owner); html("</td><td>"); print_modtime(ctx.repo); html("</td>"); if (ctx.cfg.enable_index_links) { html("<td>"); - html_link_open(cgit_repourl(ctx.repo->url), - NULL, "button"); - html("summary</a>"); + cgit_summary_link("summary", NULL, "button", NULL); cgit_log_link("log", NULL, "button", NULL, NULL, NULL, 0, NULL, NULL); cgit_tree_link("tree", NULL, "button", NULL, NULL, NULL); html("</td>"); } html("</tr>\n"); } html("</table>"); if (!hits) cgit_print_error("No repositories found"); else if (hits > ctx.cfg.max_repo_count) print_pager(hits, ctx.cfg.max_repo_count, ctx.qry.search); cgit_print_docend(); } void cgit_print_site_readme() { if (ctx.cfg.root_readme) html_include(ctx.cfg.root_readme); } |