From c61c11ae54a5cce9449cfd48c2a788ac858ec2fd Mon Sep 17 00:00:00 2001
From: thomaswoehlke <thomas.woehlke@gmail.com>
Date: Mon, 18 Jan 2021 13:16:53 +0100
Subject: [PATCH] ### 0.0.7 Release * Fixed #8
 WhoServiceUpdate.update_db_short() * Fixed #9 URL: /who/update/short * Fixed
 #10 async who_update_short_task * Fixed #11
 WhoServiceUpdate.__update_who_global_data_short() * Fixed #12 better layout
 for flash messages

---
 templates/who/who_imported.html | 63 +++++++++++++++++++++++++++++++++
 1 file changed, 63 insertions(+)

diff --git a/templates/who/who_imported.html b/templates/who/who_imported.html
index bd8cbe82..a9618e12 100644
--- a/templates/who/who_imported.html
+++ b/templates/who/who_imported.html
@@ -12,6 +12,69 @@
 
 {% block main_container %}
 
+    {% if page_data.pages > 1 %}
+    <!-- previous page -->
+        <ul class="pagination">
+        {% if page_data.has_prev %}
+        <li class="page-item">
+            <a class="page-link" href="{{ url_for('url_who_imported', page=page_data.prev_num) }}">Previous</a>
+        </li>
+        {% endif %}
+        <!-- all page numbers -->
+        {% for page_num in page_data.iter_pages() %}
+            {% if page_num %}
+                {% if page_num != page_data.page %}
+                    <li class="page-item">
+                        <a class="page-link" href="{{ url_for('url_who_imported', page=page_num) }}">{{ page_num }}</a>
+                    </li>
+                {% else %}
+                    <li class="page-item active">
+                        <a class="page-link" href="#">{{ page_num }}</a>
+                    </li>
+                {% endif %}
+           {% else %}
+               <li class="page-item">
+                   <span class="ellipsis page-link" style="white-space; nowrap; overflow: hidden; text-overflow: ellipsis">…</span>
+               </li>
+           {% endif %}
+        {% endfor %}
+        <!-- next page -->
+        {% if page_data.has_next %}
+        <li class="page-item">
+            <a class="page-link" href="{{ url_for('url_who_imported', page=page_data.next_num) }}">Next</a>
+        </li>
+        {% endif %}
+        </ul>
+    {% endif %}
+
+    <table class="table table-hover table-striped">
+        <thead>
+            <tr>
+                <th scope="col">date_reported</th>
+                <th scope="col">country_code</th>
+                <th scope="col">country</th>
+                <th scope="col">who_region</th>
+                <th scope="col">new_cases</th>
+                <th scope="col">cumulative_cases</th>
+                <th scope="col">new_deaths</th>
+                <th scope="col">cumulative_deaths</th>
+            </tr>
+        </thead>
+        <tbody>
+        {% for who_global_data_import in page_data.items %}
+            <tr>
+                <td>{{ who_global_data_import.date_reported }}</td>
+                <td>{{ who_global_data_import.country_code }}</td>
+                <td>{{ who_global_data_import.country }}</td>
+                <td>{{ who_global_data_import.who_region }}</td>
+                <td>{{ who_global_data_import.new_cases }}</td>
+                <td>{{ who_global_data_import.cumulative_cases }}</td>
+                <td>{{ who_global_data_import.new_deaths }}</td>
+                <td>{{ who_global_data_import.cumulative_deaths }}</td>
+            </tr>
+        {% endfor %}
+        </tbody>
+    </table>
 {% endblock %}
 
 
-- 
GitLab