summaryrefslogtreecommitdiffabout
path: root/ui-log.c
authorLars Hjemli <hjemli@gmail.com>2008-12-06 10:37:37 (UTC)
committer Lars Hjemli <hjemli@gmail.com>2008-12-06 10:37:37 (UTC)
commit3c32fe07717f27fc891b66ccd06057fb810d03ad (patch) (side-by-side diff)
tree04897b3eac6432c43284e7da79161e47856d078b /ui-log.c
parent9c8be943f72b6f1bda5a31ce401899c3dd734e98 (diff)
parentab67164d6217fcda5ef3e07aefa3dd6eee6b65a3 (diff)
downloadcgit-3c32fe07717f27fc891b66ccd06057fb810d03ad.zip
cgit-3c32fe07717f27fc891b66ccd06057fb810d03ad.tar.gz
cgit-3c32fe07717f27fc891b66ccd06057fb810d03ad.tar.bz2
Merge branch 'full-log'
Conflicts: cgit.c cgit.h
Diffstat (limited to 'ui-log.c') (more/less context) (ignore whitespace changes)
-rw-r--r--ui-log.c35
1 files changed, 28 insertions, 7 deletions
diff --git a/ui-log.c b/ui-log.c
index d212984..2f90778 100644
--- a/ui-log.c
+++ b/ui-log.c
@@ -37,5 +37,7 @@ void print_commit(struct commit *commit)
char *tmp;
+ int cols = 2;
info = cgit_parse_commit(commit);
- html("<tr><td>");
+ htmlf("<tr%s><td>",
+ ctx.qry.showmsg ? " class='logheader'" : "");
tmp = fmt("id=%s", sha1_to_hex(commit->object.sha1));
@@ -45,3 +47,4 @@ void print_commit(struct commit *commit)
html_link_close();
- html("</td><td>");
+ htmlf("</td><td%s>",
+ ctx.qry.showmsg ? " class='logsubject'" : "");
cgit_commit_link(info->subject, NULL, NULL, ctx.qry.head,
@@ -63,2 +66,13 @@ void print_commit(struct commit *commit)
html("</td></tr>\n");
+ if (ctx.qry.showmsg) {
+ if (ctx.repo->enable_log_filecount) {
+ cols++;
+ if (ctx.repo->enable_log_linecount)
+ cols++;
+ }
+ htmlf("<tr class='nohover'><td/><td colspan='%d' class='logmsg'>",
+ cols);
+ html_txt(info->msg);
+ html("</td></tr>\n");
+ }
cgit_free_commitinfo(info);
@@ -115,4 +129,11 @@ void cgit_print_log(const char *tip, int ofs, int cnt, char *grep, char *pattern
html("<tr class='nohover'><th class='left'>Age</th>"
- "<th class='left'>Commit message</th>"
- "<th class='left'>Author</th>");
+ "<th class='left'>Commit message");
+ if (pager) {
+ html(" (");
+ cgit_log_link("toggle", NULL, NULL, ctx.qry.head, ctx.qry.sha1,
+ ctx.qry.path, ctx.qry.ofs, ctx.qry.grep,
+ ctx.qry.search, ctx.qry.showmsg ? 0 : 1);
+ html(")");
+ }
+ html("</th><th class='left'>Author</th>");
if (ctx.repo->enable_log_filecount) {
@@ -151,3 +172,3 @@ void cgit_print_log(const char *tip, int ofs, int cnt, char *grep, char *pattern
ofs - cnt, ctx.qry.grep,
- ctx.qry.search);
+ ctx.qry.search, ctx.qry.showmsg);
html("&nbsp;");
@@ -158,3 +179,3 @@ void cgit_print_log(const char *tip, int ofs, int cnt, char *grep, char *pattern
ofs + cnt, ctx.qry.grep,
- ctx.qry.search);
+ ctx.qry.search, ctx.qry.showmsg);
}
@@ -164,3 +185,3 @@ void cgit_print_log(const char *tip, int ofs, int cnt, char *grep, char *pattern
cgit_log_link("[...]", NULL, NULL, ctx.qry.head, NULL, NULL, 0,
- NULL, NULL);
+ NULL, NULL, ctx.qry.showmsg);
html("</td></tr>\n");