|
diff --git a/ui-log.c b/ui-log.c index 60c9269..9b2ffb6 100644 --- a/ ui-log.c+++ b/ ui-log.c |
|
@@ -42,4 +42,6 @@ void print_commit(struct commit *commit) |
42 | cgit_commit_link(info->subject, NULL, NULL, ctx.qry.head, |
42 | cgit_commit_link(info->subject, NULL, NULL, ctx.qry.head, |
43 | sha1_to_hex(commit->object.sha1)); |
43 | sha1_to_hex(commit->object.sha1)); |
| |
44 | html("</td><td>"); |
| |
45 | html_txt(info->author); |
44 | if (ctx.repo->enable_log_filecount) { |
46 | if (ctx.repo->enable_log_filecount) { |
45 | files = 0; |
47 | files = 0; |
@@ -47,13 +49,11 @@ void print_commit(struct commit *commit) |
47 | rem_lines = 0; |
49 | rem_lines = 0; |
48 | cgit_diff_commit(commit, inspect_files); |
50 | cgit_diff_commit(commit, inspect_files); |
49 | html("</td><td class='right'>"); |
51 | html("</td><td>"); |
50 | htmlf("%d", files); |
52 | htmlf("%d", files); |
51 | if (ctx.repo->enable_log_linecount) { |
53 | if (ctx.repo->enable_log_linecount) { |
52 | html("</td><td class='right'>"); |
54 | html("</td><td>"); |
53 | htmlf("-%d/+%d", rem_lines, add_lines); |
55 | htmlf("-%d/+%d", rem_lines, add_lines); |
54 | } |
56 | } |
55 | } |
57 | } |
56 | html("</td><td>"); |
| |
57 | html_txt(info->author); |
| |
58 | html("</td></tr>\n"); |
58 | html("</td></tr>\n"); |
59 | cgit_free_commitinfo(info); |
59 | cgit_free_commitinfo(info); |
@@ -61,5 +61,6 @@ void print_commit(struct commit *commit) |
61 | |
61 | |
62 | |
62 | |
63 | void cgit_print_log(const char *tip, int ofs, int cnt, char *grep, char *pattern, char *path, int pager) |
63 | void cgit_print_log(const char *tip, int ofs, int cnt, char *grep, char *pattern, |
| |
64 | char *path, int pager) |
64 | { |
65 | { |
65 | struct rev_info rev; |
66 | struct rev_info rev; |
@@ -67,5 +68,5 @@ void cgit_print_log(const char *tip, int ofs, int cnt, char *grep, char *pattern |
67 | const char *argv[] = {NULL, tip, NULL, NULL, NULL}; |
68 | const char *argv[] = {NULL, tip, NULL, NULL, NULL}; |
68 | int argc = 2; |
69 | int argc = 2; |
69 | int i; |
70 | int i, columns = 3; |
70 | |
71 | |
71 | if (!tip) |
72 | if (!tip) |
@@ -93,14 +94,19 @@ void cgit_print_log(const char *tip, int ofs, int cnt, char *grep, char *pattern |
93 | prepare_revision_walk(&rev); |
94 | prepare_revision_walk(&rev); |
94 | |
95 | |
95 | html("<table summary='log' class='list nowrap'>"); |
96 | if (pager) |
96 | html("<tr class='nohover'><th class='left'>Age</th>" |
97 | html("<table class='list nowrap'>"); |
97 | "<th class='left'>Message</th>"); |
| |
98 | |
98 | |
| |
99 | html("<tr class='nohover'><th class='left'>Age</th>" |
| |
100 | "<th class='left'>Commit message</th>" |
| |
101 | "<th class='left'>Author</th>"); |
99 | if (ctx.repo->enable_log_filecount) { |
102 | if (ctx.repo->enable_log_filecount) { |
100 | html("<th class='right'>Files</th>"); |
103 | html("<th class='left'>Files</th>"); |
101 | if (ctx.repo->enable_log_linecount) |
104 | columns++; |
102 | html("<th class='right'>Lines</th>"); |
105 | if (ctx.repo->enable_log_linecount) { |
| |
106 | html("<th class='left'>Lines</th>"); |
| |
107 | columns++; |
| |
108 | } |
103 | } |
109 | } |
104 | html("<th class='left'>Author</th></tr>\n"); |
110 | html("</tr>\n"); |
105 | |
111 | |
106 | if (ofs<0) |
112 | if (ofs<0) |
@@ -121,8 +127,7 @@ void cgit_print_log(const char *tip, int ofs, int cnt, char *grep, char *pattern |
121 | commit->parents = NULL; |
127 | commit->parents = NULL; |
122 | } |
128 | } |
123 | html("</table>\n"); |
| |
124 | |
| |
125 | if (pager) { |
129 | if (pager) { |
126 | html("<div class='pager'>"); |
130 | htmlf("</table><div class='pager'>", |
| |
131 | columns); |
127 | if (ofs > 0) { |
132 | if (ofs > 0) { |
128 | cgit_log_link("[prev]", NULL, NULL, ctx.qry.head, |
133 | cgit_log_link("[prev]", NULL, NULL, ctx.qry.head, |
@@ -139,4 +144,9 @@ void cgit_print_log(const char *tip, int ofs, int cnt, char *grep, char *pattern |
139 | } |
144 | } |
140 | html("</div>"); |
145 | html("</div>"); |
| |
146 | } else if ((commit = get_revision(&rev)) != NULL) { |
| |
147 | html("<tr class='nohover'><td colspan='3'>"); |
| |
148 | cgit_log_link("[...]", NULL, NULL, ctx.qry.head, NULL, NULL, 0, |
| |
149 | NULL, NULL); |
| |
150 | html("</td></tr>\n"); |
141 | } |
151 | } |
142 | } |
152 | } |
|