author | Lars Hjemli <hjemli@gmail.com> | 2008-04-14 20:23:48 (UTC) |
---|---|---|
committer | Lars Hjemli <hjemli@gmail.com> | 2008-04-14 20:23:48 (UTC) |
commit | e9a7042b5b44c6af2c7dc91eabed732d92278218 (patch) (side-by-side diff) | |
tree | ca0de7f4de19156b144ada5e9f3a2b46101fee90 | |
parent | 5764fe95469f65fdee285467f0f87d188fc1a780 (diff) | |
download | cgit-e9a7042b5b44c6af2c7dc91eabed732d92278218.zip cgit-e9a7042b5b44c6af2c7dc91eabed732d92278218.tar.gz cgit-e9a7042b5b44c6af2c7dc91eabed732d92278218.tar.bz2 |
Make a few more columns in repolist and log view clickable
Less mouse movement is nice.
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
-rw-r--r-- | ui-log.c | 5 | ||||
-rw-r--r-- | ui-repolist.c | 2 |
2 files changed, 7 insertions, 0 deletions
@@ -25,28 +25,33 @@ void count_lines(char *line, int size) } void inspect_files(struct diff_filepair *pair) { files++; if (ctx.repo->enable_log_linecount) cgit_diff_files(pair->one->sha1, pair->two->sha1, count_lines); } void print_commit(struct commit *commit) { struct commitinfo *info; + char *tmp; info = cgit_parse_commit(commit); html("<tr><td>"); + tmp = fmt("id=%s", sha1_to_hex(commit->object.sha1)); + tmp = cgit_pageurl(ctx.repo->url, "commit", tmp); + html_link_open(tmp, NULL, NULL); cgit_print_age(commit->date, TM_WEEK * 2, FMT_SHORTDATE); + html_link_close(); html("</td><td>"); cgit_commit_link(info->subject, NULL, NULL, ctx.qry.head, sha1_to_hex(commit->object.sha1)); html("</td><td>"); html_txt(info->author); if (ctx.repo->enable_log_filecount) { files = 0; add_lines = 0; rem_lines = 0; cgit_diff_commit(commit, inspect_files); html("</td><td>"); htmlf("%d", files); diff --git a/ui-repolist.c b/ui-repolist.c index 7a7e95a..98009c0 100644 --- a/ui-repolist.c +++ b/ui-repolist.c @@ -105,25 +105,27 @@ void cgit_print_repolist() 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(); 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_log_link("log", NULL, "button", NULL, NULL, NULL, 0, NULL, NULL); |