From 9fa810a4d5a6fea6cf55e14038830ab7bc4beac7 Mon Sep 17 00:00:00 2001 From: Phillip Ahereza Date: Tue, 19 Jun 2018 12:25:43 +0300 Subject: [PATCH 1/3] add counter --- takwimu/templates/takwimu/_includes/report/sections_list.html | 2 +- .../takwimu/_includes/report/sections_list_detail.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/takwimu/templates/takwimu/_includes/report/sections_list.html b/takwimu/templates/takwimu/_includes/report/sections_list.html index 886dcf2e..3f15dfd9 100644 --- a/takwimu/templates/takwimu/_includes/report/sections_list.html +++ b/takwimu/templates/takwimu/_includes/report/sections_list.html @@ -10,7 +10,7 @@

Country Report Contents< {% include 'takwimu/_includes/report/sections_list_detail.html' %} {% for section in page.sections.all %} - {% include 'takwimu/_includes/report/sections_list_detail.html' with section=section.section %} + {% include 'takwimu/_includes/report/sections_list_detail.html' with section=section.section counter=forloop.counter %} {% endfor %} {# If it's a section #} diff --git a/takwimu/templates/takwimu/_includes/report/sections_list_detail.html b/takwimu/templates/takwimu/_includes/report/sections_list_detail.html index 90776e96..15a912af 100644 --- a/takwimu/templates/takwimu/_includes/report/sections_list_detail.html +++ b/takwimu/templates/takwimu/_includes/report/sections_list_detail.html @@ -5,7 +5,7 @@ {% endif %}
-

Section 1

+

Section {{ counter }}

{{ section.title|default:"Country Overview" }}

{% with default_desc="A top-level overview of "|add:page.title|add:" – how it’s governed, the make-up of it’s population, the economy and SDG indicators" %}

{{ section.description|default:default_desc }}

From a0c6c6eb79ea3f5cc77ca8dcbe6d472ee8d441db Mon Sep 17 00:00:00 2001 From: Phillip Ahereza Date: Tue, 19 Jun 2018 14:18:21 +0300 Subject: [PATCH 2/3] fixed zero indexing --- takwimu/templates/takwimu/_includes/report/sections_list.html | 2 +- .../takwimu/_includes/report/sections_list_detail.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/takwimu/templates/takwimu/_includes/report/sections_list.html b/takwimu/templates/takwimu/_includes/report/sections_list.html index 3f15dfd9..f830dc40 100644 --- a/takwimu/templates/takwimu/_includes/report/sections_list.html +++ b/takwimu/templates/takwimu/_includes/report/sections_list.html @@ -15,7 +15,7 @@

Country Report Contents< {# If it's a section #} {% for section in page.get_parent.specific.sections.all %} - {% include 'takwimu/_includes/report/sections_list_detail.html' with section=section.section %} + {% include 'takwimu/_includes/report/sections_list_detail.html' with section=section.section counter=forloop.counter%} {% endfor %}

diff --git a/takwimu/templates/takwimu/_includes/report/sections_list_detail.html b/takwimu/templates/takwimu/_includes/report/sections_list_detail.html index 15a912af..9e7a20e2 100644 --- a/takwimu/templates/takwimu/_includes/report/sections_list_detail.html +++ b/takwimu/templates/takwimu/_includes/report/sections_list_detail.html @@ -5,7 +5,7 @@
{% endif %}
-

Section {{ counter }}

+

Section {{ counter | add:"1" }}

{{ section.title|default:"Country Overview" }}

{% with default_desc="A top-level overview of "|add:page.title|add:" – how it’s governed, the make-up of it’s population, the economy and SDG indicators" %}

{{ section.description|default:default_desc }}

From 450e2f0a4add6be60981ae91d9dce5654674508c Mon Sep 17 00:00:00 2001 From: Phillip Ahereza Date: Tue, 19 Jun 2018 16:10:41 +0300 Subject: [PATCH 3/3] add snyk.io badge --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 86ef09ba..6c1db496 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # TAKWIMU [![Build Status](https://travis-ci.org/TakwimuAfrica/TAKWIMU.svg?branch=develop)](https://travis-ci.org/TakwimuAfrica/TAKWIMU) +[![Known Vulnerabilities](https://snyk.io/test/github/TakwimuAfrica/TAKWIMU/badge.svg?targetFile=requirements.txt)](https://snyk.io/test/github/TakwimuAfrica/TAKWIMU?targetFile=requirements.txt) + The TAKWIMU web platform powering insight from human development indicators. Helping to find the stories behind the data. Accessible at https://takwimu.africa/