-
-
Save schlos/997345a4237624eaabfcb4d5756d9173 to your computer and use it in GitHub Desktop.
FMS All Reports page HTML source code - page content (temporary shared file)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[% USE Number.Format -%] | |
[% extra_js = [ | |
version('/vendor/chart.min.js'), | |
version('/vendor/accessible-autocomplete.min.js'), | |
version('/js/dashboard.js') | |
] -%] | |
[% | |
problems_reported = problems_reported_by_period.last | format_number; | |
problems_fixed = problems_fixed_by_period.last | format_number; | |
last_seven_reported = last_seven_days.problems_total | format_number; | |
last_seven_updated = last_seven_days.updated_total | format_number; | |
last_seven_fixed = last_seven_days.fixed_total | format_number; | |
other_categories_formatted = other_categories | format_number; | |
-%] | |
[% INCLUDE 'header.html', title = loc('Dashboard'), bodyclass => 'dashboard fullwidthpage' %] | |
<!-- header.html START --> | |
[% | |
SET html_att = ' lang="' _ lang_code _ '"'; | |
# For a right-to-left language, use the following line in your own header: | |
# SET html_att = html_att _ ' dir="rtl"'; | |
-%] | |
<!doctype html> | |
<!--[if IE 9]> <html class="no-js ie9"[% html_att | safe %]><![endif]--> | |
<!--[if gt IE 9]><!--><html class="no-js"[% html_att | safe %]><!--<![endif]--> | |
<head> | |
<meta name="viewport" content="initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> | |
<meta name="HandHeldFriendly" content="true"> | |
<meta name="mobileoptimized" content="0"> | |
[% INCLUDE 'header_opengraph.html' %] | |
<!-- header_opengraph.html START --> | |
<meta property="og:url" content="[% c.cobrand.base_url %][% c.req.uri.path %]"> | |
<meta property="og:title" content="[% title || site_name %]"> | |
<meta property="og:site_name" content="[% site_name %]"> | |
[% IF c.req.uri.path == '/' %]<meta property="og:description" content="[% loc('Report, view, and discuss local street-related problems.') %]">[% END %] | |
<meta property="og:type" content="website"> | |
<!-- header_opengraph.html END --> | |
[% INCLUDE 'header_opengraph_image.html' %] | |
<!-- header_opengraph_image.html START --> | |
[% IF problem.photo %] | |
[% photo = problem.photos.first %] | |
[% data = problem.get_first_image_og %] | |
<meta property="og:image" content="[% c.cobrand.base_url %][% photo.url_og %]"> | |
<meta property="og:image:type" content="[% data.content_type %]"> | |
<meta property="og:image:width" content="[% data.width %]"> | |
<meta property="og:image:height" content="[% data.height %]"> | |
[% ELSE %] | |
<meta property="og:image" content="[% c.cobrand.base_url %]/cobrands/fixmystreet/images/fms-og_image.jpg"> | |
<meta property="og:image:type" content="image/jpeg"> | |
<meta property="og:image:width" content="1200"> | |
<meta property="og:image:height" content="630"> | |
[% END %] | |
<!-- header_opengraph_image.html END --> | |
[% INCLUDE 'header/css.html' %] | |
<!-- header/css.html START --> | |
[% SET base_css = version('/cobrands/' _ c.cobrand.asset_moniker _ '/base.css') %] | |
[% SET layout_css = version('/cobrands/' _ c.cobrand.asset_moniker _ '/layout.css') %] | |
<link rel="stylesheet" href="[% base_css %]"> | |
<link rel="stylesheet" href="[% layout_css %]" media="screen and (min-width:48em)"> | |
<!--[if (lt IE 9) & (!IEMobile)]> | |
<link rel="stylesheet" href="[% layout_css %]"> | |
<![endif]--> | |
<link rel="stylesheet" href="[% version('/vendor/OpenLayers/theme/default/style.css') %]"> | |
[% extra_css | safe %] | |
<!-- header/css.html END --> | |
[% INCLUDE 'common_header_tags.html' %] | |
<!-- common_header_tags.html START --> | |
[% SET start = c.config.ADMIN_BASE_URL IF admin %] | |
<meta http-equiv="content-type" content="text/html; charset=utf-8"> | |
<link rel="manifest" href="/.well-known/manifest.webmanifest"> | |
[% IF manifest_theme %] | |
<meta name='theme-color' content='[% manifest_theme.theme_colour %]'> | |
[% FOREACH icon IN manifest_theme.icons %] | |
<link rel="apple-touch-icon" sizes="[% icon.sizes %]" href="[% icon.src %]"> | |
[% END %] | |
[% END %] | |
[% IF csrf_token %] | |
<meta content="[% csrf_token %]" name="csrf-token" /> | |
[% END %] | |
<!--[if (lt IE 9)]> | |
<script src="[% version('/vendor/html5shiv.js') %]"></script> | |
<![endif]--> | |
<script nonce="[% csp_nonce %]"> | |
(function(d,e,k){function m(b,n,a,l){var f=e.createElement("div");var c=e.body;c||(c=e.createElement("body"),c.fake=!0);if(parseInt(a,10))for(;a--;){var d=e.createElement("div");d.id=l?l[a]:"modernizr"+(a+1);f.appendChild(d)}a=e.createElement("style");a.type="text/css";a.id="smodernizr";(c.fake?c:f).appendChild(a);c.appendChild(f);a.styleSheet?a.styleSheet.cssText=b:a.appendChild(e.createTextNode(b));f.id="modernizr";if(c.fake){c.style.background="";c.style.overflow="hidden";var g=h.style.overflow; | |
h.style.overflow="hidden";h.appendChild(c)}b=n(f,b);c.fake?(c.parentNode.removeChild(c),h.style.overflow=g,h.offsetHeight):f.parentNode.removeChild(f);return!!b}k={_version:"3.11.4"};var g=function(){};g.prototype=k;g=new g;var h=e.documentElement,p=function(){var b=d.matchMedia||d.msMatchMedia;return b?function(d){return(d=b(d))&&d.matches||!1}:function(b){var a=!1;m("@media "+b+" { #modernizr { position: absolute; } }",function(b){a="absolute"===("getComputedStyle"in d?getComputedStyle(b):b.currentStyle).position}); | |
return a}}();k.mq=p;d.Modernizr=g})(window,document); | |
var fixmystreet=fixmystreet||{};fixmystreet.page="[% page %]";fixmystreet.cobrand="[% c.cobrand.moniker %]"; | |
(function(a){a=a.documentElement;a.className=a.className.replace(/\bno-js\b/,"js");var b=Modernizr.mq("(min-width: 48em)")?"desktop":"mobile";"IntersectionObserver"in window&&(a.className+=" lazyload");"mobile"==b&&(a.className+=' mobile[% " map-fullscreen only-map map-reporting" IF page == "around" || page == "new" %]')})(document); | |
</script> | |
<script nonce="[% csp_nonce %]"> | |
if ('serviceWorker' in navigator) { | |
window.addEventListener('load', function() { | |
navigator.serviceWorker.register('/service-worker.js'); | |
}); | |
} | |
</script> | |
[% IF robots %] | |
<meta name="robots" content="[% robots %]"> | |
[% ELSIF c.config.STAGING_SITE %] | |
<meta name="robots" content="noindex,nofollow"> | |
[% END %] | |
[% INCLUDE 'header_rss.html' %] | |
<!-- header_rss.html START --> | |
[% IF rss %] | |
<link rel="alternate" type="application/rss+xml" title="[% rss.0 %]" href="[% rss.1 %]"> | |
[% END %] | |
<!-- header_rss.html END --> | |
[% INCLUDE 'header/title.html' %] | |
<!-- header/title.html START --> | |
<title> | |
[% tprintf('%s :: ', title) IF title %] | |
[% site_name -%] | |
</title> | |
<!-- header/title.html END --> | |
[% IF bodyclass.match('frontpage') %] | |
<link rel="prefetch" href="[% version('/js/validation_rules.js') %]"> | |
[%~ IF NOT c.user_exists OR NOT (c.user.from_body OR c.user.is_superuser) %] | |
<link rel="prefetch" href="[% version('/vendor/jquery-2.2.4.min.js') %]"> | |
[%~ END %] | |
<link rel="prefetch" href="[% version('/vendor/jquery.multi-select.min.js') %]"> | |
<link rel="prefetch" href="[% version('/vendor/jquery.validate.min.js') %]"> | |
<link rel="prefetch" href="[% version('/cobrands/fixmystreet/fixmystreet.js') %]"> | |
[% END %] | |
[% IF NOT bodyclass.match('mappage') %] | |
[% FOR script IN map_js.merge(c.cobrand.call_hook('map_js_extra')) %] | |
<link rel="prefetch" href="[% IF script.match('^/'); version(script); ELSE; script; END %]"> | |
[% END %] | |
<link rel="prefetch" href="[% version('/cobrands/fixmystreet/map.js') %]"> | |
<link rel="prefetch" href="[% version('/vendor/dropzone.min.js') %]"> | |
<link rel="prefetch" href="[% version('/vendor/fancybox/jquery.fancybox-1.3.4.pack.js') %]"> | |
[% END %] | |
<!-- common_header_tags.html END --> | |
[% TRY %][% PROCESS 'header_extra.html' %][% CATCH file %][% END %] | |
<!-- header_extra.html START --> | |
<!-- N/A - header_extra.html does not exist in base, it's used if needed in some custom themes --> | |
<!-- header_extra.html END --> | |
</head> | |
[% TRY %][% PROCESS 'set_body_class.html' %][% CATCH file %][% END %] | |
<!-- set_body_class.html START --> | |
<!-- N/A - set_body_class.html does not exist in base, it's used if needed in some custom themes --> | |
<!-- set_body_class.html END --> | |
<body class="[% bodyclass | html IF bodyclass %]"> | |
<a class="skiplink" href="#content">[% loc('Skip to main content') %]</a> | |
[% INCLUDE 'debug_header.html' %] | |
<!-- debug_header.html START --> | |
[% IF c.config.STAGING_SITE and !c.config.STAGING_FLAGS.hide_staging_banner ~%] | |
<div class="dev-site-notice"> | |
[% loc("Staging site") %] | |
</div> | |
[% END %] | |
<!-- debug_header.html END --> | |
[% TRY %][% PROCESS 'before_wrapper.html' %][% CATCH file %][% END %] | |
<!-- before_wrapper.html START --> | |
<!-- N/A - before_wrapper.html does not exist in base, it's used if needed in some custom themes --> | |
<!-- before_wrapper.html END --> | |
<div class="wrapper"> | |
<div class="table-cell"> | |
[% INCLUDE 'header_site.html' %] | |
<!-- header_site.html START --> | |
<header id="site-header" role="banner"> | |
<div class="container"> | |
[% INCLUDE 'header_logo.html' %] | |
<!-- header_logo.html START --> | |
<a href="[% c.cobrand.base_url IF admin %]/" id="site-logo">[% site_name %]</a> | |
<a href="[% c.cobrand.base_url IF admin %]/" id="report-cta" title="[%- loc('Report a problem') -%]">[%- loc('Report') -%]</a> | |
<!-- header_logo.html END --> | |
<label id="nav-link" for="main-nav-btn" aria-expanded="false">[% loc('Main Navigation') %]</label> | |
</div> | |
</header> | |
<div class="nav-wrapper"> | |
<div class="container"> | |
[% INCLUDE 'main_nav.html' %] | |
<!-- main_nav.html START --> | |
[% | |
# DEFAULT would make sense here, except it treats the empty string as falsy | |
# and some cobrands want to set ul_class to an empty string. | |
SET ul_class="nav-menu nav-menu--main" UNLESS ul_class.defined; | |
%] | |
[% BLOCK navitem ~%] | |
<li [% liattrs | safe %]> | |
[%~ IF c.req.uri.path == uri AND NOT always_url ~%] | |
<span [% attrs | safe %]>[% label %]</span> | |
[%~ ELSE ~%] | |
<a href="[% uri %][% suffix IF suffix %]" [% attrs | safe %]>[% label %]</a> | |
[%~ END ~%] | |
</li> | |
[%~ END %] | |
[% UNLESS omit_wrapper %] | |
<div id="js-menu-open-modal"></div> | |
<input role="button" type="checkbox" id="main-nav-btn" autocomplete="off"> | |
<nav id="main-nav" role="navigation"> | |
[% END %] | |
<ul class="[% ul_class %]"[% " id='" _ ul_id _ "'" IF ul_id %]> | |
[% INCLUDE 'main_nav_items.html' %] | |
<!-- main_nav_items.html START --> | |
[% INCLUDE 'navigation/_report.html' %] | |
<!-- navigation/_report.html START --> | |
[%~ IF problem AND NOT problem.non_public ~%] | |
[%~ INCLUDE navitem uri='/report/new?longitude=' _ problem.longitude _ '&latitude=' _ problem.latitude label=loc('Report another problem here') attrs='class="report-a-problem-btn"' ~%] | |
[%~ ELSIF latitude AND longitude ~%] | |
[%~ INCLUDE navitem uri='/report/new?longitude=' _ longitude _ '&latitude=' _ latitude label=loc('Report a problem here') attrs='class="report-a-problem-btn"' ~%] | |
[%~ ELSIF homepage_template ~%] | |
[%~ INCLUDE navitem uri='/report' label=loc('Report a problem') attrs='class="report-a-problem-btn"' ~%] | |
[%~ ELSE ~%] | |
[%~ INCLUDE navitem uri='/' label=loc('Report a problem') attrs='class="report-a-problem-btn"' ~%] | |
[%~ END ~%] | |
<!-- navigation/_report.html END --> | |
[%~ IF c.user_exists ~%] | |
[%~ INCLUDE navitem uri='/my' label=loc('Your account') ~%] | |
[%~ ELSE ~%] | |
[%~ INCLUDE navitem uri='/auth' label=loc('Sign in') ~%] | |
[%~ END ~%] | |
[%~ IF c.user_exists AND c.user.has_body_permission_to('planned_reports') ~%] | |
[%~ INCLUDE navitem always_url=1 uri='/my/planned' label=loc('Shortlist') ~%] | |
[%~ END ~%] | |
[%~ INCLUDE 'navigation/_all_reports.html' ~%] | |
<!-- navigation/_all_reports.html START --> | |
[%~ | |
IF c.user_exists AND c.user.from_body AND ( c.user.categories.size OR c.user.area_ids.size ); | |
reports_uri = '/my/inspector_redirect'; | |
ELSE; | |
reports_uri = '/reports'; | |
IF c.cobrand.council_area; | |
body_name = c.cobrand.council_area | uri; | |
reports_uri = "${reports_uri}/${body_name}"; | |
END; | |
END; | |
INCLUDE navitem uri=reports_uri label=loc('All reports'); | |
~%] | |
<!-- navigation/_all_reports.html END --> | |
[%~ | |
IF pc; | |
pc_uri = pc | uri; | |
pc_suffix = "/list?pc=" _ pc_uri; | |
END; | |
INCLUDE navitem uri='/alert' label=loc('Local alerts') suffix=pc_suffix; | |
~%] | |
[%~ INCLUDE navitem uri='/faq' label=loc('Help') ~%] | |
[%~ UNLESS hide_privacy_link ~%] | |
[%~ INCLUDE navitem uri=c.cobrand.privacy_policy_url label=loc('Privacy') liattrs='class="nav-menu__item--privacy"' ~%] | |
[%~ END ~%] | |
[%~ IF c.user_exists AND c.cobrand.admin_allow_user(c.user) ~%] | |
[%~ INCLUDE navitem uri='/admin' label=loc('Admin') ~%] | |
[%~ END ~%] | |
<!-- main_nav_items.html END --> | |
</ul> | |
[% UNLESS omit_wrapper %] | |
</nav> | |
[% END %] | |
<!-- main_nav.html END --> | |
</div> | |
</div> | |
<!-- header_site.html END --> | |
<a name="content"></a> | |
[% pre_container_extra | safe %] | |
<!-- pre_container_extra is around/postcode_form.html START --> | |
<div id="front-main"> | |
<div id="front-main-container"> | |
[% UNLESS possible_location_matches %] | |
[% INCLUDE 'around/intro.html' %] | |
<!-- around/intro.html START --> | |
<h1>[% loc('Report, view, or discuss local problems') %]</h1> | |
<h2>[% loc('(like graffiti, fly tipping, broken paving slabs, or street lighting)') %]</h2> | |
<!-- around/intro.html END --> | |
[% END %] | |
[% | |
question = c.cobrand.enter_postcode_text || loc('Enter a nearby street name and area'); | |
%] | |
<form action="[% c.uri_for('/around') %]" method="get" name="postcodeForm" id="postcodeForm" class="js-geolocate"> | |
<label for="pc">[% question %]:</label> | |
[% INCLUDE 'around/_postcode_form_examples.html' %] | |
<!-- around/_postcode_form_examples.html START --> | |
<p class="form-hint" id="pc-hint">[% tprintf(loc('e.g. ‘%s’ or ‘%s’'), c.cobrand.example_places) %]</p> | |
<!-- around/_postcode_form_examples.html END --> | |
<div> | |
<input type="text" name="pc" value="[% pc | html %]" id="pc" size="10" maxlength="200" required aria-describedby="pc-hint"> | |
[% INCLUDE 'around/_postcode_submit_button.html' attr='id="sub"' %] | |
<!-- around/_postcode_submit_button.html START --> | |
<input type="submit" [% attr | safe %] value="[% | |
IF c.cobrand.moniker == 'cheshireeast'; | |
'Search for location'; | |
ELSE; | |
loc('Go'); | |
END %]"> | |
<!-- around/_postcode_submit_button.html END --> | |
</div> | |
[% IF partial_token %] | |
<input type="hidden" name="partial" value="[% partial_token.token %]"> | |
[% END %] | |
[% IF c.get_param('filter_category') OR c.get_param('filter_group') %] | |
<input type="hidden" name="filter_category" value="[% c.get_param('filter_category') | html %]"> | |
<input type="hidden" name="filter_group" value="[% c.get_param('filter_group') | html %]"> | |
[% ELSIF c.user_exists AND c.user.categories.size %] | |
<input type="hidden" name="filter_category" value="[% c.user.categories_string | html %]"> | |
[% END %] | |
</form> | |
[%~ SET link_params = { | |
geolocate = 1 | |
}; | |
IF c.get_param('filter_category'); link_params.filter_category = c.get_param('filter_category'); END; | |
IF c.get_param('filter_group'); link_params.filter_group = c.get_param('filter_group'); END; | |
%] | |
<a href="[% c.uri_for('/around', link_params) | html %]" id="geolocate_link">[% INCLUDE 'around/geolocate_link_icon.html' %] | |
<!-- around/geolocate_link_icon.html START --> | |
<svg class="geolocate-link__icon" width="16" height="16" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M23.744.255a.874.874 0 01.18.974l-9.89 22.252a.874.874 0 01-1.603-.012l-3.568-8.332-8.334-3.57a.874.874 0 01-.01-1.602L22.77.075a.874.874 0 01.972.18h.002z" fill="currentColor" fill-rule="nonzero"/></svg> | |
<svg class="geolocate-link__loading" width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><g fill="currentColor" fill-rule="nonzero"><path d="M16 8a8 8 0 11-8-8v2a6 6 0 106 6z"></path><circle cx="8" cy="1" r="1"></circle><circle cx="15" cy="8" r="1"></circle></g></svg> | |
<!-- around/geolocate_link_icon.html END --> | |
[% loc('Use my current location') %]</a> | |
[% UNLESS possible_location_matches OR location_error_pc_lookup %] | |
[% INCLUDE 'around/_postcode_form_post.html' %] | |
<!-- around/_postcode_form_post.html START --> | |
<!-- around/_postcode_form_post.html END --> | |
[% END %] | |
</div> | |
</div> | |
<!-- pre_container_extra is around/postcode_form.html END --> | |
<div class="container"> | |
<div class="content[% " $mainclass" | html IF mainclass %]" role="main"> | |
<!-- header.html END --> | |
<div class="dashboard-header"> | |
<h1>[% loc('Dashboard') %] | |
[% IF body %] – [% body.name %] [% END %] | |
</h1> | |
</div> | |
<div class="dashboard-row"> | |
<div class="dashboard-item dashboard-item--12"> | |
<h2>[% loc('All time') %]</h2> | |
<div class="labelled-line-chart"> | |
<canvas id="chart-all-reports" width="600" height="300" | |
data-labels="[[% FOR period IN problem_periods %]"[% period %]"[% IF NOT loop.last %],[% END %][% END %]]" | |
data-values-reports="[[% problems_reported_by_period.join(',') %]]" | |
data-values-fixed="[[% problems_fixed_by_period.join(',') %]]" | |
></canvas> | |
<span class="label" data-datasetindex="0"><strong style="color: #F4A140">[% tprintf(nget("%s problem reported", "%s problems reported", problems_reported_by_period.last), decode(problems_reported) _ '</strong>') %]</span> | |
<span class="label" data-datasetindex="1"><strong style="color: #62B356">[% tprintf(nget("%s problem marked as fixed", "%s problems marked as fixed", problems_fixed_by_period.last), decode(problems_fixed) _ '</strong>') %]</span> | |
</div> | |
</div> | |
</div> | |
<div class="dashboard-row"> | |
<div class="dashboard-item dashboard-item--6"> | |
<h2 class="dashboard-subheading">[% loc('Last 7 days') %]</h2> | |
<div class="dashboard-sparklines"> | |
<div> | |
<div class="labelled-sparkline"> | |
<canvas width="200" height="50" data-color="#F4A140" data-values="[% last_seven_days.problems.join(' ') %]"></canvas> | |
<span class="label" data-datasetindex="0"><strong style="color: #F4A140;">[% tprintf(nget("%s problem reported", "%s problems reported", last_seven_days.problems_total), decode(last_seven_reported) _ '</strong>') %]</span> | |
</div> | |
</div> | |
<div> | |
<div class="labelled-sparkline"> | |
<canvas width="200" height="50" data-color="#4FADED" data-values="[% last_seven_days.updated.join(' ') %]"></canvas> | |
<span class="label" data-datasetindex="0"><strong style="color: #4FADED;">[% tprintf(nget("%s update on problems", "%s updates on problems", last_seven_days.updated_total), decode(last_seven_updated) _ '</strong>') %]</span> | |
</div> | |
</div> | |
<div> | |
<div class="labelled-sparkline"> | |
<canvas width="200" height="50" data-color="#62B356" data-values="[% last_seven_days.fixed.join(' ') %]"></canvas> | |
<span class="label" data-datasetindex="0"><strong style="color: #62B356;">[% tprintf(nget("%s problem marked as fixed", "%s problems marked as fixed", last_seven_days.fixed_total), decode(last_seven_fixed) _ '</strong>') %]</span> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="dashboard-item dashboard-item--6"> | |
<form class="dashboard-search"> | |
<h2>[% loc('Show reports in your area') %]</h2> | |
[% IF body %] | |
<label for="ward">[% loc('Pick your ward') %]</label> | |
<div class="dashboard-search__input"> | |
<select id="ward" name="ward" class="js-autocomplete"> | |
<option value="">[% loc('Pick your ward') %]</option> | |
[% FOR child IN children.values.sort('name') %] | |
<option>[% child.name | html ~%]</option> | |
[% END %] | |
</select> | |
</div> | |
[% ELSE %] | |
<label for="body">[% loc('Pick your council') %]</label> | |
<div class="dashboard-search__input"> | |
<select id="body" name="body" class="js-autocomplete"> | |
<option value="">[% loc('Pick your council') %]</option> | |
[% FOR b IN bodies # Not body as 'body' may be on stash %] | |
<option value="[% b.id %]">[% b.name | html ~%] | |
[% IF NOT b.area_count %] [% loc('(no longer exists)') %][% END ~%] | |
</option> | |
[% END %] | |
</select> | |
</div> | |
[% END %] | |
<div class="dashboard-search__submit"> | |
<input type="submit" value="[% loc('Go') %]"> | |
</div> | |
</form> | |
</div> | |
</div> | |
<div class="dashboard-row"> | |
<div class="dashboard-item dashboard-item--6"> | |
[% IF body %] | |
<h2 class="dashboard-subheading">[% loc('Top 5 wards') %]</h2> | |
<p>[% loc('Number of problems reported in each ward, in the last 7 days.') %]</p> | |
<table class="dashboard-ranking-table"> | |
<tbody> | |
[% FOR line IN wards %] | |
<tr><td>[% line.name %]</td><td>[% tprintf(nget("%s report", "%s reports", line.reports), line.reports) %]</td></tr> | |
[% END %] | |
</tbody> | |
<tfoot> | |
<tr><td>[% loc('Other wards') %]</td><td>[% tprintf(nget("%s report", "%s reports", other_wards), other_wards) %]</td></tr> | |
</tfoot> | |
</table> | |
[% ELSE %] | |
<h2 class="dashboard-subheading">[% loc('Top 5 responsive councils') %]</h2> | |
<p>[% loc('Average time between a problem being reported and being fixed, last 100 reports.') %]</p> | |
<table class="dashboard-ranking-table"> | |
<tbody> | |
[% FOR line IN top_five_bodies %] | |
<tr><td>[% line.name %]</td><td>[% tprintf(nget("%s day", "%s days", line.days), line.days) %]</td></tr> | |
[% END %] | |
</tbody> | |
<tfoot> | |
<tr><td>[% loc('Overall average') %]</td><td>[% tprintf(nget("%s day", "%s days", average), average) %]</td></tr> | |
</tfoot> | |
</table> | |
[% END %] | |
</div> | |
<div class="dashboard-item dashboard-item--6"> | |
<h2 class="dashboard-subheading">[% loc('Top 5 most used categories') %]</h2> | |
<p>[% loc('Number of problems reported in each category, in the last 7 days.') %]</p> | |
<table class="dashboard-ranking-table"> | |
<tbody> | |
[% FOR line IN top_five_categories %] | |
[% line_count = line.count | format_number ~%] | |
<tr><td>[% line.category %]</td><td>[% tprintf(nget("%s report", "%s reports", line.count), decode(line_count)) %]</td></tr> | |
[% END %] | |
</tbody> | |
<tfoot> | |
<tr><td>[% loc('Other categories') %]</td><td>[% tprintf(nget("%s report", "%s reports", other_categories), decode(other_categories_formatted)) %]</td></tr> | |
</tfoot> | |
</table> | |
</div> | |
</div> | |
[% INCLUDE 'footer.html' pagefooter = 'yes' %] | |
<!-- footer.html START --> | |
[% IF pagefooter %] | |
<footer role="contentinfo"> | |
[% INCLUDE 'front/footer-marketing.html' %] | |
<!-- front/footer-marketing.html START --> | |
<!-- N/A - this will not show because there is no value "pagefooter" --> | |
<!-- front/footer-marketing.html END --> | |
</footer> | |
[% END %] | |
</div><!-- .content role=main --> | |
</div><!-- .container --> | |
</div><!-- .table-cell --> | |
</div> <!-- .wrapper --> | |
[% INCLUDE 'common_footer_tags.html' %] | |
<!-- common_footer_tags.html START --> | |
[% IF NOT bodyclass.match('mappage') %] | |
[% TRY %][% PROCESS 'footer_extra.html' %][% CATCH file %][% END %] | |
<!-- footer_extra.html START --> | |
<!-- N/A - footer_extra.html does not exist in base, it's used if needed in some custom themes --> | |
<!-- footer_extra.html END --> | |
[% END %] | |
[% PROCESS 'common_scripts.html' %] | |
<!-- common_scripts.html START --> | |
[% | |
USE date; | |
USE Math; | |
scripts = []; | |
scripts.push( | |
start _ "/js/translation_strings." _ lang_code _ ".js?" _ Math.int( date.now / 3600 ), | |
); | |
IF bodyclass.match('frontpage'); | |
scripts.push( | |
version('/js/front.js'), | |
version('/js/geolocation.js'), | |
version('/js/loading-attribute-polyfill.js'), | |
); | |
ELSIF bodyclass.match('alertpage'); | |
scripts.push( | |
version('/js/geolocation.js'), | |
); | |
ELSIF bodyclass.match('offlinepage'); | |
ELSE; | |
scripts.push( | |
version('/js/validation_rules.js'), | |
version('/vendor/jquery-2.2.4.min.js'), | |
version('/vendor/jquery.multi-select.min.js'), | |
version('/vendor/jquery.validate.min.js'), | |
version('/cobrands/fixmystreet/fixmystreet.js'), | |
); | |
END; | |
FOR script IN extra_js; | |
scripts.push(script); | |
END; | |
IF c.user_exists AND (c.user.from_body OR c.user.is_superuser); | |
scripts.push( | |
version('/js/geolocation.js'), | |
version('/vendor/jquery-2.2.4.min.js'), | |
version('/cobrands/fixmystreet/staff.js') | |
); | |
IF bodyclass.match('mappage') AND c.cobrand.suggest_duplicates AND NOT login_success AND NOT oauth_need_email; | |
scripts.push( | |
version('/js/duplicates.js') | |
); | |
END; | |
IF c.user.has_body_permission_to('planned_reports'); | |
scripts.push( | |
version('/vendor/idb-keyval-iife.min.js'), | |
version('/cobrands/fixmystreet/offline.js'), | |
); | |
END; | |
END; | |
IF bodyclass.match('mappage'); | |
FOR script IN map_js.merge(c.cobrand.call_hook('map_js_extra')); | |
IF script.match('^/'); | |
scripts.push(version(script)); | |
ELSE; | |
scripts.push(script); | |
END; | |
END; | |
scripts.push( | |
version('/cobrands/fixmystreet/map.js'), | |
version('/vendor/dropzone.min.js'), | |
version('/vendor/fancybox/jquery.fancybox-1.3.4.pack.js'), | |
version('/js/loading-attribute-polyfill.js'), | |
); | |
ELSE; | |
scripts.push( | |
version('/cobrands/fixmystreet/prefetch-polyfill.js'), | |
); | |
END; | |
IF admin; | |
scripts.push( | |
version('/cobrands/fixmystreet/admin.js'), | |
version('/vendor/html5sortable.min.js'), | |
); | |
END; | |
TRY; | |
PROCESS 'footer_extra_js.html'; | |
CATCH file; | |
END; | |
<!-- footer_extra_js.html START --> | |
<!-- N/A - footer_extra_js.html does not exist in base, it's used if needed in some custom themes --> | |
<!-- footer_extra_js.html END --> | |
~%] | |
<!-- common_scripts.html END --> | |
<!--[if lte IE 9]> | |
<script src="[% version('/vendor/history.polyfill.min.js') %]"></script> | |
<![endif]--> | |
[% | |
scripts_seen = {}; | |
FOR script IN scripts; | |
script = script.0 ? script : [ script ]; | |
NEXT IF scripts_seen.${script.0}; | |
scripts_seen.${script.0} = 1; | |
~%] | |
<script src="[% script.0 %]" | |
[%~ FOR attr IN script.1 %] [% attr.key %]="[% attr.value %]"[% END ~%] | |
></script> | |
[% END %] | |
<!-- common_footer_tags.html END --> | |
</body> | |
</html> | |
<!-- footer.html END --> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment