aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Keeping2015-08-14 12:47:15 +0100
committerJason A. Donenfeld2015-08-14 15:46:51 +0200
commit23c17d8ff01b96619bc1f71274cb44f1425e10f4 (patch)
treebc551415603a198541513e356b6fa16396868747
parent3b220eb22ded98851ca9dee7c3c3e3b0fd02c49b (diff)
downloadcgit-23c17d8ff01b96619bc1f71274cb44f1425e10f4.tar.gz
cgit-23c17d8ff01b96619bc1f71274cb44f1425e10f4.tar.bz2
cgit-23c17d8ff01b96619bc1f71274cb44f1425e10f4.zip
log: move layout into page function
Signed-off-by: John Keeping <john@keeping.me.uk>
-rw-r--r--cmd.c2
-rw-r--r--ui-log.c5
2 files changed, 5 insertions, 2 deletions
diff --git a/cmd.c b/cmd.c
index d9f6eff..0bf4c76 100644
--- a/cmd.c
+++ b/cmd.c
@@ -160,7 +160,7 @@ struct cgit_cmd *cgit_get_cmd(void)
160 def_cmd(commit, 1, 0, 1, 0), 160 def_cmd(commit, 1, 0, 1, 0),
161 def_cmd(diff, 1, 0, 1, 0), 161 def_cmd(diff, 1, 0, 1, 0),
162 def_cmd(info, 1, 0, 0, 1), 162 def_cmd(info, 1, 0, 0, 1),
163 def_cmd(log, 1, 1, 1, 0), 163 def_cmd(log, 1, 0, 1, 0),
164 def_cmd(ls_cache, 0, 0, 0, 0), 164 def_cmd(ls_cache, 0, 0, 0, 0),
165 def_cmd(objects, 1, 0, 0, 1), 165 def_cmd(objects, 1, 0, 0, 1),
166 def_cmd(patch, 1, 0, 1, 0), 166 def_cmd(patch, 1, 0, 1, 0),
diff --git a/ui-log.c b/ui-log.c
index 6bff948..0782478 100644
--- a/ui-log.c
+++ b/ui-log.c
@@ -442,8 +442,10 @@ void cgit_print_log(const char *tip, int ofs, int cnt, char *grep, char *pattern
442 compile_grep_patterns(&rev.grep_filter); 442 compile_grep_patterns(&rev.grep_filter);
443 prepare_revision_walk(&rev); 443 prepare_revision_walk(&rev);
444 444
445 if (pager) 445 if (pager) {
446 cgit_print_layout_start();
446 html("<table class='list nowrap'>"); 447 html("<table class='list nowrap'>");
448 }
447 449
448 html("<tr class='nohover'>"); 450 html("<tr class='nohover'>");
449 if (commit_graph) 451 if (commit_graph)
@@ -526,6 +528,7 @@ void cgit_print_log(const char *tip, int ofs, int cnt, char *grep, char *pattern
526 html("</li>"); 528 html("</li>");
527 } 529 }
528 html("</ul>"); 530 html("</ul>");
531 cgit_print_layout_end();
529 } else if ((commit = get_revision(&rev)) != NULL) { 532 } else if ((commit = get_revision(&rev)) != NULL) {
530 htmlf("<tr class='nohover'><td colspan='%d'>", columns); 533 htmlf("<tr class='nohover'><td colspan='%d'>", columns);
531 cgit_log_link("[...]", NULL, NULL, ctx.qry.head, NULL, 534 cgit_log_link("[...]", NULL, NULL, ctx.qry.head, NULL,