repolist: add owner-filter

This allows custom links to be used for repository owners by
configuring a filter to be applied in the "Owner" column in the
repository list.
此提交包含在:
Chris Burroughs
2014-08-04 09:23:08 -04:00
提交者 Jason A. Donenfeld
父節點 3c53ebfb57
當前提交 96ceb9a95a
共有 7 個檔案被更改,包括 64 行新增8 行删除

查看文件

@@ -307,13 +307,19 @@ void cgit_print_repolist()
html_link_close();
html("</td><td>");
if (ctx.cfg.enable_index_owner) {
html("<a href='");
html_attr(cgit_rooturl());
html("?q=");
html_url_arg(ctx.repo->owner);
html("'>");
html_txt(ctx.repo->owner);
html("</a>");
if (ctx.repo->owner_filter) {
cgit_open_filter(ctx.repo->owner_filter);
html_txt(ctx.repo->owner);
cgit_close_filter(ctx.repo->owner_filter);
} else {
html("<a href='");
html_attr(cgit_rooturl());
html("?=");
html_url_arg(ctx.repo->owner);
html("'>");
html_txt(ctx.repo->owner);
html("</a>");
}
html("</td><td>");
}
print_modtime(ctx.repo);