diff options
author | Matthew Somerville <matthew@mysociety.org> | 2014-07-07 16:59:23 +0100 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2014-07-08 17:59:17 +0100 |
commit | ba8d2c4ba6f6c0216d618e77d368b640a2b92d1e (patch) | |
tree | 8b9e1a960f91c006606b5e0767a84a400dfc2fb0 /templates/web/base/dashboard/index.html | |
parent | 8f2c5942e3aa5d3b85e76b7353ab7ada87f97fc6 (diff) |
Rename 'default' web directory to 'base'.
This should reduce confusion with the Default cobrand and override order.
Diffstat (limited to 'templates/web/base/dashboard/index.html')
-rw-r--r-- | templates/web/base/dashboard/index.html | 172 |
1 files changed, 172 insertions, 0 deletions
diff --git a/templates/web/base/dashboard/index.html b/templates/web/base/dashboard/index.html new file mode 100644 index 000000000..b3e1e8426 --- /dev/null +++ b/templates/web/base/dashboard/index.html @@ -0,0 +1,172 @@ +[% extra_css = BLOCK %] + <link rel="stylesheet" href="[% version('/cobrands/fixmystreet/dashboard.css') %]"> +[% END %] + +[% + INCLUDE 'header.html' + title = loc('Dashboard') + robots = 'noindex, nofollow' + bodyclass = 'fullwidthpage' +%] + +<form> + +<hgroup> + <h2>Reports, Statistics and Actions for</h2> + <h1>[% council.name %]</h1> +</hgroup> + +<div class="filters"> + [% IF c.cobrand.moniker != 'fixmybarangay' %] + <p> + <label for="ward">Ward:</label> + <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> + </p> + [% END %] + + <p> + <label for="category">Report category:</label> + <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> + </p> + + <p> + <input type="submit" value="Look up"> + </p> + + <br clear="all" /> +</div> + + +<table width="100%" id="overview"> + <tr> + <th> </th> + <th scope="col"><abbr title="Week To Date">WTD</abbr></th> + <th scope="col">Last 7 days</th> + <th scope="col">Last 4 weeks</th> + <th scope="col">YTD</th> + </tr> + + [% + rows = { + '0' => [ "total", "Total reports received" ] + '1' => [ "fixed - council", "Council has marked as fixed" ] + '2' => [ "fixed_user", "User has marked as fixed" ] + }; + FOR row IN rows %] + <tr id="[% row.value.0.replace('[^\w]+', '_' ) %]"> + <th scope="row">[% row.value.1 %]</th> + <td>[% problems.wtd.${row.value.0} %]</td> + <td>[% problems.week.${row.value.0} %]</td> + <td>[% problems.weeks.${row.value.0} %]</td> + <td>[% problems.ytd.${row.value.0} %]</td> + </tr> + [% END %] + + <tr class='subtotal' id="total_fixed"> + <th scope="row">Total marked as fixed</th> + <td>[% problems.wtd.${"fixed - council"} + problems.wtd.fixed_user %]</td> + <td>[% problems.week.${"fixed - council"} + problems.week.fixed_user %]</td> + <td>[% problems.weeks.${"fixed - council"} + problems.weeks.fixed_user %]</td> + <td>[% problems.ytd.${"fixed - council"} + problems.ytd.fixed_user %]</td> + </tr> + + [% + rows = { + '0' => [ "in progress", "Council has marked as in progress" ] + '1' => [ "action scheduled", "Council has marked as planned" ] + '2' => [ "investigating", "Council has marked as investigating" ] + '3' => [ "closed", "Council has marked as closed" ] + }; + wtd = 0, week = 0, weeks = 0, ytd = 0; + FOR row IN rows %] + <tr id="[% row.value.0.replace('[^\w]+', '_' ) %]"> + <th scope="row">[% row.value.1 %]</th> + <td>[% problems.wtd.${row.value.0} %]</td> + <td>[% problems.week.${row.value.0} %]</td> + <td>[% problems.weeks.${row.value.0} %]</td> + <td>[% problems.ytd.${row.value.0} %]</td> + </tr> + [% END %] + + <tr class='subtotal' id="marked"> + <th scope="row">Total marked</th> + <td>[% problems.wtd.${"in progress"} + problems.wtd.${"action scheduled"} + + problems.wtd.investigating + problems.wtd.closed %]</td> + <td>[% problems.week.${"in progress"} + problems.week.${"action scheduled"} + + problems.week.investigating + problems.wtd.closed %]</td> + <td>[% problems.weeks.${"in progress"} + problems.weeks.${"action scheduled"} + + problems.weeks.investigating + problems.wtd.closed %]</td> + <td>[% problems.ytd.${"in progress"} + problems.ytd.${"action scheduled"} + + problems.ytd.investigating + problems.wtd.closed %]</td> + </tr> + + <tr id="avg_fixed"> + <th scope="row">Average time to council marking fixed (days)</th> + <td>[% problems.wtd.time_to_fix %]</td> + <td>[% problems.week.time_to_fix %]</td> + <td>[% problems.weeks.time_to_fix %]</td> + <td>[% problems.ytd.time_to_fix %]</td> + </tr> + + <tr id="avg_marked"> + <th scope="row">Average time to first council state change (days)</th> + <td>[% problems.wtd.time_to_mark %]</td> + <td>[% problems.week.time_to_mark %]</td> + <td>[% problems.weeks.time_to_mark %]</td> + <td>[% problems.ytd.time_to_mark %]</td> + </tr> + + <tr class='subtotal' id="not_marked"> + <th scope="row">Total not marked</th> + <td>[% problems.wtd.not_marked %]</td> + <td>[% problems.week.not_marked %]</td> + <td>[% problems.weeks.not_marked %]</td> + <td>[% problems.ytd.not_marked %]</td> + </tr> + +</table> + +<h2>Reports</h2> + + </select> +<p>Report state: <select name="state"> +<option value=''>All</option> + [% FOREACH state IN [ ['confirmed', loc('Open')], ['investigating', + loc('Investigating')], ['action scheduled', 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"> +<a class="export_as_csv" href="[% c.req.uri_with({ export => 1 }) %]">Export as CSV</a> + +<table width="100%" id="reports"> + <tr> + <th scope="col">Less than 7 days old</th> + <th scope="col">7-14 days old</th> + <th scope="col">14-30 days old</th> + </tr> + <tr> + <td width="34%"><ul>[% INCLUDE list, list = lists.1 %]</ul></td> + <td width="33%"><ul>[% INCLUDE list, list = lists.2 %]</ul></td> + <td width="33%"><ul>[% INCLUDE list, list = lists.3 %]</ul></td> + </tr> +</table> + +</form> + +[% INCLUDE 'footer.html' %] + +[% BLOCK list %] +[% FOR p IN list %] +<li><a href="/report/[% p.id %]">[% p.title | html %]</a> <date>[% p.confirmed.dmy('/') %]</date></li> +[% END %] +[% END %] |