From 61658410b220ffa236c33e9db7a9216354a00424 Mon Sep 17 00:00:00 2001
From: Stephan Porada <sporada@uni-bielefeld.de>
Date: Tue, 22 Sep 2020 11:18:34 +0200
Subject: [PATCH] Fix tables and add bottom paginatio nto all tables

---
 web/app/static/js/nopaque.lists.js            | 19 ++++++++++++++-----
 .../services/corpus_analysis.html.j2          |  3 ++-
 .../templates/tables/query_results.html.j2    |  2 +-
 3 files changed, 17 insertions(+), 7 deletions(-)

diff --git a/web/app/static/js/nopaque.lists.js b/web/app/static/js/nopaque.lists.js
index 306d706e..d9acebe6 100644
--- a/web/app/static/js/nopaque.lists.js
+++ b/web/app/static/js/nopaque.lists.js
@@ -145,11 +145,20 @@ RessourceList.dataMappers = {
 RessourceList.options = {
   // common list.js options for 4 rows per page etc.
   common: {
-    page: 4,
-    pagination: {
-      innerWindow: 8,
-      outerWindow: 1,
-    },
+    page: 5,
+    pagination: [
+      {
+        name: "paginationTop",
+        paginationClass: "paginationTop",
+        innerWindow: 4,
+        outerWindow: 1
+      },
+      {
+        paginationClass: "paginationBottom",
+        innerWindow: 4,
+        outerWindow: 1,
+      },
+    ],
   },
   // extended list.js options for 10 rows per page etc.
   extended: {
diff --git a/web/app/templates/services/corpus_analysis.html.j2 b/web/app/templates/services/corpus_analysis.html.j2
index 23555b8f..f6eadf60 100644
--- a/web/app/templates/services/corpus_analysis.html.j2
+++ b/web/app/templates/services/corpus_analysis.html.j2
@@ -27,6 +27,7 @@
         <input id="search-corpus" class="search" type="search"></input>
         <label for="search-corpus">Search corpus</label>
       </div>
+      <ul class="pagination paginationTop"></ul>
       <table>
         <thead>
           <tr>
@@ -41,7 +42,7 @@
         </thead>
         <tbody class="list"></tbody>
       </table>
-      <ul class="pagination"></ul>
+      <ul class="pagination paginationBottom"></ul>
     </div>
     <div class="card-action right-align">
       <a class="btn corpus-analysis-color darken waves-effect waves-light" href="{{ url_for('corpora.add_corpus') }}">New corpus<i class="material-icons right">add</i></a>
diff --git a/web/app/templates/tables/query_results.html.j2 b/web/app/templates/tables/query_results.html.j2
index 4d776bf9..1b7503dc 100644
--- a/web/app/templates/tables/query_results.html.j2
+++ b/web/app/templates/tables/query_results.html.j2
@@ -10,7 +10,7 @@ results. -->
         <th style="width: 3%">Title</th>
         <th style="width: 25%">Left context</th>
         <th style="width: 35%">Match</th>
-        <th style="width: 10%">Actions</th>
+        <th style="width: 10%">{# Actions #}</th>
         <th style="width: 25%">Right Context</th>
       </tr>
     </thead>
-- 
GitLab