[PATCH 1/1] ui-log: Show count of displayed commits

Petr Vorel petr.vorel at gmail.com
Sun Apr 14 15:57:41 CEST 2019


+ add CSS formatting.

Signed-off-by: Petr Vorel <petr.vorel at gmail.com>
---
 cgit.css | 5 +++++
 ui-log.c | 4 +++-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/cgit.css b/cgit.css
index d4aadbf..ca74508 100644
--- a/cgit.css
+++ b/cgit.css
@@ -893,3 +893,8 @@ div#cgit table.ssdiff td.space {
 div#cgit table.ssdiff td.space div {
 	min-height: 3em;
 }
+div#cgit div#count {
+	font-size: 90%;
+	padding-top: 10px;
+	padding-left: 6px;
+}
diff --git a/ui-log.c b/ui-log.c
index 3bcb657..b88e95e 100644
--- a/ui-log.c
+++ b/ui-log.c
@@ -515,7 +515,9 @@ void cgit_print_log(const char *tip, int ofs, int cnt, char *grep, char *pattern
 		commit->parents = NULL;
 	}
 	if (pager) {
-		html("</table><ul class='pager'>");
+		html("</table>");
+		htmlf("<div id='count'>Displayed items: %d</div>", i);
+		html("<ul class='pager'>");
 		if (ofs > 0) {
 			html("<li>");
 			cgit_log_link("[prev]", NULL, NULL, ctx.qry.head,
-- 
2.20.1



More information about the CGit mailing list