aboutsummaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorDave Arter <davea@mysociety.org>2015-04-08 15:17:41 +0100
committerDave Arter <davea@mysociety.org>2015-06-30 11:00:55 +0100
commit0133134e11dc9082b74d65a66f645004d66fc545 (patch)
tree17c71a574027c278d9444e3d6d75cc1464fcf4ec /templates
parentdcea8fdb0fd098cc179e7495842f599bd4a9d316 (diff)
[Greenwich] Use templates from Oxfordshire cobrand to get map pin filter controls
Diffstat (limited to 'templates')
-rw-r--r--templates/web/greenwich/around/_report_banner.html10
-rw-r--r--templates/web/greenwich/around/around_map_list_items.html0
-rw-r--r--templates/web/greenwich/around/on_map_list_items.html11
-rw-r--r--templates/web/greenwich/around/tabbed_lists.html5
-rw-r--r--templates/web/greenwich/my/_problem-list.html25
-rw-r--r--templates/web/greenwich/reports/_list-entry.html6
-rw-r--r--templates/web/greenwich/reports/_list-filters.html32
-rw-r--r--templates/web/greenwich/reports/_problem-list.html19
8 files changed, 108 insertions, 0 deletions
diff --git a/templates/web/greenwich/around/_report_banner.html b/templates/web/greenwich/around/_report_banner.html
new file mode 100644
index 000000000..52a869262
--- /dev/null
+++ b/templates/web/greenwich/around/_report_banner.html
@@ -0,0 +1,10 @@
+<h1 class="big-green-banner">
+ [% loc( 'Click map to report a problem' ) %]
+</h1>
+<div class="click-the-map">
+ <h2>[% loc( 'Have you found a problem here?' ) %]</h2>
+ <p>Click on the map to report it</p>
+</div>
+<a id="skip-this-step" href="[% url_skip %]" rel="nofollow">
+ [% loc("Can't see the map? <em>Skip this step</em>") %]
+</a>
diff --git a/templates/web/greenwich/around/around_map_list_items.html b/templates/web/greenwich/around/around_map_list_items.html
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/templates/web/greenwich/around/around_map_list_items.html
diff --git a/templates/web/greenwich/around/on_map_list_items.html b/templates/web/greenwich/around/on_map_list_items.html
new file mode 100644
index 000000000..893f5c698
--- /dev/null
+++ b/templates/web/greenwich/around/on_map_list_items.html
@@ -0,0 +1,11 @@
+[% all_reports = on_map.merge(around_map) %]
+[% IF all_reports.size %]
+ [% FOREACH problem IN all_reports %]
+ [% UNLESS problem.title; problem = problem.problem; END %]
+ [% INCLUDE "reports/_list-entry.html" %]
+ [% END %]
+[% ELSE %]
+ <li class="empty">
+ <p>[% loc('There are no reports to show.') %]</p>
+ </li>
+[% END %]
diff --git a/templates/web/greenwich/around/tabbed_lists.html b/templates/web/greenwich/around/tabbed_lists.html
new file mode 100644
index 000000000..0d7dfddfc
--- /dev/null
+++ b/templates/web/greenwich/around/tabbed_lists.html
@@ -0,0 +1,5 @@
+[% INCLUDE "reports/_list-filters.html" %]
+
+<ul class="report-list" id="current">
+ [% INCLUDE "around/on_map_list_items.html" %]
+</ul>
diff --git a/templates/web/greenwich/my/_problem-list.html b/templates/web/greenwich/my/_problem-list.html
new file mode 100644
index 000000000..1ff69f9fb
--- /dev/null
+++ b/templates/web/greenwich/my/_problem-list.html
@@ -0,0 +1,25 @@
+<ul class='issue-list-a full-width'>
+ [% IF problems.all %]
+ [% FOREACH p = problems.all %]
+ [% INCLUDE 'reports/_list-entry.html', problem = p, no_fixed =1 %]
+ [% END %]
+ [% ELSE %]
+ <li class="empty">
+ <p>[% loc('There are no reports to show.') %]</p>
+ </li>
+ [% END %]
+</ul>
+
+[% IF ! problems.size %]
+<!-- Preserve behaviour of map filters despite map not being shown -->
+<script type="text/javascript">
+ (function($) {
+ $(function() {
+ $(".report-list-filters [type=submit]").hide();
+ $(".report-list-filters select").change(function() {
+ $(this).closest("form").submit();
+ });
+ })
+ })(window.jQuery);
+</script>
+[% END %]
diff --git a/templates/web/greenwich/reports/_list-entry.html b/templates/web/greenwich/reports/_list-entry.html
new file mode 100644
index 000000000..cd70410d3
--- /dev/null
+++ b/templates/web/greenwich/reports/_list-entry.html
@@ -0,0 +1,6 @@
+<li class="[% c.cobrand.pin_colour(problem) %]">
+ <a href="[% c.uri_for('/report', problem.id ) %]" class="[% problem.category %]">
+ <h3>[% problem.title | html %]</h3>
+ <p>Reported [%- prettify_dt( problem.confirmed, 1 ) %]</p>
+ </a>
+</li>
diff --git a/templates/web/greenwich/reports/_list-filters.html b/templates/web/greenwich/reports/_list-filters.html
new file mode 100644
index 000000000..5d610261b
--- /dev/null
+++ b/templates/web/greenwich/reports/_list-filters.html
@@ -0,0 +1,32 @@
+[% IF use_section_wrapper %]
+<section class="full-width">
+ <form method="get" action="">
+[% END %]
+
+ <p class="report-list-filters">
+ <label>
+ Show
+ <select name="status" id="statuses">
+ <option value="all"[% ' selected' IF filter_status == 'all' %]>all reports</option>
+ <option value="open"[% ' selected' IF filter_status == 'open' %]>unfixed reports</option>
+ <option value="fixed"[% ' selected' IF filter_status == 'fixed' %]>fixed reports</option>
+ </select>
+ </label>
+ <label>
+ about
+ <select name="filter_category" id="filter_categories">
+ <option value="">Everything</option>
+ [% FOR category IN filter_categories %]
+ <option value="[% category | html %]"[% ' selected' IF filter_category == category %]>
+ [% category | html %]
+ </option>
+ [% END %]
+ </select>
+ </label>
+ <input type=submit value="Go" />
+ </p>
+
+[% IF use_section_wrapper %]
+ </form>
+</section>
+[% END %]
diff --git a/templates/web/greenwich/reports/_problem-list.html b/templates/web/greenwich/reports/_problem-list.html
new file mode 100644
index 000000000..45746e309
--- /dev/null
+++ b/templates/web/greenwich/reports/_problem-list.html
@@ -0,0 +1,19 @@
+<section class="full-width">
+ [% INCLUDE column
+ problems = problems.${body.id}
+ %]
+</section>
+
+[% BLOCK column %]
+ <ul class="issue-list-a">
+ [% IF problems %]
+ [% FOREACH problem IN problems %]
+ [% INCLUDE 'reports/_list-entry.html' %]
+ [% END %]
+ [% ELSE %]
+ <li class="empty">
+ <p>[% loc('There are no reports to show.') %]</p>
+ </li>
+ [% END %]
+ </ul>
+[% END %]