aboutsummaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2018-05-02 17:05:43 +0100
committerMatthew Somerville <matthew-github@dracos.co.uk>2018-05-08 15:32:12 +0100
commit505953fc71a6142826e1e5743a0a3dc18e306748 (patch)
tree79bb4371dee529c70a98ef8160da3d412a161d0f /templates
parentba16e095260993d814e6fb603a7d405d08a4ecb9 (diff)
Remove needless category mappings.
Both filter categories and new report category lists went through mappings to different data structures, which doesn't seem to be needed.
Diffstat (limited to 'templates')
-rw-r--r--templates/web/base/admin/report-category.html2
-rw-r--r--templates/web/base/report/_inspect.html2
-rw-r--r--templates/web/base/report/new/category.html6
-rw-r--r--templates/web/base/reports/_list-filters.html4
-rw-r--r--templates/web/zurich/admin/report_edit.html2
-rw-r--r--templates/web/zurich/admin/stats/index.html2
6 files changed, 9 insertions, 9 deletions
diff --git a/templates/web/base/admin/report-category.html b/templates/web/base/admin/report-category.html
index 2d9ffcdb1..0416d71c0 100644
--- a/templates/web/base/admin/report-category.html
+++ b/templates/web/base/admin/report-category.html
@@ -7,7 +7,7 @@
[% IF category_options.size %]
<optgroup label="[% loc('Available categories') %]">
[% FOREACH cat IN category_options %]
- <option value="[% cat.name | html %]"[% ' selected' IF problem.category == cat.name %]>[% cat.value | html %]</option>
+ <option value="[% cat.category | html %]"[% ' selected' IF problem.category == cat.category %]>[% cat.category_display | html %]</option>
[% END %]
</optgroup>
[% END %]
diff --git a/templates/web/base/report/_inspect.html b/templates/web/base/report/_inspect.html
index 8708b08de..a81510f22 100644
--- a/templates/web/base/report/_inspect.html
+++ b/templates/web/base/report/_inspect.html
@@ -67,7 +67,7 @@
</p>
[% FOREACH category IN category_options %]
- [% cat_name = category.name;
+ [% cat_name = category.category;
cat_prefix = cat_name | lower | replace('[^a-z]', '');
cat_prefix = "category_" _ cat_prefix _ "_" %]
<p data-category="[% cat_name | html %]"
diff --git a/templates/web/base/report/new/category.html b/templates/web/base/report/new/category.html
index 94d5479a6..96b14e75b 100644
--- a/templates/web/base/report/new/category.html
+++ b/templates/web/base/report/new/category.html
@@ -1,8 +1,8 @@
[% IF category_options.size OR category_groups.size ~%]
[%~ BLOCK category_option ~%]
- [% cat_op_lc = cat_op.name | lower =%]
- <option value='[% cat_op.name | html %]'[% ' selected' IF report.category == cat_op.name || category_lc == cat_op_lc || (category_options.size == 2 AND loop.last) ~%]
- >[% IF loop.first %][% cat_op.value %][% ELSE %][% cat_op.value | html %][% END %]</option>
+ [% cat_op_lc = cat_op.category | lower =%]
+ <option value='[% cat_op.category | html %]'[% ' selected' IF report.category == cat_op.category || category_lc == cat_op_lc || (category_options.size == 2 AND loop.last) ~%]
+ >[% IF loop.first %][% cat_op.category_display %][% ELSE %][% cat_op.category_display | html %][% END %]</option>
[%~ END ~%]
[% IF category;
diff --git a/templates/web/base/reports/_list-filters.html b/templates/web/base/reports/_list-filters.html
index ab8ac06f7..ba6becb80 100644
--- a/templates/web/base/reports/_list-filters.html
+++ b/templates/web/base/reports/_list-filters.html
@@ -38,8 +38,8 @@
[% IF filter_categories.size %]
<select class="form-control js-multiple" name="filter_category" id="filter_categories" multiple data-all="[% loc('Everything') %]">
[% FOR cat IN filter_categories %]
- <option value="[% cat.name | html %]"[% ' selected' IF filter_category.${cat.name} %]>
- [% cat.value | html %]
+ <option value="[% cat.category | html %]"[% ' selected' IF filter_category.${cat.category} %]>
+ [% cat.category_display | html %]
</option>
[% END %]
</select>
diff --git a/templates/web/zurich/admin/report_edit.html b/templates/web/zurich/admin/report_edit.html
index ad14b2d45..58cf9d2a4 100644
--- a/templates/web/zurich/admin/report_edit.html
+++ b/templates/web/zurich/admin/report_edit.html
@@ -171,7 +171,7 @@
<select class="form-control" name="category" id="category">
<option value="">--</option>
[% FOREACH cat IN category_options %]
- <option value="[% cat.name %]">[% cat.value ~%]
+ <option value="[% cat.category %]">[% cat.category_display ~%]
[% ' (' _ cat.abbreviation _ ')' IF cat.abbreviation %]</option>
[% END %]
</select>
diff --git a/templates/web/zurich/admin/stats/index.html b/templates/web/zurich/admin/stats/index.html
index 9f2906d0a..4e2c568a0 100644
--- a/templates/web/zurich/admin/stats/index.html
+++ b/templates/web/zurich/admin/stats/index.html
@@ -27,7 +27,7 @@
<select class="form-control" name="category" id="category">
<option value="">--</option>
[% FOREACH cat IN category_options %]
- <option value="[% cat.name %]"[% ' selected' IF cat.name == category %]>[% cat.value ~%]
+ <option value="[% cat.category %]"[% ' selected' IF cat.category == category %]>[% cat.category_display ~%]
[% ' (' _ cat.abbreviation _ ')' IF cat.abbreviation %]</option>
[% END %]
</select>