[tor-commits] [tpo/staging] Edit tag color with databag

hiro at torproject.org hiro at torproject.org
Tue Jan 22 15:39:36 UTC 2019


commit cf3182de7df8e6ae28aad8f27356b121222b293b
Author: hiro <hiro at torproject.org>
Date:   Tue Jan 22 16:39:27 2019 +0100

    Edit tag color with databag
---
 content/about/reports/2007-irs-form-990/contents.lr           |  2 +-
 content/about/reports/2008-financial-statements/contents.lr   |  2 +-
 content/about/reports/2008-irs-form-990/contents.lr           |  2 +-
 content/about/reports/2009-annual-report/contents.lr          |  2 +-
 content/about/reports/2009-data-collection/contents.lr        |  2 +-
 content/about/reports/2009-financial-statements/contents.lr   |  2 +-
 content/about/reports/2009-irs-form-990/contents.lr           |  2 +-
 content/about/reports/2010-irs-form-990/contents.lr           |  2 +-
 content/about/reports/2011-data-collection/contents.lr        |  2 +-
 content/about/reports/2011-financial-statements/contents.lr   |  2 +-
 content/about/reports/2011-form-pc/contents.lr                |  2 +-
 content/about/reports/2011-irs-form-990/contents.lr           |  2 +-
 content/about/reports/2012-annual-report/contents.lr          |  2 +-
 content/about/reports/2012-financial-statements/contents.lr   |  2 +-
 content/about/reports/2012-form-pc/contents.lr                |  2 +-
 content/about/reports/2012-irs-form-990/contents.lr           |  2 +-
 content/about/reports/2013-financial-statements/contents.lr   |  2 +-
 content/about/reports/2013-form-pc/contents.lr                |  2 +-
 content/about/reports/2013-irs-form-990/contents.lr           |  2 +-
 content/about/reports/2014-irs-form-990/contents.lr           |  4 +++-
 content/about/reports/2015-irs-form-990/contents.lr           |  4 +++-
 .../about/reports/2016-12-05-tor-project-bylaws/contents.lr   |  2 +-
 content/about/reports/2016-irs-form-990/contents.lr           |  4 +++-
 content/about/reports/2017-irs-form-990/contents.lr           |  2 +-
 databags/tags.ini                                             | 11 +++++++++++
 templates/macros/reports.html                                 |  4 +++-
 26 files changed, 44 insertions(+), 25 deletions(-)

diff --git a/content/about/reports/2007-irs-form-990/contents.lr b/content/about/reports/2007-irs-form-990/contents.lr
index cf8c80c..e781fd6 100644
--- a/content/about/reports/2007-irs-form-990/contents.lr
+++ b/content/about/reports/2007-irs-form-990/contents.lr
@@ -4,7 +4,7 @@ type: report
 ---
 date: 2007
 ---
-tags: Fiscal Year 2007
+tags: IRS 990
 ---
 title: 2007 IRS Form 990
 ---
diff --git a/content/about/reports/2008-financial-statements/contents.lr b/content/about/reports/2008-financial-statements/contents.lr
index f124392..0776be5 100644
--- a/content/about/reports/2008-financial-statements/contents.lr
+++ b/content/about/reports/2008-financial-statements/contents.lr
@@ -4,7 +4,7 @@ type: report
 ---
 date: 2008
 ---
-tags: Fiscal Year 2008
+tags: AUDIT
 ---
 title: 2008 Financial Statements and Audit Results
 ---
diff --git a/content/about/reports/2008-irs-form-990/contents.lr b/content/about/reports/2008-irs-form-990/contents.lr
index 0e64a97..06fc1f5 100644
--- a/content/about/reports/2008-irs-form-990/contents.lr
+++ b/content/about/reports/2008-irs-form-990/contents.lr
@@ -4,7 +4,7 @@ type: report
 ---
 date: 2008
 ---
-tags: Fiscal Year 2008
+tags: IRS 990
 ---
 title: 2008 IRS Form 990
 ---
diff --git a/content/about/reports/2009-annual-report/contents.lr b/content/about/reports/2009-annual-report/contents.lr
index 5e20c5e..78e32ab 100644
--- a/content/about/reports/2009-annual-report/contents.lr
+++ b/content/about/reports/2009-annual-report/contents.lr
@@ -4,7 +4,7 @@ type: report
 ---
 date: 2009
 ---
-tags: Fiscal Year 2009
+tags: FISCAL YEAR
 ---
 title: 2009 Annual Report
 ---
diff --git a/content/about/reports/2009-data-collection/contents.lr b/content/about/reports/2009-data-collection/contents.lr
index 4b25dd5..ffa897e 100644
--- a/content/about/reports/2009-data-collection/contents.lr
+++ b/content/about/reports/2009-data-collection/contents.lr
@@ -4,7 +4,7 @@ type: report
 ---
 date: 2009
 ---
-tags: Fiscal Year 2009
+tags: AUDIT
 ---
 title: 2009 Dept of Commerce Data Collection Form
 ---
diff --git a/content/about/reports/2009-financial-statements/contents.lr b/content/about/reports/2009-financial-statements/contents.lr
index f7c4d67..2a8f57e 100644
--- a/content/about/reports/2009-financial-statements/contents.lr
+++ b/content/about/reports/2009-financial-statements/contents.lr
@@ -4,7 +4,7 @@ type: report
 ---
 date: 2009
 ---
-tags: Fiscal Year 2009
+tags: AUDIT
 ---
 title: 2009 Financial Statements and Audit Results
 ---
diff --git a/content/about/reports/2009-irs-form-990/contents.lr b/content/about/reports/2009-irs-form-990/contents.lr
index 2fe0959..2a69a16 100644
--- a/content/about/reports/2009-irs-form-990/contents.lr
+++ b/content/about/reports/2009-irs-form-990/contents.lr
@@ -4,7 +4,7 @@ type: report
 ---
 date: 2009
 ---
-tags: Fiscal Year 2009
+tags: IRS 990
 ---
 title: 2009 IRS Form 990
 ---
diff --git a/content/about/reports/2010-irs-form-990/contents.lr b/content/about/reports/2010-irs-form-990/contents.lr
index 55072e0..15cf517 100644
--- a/content/about/reports/2010-irs-form-990/contents.lr
+++ b/content/about/reports/2010-irs-form-990/contents.lr
@@ -4,7 +4,7 @@ type: report
 ---
 date: 2010
 ---
-tags: Fiscal Year 2010
+tags: AUDIT
 ---
 title: 2010 IRS Form 990, State of MA Form PC, and Independent Audit Results
 ---
diff --git a/content/about/reports/2011-data-collection/contents.lr b/content/about/reports/2011-data-collection/contents.lr
index 0d0151c..2e2b8f0 100644
--- a/content/about/reports/2011-data-collection/contents.lr
+++ b/content/about/reports/2011-data-collection/contents.lr
@@ -4,7 +4,7 @@ type: report
 ---
 date: 2011
 ---
-tags: Fiscal Year 2011
+tags: FISCAL YEAR
 ---
 title: 2011 Dept of Commerce Data Collection Form
 ---
diff --git a/content/about/reports/2011-financial-statements/contents.lr b/content/about/reports/2011-financial-statements/contents.lr
index 6bd6b70..f78dca4 100644
--- a/content/about/reports/2011-financial-statements/contents.lr
+++ b/content/about/reports/2011-financial-statements/contents.lr
@@ -4,7 +4,7 @@ type: report
 ---
 date: 2011
 ---
-tags: Fiscal Year 2011
+tags: AUDIT
 ---
 title: 2011 Financial Statements and Audit Report
 ---
diff --git a/content/about/reports/2011-form-pc/contents.lr b/content/about/reports/2011-form-pc/contents.lr
index 576789b..5fc52cc 100644
--- a/content/about/reports/2011-form-pc/contents.lr
+++ b/content/about/reports/2011-form-pc/contents.lr
@@ -4,7 +4,7 @@ type: report
 ---
 date: 2011
 ---
-tags: Fiscal Year 2011
+tags: FISCAL YEAR
 ---
 title: 2011 Steate of MA Form PC
 ---
diff --git a/content/about/reports/2011-irs-form-990/contents.lr b/content/about/reports/2011-irs-form-990/contents.lr
index d3b69f2..3ea16d9 100644
--- a/content/about/reports/2011-irs-form-990/contents.lr
+++ b/content/about/reports/2011-irs-form-990/contents.lr
@@ -4,7 +4,7 @@ type: report
 ---
 date: 2011
 ---
-tags: Fiscal Year 2011
+tags: AUDIT
 ---
 title: 2011 IRS Form 990
 ---
diff --git a/content/about/reports/2012-annual-report/contents.lr b/content/about/reports/2012-annual-report/contents.lr
index 6b85a3a..8efd62e 100644
--- a/content/about/reports/2012-annual-report/contents.lr
+++ b/content/about/reports/2012-annual-report/contents.lr
@@ -4,7 +4,7 @@ type: report
 ---
 date: 2012
 ---
-tags: Fiscal Year 2012
+tags: FISCAL YEAR
 ---
 title: 2012 Annual Report
 ---
diff --git a/content/about/reports/2012-financial-statements/contents.lr b/content/about/reports/2012-financial-statements/contents.lr
index b57a068..3f7b3b4 100644
--- a/content/about/reports/2012-financial-statements/contents.lr
+++ b/content/about/reports/2012-financial-statements/contents.lr
@@ -4,7 +4,7 @@ type: report
 ---
 date: 2012
 ---
-tags: Fiscal Year 2012
+tags: FISCAL YEAR
 ---
 title: 2012 Financial Statements
 ---
diff --git a/content/about/reports/2012-form-pc/contents.lr b/content/about/reports/2012-form-pc/contents.lr
index 93e15ad..fe2e6cc 100644
--- a/content/about/reports/2012-form-pc/contents.lr
+++ b/content/about/reports/2012-form-pc/contents.lr
@@ -4,7 +4,7 @@ type: report
 ---
 date: 2012
 ---
-tags: Fiscal Year 2012
+tags: AUDIT
 ---
 title: 2012 Steate of MA Form PC
 ---
diff --git a/content/about/reports/2012-irs-form-990/contents.lr b/content/about/reports/2012-irs-form-990/contents.lr
index 8459a5e..278f416 100644
--- a/content/about/reports/2012-irs-form-990/contents.lr
+++ b/content/about/reports/2012-irs-form-990/contents.lr
@@ -4,7 +4,7 @@ type: report
 ---
 date: 2012
 ---
-tags: Fiscal Year 2012
+tags: IRS 990
 ---
 title: 2012 IRS Form 990
 ---
diff --git a/content/about/reports/2013-financial-statements/contents.lr b/content/about/reports/2013-financial-statements/contents.lr
index 40a758f..ae3e6c6 100644
--- a/content/about/reports/2013-financial-statements/contents.lr
+++ b/content/about/reports/2013-financial-statements/contents.lr
@@ -4,7 +4,7 @@ type: report
 ---
 date: 2013
 ---
-tags: Fiscal Year 2013
+tags: AUDIT
 ---
 title: 2013 Financial Statements
 ---
diff --git a/content/about/reports/2013-form-pc/contents.lr b/content/about/reports/2013-form-pc/contents.lr
index 4e815ba..4392db7 100644
--- a/content/about/reports/2013-form-pc/contents.lr
+++ b/content/about/reports/2013-form-pc/contents.lr
@@ -4,7 +4,7 @@ type: report
 ---
 date: 2013
 ---
-tags: Fiscal Year 2013
+tags: AUDIT
 ---
 title: 2013 Steate of MA Form PC
 ---
diff --git a/content/about/reports/2013-irs-form-990/contents.lr b/content/about/reports/2013-irs-form-990/contents.lr
index 0261f2c..12872b3 100644
--- a/content/about/reports/2013-irs-form-990/contents.lr
+++ b/content/about/reports/2013-irs-form-990/contents.lr
@@ -4,7 +4,7 @@ type: report
 ---
 date: 2013
 ---
-tags: Fiscal Year 2013
+tags: IRS 990
 ---
 title: 2013 IRS Form 990
 ---
diff --git a/content/about/reports/2014-irs-form-990/contents.lr b/content/about/reports/2014-irs-form-990/contents.lr
index 1ea5cbe..21f2e97 100644
--- a/content/about/reports/2014-irs-form-990/contents.lr
+++ b/content/about/reports/2014-irs-form-990/contents.lr
@@ -4,7 +4,9 @@ type: report
 ---
 date: 2014
 ---
-tags: Fiscal Year 2014
+tags:
+IRS 990
+AUDIT
 ---
 title: 2014 IRS Form 990, State of MA Form PC, and Independent Audit Results
 ---
diff --git a/content/about/reports/2015-irs-form-990/contents.lr b/content/about/reports/2015-irs-form-990/contents.lr
index d3886c5..c42cbf2 100644
--- a/content/about/reports/2015-irs-form-990/contents.lr
+++ b/content/about/reports/2015-irs-form-990/contents.lr
@@ -4,7 +4,9 @@ type: report
 ---
 date: 2015
 ---
-tags: Fiscal Year 2015
+tags:
+IRS 990
+AUDIT
 ---
 title: 2015 IRS Form 990, State of MA Form PC, and Independent Audit Results
 ---
diff --git a/content/about/reports/2016-12-05-tor-project-bylaws/contents.lr b/content/about/reports/2016-12-05-tor-project-bylaws/contents.lr
index 58933f6..7449d96 100644
--- a/content/about/reports/2016-12-05-tor-project-bylaws/contents.lr
+++ b/content/about/reports/2016-12-05-tor-project-bylaws/contents.lr
@@ -4,7 +4,7 @@ type: report
 ---
 date: 2016
 ---
-tags: Fiscal Year 2016
+tags: AUDIT
 ---
 title: 2016-12-05 Tor Project Bylaws
 ---
diff --git a/content/about/reports/2016-irs-form-990/contents.lr b/content/about/reports/2016-irs-form-990/contents.lr
index 72dd971..7b17ac8 100644
--- a/content/about/reports/2016-irs-form-990/contents.lr
+++ b/content/about/reports/2016-irs-form-990/contents.lr
@@ -4,7 +4,9 @@ type: report
 ---
 date: 2016
 ---
-tags: Fiscal Year 2016
+tags:
+IRS 990
+AUDIT
 ---
 title: 2016 IRS Form 990 and Independent Audit Results
 ---
diff --git a/content/about/reports/2017-irs-form-990/contents.lr b/content/about/reports/2017-irs-form-990/contents.lr
index cb23f28..e4a1c27 100644
--- a/content/about/reports/2017-irs-form-990/contents.lr
+++ b/content/about/reports/2017-irs-form-990/contents.lr
@@ -4,7 +4,7 @@ type: report
 ---
 date: 2017
 ---
-tags: Fiscal Year 2017
+tags: IRS 990
 ---
 title: 2017 IRS Form 990
 ---
diff --git a/databags/tags.ini b/databags/tags.ini
new file mode 100644
index 0000000..67d7dc7
--- /dev/null
+++ b/databags/tags.ini
@@ -0,0 +1,11 @@
+[IRS 990]
+color = primary
+label = IRS 990
+
+[AUDIT]
+color = success
+label = AUDIT
+
+[FISCAL YEAR]
+color = success
+label = FISCAL YEAR
diff --git a/templates/macros/reports.html b/templates/macros/reports.html
index 20887b2..b2d9916 100644
--- a/templates/macros/reports.html
+++ b/templates/macros/reports.html
@@ -11,8 +11,10 @@
   <th scope="row">{{ item.date }}</th>
   <td>
     {% for tag in item.tags %}
-      <span class="badge-pill badge-success">{{ tag }}</span></td>
+      {% set t = bag('tags', tag) %}
+      <span class="badge-pill badge-{{ t.color }}">{{ tag }}</span>
     {% endfor %}
+  </td>
   <td>{{ item.title }}</td>
   <td><a href="{{ item.link }}">View PDF</a></td>
 </tr>



More information about the tor-commits mailing list