aboutsummaryrefslogtreecommitdiffstats
path: root/templates/web/default
diff options
context:
space:
mode:
Diffstat (limited to 'templates/web/default')
-rw-r--r--templates/web/default/admin/header.html1
-rw-r--r--templates/web/default/admin/list_flagged.html51
-rw-r--r--templates/web/default/admin/problem_row.html30
-rw-r--r--templates/web/default/admin/report_blocks.html10
-rw-r--r--templates/web/default/admin/report_edit.html3
-rw-r--r--templates/web/default/admin/search_abuse.html21
-rw-r--r--templates/web/default/admin/search_reports.html31
-rw-r--r--templates/web/default/admin/stats.html61
-rw-r--r--templates/web/default/admin/update_edit.html2
-rw-r--r--templates/web/default/footer.html4
-rw-r--r--templates/web/default/header.html1
-rw-r--r--templates/web/default/maps/fms.html2
-rw-r--r--templates/web/default/maps/osm-streetview.html2
-rw-r--r--templates/web/default/maps/osm.html2
-rw-r--r--templates/web/default/open311/index.html2
-rw-r--r--templates/web/default/tracking_code.html24
16 files changed, 197 insertions, 50 deletions
diff --git a/templates/web/default/admin/header.html b/templates/web/default/admin/header.html
index 261f0efb2..e0317cca0 100644
--- a/templates/web/default/admin/header.html
+++ b/templates/web/default/admin/header.html
@@ -5,6 +5,7 @@
dt { clear: left; float: left; font-weight: bold; }
dd { margin-left: 8em; }
.hidden { color: #666666; }
+.error { color: red; }
</style>
</head>
<body>
diff --git a/templates/web/default/admin/list_flagged.html b/templates/web/default/admin/list_flagged.html
new file mode 100644
index 000000000..0b22bccb2
--- /dev/null
+++ b/templates/web/default/admin/list_flagged.html
@@ -0,0 +1,51 @@
+[% INCLUDE 'admin/header.html' title=loc('Search Reports') %]
+[% PROCESS 'admin/report_blocks.html' %]
+
+
+<h2>[% loc( 'Problems' ) %]</h2>
+[% IF problems.size > 0 %]
+<table cellspacing="0" cellpadding="2" border="1">
+ <tr>
+ <th>[% loc('ID') %]</th>
+ <th>[% loc('Title') %]</th>
+ <th>[% loc('Name') %]</th>
+ <th>[% loc('Email') %]</th>
+ <th>[% loc('Council') %]</th>
+ <th>[% loc('Category') %]</th>
+ <th>[% loc('Anonymous') %]</th>
+ <th>[% loc('Cobrand') %]</th>
+ <th>[% loc('Created') %]</th>
+ <th>[% loc('State') %]</th>
+ <th>[% loc('When sent') %]</th>
+ <th>*</th>
+ </tr>
+ [% INCLUDE 'admin/problem_row.html' %]
+</table>
+[% ELSE %]
+<p>
+[% loc('No flagged problems found') %]
+</p>
+[% END %]
+
+<h2>[% loc( 'Users' ) %]</h2>
+[% IF users%]
+<table cellspacing="0" cellpadding="2" border="1">
+ <tr>
+ <th>[% loc('Name') %]</th>
+ <th>[% loc('Email') %]</th>
+ </tr>
+[% WHILE ( user = users.next ) -%]
+ <tr>
+ <td>[% user.name | html %]</td>
+ <td>[% user.email | html %]</td>
+ <td><a href="[% c.uri_for( 'search_reports', search => user.email ) %]">list content</a></td>
+ </tr>
+[%- END %]
+</table>
+[%- ELSE %]
+<p>
+[% loc('No flagged users found') %]
+</p>
+[%- END %]
+
+[% INCLUDE 'admin/footer.html' %]
diff --git a/templates/web/default/admin/problem_row.html b/templates/web/default/admin/problem_row.html
new file mode 100644
index 000000000..664ff1b13
--- /dev/null
+++ b/templates/web/default/admin/problem_row.html
@@ -0,0 +1,30 @@
+[%- FOR problem IN problems %]
+ <tr[% ' class="hidden"' IF problem.state == 'hidden' %]>
+ <td>[%- IF problem.state == 'confirmed' || problem.state == 'fixed' -%]
+ [%- cobrand_data = problem.cobrand_data %]
+ [%- cobrand_data = c.data_for_generic_problem IF !problem.cobrand %]
+ <a href="[% c.uri_for_email( '/report', problem.id, cobrand_data ) %]">[% problem.id %]</a>
+ [%- ELSE %]
+ [%- problem.id %]
+ [%- END -%]</td>
+ <td>[% PROCESS value_or_nbsp value=problem.title %]</td>
+ <td>[% PROCESS value_or_nbsp value=problem.name %]</td>
+ <td>[% PROCESS value_or_nbsp value=problem.user.email %]</td>
+ <td>[%- IF edit_council_contacts -%]
+ <a href="[% c.uri_for('council_contacts', problem.council ) %]">[% PROCESS value_or_nbsp value=problem.council %]</a>
+ [%- ELSE -%]
+ [%- PROCESS value_or_nbsp value=problem.council -%]
+ [%- END -%]</td>
+ <td>[% PROCESS value_or_nbsp value=problem.category %]</td>
+ <td>[% IF problem.anonymous %][% loc('Yes') %][% ELSE %][% loc('No') %][% END %]</td>
+ <td>[% problem.cobrand %]<br>[% problem.cobrand_data | html %]</td>
+ <td>[% PROCESS format_time time=problem.created %]</td>
+ <td>[% problem.state %]<small>
+ [%- IF problem.state == 'fixed' || problem.state == 'confirmed' %]<br>[% loc('Confirmed:' ) %]&nbsp;[% PROCESS format_time time=problem.confirmed %][% END -%]
+ [%- IF problem.state == 'fixed' %]<br>[% loc('Fixed:') %] [% PROCESS format_time time=problem.lastupdate %][% END -%]
+ [%- IF problem.state == 'confirmed' %]<br>[% loc('Last&nbsp;update:') %] [% PROCESS format_time time=problem.lastupdate %][% END -%]</small>
+ </td>
+ <td>[% PROCESS format_time time=problem.whensent %]</td>
+ <td><a href="[% c.uri_for( 'report_edit', problem.id ) %]">[% loc('Edit') %]</a></td>
+ </tr>
+[%- END -%]
diff --git a/templates/web/default/admin/report_blocks.html b/templates/web/default/admin/report_blocks.html
index 1fe650f15..f08529ce7 100644
--- a/templates/web/default/admin/report_blocks.html
+++ b/templates/web/default/admin/report_blocks.html
@@ -5,3 +5,13 @@
[% BLOCK format_time -%]
[%- IF time %][% time.ymd %]&nbsp;[% time.hms %][% ELSE %][% no_time || '&nbsp;' %][% END %][% no_time = '' %]
[%- END %]
+
+[% BLOCK abuse_button -%]
+[% IF allowed_pages.abuse_edit -%]
+[% IF email_in_abuse %]<small>[% loc('(Email in abuse table)') %]</small>[% ELSE %]<input type="submit" name="banuser" value="[% loc('Ban email address') %]" />[% END %]
+[%- END %]
+[%- END %]
+
+[% BLOCK flag_button -%]
+[% IF user.flagged || user_flagged %]<input type="submit" name="removeuserflag" value="[% loc('Remove flag') %]">[% ELSE %]<input type="submit" name="flaguser" value="[% loc('Flag user') %]" />[% END %]
+[%- END %]
diff --git a/templates/web/default/admin/report_edit.html b/templates/web/default/admin/report_edit.html
index 9c38b014e..69d5d0b11 100644
--- a/templates/web/default/admin/report_edit.html
+++ b/templates/web/default/admin/report_edit.html
@@ -25,7 +25,7 @@
</select></li>
<li>[% loc('Category:') %] [% problem.category | html %] </li>
<li>[% loc('Name:') %] <input type='text' name='name' id='name' value='[% problem.name | html %]'></li>
-<li>[% loc('Email:') %] <input type='text' id='email' name='email' value='[% problem.user.email | html %]'></li>
+<li>[% loc('Email:') %] <input type='text' id='email' name='email' value='[% problem.user.email | html %]'> [% PROCESS abuse_button %] [% PROCESS flag_button user=problem.user %]</li>
<li>[% loc('Phone:') %] [% problem.user.phone | html %]</li>
<li>[% loc('Created:') %] [% PROCESS format_time time=problem.created %]</li>
<li>[% loc('Confirmed:') %] [% PROCESS format_time time=problem.confirmed no_time='-' %]</li>
@@ -35,6 +35,7 @@
<li>[% loc('Cobrand:') %] [% problem.cobrand %]</li>
<li>[% loc('Cobrand data:') %] [% problem.cobrand_data %]</li>
<li>[% loc('Going to send questionnaire?') %] [% IF problem.send_questionnaire %][% loc('Yes') %][% ELSE %][% loc('No') %][% END %]</li>
+<li><label for="flagged">[% loc('Flagged:') %]</label> <input type="checkbox" name="flagged"[% ' checked' IF problem.flagged %]></li>
[% IF problem.photo %]
[% photo = problem.get_photo_params %]
diff --git a/templates/web/default/admin/search_abuse.html b/templates/web/default/admin/search_abuse.html
new file mode 100644
index 000000000..0984e85cf
--- /dev/null
+++ b/templates/web/default/admin/search_abuse.html
@@ -0,0 +1,21 @@
+[% INCLUDE 'admin/header.html' title=loc('Search Abuse Table') %]
+
+<form method="get" action="[% c.uri_for('search_abuse') %]" enctype="application/x-www-form-urlencoded" accept-charset="utf-8">
+ <label for="search">[% loc('Search:') %]</label> <input type="text" name="search" size="30" id="search">
+</form>
+
+
+[% IF emails.size > 0 %]
+<table cellspacing="0" cellpadding="2" border="1">
+ <tr>
+ <th>[% loc('Email') %]</th>
+ </tr>
+[%- FOREACH foo IN emails %]
+ <tr>
+ <td>[%- foo.email | html -%]</td>
+ </tr>
+[%- END -%]
+</table>
+[% END %]
+
+[% INCLUDE 'admin/footer.html' %]
diff --git a/templates/web/default/admin/search_reports.html b/templates/web/default/admin/search_reports.html
index 3809965f6..9702c16a7 100644
--- a/templates/web/default/admin/search_reports.html
+++ b/templates/web/default/admin/search_reports.html
@@ -22,36 +22,7 @@
<th>[% loc('When sent') %]</th>
<th>*</th>
</tr>
-[%- FOREACH problem IN problems %]
- <tr[% ' class="hidden"' IF problem.state == 'hidden' %]>
- <td>[%- IF problem.state == 'confirmed' || problem.state == 'fixed' -%]
- [%- cobrand_data = problem.cobrand_data %]
- [%- cobrand_data = c.data_for_generic_problem IF !problem.cobrand %]
- <a href="[% c.uri_for_email( '/report', problem.id, cobrand_data ) %]">[% problem.id %]</a>
- [%- ELSE %]
- [%- problem.id %]
- [%- END -%]</td>
- <td>[% PROCESS value_or_nbsp value=problem.title %]</td>
- <td>[% PROCESS value_or_nbsp value=problem.name %]</td>
- <td>[% PROCESS value_or_nbsp value=problem.user.email %]</td>
- <td>[%- IF edit_council_contacts -%]
- <a href="[% c.uri_for('council_contacts', problem.council ) %]">[% PROCESS value_or_nbsp value=problem.council %]</a>
- [%- ELSE -%]
- [%- PROCESS value_or_nbsp value=problem.council -%]
- [%- END -%]</td>
- <td>[% PROCESS value_or_nbsp value=problem.category %]</td>
- <td>[% IF problem.anonymous %][% loc('Yes') %][% ELSE %][% loc('No') %][% END %]</td>
- <td>[% problem.cobrand %]<br>[% problem.cobrand_data | html %]</td>
- <td>[% PROCESS format_time time=problem.created %]</td>
- <td>[% problem.state %]<small>
- [%- IF problem.state == 'fixed' || problem.state == 'confirmed' %]<br>[% loc('Confirmed:' ) %]&nbsp;[% PROCESS format_time time=problem.confirmed %][% END -%]
- [%- IF problem.state == 'fixed' %]<br>[% loc('Fixed:') %] [% PROCESS format_time time=problem.lastupdate %][% END -%]
- [%- IF problem.state == 'confirmed' %]<br>[% loc('Last&nbsp;update:') %] [% PROCESS format_time time=problem.lastupdate %][% END -%]</small>
- </td>
- <td>[% PROCESS format_time time=problem.whensent %]</td>
- <td><a href="[% c.uri_for( 'report_edit', problem.id ) %]">[% loc('Edit') %]</a></td>
- </tr>
-[%- END -%]
+ [% INCLUDE 'admin/problem_row.html' %]
</table>
[% INCLUDE 'admin/list_updates.html' %]
diff --git a/templates/web/default/admin/stats.html b/templates/web/default/admin/stats.html
new file mode 100644
index 000000000..ccd41601a
--- /dev/null
+++ b/templates/web/default/admin/stats.html
@@ -0,0 +1,61 @@
+[% INCLUDE 'admin/header.html' title=loc('Stats') %]
+
+[% IF show_count %]
+<p>
+<strong>[% tprintf( loc( '%sreports between %s and %s' ), ( unconfirmed ? loc( 'All' ) _ ' ' : loc( 'Confirmed' ) _ ' ' ), start_date.ymd, end_date.ymd ) | html %]</strong>
+</p>
+<table>
+ <thead>
+ <td style="width: 8em"><strong>[% loc('Current state') %]</strong></td>
+ <td><strong>[% loc('Count') %]</strong></td>
+ </thead>
+ [% total = 0 %]
+ [% WHILE ( state = states.next ) %]
+ [% total = total + state.get_column( 'count' ) %]
+ <tr>
+ <td>[% state.state | html %]</td>
+ <td>[% state.get_column( 'count' ) %]</td>
+ </tr>
+ [% END %]
+ <tr>
+ <td><strong>[% loc( 'Total' ) %]</strong></td>
+ <td><strong>[% total %]</strong></td>
+ </tr>
+</table>
+
+[% IF unconfirmed %]
+ <p>
+ <small>[% loc( 'Note that when including unconfirmed reports we use the date the report was created which may not be in the same month the report was confirmed so the numbers may jump about a little' ) %]</small>
+ </p>
+[% END %]
+[% END %]
+
+[% IF errors %]
+ [% FOREACH error IN errors %]
+ <p class="error">[% error %]</p>
+ [% END %]
+[% END %]
+
+<form method="post" action="[% c.uri_for('stats') %]" enctype="application/x-www-form-urlencoded" accept-charset="utf-8">
+ <p>
+ <label for="start_date_year">[% loc('Start Year:') %]</label><input type="text" name="start_date_year" id="start_date_year" size="5" value="[% start_date ? start_date.year : '' | html %]" />
+ <label for="start_date_month">[% loc('Start month:') %]</label><input type="text" name="start_date_month" id="start_date_month" size="3" value="[% start_date ? start_date.month : '' | html %]" />
+ <label for="start_date_day">[% loc('Start day:') %]</label><input type="text" name="start_date_day" id="start_date_day" size="3" value="[% start_date ? start_date.day : '' | html %]" />
+ </p>
+
+ <p>
+ <label for="end_date_year">[% loc('End Year:') %]</label><input type="text" name="end_date_year" id="end_date_year" size="5" value="[% end_date ? end_date.year : '' | html %]" />
+ <label for="end_date_month">[% loc('End month:') %]</label><input type="text" name="end_date_month" id="end_date_month" size="3" value="[% end_date ? end_date.month : '' | html %]" />
+ <label for="end_date_day">[% loc('End day:') %]</label><input type="text" name="end_date_day" id="end_date_day" size="3" value="[% end_date ? end_date.day : '' | html %]" />
+ </p>
+
+ <p>
+ <input type="checkbox" name="unconfirmed" id="unconfirmed"[% unconfirmed ? ' checked' : '' %] /><label for="unconfirmed">[% loc('Include unconfirmed reports') %]</label>
+ </p>
+
+ <p>
+ <input type="submit" name="getcounts" size="30" id="getcounts" value="Get Count" />
+ </p>
+</form>
+
+[% INCLUDE 'admin/footer.html' %]
diff --git a/templates/web/default/admin/update_edit.html b/templates/web/default/admin/update_edit.html
index d7f212052..d4ac1b440 100644
--- a/templates/web/default/admin/update_edit.html
+++ b/templates/web/default/admin/update_edit.html
@@ -21,7 +21,7 @@
[% END %]
</select></li>
<li>[% loc('Name:') %] <input type='text' name='name' id='name' value='[% update.name | html %]'></li>
-<li>[% loc('Email:') %] <input type='text' id='email' name='email' value='[% update.user.email | html %]'></li>
+<li>[% loc('Email:') %] <input type='text' id='email' name='email' value='[% update.user.email | html %]'> [% PROCESS abuse_button %] [% PROCESS flag_button user=update.user %]</li>
<li>[% loc('Cobrand:') %] [% update.cobrand %]</li>
<li>[% loc('Cobrand data:') %] [% update.cobrand_data %]</li>
<li>[% loc('Created:') %] [% PROCESS format_time time=update.created %]</li>
diff --git a/templates/web/default/footer.html b/templates/web/default/footer.html
index a71909539..bd684b722 100644
--- a/templates/web/default/footer.html
+++ b/templates/web/default/footer.html
@@ -31,9 +31,7 @@
</p>
</div>
-[%# INCLUDE 'tracking_code.html' %]
-
-[%# INCLUDE 'debug_footer.html' %]
+[% INCLUDE 'debug_footer.html' %]
</body>
</html>
diff --git a/templates/web/default/header.html b/templates/web/default/header.html
index 8fffbda88..b2bfd27d7 100644
--- a/templates/web/default/header.html
+++ b/templates/web/default/header.html
@@ -14,6 +14,7 @@
<link rel="canonical" href="http://www.fixmystreet.com[% c.req.uri.path_query %]">
[% END %]
+ [% INCLUDE 'tracking_code.html' %]
</head>
<body>
diff --git a/templates/web/default/maps/fms.html b/templates/web/default/maps/fms.html
index 6e6d747bf..172fa9e7f 100644
--- a/templates/web/default/maps/fms.html
+++ b/templates/web/default/maps/fms.html
@@ -1,6 +1,6 @@
[% map_js = BLOCK %]
<!-- <script type="text/javascript" src="http://ecn.dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=7.0&mkt=en-GB"></script> -->
-<script type="text/javascript" src="/jslib/OpenLayers-2.10/OpenLayers.js"></script>
+<script type="text/javascript" src="/js/OpenLayers.fixmystreet.js"></script>
<script type="text/javascript" src="/js/map-OpenLayers.js"></script>
<script type="text/javascript" src="/js/map-bing-ol.js"></script>
<!--[if lte IE 6]>
diff --git a/templates/web/default/maps/osm-streetview.html b/templates/web/default/maps/osm-streetview.html
index 9de99c253..3c97af5b9 100644
--- a/templates/web/default/maps/osm-streetview.html
+++ b/templates/web/default/maps/osm-streetview.html
@@ -1,5 +1,5 @@
[% map_js = BLOCK %]
-<script type="text/javascript" src="/jslib/OpenLayers-2.10/OpenLayers.js"></script>
+<script type="text/javascript" src="/js/OpenLayers.fixmystreet.js"></script>
<script type="text/javascript" src="/js/map-OpenLayers.js"></script>
<script type="text/javascript" src="/js/map-streetview.js"></script>
<!--[if lte IE 6]>
diff --git a/templates/web/default/maps/osm.html b/templates/web/default/maps/osm.html
index e2762ee26..b0607220f 100644
--- a/templates/web/default/maps/osm.html
+++ b/templates/web/default/maps/osm.html
@@ -1,5 +1,5 @@
[% map_js = BLOCK %]
-<script type="text/javascript" src="/jslib/OpenLayers-2.10/OpenLayers.js"></script>
+<script type="text/javascript" src="/js/OpenLayers.fixmystreet.js"></script>
<script type="text/javascript" src="/js/map-OpenLayers.js"></script>
<script type="text/javascript" src="/js/map-OpenStreetMap.js"></script>
<!--[if lte IE 6]>
diff --git a/templates/web/default/open311/index.html b/templates/web/default/open311/index.html
index 28e8aee3b..8ce18f68c 100644
--- a/templates/web/default/open311/index.html
+++ b/templates/web/default/open311/index.html
@@ -68,7 +68,7 @@
[% IF url.match('/requests.xml') %]
[ <a href="http://maps.google.com/?q=[% url.replace('.xml', '.rss') | uri %]">[% loc('GeoRSS on Google Maps') %]</a> ]
[% END %]
- <br>[% ent(url) %]</li>
+ <br>[% url | html %]</li>
[% END %]
</ul>
diff --git a/templates/web/default/tracking_code.html b/templates/web/default/tracking_code.html
index e5fc13793..b506d41c1 100644
--- a/templates/web/default/tracking_code.html
+++ b/templates/web/default/tracking_code.html
@@ -1,16 +1,18 @@
[% IF c.config.BASE_URL == "http://www.fixmystreet.com" %]
-<!-- Piwik -->
<script type="text/javascript">
-var pkBaseURL = (("https:" == document.location.protocol) ? "https://piwik.mysociety.org/" : "http://piwik.mysociety.org/");
-document.write(unescape("%3Cscript src='" + pkBaseURL + "piwik.js' type='text/javascript'%3E%3C/script%3E"));
-</script><script type="text/javascript">
-try {
-var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php", 8);
-piwikTracker.trackPageView();
-piwikTracker.enableLinkTracking();
-} catch( err ) {}
-</script><noscript><p><img src="http://piwik.mysociety.org/piwik.php?idsite=8" style="border:0" alt=""/></p></noscript>
-<!-- End Piwik Tag -->
+
+ var _gaq = _gaq || [];
+ _gaq.push(['_setAccount', 'UA-660910-4']);
+ _gaq.push(['_setDomainName', '.fixmystreet.com']);
+ _gaq.push(['_trackPageview']);
+
+ (function() {
+ var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+ ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+ })();
+
+</script>
[% ELSE %]
<!-- Tracking code not inserted as "[% c.config.BASE_URL %]" not "http://www.fixmystreet.com" -->
[% END %]