From f202b461206e462c553d1bf65254a67f012aa9a8 Mon Sep 17 00:00:00 2001 From: thomaswoehlke <thomas.woehlke@gmail.com> Date: Sun, 11 Apr 2021 16:16:00 +0200 Subject: [PATCH] ### 0.0.26 Release * Fixed #194 dependency is unsecure --- .../date_reported/who_date_reported_all.html | 79 ++----------------- .../who_date_reported_all_pagination.html | 34 ++++++++ .../who_date_reported_all_table.html | 39 +++++++++ .../date_reported/who_date_reported_one.html | 45 ++--------- ...ho_date_reported_one_cases_cumulative.html | 45 ++--------- ...orted_one_cases_cumulative_pagination.html | 37 +++++++++ .../who_date_reported_one_cases_new.html | 47 ++--------- ...ate_reported_one_cases_new_pagination.html | 39 +++++++++ ...o_date_reported_one_deaths_cumulative.html | 45 ++--------- ...rted_one_deaths_cumulative_pagination.html | 37 +++++++++ .../who_date_reported_one_deaths_new.html | 51 ++---------- .../who_date_reported_one_pagination.html | 37 +++++++++ .../who_date_reported_one_table.html} | 0 13 files changed, 265 insertions(+), 270 deletions(-) create mode 100644 src/covid19/blueprints/who/templates/who/date_reported/who_date_reported_all_pagination.html create mode 100644 src/covid19/blueprints/who/templates/who/date_reported/who_date_reported_all_table.html create mode 100644 src/covid19/blueprints/who/templates/who/date_reported/who_date_reported_one_cases_cumulative_pagination.html create mode 100644 src/covid19/blueprints/who/templates/who/date_reported/who_date_reported_one_cases_new_pagination.html create mode 100644 src/covid19/blueprints/who/templates/who/date_reported/who_date_reported_one_deaths_cumulative_pagination.html create mode 100644 src/covid19/blueprints/who/templates/who/date_reported/who_date_reported_one_pagination.html rename src/covid19/blueprints/who/templates/who/{fragments/fragment_who_table_global_data_date_reported.html => date_reported/who_date_reported_one_table.html} (100%) diff --git a/src/covid19/blueprints/who/templates/who/date_reported/who_date_reported_all.html b/src/covid19/blueprints/who/templates/who/date_reported/who_date_reported_all.html index 41439290..eea1d5da 100644 --- a/src/covid19/blueprints/who/templates/who/date_reported/who_date_reported_all.html +++ b/src/covid19/blueprints/who/templates/who/date_reported/who_date_reported_all.html @@ -7,82 +7,17 @@ <div class="container"> <div class="row"> <div class="col"> - {% 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('who.url_who_date_reported_all', 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('who.url_who_date_reported_all', 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 my-page-item-ellipsis-page-link">…</span> - </li> - {% endif %} - {% endfor %} - <!-- next page --> - {% if page_data.has_next %} - <li class="page-item"> - <a class="page-link" href="{{ url_for('who.url_who_date_reported_all', page=page_data.next_num) }}">Next</a> - </li> - {% endif %} - </ul> - {% endif %} + {% include 'who/date_reported/who_date_reported_all_pagination.html' %} </div> </div> <div class="row"> <div class="col"> - <table class="table table-hover table-striped table-dark"> - <thead class="table-secondary"> - <tr> - <th scope="col" class="text-right">day of week</th> - <th scope="col" class="text-left">date reported</th> - <th scope="col" class="text-right">week of year</th> - <th scope="col" class="text-left">year</th> - </tr> - </thead> - <tbody> - {% for who_date_reported in page_data.items %} - <tr> - <td class="text-right"> - {{ who_date_reported.get_name_for_weekday() }} - </td> - <td class="text-left"> - <a href="/who/date_reported/{{ who_date_reported.id }}"> - {{ who_date_reported }} - </a> - </td> - <td class="text-right"> - {{ who_date_reported.week_of_year }} - </td> - <td class="text-left"> - {{ who_date_reported.year }} - </td> - </tr> - {% endfor %} - </tbody> - <tfoot class="table-secondary"> - <tr> - <th scope="col" class="text-right">day of week</th> - <th scope="col" class="text-left">date reported</th> - <th scope="col" class="text-right">week of year</th> - <th scope="col" class="text-left">year</th> - </tr> - </tfoot> - </table> + {% include 'who/date_reported/who_date_reported_all_table.html' %} + </div> + </div> + <div class="row"> + <div class="col"> + {% include 'who/date_reported/who_date_reported_all_pagination.html' %} </div> </div> </div> diff --git a/src/covid19/blueprints/who/templates/who/date_reported/who_date_reported_all_pagination.html b/src/covid19/blueprints/who/templates/who/date_reported/who_date_reported_all_pagination.html new file mode 100644 index 00000000..34348791 --- /dev/null +++ b/src/covid19/blueprints/who/templates/who/date_reported/who_date_reported_all_pagination.html @@ -0,0 +1,34 @@ + {% 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('who.url_who_date_reported_all', 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('who.url_who_date_reported_all', 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 my-page-item-ellipsis-page-link">…</span> + </li> + {% endif %} + {% endfor %} + <!-- next page --> + {% if page_data.has_next %} + <li class="page-item"> + <a class="page-link" href="{{ url_for('who.url_who_date_reported_all', page=page_data.next_num) }}">Next</a> + </li> + {% endif %} + </ul> + {% endif %} diff --git a/src/covid19/blueprints/who/templates/who/date_reported/who_date_reported_all_table.html b/src/covid19/blueprints/who/templates/who/date_reported/who_date_reported_all_table.html new file mode 100644 index 00000000..ef541983 --- /dev/null +++ b/src/covid19/blueprints/who/templates/who/date_reported/who_date_reported_all_table.html @@ -0,0 +1,39 @@ + <table class="table table-hover table-striped table-dark"> + <thead class="table-secondary"> + <tr> + <th scope="col" class="text-right">day of week</th> + <th scope="col" class="text-left">date reported</th> + <th scope="col" class="text-right">week of year</th> + <th scope="col" class="text-left">year</th> + </tr> + </thead> + <tbody> + {% for who_date_reported in page_data.items %} + <tr> + <td class="text-right"> + {{ who_date_reported.get_name_for_weekday() }} + </td> + <td class="text-left"> + <a href="/who/date_reported/{{ who_date_reported.id }}"> + {{ who_date_reported }} + </a> + </td> + <td class="text-right"> + {{ who_date_reported.week_of_year }} + </td> + <td class="text-left"> + {{ who_date_reported.year }} + </td> + </tr> + {% endfor %} + </tbody> + <tfoot class="table-secondary"> + <tr> + <th scope="col" class="text-right">day of week</th> + <th scope="col" class="text-left">date reported</th> + <th scope="col" class="text-right">week of year</th> + <th scope="col" class="text-left">year</th> + </tr> + </tfoot> + </table> + diff --git a/src/covid19/blueprints/who/templates/who/date_reported/who_date_reported_one.html b/src/covid19/blueprints/who/templates/who/date_reported/who_date_reported_one.html index 7d0a6c40..fb852908 100644 --- a/src/covid19/blueprints/who/templates/who/date_reported/who_date_reported_one.html +++ b/src/covid19/blueprints/who/templates/who/date_reported/who_date_reported_one.html @@ -7,48 +7,17 @@ <div class="container"> <div class="row"> <div class="col"> - {% 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('who.url_who_date_reported', - date_reported_id=who_date_reported.id, 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('who.url_who_date_reported', - date_reported_id=who_date_reported.id, 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 my-page-item-ellipsis-page-link">…</span> - </li> - {% endif %} - {% endfor %} - <!-- next page --> - {% if page_data.has_next %} - <li class="page-item"> - <a class="page-link" href="{{ url_for('who.url_who_date_reported', - date_reported_id=who_date_reported.id, page=page_data.next_num) }}">Next</a> - </li> - {% endif %} - </ul> - {% endif %} + {% include 'who/date_reported/who_date_reported_one_pagination.html' %} </div> </div> <div class="row"> <div class="col"> - {% include 'who/fragments/fragment_who_table_global_data_date_reported.html' %} + {% include 'who/date_reported/who_date_reported_one_table.html' %} + </div> + </div> + <div class="row"> + <div class="col"> + {% include 'who/date_reported/who_date_reported_one_pagination.html' %} </div> </div> </div> diff --git a/src/covid19/blueprints/who/templates/who/date_reported/who_date_reported_one_cases_cumulative.html b/src/covid19/blueprints/who/templates/who/date_reported/who_date_reported_one_cases_cumulative.html index 0f13ba30..2e6562a5 100644 --- a/src/covid19/blueprints/who/templates/who/date_reported/who_date_reported_one_cases_cumulative.html +++ b/src/covid19/blueprints/who/templates/who/date_reported/who_date_reported_one_cases_cumulative.html @@ -7,48 +7,17 @@ <div class="container"> <div class="row"> <div class="col"> - {% 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('who.url_who_date_reported_deaths_cumulative', - date_reported_id=who_date_reported.id, 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('who.url_who_date_reported_deaths_cumulative', - date_reported_id=who_date_reported.id, 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 my-page-item-ellipsis-page-link">…</span> - </li> - {% endif %} - {% endfor %} - <!-- next page --> - {% if page_data.has_next %} - <li class="page-item"> - <a class="page-link" href="{{ url_for('who.url_who_date_reported_deaths_cumulative', - date_reported_id=who_date_reported.id, page=page_data.next_num) }}">Next</a> - </li> - {% endif %} - </ul> - {% endif %} + {% include 'who/date_reported/who_date_reported_one_pagination.html' %} </div> </div> <div class="row"> <div class="col"> - {% include 'who/fragments/fragment_who_table_global_data_date_reported.html' %} + {% include 'who/date_reported/who_date_reported_one_table.html' %} + </div> + </div> + <div class="row"> + <div class="col"> + {% include 'who/date_reported/who_date_reported_one_pagination.html' %} </div> </div> {% endblock %} diff --git a/src/covid19/blueprints/who/templates/who/date_reported/who_date_reported_one_cases_cumulative_pagination.html b/src/covid19/blueprints/who/templates/who/date_reported/who_date_reported_one_cases_cumulative_pagination.html new file mode 100644 index 00000000..3b618854 --- /dev/null +++ b/src/covid19/blueprints/who/templates/who/date_reported/who_date_reported_one_cases_cumulative_pagination.html @@ -0,0 +1,37 @@ + {% 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('who.url_who_date_reported_deaths_cumulative', + date_reported_id=who_date_reported.id, 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('who.url_who_date_reported_deaths_cumulative', + date_reported_id=who_date_reported.id, 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 my-page-item-ellipsis-page-link">…</span> + </li> + {% endif %} + {% endfor %} + <!-- next page --> + {% if page_data.has_next %} + <li class="page-item"> + <a class="page-link" href="{{ url_for('who.url_who_date_reported_deaths_cumulative', + date_reported_id=who_date_reported.id, page=page_data.next_num) }}">Next</a> + </li> + {% endif %} + </ul> + {% endif %} diff --git a/src/covid19/blueprints/who/templates/who/date_reported/who_date_reported_one_cases_new.html b/src/covid19/blueprints/who/templates/who/date_reported/who_date_reported_one_cases_new.html index 8d1da838..fb852908 100644 --- a/src/covid19/blueprints/who/templates/who/date_reported/who_date_reported_one_cases_new.html +++ b/src/covid19/blueprints/who/templates/who/date_reported/who_date_reported_one_cases_new.html @@ -7,50 +7,17 @@ <div class="container"> <div class="row"> <div class="col"> - {% 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('who.url_who_date_reported_cases_new', - date_reported_id=who_date_reported.id, 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('who.url_who_date_reported_cases_new', - date_reported_id=who_date_reported.id, 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 my-page-item-ellipsis-page-link">…</span> - </li> - {% endif %} - {% endfor %} - <!-- next page --> - {% if page_data.has_next %} - <li class="page-item"> - <a class="page-link" href="{{ url_for('who.url_who_date_reported_cases_new', - date_reported_id=who_date_reported.id, page=page_data.next_num) }}">Next</a> - </li> - {% endif %} - </ul> - {% endif %} + {% include 'who/date_reported/who_date_reported_one_pagination.html' %} </div> </div> <div class="row"> <div class="col"> - {% include 'who/fragments/fragment_who_table_global_data_date_reported.html' %} + {% include 'who/date_reported/who_date_reported_one_table.html' %} + </div> + </div> + <div class="row"> + <div class="col"> + {% include 'who/date_reported/who_date_reported_one_pagination.html' %} </div> </div> </div> diff --git a/src/covid19/blueprints/who/templates/who/date_reported/who_date_reported_one_cases_new_pagination.html b/src/covid19/blueprints/who/templates/who/date_reported/who_date_reported_one_cases_new_pagination.html new file mode 100644 index 00000000..dc078243 --- /dev/null +++ b/src/covid19/blueprints/who/templates/who/date_reported/who_date_reported_one_cases_new_pagination.html @@ -0,0 +1,39 @@ + {% 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('who.url_who_date_reported_cases_new', + date_reported_id=who_date_reported.id, 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('who.url_who_date_reported_cases_new', + date_reported_id=who_date_reported.id, 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 my-page-item-ellipsis-page-link">…</span> + </li> + {% endif %} + {% endfor %} + <!-- next page --> + {% if page_data.has_next %} + <li class="page-item"> + <a class="page-link" href="{{ url_for('who.url_who_date_reported_cases_new', + date_reported_id=who_date_reported.id, page=page_data.next_num) }}">Next</a> + </li> + {% endif %} + </ul> + {% endif %} diff --git a/src/covid19/blueprints/who/templates/who/date_reported/who_date_reported_one_deaths_cumulative.html b/src/covid19/blueprints/who/templates/who/date_reported/who_date_reported_one_deaths_cumulative.html index 5c73fb1d..6cade560 100644 --- a/src/covid19/blueprints/who/templates/who/date_reported/who_date_reported_one_deaths_cumulative.html +++ b/src/covid19/blueprints/who/templates/who/date_reported/who_date_reported_one_deaths_cumulative.html @@ -7,48 +7,17 @@ <div class="container"> <div class="row"> <div class="col"> - {% 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('who.url_who_date_reported_deaths_cumulative', - date_reported_id=who_date_reported.id, 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('who.url_who_date_reported_deaths_cumulative', - date_reported_id=who_date_reported.id, 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 my-page-item-ellipsis-page-link">…</span> - </li> - {% endif %} - {% endfor %} - <!-- next page --> - {% if page_data.has_next %} - <li class="page-item"> - <a class="page-link" href="{{ url_for('who.url_who_date_reported_deaths_cumulative', - date_reported_id=who_date_reported.id, page=page_data.next_num) }}">Next</a> - </li> - {% endif %} - </ul> - {% endif %} + {% include 'who/date_reported/who_date_reported_one_pagination.html' %} </div> </div> <div class="row"> <div class="col"> - {% include 'who/fragments/fragment_who_table_global_data_date_reported.html' %} + {% include 'who/date_reported/who_date_reported_one_table.html' %} + </div> + </div> + <div class="row"> + <div class="col"> + {% include 'who/date_reported/who_date_reported_one_pagination.html' %} </div> </div> </div> diff --git a/src/covid19/blueprints/who/templates/who/date_reported/who_date_reported_one_deaths_cumulative_pagination.html b/src/covid19/blueprints/who/templates/who/date_reported/who_date_reported_one_deaths_cumulative_pagination.html new file mode 100644 index 00000000..3b618854 --- /dev/null +++ b/src/covid19/blueprints/who/templates/who/date_reported/who_date_reported_one_deaths_cumulative_pagination.html @@ -0,0 +1,37 @@ + {% 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('who.url_who_date_reported_deaths_cumulative', + date_reported_id=who_date_reported.id, 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('who.url_who_date_reported_deaths_cumulative', + date_reported_id=who_date_reported.id, 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 my-page-item-ellipsis-page-link">…</span> + </li> + {% endif %} + {% endfor %} + <!-- next page --> + {% if page_data.has_next %} + <li class="page-item"> + <a class="page-link" href="{{ url_for('who.url_who_date_reported_deaths_cumulative', + date_reported_id=who_date_reported.id, page=page_data.next_num) }}">Next</a> + </li> + {% endif %} + </ul> + {% endif %} diff --git a/src/covid19/blueprints/who/templates/who/date_reported/who_date_reported_one_deaths_new.html b/src/covid19/blueprints/who/templates/who/date_reported/who_date_reported_one_deaths_new.html index 5d940091..c61e0d19 100644 --- a/src/covid19/blueprints/who/templates/who/date_reported/who_date_reported_one_deaths_new.html +++ b/src/covid19/blueprints/who/templates/who/date_reported/who_date_reported_one_deaths_new.html @@ -7,54 +7,17 @@ <div class="container"> <div class="row"> <div class="col"> - {% 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('who.url_who_date_reported_deaths_new', - date_reported_id=who_date_reported.id, 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('who.url_who_date_reported_deaths_new', - date_reported_id=who_date_reported.id, 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 my-page-item-ellipsis-page-link">…</span> - </li> - {% endif %} - {% endfor %} - <!-- next page --> - {% if page_data.has_next %} - <li class="page-item"> - <a class="page-link" href="{{ url_for('who.url_who_date_reported_deaths_new', - date_reported_id=who_date_reported.id, page=page_data.next_num) }}"> - Next - </a> - </li> - {% endif %} - </ul> - {% endif %} + {% include 'who/date_reported/who_date_reported_one_pagination.html' %} </div> </div> <div class="row"> <div class="col"> - {% include 'who/fragments/fragment_who_table_global_data_date_reported.html' %} + {% include 'who/date_reported/who_date_reported_one_table.html' %} + </div> + </div> + <div class="row"> + <div class="col"> + {% include 'who/date_reported/who_date_reported_one_pagination.html' %} </div> </div> </div> diff --git a/src/covid19/blueprints/who/templates/who/date_reported/who_date_reported_one_pagination.html b/src/covid19/blueprints/who/templates/who/date_reported/who_date_reported_one_pagination.html new file mode 100644 index 00000000..7938fbcd --- /dev/null +++ b/src/covid19/blueprints/who/templates/who/date_reported/who_date_reported_one_pagination.html @@ -0,0 +1,37 @@ + {% 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('who.url_who_date_reported', + date_reported_id=who_date_reported.id, 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('who.url_who_date_reported', + date_reported_id=who_date_reported.id, 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 my-page-item-ellipsis-page-link">…</span> + </li> + {% endif %} + {% endfor %} + <!-- next page --> + {% if page_data.has_next %} + <li class="page-item"> + <a class="page-link" href="{{ url_for('who.url_who_date_reported', + date_reported_id=who_date_reported.id, page=page_data.next_num) }}">Next</a> + </li> + {% endif %} + </ul> + {% endif %} diff --git a/src/covid19/blueprints/who/templates/who/fragments/fragment_who_table_global_data_date_reported.html b/src/covid19/blueprints/who/templates/who/date_reported/who_date_reported_one_table.html similarity index 100% rename from src/covid19/blueprints/who/templates/who/fragments/fragment_who_table_global_data_date_reported.html rename to src/covid19/blueprints/who/templates/who/date_reported/who_date_reported_one_table.html -- GitLab