aboutsummaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2016-01-08 17:18:02 +0000
committerMatthew Somerville <matthew@mysociety.org>2016-01-08 17:18:23 +0000
commit0715183153048e2bdbf838d6206ae50103d50384 (patch)
treeb209f349966731c2afe508e2501b4c158af48d6b /templates
parentc147fa9e46fc8b87b9e45fe9770d1a84c081736e (diff)
Combine base/fixmystreet report templates.
Refactor some cobrand specific elements for clarity.
Diffstat (limited to 'templates')
-rw-r--r--templates/web/base/report/banner.html16
-rw-r--r--templates/web/base/report/display.html84
-rw-r--r--templates/web/base/report/update-form.html256
-rw-r--r--templates/web/base/report/update.html86
-rw-r--r--templates/web/base/report/updates-sidebar-notes.html4
-rw-r--r--templates/web/bromley/report/banner.html15
-rw-r--r--templates/web/fixamingata/report/updates-sidebar-notes.html1
-rw-r--r--templates/web/fixmystreet.com/report/banner.html28
-rw-r--r--templates/web/fixmystreet.com/report/updates-sidebar-notes.html6
-rw-r--r--templates/web/fixmystreet/report/banner.html21
-rw-r--r--templates/web/fixmystreet/report/display.html78
-rw-r--r--templates/web/fixmystreet/report/update-form.html152
-rw-r--r--templates/web/fixmystreet/report/update.html70
-rw-r--r--templates/web/fixmystreet/report/updates-sidebar-notes.html7
14 files changed, 300 insertions, 524 deletions
diff --git a/templates/web/base/report/banner.html b/templates/web/base/report/banner.html
index bd7798d79..188e96502 100644
--- a/templates/web/base/report/banner.html
+++ b/templates/web/base/report/banner.html
@@ -1,22 +1,20 @@
[% USE date %]
[% BLOCK banner %]
-<p class="banner" id="[% id %]">
- [% text %]
-</p>
+ <div class="banner">
+ <p id="[% id %]">[% text %]</p>
+ </div>
[% END %]
[% IF problem.is_open AND date.now - problem.lastupdate.epoch > 8 * 7 * 24 * 60 * 60 %]
- [% INCLUDE banner, id = 'unknown', text = loc('This problem is old and of unknown status.') %]
+ [% INCLUDE banner, id = 'unknown', text = loc('Unknown') %]
[% END %]
[% IF problem.is_fixed %]
- [% INCLUDE banner, id = 'fixed', text = loc('This problem has been fixed') %]
+ [% INCLUDE banner, id = 'fixed', text = loc('Fixed') %]
[% END %]
[% IF problem.is_closed %]
- [% INCLUDE banner, id = 'closed', text = loc('This problem has been closed') %]
+ [% INCLUDE banner, id = 'closed', text = loc('Closed') %]
[% END %]
[% states = [ 'investigating', 'in progress', 'planned', 'action scheduled' ];
IF states.grep(problem.state).size %]
- [% INCLUDE banner, id = 'progress', text = loc('This problem is in progress') %]
+ [% INCLUDE banner, id = 'progress', text = loc('In progress') %]
[% END %]
-
-
diff --git a/templates/web/base/report/display.html b/templates/web/base/report/display.html
index 329614488..5f499dd6e 100644
--- a/templates/web/base/report/display.html
+++ b/templates/web/base/report/display.html
@@ -1,60 +1,78 @@
[%
+ SET bodyclass = 'mappage';
+ PROCESS "report/photo-js.html";
PROCESS "maps/${map.type}.html";
problem_title = problem.title_safe _ ' - ' _ loc('Viewing a problem');
- SET rss = [ tprintf(loc('Updates to this problem, %s', "%s is the site name"), site_name), "/rss/$problem.id" ] IF c.cobrand.moniker != 'emptyhomes';
- SET robots = 'index, nofollow';
- SET robots = 'noindex, nofollow' IF c.cobrand.moniker == 'emptyhomes';
INCLUDE 'header.html'
title = problem_title
+ rss = [ tprintf(loc('Updates to this problem, %s', "%s is the site name"), site_name), "/rss/$problem.id" ]
+ robots = 'index, nofollow';
%]
-[% IF c.cobrand.moniker != 'emptyhomes' %]
- [% map_html %]
- </div>
-[% END %]
-
-<div id="side">
+[% map_html %]
+</div>
[% IF login_success %]
<p class='form-success'>[% loc('You have successfully signed in; please check and confirm your details are accurate:') %]</p>
[% END %]
[% INCLUDE 'report/banner.html' %]
-[% INCLUDE 'report/_main.html' %]
-<p align="right">
- <small>
- <a rel="nofollow" href="[% c.uri_for( '/contact', { id => problem.id } ) %]">[% loc('Offensive? Unsuitable? Tell us' ) %]</a>
- </small>
-</p>
+[% INCLUDE 'report/_main.html' %]
+[% TRY %][% INCLUDE 'report/_message_manager.html' %][% CATCH file %][% END %]
-[% IF c.cobrand.moniker != 'emptyhomes' %]
-<p style="padding-bottom: 0.5em; border-bottom: dotted 1px #999999;" align="right">
- <a href="[% c.uri_for( '/around', { lat => latitude, lon => longitude } ) %]">[% loc( 'More problems nearby' ) %]</a>
-</p>
+<div class="shadow-wrap">
+ <ul id="key-tools">
+ [% IF c.user_exists AND c.cobrand.users_can_hide AND c.user.belongs_to_body( c.cobrand.council_id ) %]
+ <li><form method="post" action="/report/delete/[% problem.id %]" id="remove-from-site-form">
+ <input type="submit" id="key-tool-report-abuse" class="abuse" value="Remove from site">
+ </form></li>
+ [% ELSIF c.cobrand.moniker != 'zurich' %]
+ <li><a rel="nofollow" id="key-tool-report-abuse" class="abuse" href="[% c.uri_for( '/contact', { id => problem.id } ) %]">[% loc('Report abuse' ) %]</a></li>
+ [% END %]
+ [% IF c.cobrand.moniker != 'zurich' %]
+ <li><a rel="nofollow" id="key-tool-report-updates" class="feed" href="[% c.uri_for( '/alert/subscribe', { id => problem.id } ) %]">[% loc('Get updates' ) %]</a></li>
+ [% END %]
+ [% IF c.cobrand.moniker == 'fixmystreet' %]
+ <li><a rel="nofollow" id="key-tool-report-share" class="share" href="#report-share">[% loc('Share') %]</a></li>
+ [% END %]
+ [% IF c.cobrand.moniker == 'zurich' %]
+ <li><a class="chevron" id="key-tool-problems-nearby" href="[% c.uri_for( '/around', { lat => latitude, lon => longitude } ) %]">[% loc( 'Problems on the map' ) %]</a></li>
+ [% ELSE %]
+ <li><a class="chevron" id="key-tool-problems-nearby" href="[% c.uri_for( '/around', { lat => latitude, lon => longitude } ) %]">[% loc( 'Problems nearby' ) %]</a></li>
+ [% END %]
+ </ul>
-<div id="alert_links">
- <a rel="nofollow" id="email_alert" href="[% c.uri_for( '/alert/subscribe', { id => problem.id } ) %]">[% loc('Email me updates' ) %]</a>
+[% IF c.cobrand.moniker == 'fixmystreet' %]
+ <div id="report-share" class="hidden-js" align="center">
+ <a href="https://twitter.com/share" class="twitter-share-button" data-text="I just reported &lsquo;[% problem.title_safe | html %]&rsquo;" data-via="fixmystreet" data-related="mysociety" data-count="none" data-dnt="true">Tweet</a>
+<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
+ <iframe src="//www.facebook.com/plugins/like.php?href=[% c.req.uri | uri %]&amp;send=false&amp;layout=button_count&amp;width=90&amp;show_faces=false&amp;action=like&amp;colorscheme=light&amp;font&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:90px; height:21px;" allowTransparency="true"></iframe>
+ </div>
+[% END %]
- <form action="[% c.uri_for( '/alert/subscribe' ) %]" method="post" id="email_alert_box">
+<div id="report-updates-data" class="hidden-js">
+ <form action="[% c.uri_for( '/alert/subscribe' ) %]" method="post">
+ <a href="[% c.uri_for( '/rss', problem.id ) %]">
+ <img src="/i/feed.png" width="16" height="16" title="[% loc('RSS feed') %]" alt="[% loc('RSS feed of updates to this problem' ) %]" border="0">
+ </a>
<p>[% loc('Receive email when updates are left on this problem.' ) %]</p>
- <label class="n" for="alert_rznvy">[% loc('Email:') %]</label>
- <input type="email" name="rznvy" id="alert_rznvy" value="[% email | html %]" size="30">
+ <fieldset>
+ <label class="hidden n" for="alert_rznvy">[% loc('Your email') %]</label>
+ <div class="form-txt-submit-box">
+ <input type="email" name="rznvy" id="alert_rznvy" value="[% email | html %]" size="30" placeholder="[% loc('Your email') %]">
+ <input class="green-btn" type="submit" value="[% loc('Subscribe') %]">
+ </div>
<input type="hidden" name="id" value="[% problem.id %]">
<input type="hidden" name="type" value="updates">
- <input type="submit" value="[% loc('Subscribe') %]">
+ </fieldset>
</form>
- &nbsp;
- <a href="[% c.uri_for( '/rss', problem.id ) %]">
- <img src="/i/feed.png" width="16" height="16" title="[% loc('RSS feed') %]" alt="[% loc('RSS feed of updates to this problem' ) %]" border="0" style="vertical-align: middle">
- </a>
</div>
-[% INCLUDE 'report/updates.html' %]
-[% INCLUDE 'report/update-form.html' %]
-[% END %]
-
</div>
+[% TRY %][% INCLUDE 'report/sharing.html' %][% CATCH file %][% END %]
+[% INCLUDE 'report/updates.html' %]
+[% INCLUDE 'report/update-form.html' %]
[% INCLUDE 'footer.html' %]
diff --git a/templates/web/base/report/update-form.html b/templates/web/base/report/update-form.html
index 3115855d3..be93ca82e 100644
--- a/templates/web/base/report/update-form.html
+++ b/templates/web/base/report/update-form.html
@@ -1,165 +1,153 @@
+[% allow_creation = !c.cobrand.only_authed_can_create || (c.user && c.user.from_body) %]
+[% IF allow_creation %]
<div id="update_form">
-
<h2>[% loc( 'Provide an update') %]</h2>
- [% IF c.cobrand.moniker != 'emptyhomes' %]
- <p>
- <small>[% loc( 'Please note that updates are not sent to the council. If you leave your name it will be public. Your information will only be used in accordance with our <a href="/faq#privacy">privacy policy</a>' ) %]</small>
- </p>
+ [% IF c.cobrand.moniker != 'emptyhomes' AND c.cobrand.moniker != 'stevenage' %]
+ <div class="general-notes">
+ [% INCLUDE 'report/updates-sidebar-notes.html' %]
+ </div>
[% END %]
[% INCLUDE 'errors.html' %]
- <form method="post" action="[% c.uri_for( '/report/update' ) %]" name="updateForm" class="fieldset validate"[% IF c.cobrand.allow_photo_upload %] enctype="multipart/form-data"[% END %]>
-
- <input type="hidden" name="submit_update" value="1">
- <input type="hidden" name="id" value="[% problem.id | html %]">
+ <form method="post" action="[% c.uri_for( '/report/update' ) %]" id="form_update_form" name="updateForm" class="validate"[% IF c.cobrand.allow_photo_upload %] enctype="multipart/form-data"[% END %]>
+ <fieldset>
+ <input type="hidden" name="submit_update" value="1">
+ <input type="hidden" name="id" value="[% problem.id | html %]">
- [% IF field_errors.update %]
- <div class='form-error'>[% field_errors.update %]</div>
- [% END %]
- <div class="form-field">
- <label for="form_update">[% loc( 'Update:' ) %]</label>
- <textarea name="update" id="form_update" rows="7" cols="30" required>[% update.text | html %]</textarea>
- </div>
-
- [% IF c.user && c.user.belongs_to_body( problem.bodies_str ) %]
- <div class="form-field">
- <label for="form_state">[% loc( 'State:' ) %]</label>
- <select name="state" id="form_state">
- [% FOREACH state IN [ ['confirmed', loc('Open')], ['investigating',
- loc('Investigating')], ['action scheduled', loc('Action Scheduled')],
- ['in progress', loc('In Progress')], ['duplicate', loc('Duplicate')],
- ['unable to fix', loc('Unable to fix')], ['not responsible', loc('Not Responsible')],
- ['fixed', loc('Fixed')] ] %]
- <option [% 'selected ' IF state.0 == problem.state %] value="[% state.0 %]">[% state.1 %]</option>
+ <label for="form_update">[% loc( 'Update' ) %]</label>
+ [% IF field_errors.update %]
+ <div class='form-error'>[% field_errors.update %]</div>
[% END %]
- </select>
- </div>
- [% ELSE %]
- [% IF problem.is_fixed AND ((c.user_exists AND c.user.id == problem.user_id) OR alert_to_reporter) %]
- <div class="checkbox">
- <input type="checkbox" name="reopen" id="form_reopen" value="1"[% ' checked' IF update.mark_open %]>
- <label class="inline" for="form_reopen">[% loc('This problem has not been fixed') %]</label>
- </div>
- [% ELSIF !problem.is_fixed %]
- <div class="checkbox">
- <input type="checkbox" name="fixed" id="form_fixed" value="1"[% ' checked' IF update.mark_fixed %]>
- <label class="inline" for="form_fixed">[% loc('This problem has been fixed') %]</label>
- </div>
+ <textarea rows="7" cols="30" name="update" id="form_update" placeholder="[% loc('Please write your update here') %]" required>[% update.text | html %]</textarea>
+
+ [% IF c.user && c.user.belongs_to_body( problem.bodies_str ) %]
+ <label for="form_state">[% loc( 'State' ) %]</label>
+ <select name="state" id="form_state">
+ [% FOREACH state IN [ ['confirmed', loc('Open')], ['investigating',
+ loc('Investigating')], ['action scheduled', loc('Action Scheduled')],
+ ['in progress', loc('In Progress')], ['duplicate', loc('Duplicate')],
+ ['unable to fix', loc('Unable to fix')], ['not responsible', loc('Not Responsible')],
+ ['fixed', loc('Fixed')] ] %]
+ <option [% 'selected ' IF state.0 == problem.state %] value="[% state.0 %]">[% state.1 %]</option>
+ [% END %]
+ </select>
+ [% ELSE %]
+ [% IF problem.is_fixed AND ((c.user_exists AND c.user.id == problem.user_id) OR alert_to_reporter) %]
+
+ <input type="checkbox" name="reopen" id="form_reopen" value="1"[% ' checked' IF update.mark_open %]>
+ <label class="inline" for="form_reopen">[% loc('This problem has not been fixed') %]</label>
+
+ [% ELSIF !problem.is_fixed %]
+
+ <div class="checkbox-group">
+ <input type="checkbox" name="fixed" id="form_fixed" value="1"[% ' checked' IF update.mark_fixed %]>
+ <label class="inline" for="form_fixed">[% loc('This problem has been fixed') %]</label>
+ </div>
+
+ [% END %]
[% END %]
- [% END %]
[% IF c.cobrand.allow_photo_upload %]
- [% IF field_errors.photo %]
- <div class='form-error'>[% field_errors.photo %]</div>
- [% END %]
- <div id="fileupload_normalUI">
- [% IF upload_fileid %]
- <p>[% loc('You have already attached a photo to this update, attaching another one will replace it.') %]</p>
- <input type="hidden" name="upload_fileid" value="[% upload_fileid %]">
- [% END %]
- <label for="form_photo">[% loc('Photo:') %]</label>
- <input type="file" name="photo" id="form_photo" style="width:20em">
- </div>
- [% END %]
-
-[% IF c.user_exists %]
-
- [% INCLUDE name %]
-
- <div class="checkbox">
- <input type="submit" id="update_post" value="[% loc('Post') %]">
- </div>
-
-[% ELSE %]
-
- [% IF field_errors.email %]
- <div class='form-error'>[% field_errors.email %]</div>
- [% END %]
- <div class="form-field">
- <label for="form_rznvy">[% loc('Your email:' ) %]</label>
- <input type="email" name="rznvy" id="form_rznvy" value="[% update.user.email | html %]" size="30" required>
- </div>
-
-<div id="form_sign_in">
- <h3>[% loc("Now to submit your update&hellip;") %]</h3>
- <h2>[% tprintf(loc("Do you have a %s password?", "%s is the site name"), site_name) %]</h2>
-
- <div id="form_sign_in_yes">
-
- [% IF field_errors.password %]
- <div class='form-error'>[% field_errors.password %]</div>
+ <div id="fileupload_normalUI">
+ [% IF upload_fileid %]
+ <img align="right" src="/photo/[% upload_fileid %].temp.jpeg" alt="">
+ <p>[% loc('You have already attached a photo to this update, attaching another one will replace it.') %]</p>
+ <input type="hidden" name="upload_fileid" value="[% upload_fileid %]">
+ [% END %]
+ <label for="form_photo">[% loc('Photo') %]</label>
+ [% IF field_errors.photo %]
+ <p class='form-error'>[% field_errors.photo %]</p>
+ [% END %]
+ <input type="file" name="photo" id="form_photo">
+ </div>
[% END %]
- <p>
- <label class="n" for="password_sign_in">[% loc('<strong>Yes</strong> I have a password') %]</label>
- <input type="password" name="password_sign_in" id="password_sign_in" value="" size="25">
- </p>
-
- <div class="fieldset">
-
- <p>
- <input type="checkbox" id="remember_me" name="remember_me" value='1'[% ' checked' IF remember_me %]>
- <label class="n" for="remember_me">
- [% loc('Keep me signed in on this computer') %]
- </label>
- </p>
-
- <p>
- <input type="submit" name="submit_sign_in" id="submit_sign_in" value="[% loc('Post') %]">
- </p>
-
- </div>
-
- </div>
- <div id="form_sign_in_no">
-
- <p>[% loc('<strong>No</strong>, let me confirm my update by email:') %]</p>
-
- <div class="fieldset">
+ [% IF c.user_exists %]
[% INCLUDE name %]
+
+ <input class="final-submit green-btn" type="submit" id="update_post" value="[% loc('Post') %]">
+
- <div class="form-field">
- <label for="password_register">[% loc('Enter a new password:') %]</label>
- <input type="password" name="password_register" id="password_register" value="" size="25">
- </div>
-
- <p style="clear:both"><small>[% loc('Providing a password is optional, but doing so will allow you to more easily report problems, leave updates and manage your reports.') %]</small></p>
-
- <p>
- <input type="submit" name="submit_register" id="submit_register" value="[% loc('Post') %]">
- </p>
-
- </div>
-
- </div>
-
-</div>
+ [% ELSE %]
-[% END %]
+ <label for="form_rznvy">[% loc('Your email' ) %]
+ <span class="muted">([% loc('We never show your email') %])</span>
+ </label>
+ [% IF field_errors.email %]
+ <p class='form-error'>[% field_errors.email %]</p>
+ [% END %]
+ <input type="email" name="rznvy" id="form_rznvy" value="[% update.user.email | html %]" placeholder="[% loc('Your email address' ) %]" required>
+
+ <div id="form_sign_in">
+ <h3>[% loc("Now to submit your update&hellip;") %]</h3>
+ <h2>[% tprintf(loc("Do you have a %s password?", "%s is the site name"), site_name) %]</h2>
+
+ <div id="form_sign_in_yes" class="form-box">
+ <h5>[% loc('<strong>Yes</strong> I have a password') %]</h5>
+
+ <label class="hidden-js n" for="password_sign_in">[% loc('Yes I have a password') %]</label>
+ [% IF field_errors.password %]
+ <p class='form-error'>[% field_errors.password %]</p>
+ [% END %]
+ <div class="form-txt-submit-box">
+ <input type="password" name="password_sign_in" id="password_sign_in" value="" placeholder="[% loc('Your password') %]">
+ <input class="green-btn" type="submit" name="submit_sign_in" id="submit_sign_in" value="[% loc('Post') %]">
+ </div>
+
+ <div class="checkbox-group">
+ <input type="checkbox" id="remember_me" name="remember_me" value='1'[% ' checked' IF remember_me %]>
+ <label class="inline n" for="remember_me">[% loc('Keep me signed in on this computer') %]</label>
+ </div>
+
+ <div class="general-notes">
+ <p><strong>[% loc('Forgotten your password?') %]</strong>
+ [% loc('Confirm by email below, providing a new password at that point. When you confirm, your password will be updated.') %]</p>
+ </div>
+
+ </div>
+ <div id="form_sign_in_no" class="form-box">
+ <h5>[% loc('<strong>No</strong> Let me confirm my update by email') %]</h5>
+
+ [% INCLUDE name %]
+
+ <label for="password_register">[% loc('Password (optional)') %]</label>
+
+ <div class="general-notes">
+ <p>[% loc('Providing a password is optional, but doing so will allow you to more easily report problems, leave updates and manage your reports.') %]</p>
+ </div>
+
+ <div class="form-txt-submit-box">
+ <input type="password" name="password_register" id="password_register" value="" placeholder="[% loc('Enter a password') %]">
+ <input class="green-btn" type="submit" name="submit_register" id="submit_register" value="[% loc('Post') %]">
+ </div>
+
+ </div>
+ </div>
+ [% END %]
+ </fieldset>
</form>
</div>
+[% END %]
[% BLOCK name %]
+ [% INCLUDE 'report/new/extra_name.html' %]
+ <label for="form_name">[% loc('Name') %]</label>
[% IF field_errors.name %]
- <div class='form-error'>[% field_errors.name %]</div>
+ <p class='form-error'>[% field_errors.name %]</p>
[% END %]
+ <input type="text"
+ [%- IF c.cobrand.moniker.match('fixmystreet|bromley') AND problem.bodies_str == '2482' %]class="validName" [% END -%]
+ name="name" id="form_name" value="[% update.name || c.user.name | html %]" placeholder="[% loc('Your name') %]">
- <div>
- <label for="form_name">[% loc('Your name:') %]</label>
- <input type="text" name="name" id="form_name" value="[% update.name || c.user.name | html %]" size="25">
- </div>
-
- <div class="checkbox">
+ <div class="checkbox-group">
<input type="checkbox" name="may_show_name" id="form_may_show_name" value="1"[% ' checked' IF update.anonymous==0 OR (c.cobrand.default_show_name AND update.anonymous=='') %]>
- <label for="form_may_show_name">[% loc('Show my name publicly') %]</label>
- <small>[% loc('(we never show your email)') %]</small>
+ <label class="inline" for="form_may_show_name">[% loc('Show my name publicly') %]</label>
</div>
-
- <div class="checkbox">
+ <div class="checkbox-group">
<input type="checkbox" name="add_alert" id="form_add_alert" value="1"[% ' checked' IF add_alert %]>
<label class="inline" for="form_add_alert">[% loc( 'Alert me to future updates' ) %]</label>
</div>
diff --git a/templates/web/base/report/update.html b/templates/web/base/report/update.html
index a5fd97870..66e698606 100644
--- a/templates/web/base/report/update.html
+++ b/templates/web/base/report/update.html
@@ -1,24 +1,70 @@
+[% moderating = c.user && c.user.has_permission_to('moderate', problem.bodies_str) %]
+
[% IF loop.first %]
-<div id="updates">
- <h2 class="problem-update-list-header">[% loc('Updates') %]</h2>
+<section class="full-width">
+ <h4 class="static-with-rule">[% loc('Updates') %]</h4>
+ <ul class="item-list item-list--updates">
[% END %]
- <div><div class="problem-update"><p><a name="update_[% update.id %]"></a><em>
- [% INCLUDE meta_line %]
- </em></p></div>
-[% IF NOT update.whenanswered %]
-
- [% INCLUDE 'report/photo.html' object=update %]
-
- <div class="update-text">
- [% add_links( update.text ) | html_para %]
-
- [% IF c.cobrand.allow_update_reporting %]
- <p align="right">
- <small><a rel="nofollow" class="unsuitable-problem" href="[% c.uri_for( '/contact', { id => update.problem_id, update_id => update.id } ) %]">[% loc('Offensive? Unsuitable? Tell us') %]</a></small>
- </p>
- [% END %]
- </div>
+ <li class="item-list__item item-list__item--updates">
+ [% IF moderating; original_update = update.moderation_original_data %]
+ <form method="post" action="/moderate/report/[% problem.id %]/update/[% update.id %]">
+ <input type="button" class="btn moderate moderate-display" value="moderate">
+ <div class="moderate-edit">
+ <input type="checkbox" class="hide-document" name="update_hide">
+ <label for="update_hide">Hide update completely?</label>
+ <br />
+ <input type="checkbox" name="update_show_name" [% update.anonymous ? '' : 'checked' %]>
+ <label for="update_show_name">Show name publicly?</label>
+ [% IF update.photo or original_update.photo %]
+ <br />
+ <input type="checkbox" name="update_show_photo" [% update.photo ? 'checked' : '' %]>
+ <label for="update_show_photo">Show Photo?</label>
+ [% END %]
+ </div>
+ [% END %]
+ <div class="item-list__update-wrap">
+ [% IF update.whenanswered %]
+ <div class="item-list__update-text">
+ <p class="meta-2"> [% INCLUDE meta_line %] </p>
+ </div>
+ [% ELSE %]
+ [% INCLUDE 'report/photo.html' object=update %]
+ <div class="item-list__update-text">
+ <div class="moderate-display">
+ [% add_links( update.text ) | html_para %]
+ </div>
+ [% IF moderating %]
+ <div class="moderate-edit">
+ [% IF update.text != original.detail %]
+ <input type="checkbox" name="update_revert_detail" class="revert-textarea">
+ <label for="update_revert_detail">Revert to original</label>
+ [% END %]
+ <textarea name="update_detail">[% add_links( update.text ) %]</textarea>
+ </div>
+ [% END %]
+ <p class="meta-2">
+ <a name="update_[% update.id %]"></a>
+ [% INCLUDE meta_line %]
+ [% mlog = update.latest_moderation_log_entry(); IF mlog %]
+ <br /> Moderated by [% mlog.user.from_body.name %] at [% prettify_dt(mlog.whenedited) %]
+ [% END %]
+ </p>
+ </div>
+ [% END %]
+ </div>
+ [% IF moderating %]
+ <div class="moderate-edit">
+ <label for="moderation_reason">Moderation reason:</label>
+ <input type="text" name="moderation_reason"
+ placeholder="Describe why you are moderating this">
+ <input type="submit" class="red-btn" value="moderate it">
+ <input type="button" class="btn cancel" value="cancel">
+ </div>
+ </form>
+ [% END %]
+ </li>
+[% IF loop.last %]
+ </ul>
+</section>
[% END %]
- </div>
-[% '</div>' IF loop.last %]
diff --git a/templates/web/base/report/updates-sidebar-notes.html b/templates/web/base/report/updates-sidebar-notes.html
new file mode 100644
index 000000000..1426e4d71
--- /dev/null
+++ b/templates/web/base/report/updates-sidebar-notes.html
@@ -0,0 +1,4 @@
+<p>
+ [% loc( 'Please note that updates are not sent to the council.' ) %]
+ [% loc( 'Your information will only be used in accordance with our <a href="/privacy">privacy policy</a>' ) %]
+</p>
diff --git a/templates/web/bromley/report/banner.html b/templates/web/bromley/report/banner.html
new file mode 100644
index 000000000..ef9379f52
--- /dev/null
+++ b/templates/web/bromley/report/banner.html
@@ -0,0 +1,15 @@
+[% USE date %]
+
+[% BLOCK banner %]
+ <div class="banner">
+ <p id="[% id %]">[% text %]</p>
+ </div>
+[% END %]
+
+[% IF problem.is_fixed %]
+ [% INCLUDE banner, id = 'fixed', text = loc('Fixed') %]
+[% END %]
+
+[% IF problem.is_closed %]
+ [% INCLUDE banner, id = 'closed', text = loc('Closed') %]
+[% END %]
diff --git a/templates/web/fixamingata/report/updates-sidebar-notes.html b/templates/web/fixamingata/report/updates-sidebar-notes.html
new file mode 100644
index 000000000..bb75bd1f1
--- /dev/null
+++ b/templates/web/fixamingata/report/updates-sidebar-notes.html
@@ -0,0 +1 @@
+<p>[% loc( 'Your information will only be used in accordance with our <a href="/privacy">privacy policy</a>' ) %]</p>
diff --git a/templates/web/fixmystreet.com/report/banner.html b/templates/web/fixmystreet.com/report/banner.html
new file mode 100644
index 000000000..35d7be179
--- /dev/null
+++ b/templates/web/fixmystreet.com/report/banner.html
@@ -0,0 +1,28 @@
+[% USE date %]
+
+[% BLOCK banner %]
+ <div class="banner">
+ <p id="[% id %]">[% text %]</p>
+ </div>
+[% END %]
+
+[% IF problem.is_fixed %]
+ [% INCLUDE banner, id = 'fixed', text = loc('Fixed') %]
+[% END %]
+
+[% IF problem.is_closed %]
+ [% INCLUDE banner, id = 'closed', text = loc('Closed') %]
+[% END %]
+
+[% IF NOT problem.bodies_str == '2482' %]
+
+ [% IF problem.is_open AND date.now - problem.lastupdate.epoch > 8 * 7 * 24 * 60 * 60 %]
+ [% INCLUDE banner, id = 'unknown', text = loc('Unknown') %]
+ [% END %]
+
+ [% states = [ 'investigating', 'in progress', 'planned', 'action scheduled' ];
+ IF states.grep(problem.state).size %]
+ [% INCLUDE banner, id = 'progress', text = loc('In progress') %]
+ [% END %]
+
+[% END %]
diff --git a/templates/web/fixmystreet.com/report/updates-sidebar-notes.html b/templates/web/fixmystreet.com/report/updates-sidebar-notes.html
new file mode 100644
index 000000000..276ab4106
--- /dev/null
+++ b/templates/web/fixmystreet.com/report/updates-sidebar-notes.html
@@ -0,0 +1,6 @@
+<p>
+ [% IF problem.send_method_used != 'Open311' OR ( NOT problem.bodies_str.match('2482|2347') ) %]
+ [% loc( 'Please note that updates are not sent to the council.' ) %]
+ [% END %]
+ [% loc( 'Your information will only be used in accordance with our <a href="/privacy">privacy policy</a>' ) %]
+</p>
diff --git a/templates/web/fixmystreet/report/banner.html b/templates/web/fixmystreet/report/banner.html
deleted file mode 100644
index 83c780958..000000000
--- a/templates/web/fixmystreet/report/banner.html
+++ /dev/null
@@ -1,21 +0,0 @@
-[% USE date %]
-[% BLOCK banner %]
- <div class="banner">
- <p id="[% id %]">[% text %]</p>
- </div>
-[% END %]
-
-[% IF c.cobrand.moniker != 'bromley' AND problem.bodies_str != '2482' AND problem.is_open AND date.now - problem.lastupdate.epoch > 8 * 7 * 24 * 60 * 60 %]
- [% INCLUDE banner, id = 'unknown', text = loc('Unknown') %]
-[% END %]
-[% IF problem.is_fixed %]
- [% INCLUDE banner, id = 'fixed', text = loc('Fixed') %]
-[% END %]
-[% IF problem.is_closed %]
- [% INCLUDE banner, id = 'closed', text = loc('Closed') %]
-[% END %]
-[% states = [ 'investigating', 'in progress', 'planned', 'action scheduled' ];
- IF c.cobrand.moniker != 'bromley' AND problem.bodies_str != '2482' && states.grep(problem.state).size %]
- [% INCLUDE banner, id = 'progress', text = loc('In progress') %]
-[% END %]
-
diff --git a/templates/web/fixmystreet/report/display.html b/templates/web/fixmystreet/report/display.html
deleted file mode 100644
index 5f499dd6e..000000000
--- a/templates/web/fixmystreet/report/display.html
+++ /dev/null
@@ -1,78 +0,0 @@
-[%
- SET bodyclass = 'mappage';
- PROCESS "report/photo-js.html";
- PROCESS "maps/${map.type}.html";
-
- problem_title = problem.title_safe _ ' - ' _ loc('Viewing a problem');
- INCLUDE 'header.html'
- title = problem_title
- rss = [ tprintf(loc('Updates to this problem, %s', "%s is the site name"), site_name), "/rss/$problem.id" ]
- robots = 'index, nofollow';
-%]
-
-[% map_html %]
-</div>
-
-[% IF login_success %]
- <p class='form-success'>[% loc('You have successfully signed in; please check and confirm your details are accurate:') %]</p>
-[% END %]
-
-[% INCLUDE 'report/banner.html' %]
-
-[% INCLUDE 'report/_main.html' %]
-[% TRY %][% INCLUDE 'report/_message_manager.html' %][% CATCH file %][% END %]
-
-<div class="shadow-wrap">
- <ul id="key-tools">
- [% IF c.user_exists AND c.cobrand.users_can_hide AND c.user.belongs_to_body( c.cobrand.council_id ) %]
- <li><form method="post" action="/report/delete/[% problem.id %]" id="remove-from-site-form">
- <input type="submit" id="key-tool-report-abuse" class="abuse" value="Remove from site">
- </form></li>
- [% ELSIF c.cobrand.moniker != 'zurich' %]
- <li><a rel="nofollow" id="key-tool-report-abuse" class="abuse" href="[% c.uri_for( '/contact', { id => problem.id } ) %]">[% loc('Report abuse' ) %]</a></li>
- [% END %]
- [% IF c.cobrand.moniker != 'zurich' %]
- <li><a rel="nofollow" id="key-tool-report-updates" class="feed" href="[% c.uri_for( '/alert/subscribe', { id => problem.id } ) %]">[% loc('Get updates' ) %]</a></li>
- [% END %]
- [% IF c.cobrand.moniker == 'fixmystreet' %]
- <li><a rel="nofollow" id="key-tool-report-share" class="share" href="#report-share">[% loc('Share') %]</a></li>
- [% END %]
- [% IF c.cobrand.moniker == 'zurich' %]
- <li><a class="chevron" id="key-tool-problems-nearby" href="[% c.uri_for( '/around', { lat => latitude, lon => longitude } ) %]">[% loc( 'Problems on the map' ) %]</a></li>
- [% ELSE %]
- <li><a class="chevron" id="key-tool-problems-nearby" href="[% c.uri_for( '/around', { lat => latitude, lon => longitude } ) %]">[% loc( 'Problems nearby' ) %]</a></li>
- [% END %]
- </ul>
-
-[% IF c.cobrand.moniker == 'fixmystreet' %]
- <div id="report-share" class="hidden-js" align="center">
- <a href="https://twitter.com/share" class="twitter-share-button" data-text="I just reported &lsquo;[% problem.title_safe | html %]&rsquo;" data-via="fixmystreet" data-related="mysociety" data-count="none" data-dnt="true">Tweet</a>
-<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
- <iframe src="//www.facebook.com/plugins/like.php?href=[% c.req.uri | uri %]&amp;send=false&amp;layout=button_count&amp;width=90&amp;show_faces=false&amp;action=like&amp;colorscheme=light&amp;font&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:90px; height:21px;" allowTransparency="true"></iframe>
- </div>
-[% END %]
-
-<div id="report-updates-data" class="hidden-js">
- <form action="[% c.uri_for( '/alert/subscribe' ) %]" method="post">
- <a href="[% c.uri_for( '/rss', problem.id ) %]">
- <img src="/i/feed.png" width="16" height="16" title="[% loc('RSS feed') %]" alt="[% loc('RSS feed of updates to this problem' ) %]" border="0">
- </a>
- <p>[% loc('Receive email when updates are left on this problem.' ) %]</p>
- <fieldset>
- <label class="hidden n" for="alert_rznvy">[% loc('Your email') %]</label>
- <div class="form-txt-submit-box">
- <input type="email" name="rznvy" id="alert_rznvy" value="[% email | html %]" size="30" placeholder="[% loc('Your email') %]">
- <input class="green-btn" type="submit" value="[% loc('Subscribe') %]">
- </div>
- <input type="hidden" name="id" value="[% problem.id %]">
- <input type="hidden" name="type" value="updates">
- </fieldset>
- </form>
-</div>
-
-</div>
-
-[% TRY %][% INCLUDE 'report/sharing.html' %][% CATCH file %][% END %]
-[% INCLUDE 'report/updates.html' %]
-[% INCLUDE 'report/update-form.html' %]
-[% INCLUDE 'footer.html' %]
diff --git a/templates/web/fixmystreet/report/update-form.html b/templates/web/fixmystreet/report/update-form.html
deleted file mode 100644
index a69b793b7..000000000
--- a/templates/web/fixmystreet/report/update-form.html
+++ /dev/null
@@ -1,152 +0,0 @@
-[% allow_creation = !c.cobrand.only_authed_can_create || (c.user && c.user.from_body) %]
-[% IF allow_creation %]
-<div id="update_form">
- <h2>[% loc( 'Provide an update') %]</h2>
-
- [% IF c.cobrand.moniker != 'emptyhomes' AND c.cobrand.moniker != 'stevenage' %]
- <div class="general-notes">
- [% INCLUDE 'report/updates-sidebar-notes.html' %]
- </div>
- [% END %]
-
- [% INCLUDE 'errors.html' %]
-
- <form method="post" action="[% c.uri_for( '/report/update' ) %]" id="form_update_form" name="updateForm" class="validate"[% IF c.cobrand.allow_photo_upload %] enctype="multipart/form-data"[% END %]>
- <fieldset>
- <input type="hidden" name="submit_update" value="1">
- <input type="hidden" name="id" value="[% problem.id | html %]">
-
- <label for="form_update">[% loc( 'Update' ) %]</label>
- [% IF field_errors.update %]
- <div class='form-error'>[% field_errors.update %]</div>
- [% END %]
- <textarea rows="7" cols="30" name="update" id="form_update" placeholder="[% loc('Please write your update here') %]" required>[% update.text | html %]</textarea>
-
- [% IF c.user && c.user.belongs_to_body( problem.bodies_str ) %]
- <label for="form_state">[% loc( 'State' ) %]</label>
- <select name="state" id="form_state">
- [% FOREACH state IN [ ['confirmed', loc('Open')], ['investigating',
- loc('Investigating')], ['action scheduled', loc('Action Scheduled')],
- ['in progress', loc('In Progress')], ['duplicate', loc('Duplicate')],
- ['unable to fix', loc('Unable to fix')], ['not responsible', loc('Not Responsible')],
- ['fixed', loc('Fixed')] ] %]
- <option [% 'selected ' IF state.0 == problem.state %] value="[% state.0 %]">[% state.1 %]</option>
- [% END %]
- </select>
- [% ELSE %]
- [% IF problem.is_fixed AND ((c.user_exists AND c.user.id == problem.user_id) OR alert_to_reporter) %]
-
- <input type="checkbox" name="reopen" id="form_reopen" value="1"[% ' checked' IF update.mark_open %]>
- <label class="inline" for="form_reopen">[% loc('This problem has not been fixed') %]</label>
-
- [% ELSIF !problem.is_fixed %]
-
- <div class="checkbox-group">
- <input type="checkbox" name="fixed" id="form_fixed" value="1"[% ' checked' IF update.mark_fixed %]>
- <label class="inline" for="form_fixed">[% loc('This problem has been fixed') %]</label>
- </div>
-
- [% END %]
- [% END %]
-
- [% IF c.cobrand.allow_photo_upload %]
- <div id="fileupload_normalUI">
- [% IF upload_fileid %]
- <img align="right" src="/photo/[% upload_fileid %].temp.jpeg" alt="">
- <p>[% loc('You have already attached a photo to this update, attaching another one will replace it.') %]</p>
- <input type="hidden" name="upload_fileid" value="[% upload_fileid %]">
- [% END %]
- <label for="form_photo">[% loc('Photo') %]</label>
- [% IF field_errors.photo %]
- <p class='form-error'>[% field_errors.photo %]</p>
- [% END %]
- <input type="file" name="photo" id="form_photo">
- </div>
- [% END %]
-
- [% IF c.user_exists %]
-
- [% INCLUDE name %]
-
- <input class="final-submit green-btn" type="submit" id="update_post" value="[% loc('Post') %]">
-
-
- [% ELSE %]
-
- <label for="form_rznvy">[% loc('Your email' ) %]
- <span class="muted">([% loc('We never show your email') %])</span>
- </label>
- [% IF field_errors.email %]
- <p class='form-error'>[% field_errors.email %]</p>
- [% END %]
- <input type="email" name="rznvy" id="form_rznvy" value="[% update.user.email | html %]" placeholder="[% loc('Your email address' ) %]" required>
-
- <div id="form_sign_in">
- <h3>[% loc("Now to submit your update&hellip;") %]</h3>
- <h2>[% tprintf(loc("Do you have a %s password?", "%s is the site name"), site_name) %]</h2>
-
- <div id="form_sign_in_yes" class="form-box">
- <h5>[% loc('<strong>Yes</strong> I have a password') %]</h5>
-
- <label class="hidden-js n" for="password_sign_in">[% loc('Yes I have a password') %]</label>
- [% IF field_errors.password %]
- <p class='form-error'>[% field_errors.password %]</p>
- [% END %]
- <div class="form-txt-submit-box">
- <input type="password" name="password_sign_in" id="password_sign_in" value="" placeholder="[% loc('Your password') %]">
- <input class="green-btn" type="submit" name="submit_sign_in" id="submit_sign_in" value="[% loc('Post') %]">
- </div>
-
- <div class="checkbox-group">
- <input type="checkbox" id="remember_me" name="remember_me" value='1'[% ' checked' IF remember_me %]>
- <label class="inline n" for="remember_me">[% loc('Keep me signed in on this computer') %]</label>
- </div>
-
- <div class="general-notes">
- <p><strong>[% loc('Forgotten your password?') %]</strong>
- [% loc('Confirm by email below, providing a new password at that point. When you confirm, your password will be updated.') %]</p>
- </div>
-
- </div>
- <div id="form_sign_in_no" class="form-box">
- <h5>[% loc('<strong>No</strong> Let me confirm my update by email') %]</h5>
-
- [% INCLUDE name %]
-
- <label for="password_register">[% loc('Password (optional)') %]</label>
-
- <div class="general-notes">
- <p>[% loc('Providing a password is optional, but doing so will allow you to more easily report problems, leave updates and manage your reports.') %]</p>
- </div>
-
- <div class="form-txt-submit-box">
- <input type="password" name="password_register" id="password_register" value="" placeholder="[% loc('Enter a password') %]">
- <input class="green-btn" type="submit" name="submit_register" id="submit_register" value="[% loc('Post') %]">
- </div>
-
- </div>
- </div>
-
- [% END %]
- </fieldset>
- </form>
-</div>
-[% END %]
-
-[% BLOCK name %]
- [% INCLUDE 'report/new/extra_name.html' %]
- <label for="form_name">[% loc('Name') %]</label>
- [% IF field_errors.name %]
- <p class='form-error'>[% field_errors.name %]</p>
- [% END %]
- <input type="text" [% IF problem.bodies_str == '2482' %]class="validName" [% END %]name="name" id="form_name" value="[% update.name || c.user.name | html %]" placeholder="[% loc('Your name') %]">
-
- <div class="checkbox-group">
- <input type="checkbox" name="may_show_name" id="form_may_show_name" value="1"[% ' checked' IF update.anonymous==0 OR (c.cobrand.default_show_name AND update.anonymous=='') %]>
- <label class="inline" for="form_may_show_name">[% loc('Show my name publicly') %]</label>
- </div>
- <div class="checkbox-group">
- <input type="checkbox" name="add_alert" id="form_add_alert" value="1"[% ' checked' IF add_alert %]>
- <label class="inline" for="form_add_alert">[% loc( 'Alert me to future updates' ) %]</label>
- </div>
-[% END %]
diff --git a/templates/web/fixmystreet/report/update.html b/templates/web/fixmystreet/report/update.html
deleted file mode 100644
index 66e698606..000000000
--- a/templates/web/fixmystreet/report/update.html
+++ /dev/null
@@ -1,70 +0,0 @@
-[% moderating = c.user && c.user.has_permission_to('moderate', problem.bodies_str) %]
-
-[% IF loop.first %]
-<section class="full-width">
- <h4 class="static-with-rule">[% loc('Updates') %]</h4>
- <ul class="item-list item-list--updates">
-[% END %]
- <li class="item-list__item item-list__item--updates">
- [% IF moderating; original_update = update.moderation_original_data %]
- <form method="post" action="/moderate/report/[% problem.id %]/update/[% update.id %]">
- <input type="button" class="btn moderate moderate-display" value="moderate">
- <div class="moderate-edit">
- <input type="checkbox" class="hide-document" name="update_hide">
- <label for="update_hide">Hide update completely?</label>
- <br />
- <input type="checkbox" name="update_show_name" [% update.anonymous ? '' : 'checked' %]>
- <label for="update_show_name">Show name publicly?</label>
- [% IF update.photo or original_update.photo %]
- <br />
- <input type="checkbox" name="update_show_photo" [% update.photo ? 'checked' : '' %]>
- <label for="update_show_photo">Show Photo?</label>
- [% END %]
- </div>
- [% END %]
- <div class="item-list__update-wrap">
- [% IF update.whenanswered %]
- <div class="item-list__update-text">
- <p class="meta-2"> [% INCLUDE meta_line %] </p>
- </div>
- [% ELSE %]
- [% INCLUDE 'report/photo.html' object=update %]
- <div class="item-list__update-text">
- <div class="moderate-display">
- [% add_links( update.text ) | html_para %]
- </div>
- [% IF moderating %]
- <div class="moderate-edit">
- [% IF update.text != original.detail %]
- <input type="checkbox" name="update_revert_detail" class="revert-textarea">
- <label for="update_revert_detail">Revert to original</label>
- [% END %]
- <textarea name="update_detail">[% add_links( update.text ) %]</textarea>
- </div>
- [% END %]
-
- <p class="meta-2">
- <a name="update_[% update.id %]"></a>
- [% INCLUDE meta_line %]
- [% mlog = update.latest_moderation_log_entry(); IF mlog %]
- <br /> Moderated by [% mlog.user.from_body.name %] at [% prettify_dt(mlog.whenedited) %]
- [% END %]
- </p>
- </div>
- [% END %]
- </div>
- [% IF moderating %]
- <div class="moderate-edit">
- <label for="moderation_reason">Moderation reason:</label>
- <input type="text" name="moderation_reason"
- placeholder="Describe why you are moderating this">
- <input type="submit" class="red-btn" value="moderate it">
- <input type="button" class="btn cancel" value="cancel">
- </div>
- </form>
- [% END %]
- </li>
-[% IF loop.last %]
- </ul>
-</section>
-[% END %]
diff --git a/templates/web/fixmystreet/report/updates-sidebar-notes.html b/templates/web/fixmystreet/report/updates-sidebar-notes.html
deleted file mode 100644
index 9f2420392..000000000
--- a/templates/web/fixmystreet/report/updates-sidebar-notes.html
+++ /dev/null
@@ -1,7 +0,0 @@
- <p>
- [% IF c.cobrand.moniker != 'fixamingata' %]
- [% IF problem.send_method_used != 'Open311' OR c.cobrand.moniker != 'fixmystreet' OR ( problem.bodies_str != '2482' AND !problem.bodies_str.match('2347') ) %]
- [% loc( 'Please note that updates are not sent to the council.' ) %]
- [% END %]
- [% END %]
- [% loc( 'Your information will only be used in accordance with our <a href="/privacy">privacy policy</a>' ) %]</p>