[% 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' %]

[% loc('Dashboard') %] [% IF body %] – [% body.name %] [% END %]

[% loc('All time') %]

[% tprintf(nget("%s problem reported", "%s problems reported", problems_reported_by_period.last), decode(problems_reported) _ '') %] [% tprintf(nget("%s problem marked as fixed", "%s problems marked as fixed", problems_fixed_by_period.last), decode(problems_fixed) _ '') %]

[% loc('Last 7 days') %]

[% tprintf(nget("%s problem reported", "%s problems reported", last_seven_days.problems_total), decode(last_seven_reported) _ '') %]
[% tprintf(nget("%s update on problems", "%s updates on problems", last_seven_days.updated_total), decode(last_seven_updated) _ '') %]
[% tprintf(nget("%s problem marked as fixed", "%s problems marked as fixed", last_seven_days.fixed_total), decode(last_seven_fixed) _ '') %]
[% IF body %]

[% loc('Top 5 wards') %]

[% loc('Number of problems reported in each ward, in the last 7 days.') %]

[% FOR line IN wards %] [% END %]
[% line.name %][% tprintf(nget("%s report", "%s reports", line.reports), line.reports) %]
[% loc('Other wards') %][% tprintf(nget("%s report", "%s reports", other_wards), other_wards) %]
[% ELSE %]

[% loc('Top 5 responsive councils') %]

[% loc('Average time between a problem being reported and being fixed, last 100 reports.') %]

[% FOR line IN top_five_bodies %] [% END %]
[% line.name %][% tprintf(nget("%s day", "%s days", line.days), line.days) %]
[% loc('Overall average') %][% tprintf(nget("%s day", "%s days", average), average) %]
[% END %]

[% loc('Top 5 most used categories') %]

[% loc('Number of problems reported in each category, in the last 7 days.') %]

[% FOR line IN top_five_categories %] [% line_count = line.count | format_number ~%] [% END %]
[% line.category %][% tprintf(nget("%s report", "%s reports", line.count), decode(line_count)) %]
[% loc('Other categories') %][% tprintf(nget("%s report", "%s reports", other_categories), decode(other_categories_formatted)) %]
[% INCLUDE 'footer.html' pagefooter = 'yes' %]