From 3c32fe07717f27fc891b66ccd06057fb810d03ad Mon Sep 17 00:00:00 2001 From: Lars Hjemli Date: Sat, 06 Dec 2008 10:37:37 +0000 Subject: Merge branch 'full-log' Conflicts: cgit.c cgit.h --- (limited to 'ui-log.c') diff --git a/ui-log.c b/ui-log.c index d212984..2f90778 100644 --- a/ui-log.c +++ b/ui-log.c @@ -35,15 +35,18 @@ void print_commit(struct commit *commit) { struct commitinfo *info; char *tmp; + int cols = 2; info = cgit_parse_commit(commit); - html(""); + htmlf("", + ctx.qry.showmsg ? " class='logheader'" : ""); 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(""); + htmlf("", + ctx.qry.showmsg ? " class='logsubject'" : ""); cgit_commit_link(info->subject, NULL, NULL, ctx.qry.head, sha1_to_hex(commit->object.sha1)); html(""); @@ -61,6 +64,17 @@ void print_commit(struct commit *commit) } } html("\n"); + if (ctx.qry.showmsg) { + if (ctx.repo->enable_log_filecount) { + cols++; + if (ctx.repo->enable_log_linecount) + cols++; + } + htmlf("", + cols); + html_txt(info->msg); + html("\n"); + } cgit_free_commitinfo(info); } @@ -113,8 +127,15 @@ void cgit_print_log(const char *tip, int ofs, int cnt, char *grep, char *pattern html(""); html("" - "" - ""); + ""); if (ctx.repo->enable_log_filecount) { html(""); columns++; @@ -149,20 +170,20 @@ void cgit_print_log(const char *tip, int ofs, int cnt, char *grep, char *pattern cgit_log_link("[prev]", NULL, NULL, ctx.qry.head, ctx.qry.sha1, ctx.qry.path, ofs - cnt, ctx.qry.grep, - ctx.qry.search); + ctx.qry.search, ctx.qry.showmsg); html(" "); } if ((commit = get_revision(&rev)) != NULL) { cgit_log_link("[next]", NULL, NULL, ctx.qry.head, ctx.qry.sha1, ctx.qry.path, ofs + cnt, ctx.qry.grep, - ctx.qry.search); + ctx.qry.search, ctx.qry.showmsg); } html(""); } else if ((commit = get_revision(&rev)) != NULL) { html("\n"); } } -- cgit v0.9.0.2
AgeCommit messageAuthorCommit 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("AuthorFiles
"); cgit_log_link("[...]", NULL, NULL, ctx.qry.head, NULL, NULL, 0, - NULL, NULL); + NULL, NULL, ctx.qry.showmsg); html("