From 00f6ed46ccf73d10f12daa1b8cfef1456a152b41 Mon Sep 17 00:00:00 2001 From: Dot-Rar Date: Sun, 26 May 2019 14:57:28 +0100 Subject: [PATCH] pagination --- app/http/endpoints/manage/logs.go | 1 + public/templates/views/logs.mustache | 112 ++++----------------------- 2 files changed, 18 insertions(+), 95 deletions(-) diff --git a/app/http/endpoints/manage/logs.go b/app/http/endpoints/manage/logs.go index 7b68ec8..32ab29f 100644 --- a/app/http/endpoints/manage/logs.go +++ b/app/http/endpoints/manage/logs.go @@ -104,6 +104,7 @@ func LogsHandler(ctx *gin.Context) { "previousPage": page - 1, "nextPage": page + 1, "logs": formattedLogs, + "page": page, })) } else { ctx.Redirect(302, "/login") diff --git a/public/templates/views/logs.mustache b/public/templates/views/logs.mustache index dd24615..ef69af8 100644 --- a/public/templates/views/logs.mustache +++ b/public/templates/views/logs.mustache @@ -74,6 +74,23 @@ {{/logs}} + +
+
+
    + {{#isPageOne}} +
  • + {{/isPageOne}} + {{^isPageOne}} +
  • + {{/isPageOne}} + +

    Page {{page}}

    + +
  • +
+
+
@@ -81,98 +98,3 @@ - - -