aboutsummaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2012-05-08 17:46:50 +0100
committerMatthew Somerville <matthew@mysociety.org>2012-05-08 17:46:50 +0100
commit5e2a8889e27340dee9207d2360077973c9f8ba38 (patch)
tree288a2dbe82dda752059770e9981096a89eda908a /templates
parentfda83d5c4c9962c17fd0629e8ee17b50e3dbbac4 (diff)
Get data for dashboard dropdowns and enable faceted lookup using them.
Diffstat (limited to 'templates')
-rw-r--r--templates/web/default/dashboard/index.html31
1 files changed, 23 insertions, 8 deletions
diff --git a/templates/web/default/dashboard/index.html b/templates/web/default/dashboard/index.html
index c54635b2a..a0ef7b911 100644
--- a/templates/web/default/dashboard/index.html
+++ b/templates/web/default/dashboard/index.html
@@ -11,19 +11,23 @@
#overview tr:nth-child(2) { background-color: #fee; }
</style>
-<p>Ward: <select name="ward"><option>All</option>
- [% FOR ward IN children.values.sort('name') %]
- <option value="[% ward.id %]">[% ward.name %]</option>
+<form>
+
+<p>Ward: <select name="ward"><option value=''>All</option>
+ [% FOR w IN children.values.sort('name') %]
+ <option value="[% w.id %]"[% ' selected' IF w.id == ward %]>[% w.name %]</option>
[% END %]
</select>
+<input type="submit" value="Look up">
<h2>Performance Overview</h2>
-<p>Report category: <select name="category"><option>All</option>
- [% FOR category IN categories %]
- <option></option>
+<p>Report category: <select name="category"><option value=''>All</option>
+ [% FOR cat_op IN category_options %]
+ <option value='[% cat_op | html %]'[% ' selected' IF category == cat_op %]>[% cat_op | html %]</option>
[% END %]
-</select>
+ </select>
+<input type="submit" value="Look up">
<table width="100%" id="overview">
<tr>
@@ -111,7 +115,16 @@
<h2>Reports</h2>
-<p>Report state: <select name="state"><option>All</option></select>
+ </select>
+<p>Report state: <select name="state">
+<option value=''>All</option>
+ [% FOREACH state IN [ ['confirmed', loc('Open')], ['investigating',
+ loc('Investigating')], ['planned', loc('Planned')], ['in progress',
+ loc('In Progress')], ['closed', loc('Closed')], ['fixed', loc('Fixed')] ] %]
+ <option [% 'selected ' IF state.0 == q_state %] value="[% state.0 %]">[% state.1 %]</option>
+ [% END %]
+</select>
+<input type="submit" value="Look up">
<table width="100%">
<tr>
@@ -128,4 +141,6 @@
</tr>
</table>
+</form>
+
[% INCLUDE 'footer.html' %]