From 370a002af3b75aa394390696ba277aeea43cbc81 Mon Sep 17 00:00:00 2001
From: Stephan Porada <sporada@uni-bielefeld.de>
Date: Wed, 30 Sep 2020 10:17:33 +0200
Subject: [PATCH] Small fix to show 5 elements in corpus view list.

---
 web/app/static/js/nopaque.lists.js       | 2 +-
 web/app/templates/corpora/corpus.html.j2 | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/web/app/static/js/nopaque.lists.js b/web/app/static/js/nopaque.lists.js
index d9acebe6..d44bb468 100644
--- a/web/app/static/js/nopaque.lists.js
+++ b/web/app/static/js/nopaque.lists.js
@@ -143,7 +143,7 @@ RessourceList.dataMappers = {
 
 
 RessourceList.options = {
-  // common list.js options for 4 rows per page etc.
+  // common list.js options for 5 rows per page etc.
   common: {
     page: 5,
     pagination: [
diff --git a/web/app/templates/corpora/corpus.html.j2 b/web/app/templates/corpora/corpus.html.j2
index 53b514da..8f3b7fc5 100644
--- a/web/app/templates/corpora/corpus.html.j2
+++ b/web/app/templates/corpora/corpus.html.j2
@@ -78,13 +78,14 @@
           </tr>
         </thead>
         <tbody class="list">
+          {% if corpus_files|length == 0 %}
           <tr class="show-if-only-child">
             <td colspan="5">
               <span class="card-title"><i class="material-icons left">book</i>Nothing here...</span>
               <p>Corpus is empty. Add texts using the option below.</p>
             </td>
           </tr>
-        </tbody>
+          {% endif %}
       </table>
       <ul class="pagination paginationBottom"></ul>
     </div>
-- 
GitLab