diff --git a/src/covid19/blueprints/owid/templates/owid/continent/owid_continent_one.html b/src/covid19/blueprints/owid/templates/owid/continent/owid_continent_one.html index 6c907a08d00885cba08a0e48b1651dffbabb6630..4cb0990df4f30ab2462732f3a898dbfce558c909 100644 --- a/src/covid19/blueprints/owid/templates/owid/continent/owid_continent_one.html +++ b/src/covid19/blueprints/owid/templates/owid/continent/owid_continent_one.html @@ -12,7 +12,7 @@ </div> <div class="row"> <div class="col"> - {% include 'owid/continent/owid_continent_one_table.html' %} + {% include 'owid/country/owid_country_all_table.html' %} </div> </div> <div class="row"> diff --git a/src/covid19/blueprints/owid/templates/owid/continent/owid_continent_one_table.html b/src/covid19/blueprints/owid/templates/owid/continent/owid_continent_one_table.html deleted file mode 100644 index c6cdc530b65035b78678237854fd081274b15a83..0000000000000000000000000000000000000000 --- a/src/covid19/blueprints/owid/templates/owid/continent/owid_continent_one_table.html +++ /dev/null @@ -1,48 +0,0 @@ - <table class="table table-hover table-striped table-dark"> - <thead class="table-secondary"> - <tr> - <th scope="col">iso_code</th> - <th scope="col">continent</th> - <th scope="col">location</th> - <th scope="col">population</th> - <th scope="col">population_density</th> - <th scope="col">median_age</th> - <th scope="col">aged_65_older</th> - <th scope="col">aged_70_older</th> - <th scope="col">gdp_per_capita</th> - <th scope="col">extreme_poverty</th> - <th scope="col">cardiovasc_death_rate</th> - <th scope="col">diabetes_prevalence</th> - <th scope="col">female_smokers</th> - <th scope="col">male_smokers</th> - <th scope="col">handwashing_facilities</th> - <th scope="col">hospital_beds_per_thousand</th> - <th scope="col">life_expectancy</th> - <th scope="col">human_development_index</th> - </tr> - </thead> - <tbody> - {% for owid_country in page_data.items %} - <tr> - <td>{{ owid_country.iso_code }}</td> - <td>{{ owid_country.continent.region }}</td> - <td>{{ owid_country.location }}</td> - <td>{{ owid_country.population }}</td> - <td>{{ owid_country.population_density }}</td> - <td>{{ owid_country.median_age }}</td> - <td>{{ owid_country.aged_65_older }}</td> - <td>{{ owid_country.aged_70_older }}</td> - <td>{{ owid_country.gdp_per_capita }}</td> - <td>{{ owid_country.extreme_poverty }}</td> - <td>{{ owid_country.cardiovasc_death_rate }}</td> - <td>{{ owid_country.diabetes_prevalence }}</td> - <td>{{ owid_country.female_smokers }}</td> - <td>{{ owid_country.male_smokers }}</td> - <td>{{ owid_country.handwashing_facilities }}</td> - <td>{{ owid_country.hospital_beds_per_thousand }}</td> - <td>{{ owid_country.life_expectancy }}</td> - <td>{{ owid_country.human_development_index }}</td> - </tr> - {% endfor %} - </tbody> - </table> \ No newline at end of file diff --git a/src/covid19/blueprints/owid/templates/owid/country/owid_country_all_table.html b/src/covid19/blueprints/owid/templates/owid/country/owid_country_all_table.html index c6cdc530b65035b78678237854fd081274b15a83..41d35c4b466e7152d195743d8eeae915e267a6dd 100644 --- a/src/covid19/blueprints/owid/templates/owid/country/owid_country_all_table.html +++ b/src/covid19/blueprints/owid/templates/owid/country/owid_country_all_table.html @@ -25,7 +25,11 @@ {% for owid_country in page_data.items %} <tr> <td>{{ owid_country.iso_code }}</td> - <td>{{ owid_country.continent.region }}</td> + <td> + <a href="{{ url_for( 'owid.url_owid_continent_one', continent_id=owid_country.continent.id) }}"> + {{ owid_country.continent.region }} + </a> + </td> <td>{{ owid_country.location }}</td> <td>{{ owid_country.population }}</td> <td>{{ owid_country.population_density }}</td> diff --git a/src/covid19/blueprints/owid/templates/owid/country/owid_country_one.html b/src/covid19/blueprints/owid/templates/owid/country/owid_country_one.html index 1dc198324453ec3d5f801e11240bfa320bdb81b3..877593380bc76614c4c4d049d0db192fe915a5ad 100644 --- a/src/covid19/blueprints/owid/templates/owid/country/owid_country_one.html +++ b/src/covid19/blueprints/owid/templates/owid/country/owid_country_one.html @@ -12,7 +12,7 @@ </div> <div class="row"> <div class="col"> - {% include 'owid/country/owid_country_one_table.html' %} + {% include 'owid/owid_data/owid_data_table.html' %} </div> </div> <div class="row"> diff --git a/src/covid19/blueprints/owid/templates/owid/country/owid_country_one_germany.html b/src/covid19/blueprints/owid/templates/owid/country/owid_country_one_germany.html index 1dc198324453ec3d5f801e11240bfa320bdb81b3..877593380bc76614c4c4d049d0db192fe915a5ad 100644 --- a/src/covid19/blueprints/owid/templates/owid/country/owid_country_one_germany.html +++ b/src/covid19/blueprints/owid/templates/owid/country/owid_country_one_germany.html @@ -12,7 +12,7 @@ </div> <div class="row"> <div class="col"> - {% include 'owid/country/owid_country_one_table.html' %} + {% include 'owid/owid_data/owid_data_table.html' %} </div> </div> <div class="row"> diff --git a/src/covid19/blueprints/owid/templates/owid/date_reported/owid_date_reported_all_table.html b/src/covid19/blueprints/owid/templates/owid/date_reported/owid_date_reported_all_table.html index 52e18cc16f24613f589fc4b670ae6d7e83eda2d0..5162b7c1100292910a355521c33d92a0aebd668c 100644 --- a/src/covid19/blueprints/owid/templates/owid/date_reported/owid_date_reported_all_table.html +++ b/src/covid19/blueprints/owid/templates/owid/date_reported/owid_date_reported_all_table.html @@ -14,7 +14,7 @@ {{ owid_date_reported.get_name_for_weekday() }} </td> <td class="text-left"> - <a href="/owid/date_reported/{{ owid_date_reported.id }}"> + <a href="{{ url_for( 'owid.url_owid_date_reported_one', date_reported_id=owid_date_reported.id) }}"> {{ owid_date_reported }} </a> </td> diff --git a/src/covid19/blueprints/owid/templates/owid/date_reported/owid_date_reported_one.html b/src/covid19/blueprints/owid/templates/owid/date_reported/owid_date_reported_one.html index 669e14cfe6162fd8984323029164e0bc8722851f..bdd55720d6e40d18f15111a55092826635f6a3ea 100644 --- a/src/covid19/blueprints/owid/templates/owid/date_reported/owid_date_reported_one.html +++ b/src/covid19/blueprints/owid/templates/owid/date_reported/owid_date_reported_one.html @@ -12,7 +12,7 @@ </div> <div class="row"> <div class="col"> - {% include 'owid/date_reported/owid_date_reported_one_table.html' %} + {% include 'owid/owid_data/owid_data_table.html' %} </div> </div> <div class="row"> diff --git a/src/covid19/blueprints/owid/templates/owid/date_reported/owid_date_reported_one_cases_cumulative.html b/src/covid19/blueprints/owid/templates/owid/date_reported/owid_date_reported_one_cases_cumulative.html index 6fc04644289cbd7207cdc8611129e1d6f3a58ac3..22a2b8de5bb5e793fbe146213a783905d2d56dd8 100644 --- a/src/covid19/blueprints/owid/templates/owid/date_reported/owid_date_reported_one_cases_cumulative.html +++ b/src/covid19/blueprints/owid/templates/owid/date_reported/owid_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('owid.url_owid_date_reported_one_deaths_cumulative', - date_reported_id=owid_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('owid.url_owid_date_reported_one_deaths_cumulative', - date_reported_id=owid_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('owid.url_owid_date_reported_one_deaths_cumulative', - date_reported_id=owid_date_reported.id, page=page_data.next_num) }}">Next</a> - </li> - {% endif %} - </ul> - {% endif %} + {% include 'owid/date_reported/owid_date_reported_one_cases_cumulative_pagination.html' %} </div> </div> <div class="row"> <div class="col"> - {% include 'owid/date_reported/owid_date_reported_one_table.html' %} + {% include 'owid/owid_data/owid_data_table.html' %} + </div> + </div> + <div class="row"> + <div class="col"> + {% include 'owid/date_reported/owid_date_reported_one_cases_cumulative_pagination.html' %} </div> </div> </div> diff --git a/src/covid19/blueprints/owid/templates/owid/date_reported/owid_date_reported_one_cases_cumulative_pagination.html b/src/covid19/blueprints/owid/templates/owid/date_reported/owid_date_reported_one_cases_cumulative_pagination.html new file mode 100644 index 0000000000000000000000000000000000000000..eb79e61f3b73d27f8c9d0d37d35632c36de8fc6a --- /dev/null +++ b/src/covid19/blueprints/owid/templates/owid/date_reported/owid_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('owid.url_owid_date_reported_one_deaths_cumulative', + date_reported_id=owid_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('owid.url_owid_date_reported_one_deaths_cumulative', + date_reported_id=owid_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('owid.url_owid_date_reported_one_deaths_cumulative', + date_reported_id=owid_date_reported.id, page=page_data.next_num) }}">Next</a> + </li> + {% endif %} + </ul> + {% endif %} diff --git a/src/covid19/blueprints/owid/templates/owid/date_reported/owid_date_reported_one_cases_new.html b/src/covid19/blueprints/owid/templates/owid/date_reported/owid_date_reported_one_cases_new.html index d213649be1377af1f47bd28248f0f53e04ebbe2e..c83b49497bb8f95645187c1ddd66457cd3991880 100644 --- a/src/covid19/blueprints/owid/templates/owid/date_reported/owid_date_reported_one_cases_new.html +++ b/src/covid19/blueprints/owid/templates/owid/date_reported/owid_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('owid.url_owid_date_reported_one_cases_new', - date_reported_id=owid_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('owid.url_owid_date_reported_one_cases_new', - date_reported_id=owid_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('owid.url_owid_date_reported_one_cases_new', - date_reported_id=owid_date_reported.id, page=page_data.next_num) }}">Next</a> - </li> - {% endif %} - </ul> - {% endif %} + {% include 'owid/date_reported/owid_date_reported_one_cases_new_pagination.html' %} </div> </div> <div class="row"> <div class="col"> - {% include 'owid/date_reported/owid_date_reported_one_table.html' %} + {% include 'owid/owid_data/owid_data_table.html' %} + </div> + </div> + <div class="row"> + <div class="col"> + {% include 'owid/date_reported/owid_date_reported_one_cases_new_pagination.html' %} </div> </div> </div> diff --git a/src/covid19/blueprints/owid/templates/owid/date_reported/owid_date_reported_one_cases_new_pagination.html b/src/covid19/blueprints/owid/templates/owid/date_reported/owid_date_reported_one_cases_new_pagination.html new file mode 100644 index 0000000000000000000000000000000000000000..180032d5d876fed7db31d0cbf675d30e4826e427 --- /dev/null +++ b/src/covid19/blueprints/owid/templates/owid/date_reported/owid_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('owid.url_owid_date_reported_one_cases_new', + date_reported_id=owid_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('owid.url_owid_date_reported_one_cases_new', + date_reported_id=owid_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('owid.url_owid_date_reported_one_cases_new', + date_reported_id=owid_date_reported.id, page=page_data.next_num) }}">Next</a> + </li> + {% endif %} + </ul> + {% endif %} diff --git a/src/covid19/blueprints/owid/templates/owid/date_reported/owid_date_reported_one_deaths_cumulative.html b/src/covid19/blueprints/owid/templates/owid/date_reported/owid_date_reported_one_deaths_cumulative.html index a66b424bfe96bb2d8e356e40ce8a815b6eb8adc3..a98fb91b6d70e873d4614d3e98ba187c8cf13c2d 100644 --- a/src/covid19/blueprints/owid/templates/owid/date_reported/owid_date_reported_one_deaths_cumulative.html +++ b/src/covid19/blueprints/owid/templates/owid/date_reported/owid_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('owid.url_owid_date_reported_one_cases_cumulative', - date_reported_id=owid_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('owid.url_owid_date_reported_one_cases_cumulative', - date_reported_id=owid_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('owid.url_owid_date_reported_one_cases_cumulative', - date_reported_id=owid_date_reported.id, page=page_data.next_num) }}">Next</a> - </li> - {% endif %} - </ul> - {% endif %} + {% include 'owid/date_reported/owid_date_reported_one_deaths_cumulative_pagination.html' %} </div> </div> <div class="row"> <div class="col"> - {% include 'owid/date_reported/owid_date_reported_one_table.html' %} + {% include 'owid/owid_data/owid_data_table.html' %} + </div> + </div> + <div class="row"> + <div class="col"> + {% include 'owid/date_reported/owid_date_reported_one_deaths_cumulative_pagination.html' %} </div> </div> </div> diff --git a/src/covid19/blueprints/owid/templates/owid/date_reported/owid_date_reported_one_deaths_cumulative_pagination.html b/src/covid19/blueprints/owid/templates/owid/date_reported/owid_date_reported_one_deaths_cumulative_pagination.html new file mode 100644 index 0000000000000000000000000000000000000000..4481a2e770bb72f3aa6090b0ff7d128ece994883 --- /dev/null +++ b/src/covid19/blueprints/owid/templates/owid/date_reported/owid_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('owid.url_owid_date_reported_one_cases_cumulative', + date_reported_id=owid_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('owid.url_owid_date_reported_one_cases_cumulative', + date_reported_id=owid_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('owid.url_owid_date_reported_one_cases_cumulative', + date_reported_id=owid_date_reported.id, page=page_data.next_num) }}">Next</a> + </li> + {% endif %} + </ul> + {% endif %} diff --git a/src/covid19/blueprints/owid/templates/owid/date_reported/owid_date_reported_one_deaths_new.html b/src/covid19/blueprints/owid/templates/owid/date_reported/owid_date_reported_one_deaths_new.html index 8c94c181b315e10a5b3aac9d098daf6087cefae1..0cc555e1ac3e1376f86616a27eccf981455618f4 100644 --- a/src/covid19/blueprints/owid/templates/owid/date_reported/owid_date_reported_one_deaths_new.html +++ b/src/covid19/blueprints/owid/templates/owid/date_reported/owid_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('owid.url_owid_date_reported_deaths_new', - date_reported_id=owid_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('owid.url_owid_date_reported_deaths_new', - date_reported_id=owid_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('owid.url_owid_date_reported_deaths_new', - date_reported_id=owid_date_reported.id, page=page_data.next_num) }}"> - Next - </a> - </li> - {% endif %} - </ul> - {% endif %} + {% include 'owid/date_reported/owid_date_reported_one_deaths_new_pagination.html' %} </div> </div> <div class="row"> <div class="col"> - {% include 'owid/date_reported/owid_date_reported_one_table.html' %} + {% include 'owid/owid_data/owid_data_table.html' %} + </div> + </div> + <div class="row"> + <div class="col"> + {% include 'owid/date_reported/owid_date_reported_one_deaths_new_pagination.html' %} </div> </div> </div> diff --git a/src/covid19/blueprints/owid/templates/owid/date_reported/owid_date_reported_one_deaths_new_pagination.html b/src/covid19/blueprints/owid/templates/owid/date_reported/owid_date_reported_one_deaths_new_pagination.html new file mode 100644 index 0000000000000000000000000000000000000000..eeee2f4d25a22665d536935a0aba9cf7593da0de --- /dev/null +++ b/src/covid19/blueprints/owid/templates/owid/date_reported/owid_date_reported_one_deaths_new_pagination.html @@ -0,0 +1,43 @@ + {% 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('owid.url_owid_date_reported_deaths_new', + date_reported_id=owid_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('owid.url_owid_date_reported_deaths_new', + date_reported_id=owid_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('owid.url_owid_date_reported_deaths_new', + date_reported_id=owid_date_reported.id, page=page_data.next_num) }}"> + Next + </a> + </li> + {% endif %} + </ul> + {% endif %} diff --git a/src/covid19/blueprints/owid/templates/owid/date_reported/owid_date_reported_one_pagination.html b/src/covid19/blueprints/owid/templates/owid/date_reported/owid_date_reported_one_pagination.html index fd70c0b9b2fbdff53f330554fa07cda3d24fe197..33cd395f1c0630c459903efef92da0d41d46511b 100644 --- a/src/covid19/blueprints/owid/templates/owid/date_reported/owid_date_reported_one_pagination.html +++ b/src/covid19/blueprints/owid/templates/owid/date_reported/owid_date_reported_one_pagination.html @@ -1,5 +1,5 @@ -{% if page_data.pages > 1 %} - <!-- previous page --> + {% if page_data.pages > 1 %} + <!-- previous page --> <ul class="pagination"> {% if page_data.has_prev %} <li class="page-item"> diff --git a/src/covid19/blueprints/owid/templates/owid/date_reported/owid_date_reported_one_table.html b/src/covid19/blueprints/owid/templates/owid/date_reported/owid_date_reported_one_table.html deleted file mode 100644 index 764caf1c1a182293e0636e67839139d2debbe933..0000000000000000000000000000000000000000 --- a/src/covid19/blueprints/owid/templates/owid/date_reported/owid_date_reported_one_table.html +++ /dev/null @@ -1,130 +0,0 @@ - <table class="table table-hover table-striped table-dark"> - <thead class="table-secondary"> - <tr> - <th scope="col">iso_code</th> - <th scope="col">continent</th> - <th scope="col">location</th> - <th scope="col">date</th> - <th scope="col">total_cases</th> - <th scope="col">new_cases</th> - <th scope="col">new_cases_smoothed</th> - <th scope="col">total_deaths</th> - <th scope="col">new_deaths</th> - <th scope="col">new_deaths_smoothed</th> - <th scope="col">total_cases_per_million</th> - <th scope="col">new_cases_per_million</th> - <th scope="col">new_cases_smoothed_per_million</th> - <th scope="col">total_deaths_per_million</th> - <th scope="col">new_deaths_per_million</th> - <th scope="col">new_deaths_smoothed_per_million</th> - <th scope="col">reproduction_rate</th> - <th scope="col">icu_patients</th> - <th scope="col">icu_patients_per_million</th> - <th scope="col">hosp_patients</th> - <th scope="col">hosp_patients_per_million</th> - <th scope="col">weekly_icu_admissions</th> - <th scope="col">weekly_icu_admissions_per_million</th> - <th scope="col">weekly_hosp_admissions</th> - <th scope="col">weekly_hosp_admissions_per_million</th> - <th scope="col">new_tests</th> - <th scope="col">total_tests</th> - <th scope="col">total_tests_per_thousand</th> - <th scope="col">new_tests_per_thousand</th> - <th scope="col">new_tests_smoothed</th> - <th scope="col">new_tests_smoothed_per_thousand</th> - <th scope="col">positive_rate</th> - <th scope="col">tests_per_case</th> - <th scope="col">tests_units</th> - <th scope="col">total_vaccinations</th> - <th scope="col">people_vaccinated</th> - <th scope="col">people_fully_vaccinated</th> - <th scope="col">new_vaccinations</th> - <th scope="col">new_vaccinations_smoothed</th> - <th scope="col">total_vaccinations_per_hundred</th> - <th scope="col">people_vaccinated_per_hundred</th> - <th scope="col">people_fully_vaccinated_per_hundred</th> - <th scope="col">new_vaccinations_smoothed_per_million</th> - <th scope="col">stringency_index</th> - <th scope="col">population</th> - <th scope="col">population_density</th> - <th scope="col">median_age</th> - <th scope="col">aged_65_older</th> - <th scope="col">aged_70_older</th> - <th scope="col">gdp_per_capita</th> - <th scope="col">extreme_poverty</th> - <th scope="col">cardiovasc_death_rate</th> - <th scope="col">diabetes_prevalence</th> - <th scope="col">female_smokers</th> - <th scope="col">male_smokers</th> - <th scope="col">handwashing_facilities</th> - <th scope="col">hospital_beds_per_thousand</th> - <th scope="col">life_expectancy</th> - <th scope="col">human_development_index</th> - </tr> - </thead> - <tbody> - {% for owid in page_data.items %} - <tr> - <td>{{ owid.country.iso_code }}</td> - <td>{{ owid.country.continent.region }}</td> - <td>{{ owid.country.location }}</td> - <td>{{ owid.date_reported }}</td> - <td>{{ owid.total_cases }}</td> - <td>{{ owid.new_cases }}</td> - <td>{{ owid.new_cases_smoothed }}</td> - <td>{{ owid.total_deaths }}</td> - <td>{{ owid.new_deaths }}</td> - <td>{{ owid.new_deaths_smoothed }}</td> - <td>{{ owid.total_cases_per_million }}</td> - <td>{{ owid.new_cases_per_million }}</td> - <td>{{ owid.new_cases_smoothed_per_million }}</td> - <td>{{ owid.total_deaths_per_million }}</td> - <td>{{ owid.new_deaths_per_million }}</td> - <td>{{ owid.new_deaths_smoothed_per_million }}</td> - <td>{{ owid.reproduction_rate }}</td> - <td>{{ owid.icu_patients }}</td> - <td>{{ owid.icu_patients_per_million }}</td> - <td>{{ owid.hosp_patients }}</td> - <td>{{ owid.hosp_patients_per_million }}</td> - <td>{{ owid.weekly_icu_admissions }}</td> - <td>{{ owid.weekly_icu_admissions_per_million }}</td> - <td>{{ owid.weekly_hosp_admissions }}</td> - <td>{{ owid.weekly_hosp_admissions_per_million }}</td> - <td>{{ owid.new_tests }}</td> - <td>{{ owid.total_tests }}</td> - <td>{{ owid.total_tests_per_thousand }}</td> - <td>{{ owid.new_tests_per_thousand }}</td> - <td>{{ owid.new_tests_smoothed }}</td> - <td>{{ owid.new_tests_smoothed_per_thousand }}</td> - <td>{{ owid.positive_rate }}</td> - <td>{{ owid.tests_per_case }}</td> - <td>{{ owid.tests_units }}</td> - <td>{{ owid.total_vaccinations }}</td> - <td>{{ owid.people_vaccinated }}</td> - <td>{{ owid.people_fully_vaccinated }}</td> - <td>{{ owid.new_vaccinations }}</td> - <td>{{ owid.new_vaccinations_smoothed }}</td> - <td>{{ owid.total_vaccinations_per_hundred }}</td> - <td>{{ owid.people_vaccinated_per_hundred }}</td> - <td>{{ owid.people_fully_vaccinated_per_hundred }}</td> - <td>{{ owid.new_vaccinations_smoothed_per_million }}</td> - <td>{{ owid.stringency_index }}</td> - <td>{{ owid.country.population }}</td> - <td>{{ owid.country.population_density }}</td> - <td>{{ owid.country.median_age }}</td> - <td>{{ owid.country.aged_65_older }}</td> - <td>{{ owid.country.aged_70_older }}</td> - <td>{{ owid.country.gdp_per_capita }}</td> - <td>{{ owid.country.extreme_poverty }}</td> - <td>{{ owid.country.cardiovasc_death_rate }}</td> - <td>{{ owid.country.diabetes_prevalence }}</td> - <td>{{ owid.country.female_smokers }}</td> - <td>{{ owid.country.male_smokers }}</td> - <td>{{ owid.country.handwashing_facilities }}</td> - <td>{{ owid.country.hospital_beds_per_thousand }}</td> - <td>{{ owid.country.life_expectancy }}</td> - <td>{{ owid.country.human_development_index }}</td> - </tr> - {% endfor %} - </tbody> - </table> \ No newline at end of file diff --git a/src/covid19/blueprints/owid/templates/owid/country/owid_country_one_table.html b/src/covid19/blueprints/owid/templates/owid/owid_data/owid_data_table.html similarity index 57% rename from src/covid19/blueprints/owid/templates/owid/country/owid_country_one_table.html rename to src/covid19/blueprints/owid/templates/owid/owid_data/owid_data_table.html index 764caf1c1a182293e0636e67839139d2debbe933..05352c12f7838d8ef870d1543262665467c83186 100644 --- a/src/covid19/blueprints/owid/templates/owid/country/owid_country_one_table.html +++ b/src/covid19/blueprints/owid/templates/owid/owid_data/owid_data_table.html @@ -65,10 +65,26 @@ <tbody> {% for owid in page_data.items %} <tr> - <td>{{ owid.country.iso_code }}</td> - <td>{{ owid.country.continent.region }}</td> - <td>{{ owid.country.location }}</td> - <td>{{ owid.date_reported }}</td> + <td> + <a href="{{ url_for( 'owid.url_owid_country_one', country_id=owid.country.id) }}"> + {{ owid.country.iso_code }} + </a> + </td> + <td> + <a href="{{ url_for( 'owid.url_owid_continent_one', continent_id=owid.country.continent.id) }}"> + {{ owid.country.continent.region }} + </a> + </td> + <td> + <a href="{{ url_for( 'owid.url_owid_country_one', country_id=owid.country.id) }}"> + {{ owid.country.location }} + </a> + </td> + <td> + <a href="{{ url_for( 'owid.url_owid_date_reported_one', date_reported_id=owid.date_reported.id) }}"> + {{ owid.date_reported }} + </a> + </td> <td>{{ owid.total_cases }}</td> <td>{{ owid.new_cases }}</td> <td>{{ owid.new_cases_smoothed }}</td> @@ -109,21 +125,81 @@ <td>{{ owid.people_fully_vaccinated_per_hundred }}</td> <td>{{ owid.new_vaccinations_smoothed_per_million }}</td> <td>{{ owid.stringency_index }}</td> - <td>{{ owid.country.population }}</td> - <td>{{ owid.country.population_density }}</td> - <td>{{ owid.country.median_age }}</td> - <td>{{ owid.country.aged_65_older }}</td> - <td>{{ owid.country.aged_70_older }}</td> - <td>{{ owid.country.gdp_per_capita }}</td> - <td>{{ owid.country.extreme_poverty }}</td> - <td>{{ owid.country.cardiovasc_death_rate }}</td> - <td>{{ owid.country.diabetes_prevalence }}</td> - <td>{{ owid.country.female_smokers }}</td> - <td>{{ owid.country.male_smokers }}</td> - <td>{{ owid.country.handwashing_facilities }}</td> - <td>{{ owid.country.hospital_beds_per_thousand }}</td> - <td>{{ owid.country.life_expectancy }}</td> - <td>{{ owid.country.human_development_index }}</td> + <td> + <a href="{{ url_for( 'owid.url_owid_country_one', country_id=owid.country.id) }}"> + {{ owid.country.population }} + </a> + </td> + <td> + <a href="{{ url_for( 'owid.url_owid_country_one', country_id=owid.country.id) }}"> + {{ owid.country.population_density }} + </a> + </td> + <td> + <a href="{{ url_for( 'owid.url_owid_country_one', country_id=owid.country.id) }}"> + {{ owid.country.median_age }} + </a> + </td> + <td> + <a href="{{ url_for( 'owid.url_owid_country_one', country_id=owid.country.id) }}"> + {{ owid.country.aged_65_older }} + </a> + </td> + <td> + <a href="{{ url_for( 'owid.url_owid_country_one', country_id=owid.country.id) }}"> + {{ owid.country.aged_70_older }} + </a> + </td> + <td> + <a href="{{ url_for( 'owid.url_owid_country_one', country_id=owid.country.id) }}"> + {{ owid.country.gdp_per_capita }} + </a> + </td> + <td> + <a href="{{ url_for( 'owid.url_owid_country_one', country_id=owid.country.id) }}"> + {{ owid.country.extreme_poverty }} + </a> + </td> + <td> + <a href="{{ url_for( 'owid.url_owid_country_one', country_id=owid.country.id) }}"> + {{ owid.country.cardiovasc_death_rate }} + </a> + </td> + <td> + <a href="{{ url_for( 'owid.url_owid_country_one', country_id=owid.country.id) }}"> + {{ owid.country.diabetes_prevalence }} + </a> + </td> + <td> + <a href="{{ url_for( 'owid.url_owid_country_one', country_id=owid.country.id) }}"> + {{ owid.country.female_smokers }} + </a> + </td> + <td> + <a href="{{ url_for( 'owid.url_owid_country_one', country_id=owid.country.id) }}"> + {{ owid.country.male_smokers }} + </a> + </td> + <td> + <a href="{{ url_for( 'owid.url_owid_country_one', country_id=owid.country.id) }}"> + {{ owid.country.handwashing_facilities }} + </a> + </td> + <td> + <a href="{{ url_for( 'owid.url_owid_country_one', country_id=owid.country.id) }}"> + {{ owid.country.hospital_beds_per_thousand }} + </a> + </td> + <td> + <a href="{{ url_for( 'owid.url_owid_country_one', country_id=owid.country.id) }}"> + {{ owid.country.life_expectancy }} + </a> + </td> + <td> + <a href="{{ url_for( 'owid.url_owid_country_one', country_id=owid.country.id) }}"> + {{ owid.country.human_development_index }} + </a> + </td> </tr> {% endfor %} </tbody> diff --git a/src/covid19/blueprints/owid/templates/owid/owid_test.html b/src/covid19/blueprints/owid/templates/owid/owid_test.html deleted file mode 100644 index c4074c802f3ff3061802d0918b50e57c073ab738..0000000000000000000000000000000000000000 --- a/src/covid19/blueprints/owid/templates/owid/owid_test.html +++ /dev/null @@ -1,29 +0,0 @@ -{% extends 'application/page_layout.html' %} - -{% block content %} - {{super()}} - {% include 'owid/navigation/owid_navtabs.html' %} - - <div class="container"> - <div class="row"> - <div class="col"> - {% include 'owid/continent/owid_continents_pagination.html' %} - </div> - </div> - <div class="row"> - <div class="col"> - {% include 'owid/continent/owid_continents_table.html' %} - </div> - </div> - <div class="row"> - <div class="col"> - {% include 'owid/continent/owid_continents_pagination.html' %} - </div> - </div> - </div> -{% endblock %} - - -{% block footer_container %} - -{% endblock %}