]> granicus.if.org Git - cgit/commitdiff
log: move layout into page function
authorJohn Keeping <john@keeping.me.uk>
Fri, 14 Aug 2015 11:47:15 +0000 (12:47 +0100)
committerJason A. Donenfeld <Jason@zx2c4.com>
Fri, 14 Aug 2015 13:46:51 +0000 (15:46 +0200)
Signed-off-by: John Keeping <john@keeping.me.uk>
cmd.c
ui-log.c

diff --git a/cmd.c b/cmd.c
index d9f6effdc70c5de9fe0232e70c7d64ef838bff83..0bf4c76b649b54f588aae6a984c711c5b5d3e051 100644 (file)
--- a/cmd.c
+++ b/cmd.c
@@ -160,7 +160,7 @@ struct cgit_cmd *cgit_get_cmd(void)
                def_cmd(commit, 1, 0, 1, 0),
                def_cmd(diff, 1, 0, 1, 0),
                def_cmd(info, 1, 0, 0, 1),
-               def_cmd(log, 1, 1, 1, 0),
+               def_cmd(log, 1, 0, 1, 0),
                def_cmd(ls_cache, 0, 0, 0, 0),
                def_cmd(objects, 1, 0, 0, 1),
                def_cmd(patch, 1, 0, 1, 0),
index 6bff94807886c39e5e15ec58e66f67a81b50187b..0782478d3b6af207e86f0aff068fe7eb212b91fd 100644 (file)
--- 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
        compile_grep_patterns(&rev.grep_filter);
        prepare_revision_walk(&rev);
 
-       if (pager)
+       if (pager) {
+               cgit_print_layout_start();
                html("<table class='list nowrap'>");
+       }
 
        html("<tr class='nohover'>");
        if (commit_graph)
@@ -526,6 +528,7 @@ void cgit_print_log(const char *tip, int ofs, int cnt, char *grep, char *pattern
                        html("</li>");
                }
                html("</ul>");
+               cgit_print_layout_end();
        } else if ((commit = get_revision(&rev)) != NULL) {
                htmlf("<tr class='nohover'><td colspan='%d'>", columns);
                cgit_log_link("[...]", NULL, NULL, ctx.qry.head, NULL,