aboutsummaryrefslogtreecommitdiffstats
path: root/templates/web/seesomething
diff options
context:
space:
mode:
Diffstat (limited to 'templates/web/seesomething')
-rw-r--r--templates/web/seesomething/admin/footer.html7
-rw-r--r--templates/web/seesomething/admin/header.html2
-rw-r--r--templates/web/seesomething/admin/stats.html63
-rw-r--r--templates/web/seesomething/around/around_index.html24
-rw-r--r--templates/web/seesomething/around/display_location.html49
-rw-r--r--templates/web/seesomething/around/postcode_form.html17
-rw-r--r--templates/web/seesomething/auth/general.html46
-rw-r--r--templates/web/seesomething/auth/sign_out.html7
-rw-r--r--templates/web/seesomething/footer.html22
-rw-r--r--templates/web/seesomething/front/stats.html0
-rw-r--r--templates/web/seesomething/front/tips.html3
-rw-r--r--templates/web/seesomething/index.html43
-rw-r--r--templates/web/seesomething/js/translation_strings.html15
-rw-r--r--templates/web/seesomething/js/validation_rules.html13
-rw-r--r--templates/web/seesomething/report/display.html9
-rw-r--r--templates/web/seesomething/report/new/category.html14
-rw-r--r--templates/web/seesomething/report/new/fill_in_details_form.html104
-rw-r--r--templates/web/seesomething/report_created.html29
-rw-r--r--templates/web/seesomething/set_body_class.html1
19 files changed, 468 insertions, 0 deletions
diff --git a/templates/web/seesomething/admin/footer.html b/templates/web/seesomething/admin/footer.html
new file mode 100644
index 000000000..bdd42e2e4
--- /dev/null
+++ b/templates/web/seesomething/admin/footer.html
@@ -0,0 +1,7 @@
+ </div><!-- .content role=main -->
+ </div><!-- .container -->
+ </div><!-- .table-cell -->
+<!-- [% INCLUDE 'debug_footer.html' %] -->
+ </div> <!-- .wrapper -->
+</body>
+</html>
diff --git a/templates/web/seesomething/admin/header.html b/templates/web/seesomething/admin/header.html
new file mode 100644
index 000000000..40bea25bf
--- /dev/null
+++ b/templates/web/seesomething/admin/header.html
@@ -0,0 +1,2 @@
+[% INCLUDE 'header.html' admin = 1, bodyclass = 'admin fullwidthpage' %]
+ <h1>[% title %]</h1>
diff --git a/templates/web/seesomething/admin/stats.html b/templates/web/seesomething/admin/stats.html
new file mode 100644
index 000000000..713c3fb6d
--- /dev/null
+++ b/templates/web/seesomething/admin/stats.html
@@ -0,0 +1,63 @@
+[% INCLUDE 'admin/header.html' title=loc('Reports') %]
+[% PROCESS 'admin/report_blocks.html' %]
+
+[% BLOCK options %]
+ [% FOR option IN option_list %]
+ <option value="[% option %]"[% ' selected' IF selected == option %]>[% option %]</opytion>
+ [% END %]
+[% END %]
+
+<form method="post" action="[% c.uri_for('stats') %]" enctype="application/x-www-form-urlencoded" accept-charset="utf-8" id="filter-form">
+ <label for="form_category">Transport Type: </label>
+ <select name="category" id="form_category">
+ <option value="">Select</option>
+ [% PROCESS options, option_list = [ 'Bus', 'Metro', 'Train' ], selected = category %]
+ </select>
+
+ <label for="form_subcategory">Incident Type: </label>
+ <select name="subcategory" id="form_subcategory">
+ <option value="">Select</option>
+ [% PROCESS options, option_list = ['Smoking', 'Drugs', 'Anti-social Behaviour', 'Loud Music', 'Damage', 'Feet on Seats', 'Other'], selected = subcategory %]
+ </select>
+
+ <label for="form_service">Device: </label>
+ <select name="service" id="form_service">
+ <option value="">Select</option>
+ [% PROCESS options, option_list = [ 'Android', 'iPhone' ], selected = service %]
+ </select>
+
+ <input type="submit" name="getcounts" size="30" id="getcounts" value="Look Up" />
+</form>
+
+[% IF pager.total_entries == 0 %]
+<p align="center">
+No Results found
+</p>
+[% ELSE %]
+<table class="admin-report">
+ <thead>
+ <tr>
+ <th>Device</th>
+ <th>Transport Category</th>
+ <th>Incident Category</th>
+ <th>Area</th>
+ <th>Submitted</th>
+ </tr>
+ </thead>
+ <tbody>
+ [%- WHILE (report = reports.next) %]
+ <tr>
+ <td>[% report.service || 'Other' %]</td>
+ <td>[% report.category %]</td>
+ <td class="nowrap">[% report.subcategory %]</td>
+ <td class="nowrap">[% council_details.${report.council}.name %]</td>
+ <td class="nowrap">[% PROCESS format_time time=report.confirmed %]</td>
+ </tr>
+ [%- END %]
+ </tbody>
+</table>
+[% END %]
+
+[% INCLUDE 'pagination.html', param = 'p' %]
+
+[% INCLUDE 'admin/footer.html' %]
diff --git a/templates/web/seesomething/around/around_index.html b/templates/web/seesomething/around/around_index.html
new file mode 100644
index 000000000..a143e90a2
--- /dev/null
+++ b/templates/web/seesomething/around/around_index.html
@@ -0,0 +1,24 @@
+[% INCLUDE 'header.html', title => loc('Reporting a problem'), bodyclass = 'mappage' %]
+
+<form action="[% c.uri_for('/around') %]" method="get" name="mapForm" id="mapForm">
+ <div id="side-form">
+ <div id="report-a-problem-main">
+ [% INCLUDE 'around/postcode_form.html' %]
+
+ [% IF location_error %]
+ <p class="error">[% location_error %]</p>
+ [% END %]
+
+ [% IF possible_location_matches %]
+ <p>[% loc('We found more than one match for that location. We show up to ten matches, please try a different search if yours is not here.') %]</p>
+ <ul class="pc_alternatives">
+ [% FOREACH match IN possible_location_matches %]
+ <li><a href="/around?latitude=[% match.latitude | uri %];longitude=[% match.longitude | uri %]">[% match.address | html %]</a></li>
+ [% END %]
+ </ul>
+ [% END %]
+ </div>
+ </div>
+</form>
+
+[% INCLUDE 'footer.html' %]
diff --git a/templates/web/seesomething/around/display_location.html b/templates/web/seesomething/around/display_location.html
new file mode 100644
index 000000000..e90d1aa0e
--- /dev/null
+++ b/templates/web/seesomething/around/display_location.html
@@ -0,0 +1,49 @@
+[%
+
+ url_skip = c.uri_for(
+ '/report/new',
+ {
+ pc => pc
+ latitude => short_latitude,
+ longitude => short_longitude,
+ skipped => 1,
+ }
+ );
+
+ PROCESS "maps/${map.type}.html";
+
+ INCLUDE 'header.html',
+ title => loc('Viewing a location')
+ bodyclass => 'mappage',
+ robots => 'noindex,nofollow';
+
+%]
+
+<form action="[% c.uri_for('/report/new') %]" method="post" name="mapForm" id="mapForm" enctype="multipart/form-data" class="validate">
+ [% IF c.req.params.map_override %]
+ <input type="hidden" name="map_override" value="[% c.req.params.map_override | html %]">
+ [% END %]
+ <input type="hidden" name="pc" value="[% pc | html %]">
+
+ <input type="hidden" name="latitude" id="fixmystreet.latitude" value="[% short_latitude | html %]">
+ <input type="hidden" name="longitude" id="fixmystreet.longitude" value="[% short_longitude | html %]">
+
+ [% map_html %]
+
+ </div>
+
+ <div id="side">
+ [% INCLUDE 'around/_report_banner.html' %]
+ </div>
+
+ <div style="display:none" id="side-form">
+ [% INCLUDE "report/new/fill_in_details_form.html"
+ js = 1,
+ report.used_map = 1
+ report.name = c.user.name
+ %]
+ </div>
+
+</form>
+
+[% INCLUDE 'footer.html' %]
diff --git a/templates/web/seesomething/around/postcode_form.html b/templates/web/seesomething/around/postcode_form.html
new file mode 100644
index 000000000..56fcdca97
--- /dev/null
+++ b/templates/web/seesomething/around/postcode_form.html
@@ -0,0 +1,17 @@
+<div id="front-main">
+ <div id="front-main-container">
+ [%
+ question = c.cobrand.enter_postcode_text || loc('Enter a nearby street name and area');
+ %]
+
+ <label for="pc">[% question %]:</label>
+ <div>
+ <input type="text" name="pc" value="[% pc | html %]" id="pc" size="10" maxlength="200" placeholder="[% tprintf(loc('e.g. ‘%s’ or ‘%s’'), c.cobrand.example_places) %]">
+ <input type="submit" value="[% loc('Go') %]" id="submit">
+ </div>
+
+ [% IF partial_token %]
+ <input type="hidden" name="partial" value="[% partial_token.token %]">
+ [% END %]
+ </div>
+</div>
diff --git a/templates/web/seesomething/auth/general.html b/templates/web/seesomething/auth/general.html
new file mode 100644
index 000000000..4fe2829d3
--- /dev/null
+++ b/templates/web/seesomething/auth/general.html
@@ -0,0 +1,46 @@
+[% INCLUDE 'header.html', title = loc('Sign in or create an account') %]
+
+<h1>[% loc('Sign in') %]</h1>
+
+<form action="[% c.uri_for() %]" method="post" name="general_auth" class="validate">
+ <fieldset>
+ <input type="hidden" name="r" value="[% c.req.params.r | html %]">
+
+ [% IF email_error;
+
+ # other keys include fqdn, mxcheck if you'd like to write a custom error message
+
+ errors = {
+ missing => loc('Please enter your email'),
+ other => loc('Please check your email address is correct')
+ };
+
+ loc_email_error = errors.$email_error || errors.other;
+ END %]
+ <label class="n" for="email">[% loc('Email') %]</label>
+ [% IF loc_email_error %]
+ <div class="form-error">[% loc_email_error %]</div>
+ [% ELSIF sign_in_error %]
+ <div class="form-error">[% loc('There was a problem with your email/password combination. If you cannot remember your password, or do not have one, please fill in the &lsquo;sign in by email&rsquo; section of the form.') %]</div>
+ [% END %]
+ <input type="email" class="required email" id="email" name="email" value="[% email | html %]" placeholder="[% loc('Your email address') %]">
+
+ <div class="form-txt-submit-box">
+ <label class="n" for="password_sign_in">Password</label>
+ <input type="password" name="password_sign_in" id="password_sign_in" value="" placeholder="[% loc('Your password') %]">
+ </div>
+
+ <div class="form-txt-submit-box">
+ <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="form-txt-submit-box">
+ <input class="green-btn" type="submit" name="sign_in" value="[% loc('Sign in') %]">
+ </div>
+
+ </fieldset>
+</form>
+
+
+[% INCLUDE 'footer.html' %]
diff --git a/templates/web/seesomething/auth/sign_out.html b/templates/web/seesomething/auth/sign_out.html
new file mode 100644
index 000000000..ef1d11b58
--- /dev/null
+++ b/templates/web/seesomething/auth/sign_out.html
@@ -0,0 +1,7 @@
+[% INCLUDE 'header.html', title = loc('Sign out'), bodyclass = 'fullwidthpage' %]
+
+<h1>[% loc('You have been signed out') %]</h1>
+
+<p>Please feel free to <a href="[% c.uri_for('/auth', { r => 'admin/stats' } ) %]">sign in again</a></p>
+
+[% INCLUDE 'footer.html' %]
diff --git a/templates/web/seesomething/footer.html b/templates/web/seesomething/footer.html
new file mode 100644
index 000000000..95297f33d
--- /dev/null
+++ b/templates/web/seesomething/footer.html
@@ -0,0 +1,22 @@
+ </div><!-- .content role=main -->
+ </div><!-- .container -->
+ </div><!-- .table-cell -->
+
+ <div class="nav-wrapper">
+ <div class="nav-wrapper-2">
+ <div id="main-nav" role="navigation">
+
+ <ul id="main-menu">
+ <li><[% IF c.req.uri.path == '/' %]span[% ELSE %]a href="/"[% END %] class="report-a-problem-btn"
+ >[% loc("Report a problem") %]</[% c.req.uri.path == '/' ? 'span' : 'a' %]></li>[%
+ %]<li><[% IF c.req.uri.path == '/faq' %]span[% ELSE %]a href="/faq"[% END
+ %]>[% loc("Help") %]</[% c.req.uri.path == '/faq' ? 'span' : 'a' %]></li>
+ </ul>
+ </div>
+ </div>
+ </div>
+
+<!-- [% INCLUDE 'debug_footer.html' %] -->
+ </div> <!-- .wrapper -->
+</body>
+</html>
diff --git a/templates/web/seesomething/front/stats.html b/templates/web/seesomething/front/stats.html
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/templates/web/seesomething/front/stats.html
diff --git a/templates/web/seesomething/front/tips.html b/templates/web/seesomething/front/tips.html
new file mode 100644
index 000000000..34712656d
--- /dev/null
+++ b/templates/web/seesomething/front/tips.html
@@ -0,0 +1,3 @@
+ <p>
+ If you are unsure about where the incident took place as you where on a moving train or bus then use the location of the start of your journey and mention which bus or train you where on in your report.
+ </p>
diff --git a/templates/web/seesomething/index.html b/templates/web/seesomething/index.html
new file mode 100644
index 000000000..cccd15709
--- /dev/null
+++ b/templates/web/seesomething/index.html
@@ -0,0 +1,43 @@
+[%# Assumes fixmystreet cobrand is using FMS map template - for bonus points preload all the right map elements. %]
+
+[% PROCESS "maps/fms.html" %]
+[% INCLUDE 'header.html', title = '', bodyclass = 'mappage' %]
+
+<form action="[% c.uri_for('/around') %]" method="get" name="mapForm" id="mapForm">
+<script type="text/javascript">
+var fixmystreet = {
+ 'page': '',
+ 'latitude': 52.505241,
+ 'longitude': -1.815285,
+ 'zoom': 3,
+ 'numZoomLevels': 5,
+ 'zoomOffset': 13,
+ 'map_type': ""
+
+}
+</script>
+<div id="map_box">
+ <div id="map"></div>
+ </div>
+
+ <div id="side-form">
+ <div id="report-a-problem-main">
+ [% form = PROCESS 'around/postcode_form.html' %]
+ [% form %]
+
+ [% IF error %]
+ <p class="form-error">[% error %]</p>
+ [% END %]
+
+ <div class="tablewrapper">
+ <div id="front-howto">
+ [% INCLUDE 'index-steps.html' %]
+ </div>
+
+ </div>
+
+ </div>
+ </div>
+</form>
+
+[% INCLUDE 'footer.html' pagefooter = 'yes' %]
diff --git a/templates/web/seesomething/js/translation_strings.html b/templates/web/seesomething/js/translation_strings.html
new file mode 100644
index 000000000..0ae40bf97
--- /dev/null
+++ b/templates/web/seesomething/js/translation_strings.html
@@ -0,0 +1,15 @@
+ translation_strings = {
+ detail: '[% loc('Please enter some details') | replace("'", "\\'") %]',
+ name: {
+ validName: '[% loc('Please enter your full name, councils need this information – if you do not wish your name to be shown on the site, untick the box below') | replace("'", "\\'") %]'
+ },
+ category: '[% loc('Please choose a transport category') | replace("'", "\\'") %]',
+ subcategory: '[% loc('Please choose an incident category') | replace("'", "\\'") %]',
+ rznvy: {
+ required: '[% loc('Please enter your email') | replace("'", "\\'") %]',
+ email: '[% loc('Please enter a valid email') | replace("'", "\\'") %]'
+ },
+ email: {
+ email: '[% loc('Please enter a valid email') | replace("'", "\\'") %]'
+ }
+ };
diff --git a/templates/web/seesomething/js/validation_rules.html b/templates/web/seesomething/js/validation_rules.html
new file mode 100644
index 000000000..cef5fce7e
--- /dev/null
+++ b/templates/web/seesomething/js/validation_rules.html
@@ -0,0 +1,13 @@
+ validation_rules = {
+ detail: { required: true },
+ category: { required: true },
+ subcategory: { required: true }
+ };
+
+ $(function(){
+ $('#submit_noname').click( function(e) {
+ $('#form_category').addClass('required validCategory').removeClass('valid');
+ $('#form_subcategory').addClass('required validCategory').removeClass('valid');
+ });
+ });
+
diff --git a/templates/web/seesomething/report/display.html b/templates/web/seesomething/report/display.html
new file mode 100644
index 000000000..93b0048a2
--- /dev/null
+++ b/templates/web/seesomething/report/display.html
@@ -0,0 +1,9 @@
+[%
+ INCLUDE 'header.html'
+ robots = 'index, nofollow',
+ bobyclass = 'mappage';
+%]
+
+Reports to this site are private
+
+[% INCLUDE 'footer.html' %]
diff --git a/templates/web/seesomething/report/new/category.html b/templates/web/seesomething/report/new/category.html
new file mode 100644
index 000000000..26d750b52
--- /dev/null
+++ b/templates/web/seesomething/report/new/category.html
@@ -0,0 +1,14 @@
+[% FILTER collapse %]
+[% IF category_options.size %]
+ [% IF category;
+ category = category | lower;
+ END; %]
+ <label for='form_category' class="select">[% category_label | html %]</label>
+ <select name='category' data-theme="c" id='form_category'[% ' onchange="form_category_onchange()"' IF category_extras.size %]>
+ [% FOREACH cat_op IN category_options %]
+ [% cat_op_lc = cat_op | lower %]
+ <option value='[% cat_op | html %]'[% ' selected' IF report.category == cat_op || category == cat_op_lc %]>[% cat_op | html %]</option>
+ [% END %]
+ </select>
+[% END %]
+[% END -%]
diff --git a/templates/web/seesomething/report/new/fill_in_details_form.html b/templates/web/seesomething/report/new/fill_in_details_form.html
new file mode 100644
index 000000000..659fadd04
--- /dev/null
+++ b/templates/web/seesomething/report/new/fill_in_details_form.html
@@ -0,0 +1,104 @@
+<div id="report-a-problem-main">
+ <p>Click and drag on the map to reposition the pin.</p>
+ <h1>[% loc('Reporting a problem') %]</h1>
+
+
+ [% INCLUDE 'errors.html' %]
+ <fieldset>
+ <div id="problem_form">
+
+ [% INCLUDE 'report/new/form_heading.html' %]
+
+ [% IF field_errors.council %]
+ <p class='form-error'>[% field_errors.council %]</p>
+ [% END %]
+
+ <label for="form_detail">[% loc('Details') %]</label>
+ [% IF field_errors.detail %]
+ <p class='form-error'>[% field_errors.detail %]</p>
+ [% END %]
+ <textarea rows="7" cols="26" name="detail" id="form_detail" placeholder="[% loc('Please fill in details of the problem.') %]" required>[% report.detail | html %]</textarea>
+
+ [% IF js %]
+ <div id="form_category_row">
+ <label for="form_category">[% loc('Transport Category') %]</label>
+ <select name="category" id="form_category" required><option>[% loc('Loading...') %]</option></select>
+ </div>
+ [% ELSE %]
+ [% IF category_options.size %]
+ [% IF field_errors.category %]
+ <p class='form-error'>[% field_errors.category %]</p>
+ [% END %]
+
+ [% PROCESS "report/new/category.html" %]
+ [% END %]
+ [% END %]
+
+ <div id="form_subcategory_row">
+ <label for="form_subcategory">[% loc('Incident Category') %]</label>
+ <select name="subcategory" id="form_subcategory" required>
+ <option value="">-- Pick a category --</option>
+ <option value="Smoking/other drugs">Smoking/other drugs</option>
+ <option value="Drugs">Drugs</option>
+ <option value="Anti-social behaviour">Anti-social behaviour</option>
+ <option value="Loud music">Loud music</option>
+ <option value="Damage">Damage</option>
+ <option value="Feet on seats">Feet on seats</option>
+ <option value="Other">Other</option>
+ </select>
+ </div>
+
+ [% IF c.cobrand.allow_photo_upload %]
+ <label for="form_photo">[% loc('Photo') %]</label>
+ [% IF upload_fileid || report.photo %]
+ [% IF upload_fileid %]
+ <img align="right" src="/photo/[% upload_fileid %].temp.jpeg" alt="">
+ <input type="hidden" name="upload_fileid" value="[% upload_fileid %]">
+ [% END %]
+
+ <p>[% loc('You have already attached a photo to this report, attaching another one will replace it.') %]</p>
+
+ [% IF report.photo %]
+ <img align="right" src="/photo/[% report.id %].jpeg">
+ [% END %]
+ [% END %]
+
+ [% IF field_errors.photo %]
+ <p class='form-error'>[% field_errors.photo %]</p>
+ [% END %]
+ <input type="file" name="photo" id="form_photo">
+ [% END %]
+
+ <h2>Personal Details:</h2>
+
+ <label for="form_name">[% loc('Name (optional)') %]</label>
+ [% IF field_errors.name %]
+ <p class='form-error'>[% field_errors.name %]</p>
+ [% END %]
+
+ <input type="text" class="form-focus-trigger validName" value="[% report.name | html %]" name="name" id="form_name" placeholder="[% loc('Your name') %]">
+
+ <label for="form_email">[% loc('Your email (optional)') %]</label>
+ [% IF field_errors.email %]
+ <p class='form-error'>[% field_errors.email %]</p>
+ [% END %]
+ <input type="email" value="[% report.user.email | html %]" name="email" id="form_email" placeholder="[% loc('Please enter your email address') %]">
+
+
+
+ <label class="" for="form_phone">[% loc('Phone number (optional)') %]</label>
+ <input class="" type="text" value="[% report.user.phone | html %]" name="phone" id="form_phone" placeholder="[% loc('Your phone number') %]">
+
+ <div class="form-txt-submit-box ">
+ <input class="green-btn" type="submit" id="submit_noname" name="submit_noname" value="[% loc('Submit') %]">
+ </div>
+
+ </div>
+ </fieldset>
+
+ [% IF partial_token %]
+ <input type="hidden" name="partial" value="[% partial_token.token %]">
+ [% END %]
+
+ <input type="hidden" name="submit_problem" value="1">
+</div>
diff --git a/templates/web/seesomething/report_created.html b/templates/web/seesomething/report_created.html
new file mode 100644
index 000000000..4a11d14b4
--- /dev/null
+++ b/templates/web/seesomething/report_created.html
@@ -0,0 +1,29 @@
+[%
+
+ IF report.used_map;
+ PROCESS "maps/${map.type}.html";
+ END;
+
+ INCLUDE 'header.html',
+ title => loc('Report created')
+ bodyclass => 'mappage',
+ robots => 'noindex,nofollow';
+%]
+
+
+ [% IF report.used_map %]
+ [% map_html %]
+
+ </div>
+ [% END %]
+
+ <div id="side">
+<div id="report-a-problem-main">
+ <h1>Complete</h1>
+ <p>Your report has been sent. If you included contact details we may be in touch to follow up or request more details.</p>
+ <p>Thank you for saying something and making our transport safer.</p>
+ <p><img src="../cobrands/seesomething/images/btp-wmp-logos.png" alt="British Transport Police and the West Midlands Police" width="271" height="116"></p>
+</div>
+ </div>
+
+[% INCLUDE 'footer.html' %]
diff --git a/templates/web/seesomething/set_body_class.html b/templates/web/seesomething/set_body_class.html
new file mode 100644
index 000000000..b613706f2
--- /dev/null
+++ b/templates/web/seesomething/set_body_class.html
@@ -0,0 +1 @@
+[% bodyclass = ( bodyclass ? bodyclass : 'mappage' ) %]