diff options
25 files changed, 36 insertions, 171 deletions
diff --git a/templates/web/base/around/on_map_list_items.html b/templates/web/base/around/on_map_list_items.html index 5de0f9216..90f836fc8 100644 --- a/templates/web/base/around/on_map_list_items.html +++ b/templates/web/base/around/on_map_list_items.html @@ -5,7 +5,7 @@ dist = tprintf("%.1f", (problem.distance || 0) ); problem = problem.problem; END %] - [% INCLUDE 'report/_item.html' %] + [% INCLUDE 'reports/_list-entry.html' %] [% END %] [% ELSE %] <li class="empty"> diff --git a/templates/web/base/front/_list-entry.html b/templates/web/base/front/_list-entry.html new file mode 100755 index 000000000..2fcf5f296 --- /dev/null +++ b/templates/web/base/front/_list-entry.html @@ -0,0 +1 @@ +[% INCLUDE 'report/_item.html' no_fixed = 1 %] diff --git a/templates/web/base/front/recent.html b/templates/web/base/front/recent.html index 5275cef43..de74f3326 100644 --- a/templates/web/base/front/recent.html +++ b/templates/web/base/front/recent.html @@ -15,7 +15,7 @@ <section class="full-width"> <ul class="issue-list-a"> [% FOREACH problem IN recent_photos %] - [% INCLUDE 'report/_item.html', no_fixed = 1 %] + [% INCLUDE 'front/_list-entry.html' %] [% END %] </ul> </section> diff --git a/templates/web/base/my/_problem-list.html b/templates/web/base/my/_problem-list.html index b8a3f07a2..4b5fc73d6 100644 --- a/templates/web/base/my/_problem-list.html +++ b/templates/web/base/my/_problem-list.html @@ -1,7 +1,7 @@ <ul class='issue-list-a full-width'> [% IF problems.size %] - [% FOREACH p = problems %] - [% INCLUDE 'report/_item.html', problem = p, no_fixed = 1 %] + [% FOREACH problem = problems %] + [% INCLUDE 'reports/_list-entry.html' no_fixed = 1 %] [% END %] [% ELSE %] <li class="empty"> diff --git a/templates/web/base/report/_item.html b/templates/web/base/report/_item.html index 6ac18b534..2fcfa9fb8 100644 --- a/templates/web/base/report/_item.html +++ b/templates/web/base/report/_item.html @@ -13,7 +13,7 @@ [%- prettify_dt( problem.confirmed) %] [%- END %] [%- IF dist %], [% dist %]km[% END %] - [%- IF NOT exclude_lastupdate AND problem.confirmed != problem.lastupdate AND problem.whensent != problem.lastupdate %], + [%- IF problem.confirmed != problem.lastupdate AND problem.whensent != problem.lastupdate %], [% tprintf(loc('last updated %s'), prettify_dt( problem.lastupdate, 1 ) ) %] [%- END %] [% IF include_sentinfo %] diff --git a/templates/web/base/reports/_list-entry.html b/templates/web/base/reports/_list-entry.html index 4c0abd337..dbf0a576e 100755 --- a/templates/web/base/reports/_list-entry.html +++ b/templates/web/base/reports/_list-entry.html @@ -1 +1 @@ -[% INCLUDE 'report/_item.html' include_sentinfo = 1 %] +[% INCLUDE 'report/_item.html' %] diff --git a/templates/web/base/reports/_problem-list.html b/templates/web/base/reports/_problem-list.html index 45746e309..a4c78877a 100644 --- a/templates/web/base/reports/_problem-list.html +++ b/templates/web/base/reports/_problem-list.html @@ -8,7 +8,7 @@ <ul class="issue-list-a"> [% IF problems %] [% FOREACH problem IN problems %] - [% INCLUDE 'reports/_list-entry.html' %] + [% INCLUDE 'reports/_list-entry.html' include_sentinfo = 1 include_lastupdate = 1 %] [% END %] [% ELSE %] <li class="empty"> diff --git a/templates/web/base/reports/body.html b/templates/web/base/reports/body.html index ffb5d8838..dfaa98d6a 100755 --- a/templates/web/base/reports/body.html +++ b/templates/web/base/reports/body.html @@ -43,8 +43,8 @@ [% INCLUDE '_hart_hants_note.html' %] [% END %] -[% IF NOT body.areas.size AND c.cobrand.moniker == 'fixmystreet' %] - [% INCLUDE 'reports/_body_gone.html' %] +[% IF NOT body.areas.size %] + [% TRY %][% INCLUDE 'reports/_body_gone.html' %][% CATCH file %][% END %] [% ELSE %] [% INCLUDE 'reports/_rss.html' %] [% END %] diff --git a/templates/web/bromley/around/on_map_list_items.html b/templates/web/bromley/around/on_map_list_items.html deleted file mode 100644 index 893f5c698..000000000 --- a/templates/web/bromley/around/on_map_list_items.html +++ /dev/null @@ -1,11 +0,0 @@ -[% all_reports = on_map.merge(around_map) %] -[% IF all_reports.size %] - [% FOREACH problem IN all_reports %] - [% UNLESS problem.title; problem = problem.problem; END %] - [% INCLUDE "reports/_list-entry.html" %] - [% END %] -[% ELSE %] - <li class="empty"> - <p>[% loc('There are no reports to show.') %]</p> - </li> -[% END %] diff --git a/templates/web/bromley/report/_item.html b/templates/web/bromley/report/_item.html index 9e9c05bcb..6398f698e 100644 --- a/templates/web/bromley/report/_item.html +++ b/templates/web/bromley/report/_item.html @@ -8,7 +8,7 @@ <span>[% problem.title | html %]</span><br /> <small>[% prettify_dt( problem.confirmed, 1 ) %] [%- IF dist %], [% dist %]km[% END %] - [%- IF NOT exclude_lastupdate AND problem.confirmed != problem.lastupdate AND problem.whensent != problem.lastupdate %], + [%- IF include_lastupdate AND problem.confirmed != problem.lastupdate AND problem.whensent != problem.lastupdate %], [% tprintf(loc('last updated %s'), prettify_dt( problem.lastupdate, 1 ) ) %] [%- END %] [% IF include_sentinfo %] diff --git a/templates/web/bromley/reports/_list-entry.html b/templates/web/bromley/reports/_list-entry.html deleted file mode 100755 index 070048af6..000000000 --- a/templates/web/bromley/reports/_list-entry.html +++ /dev/null @@ -1 +0,0 @@ -[% INCLUDE 'report/_item.html' include_sentinfo = 1 exclude_lastupdate = 1 %] diff --git a/templates/web/fixmystreet-uk-councils/report/_item-with-pin.html b/templates/web/fixmystreet-uk-councils/report/_item-with-pin.html new file mode 100644 index 000000000..cd70410d3 --- /dev/null +++ b/templates/web/fixmystreet-uk-councils/report/_item-with-pin.html @@ -0,0 +1,6 @@ +<li class="[% c.cobrand.pin_colour(problem) %]"> + <a href="[% c.uri_for('/report', problem.id ) %]" class="[% problem.category %]"> + <h3>[% problem.title | html %]</h3> + <p>Reported [%- prettify_dt( problem.confirmed, 1 ) %]</p> + </a> +</li> diff --git a/templates/web/greenwich/around/on_map_list_items.html b/templates/web/greenwich/around/on_map_list_items.html deleted file mode 100644 index 893f5c698..000000000 --- a/templates/web/greenwich/around/on_map_list_items.html +++ /dev/null @@ -1,11 +0,0 @@ -[% all_reports = on_map.merge(around_map) %] -[% IF all_reports.size %] - [% FOREACH problem IN all_reports %] - [% UNLESS problem.title; problem = problem.problem; END %] - [% INCLUDE "reports/_list-entry.html" %] - [% END %] -[% ELSE %] - <li class="empty"> - <p>[% loc('There are no reports to show.') %]</p> - </li> -[% END %] diff --git a/templates/web/greenwich/my/_problem-list.html b/templates/web/greenwich/my/_problem-list.html deleted file mode 100644 index 1ff69f9fb..000000000 --- a/templates/web/greenwich/my/_problem-list.html +++ /dev/null @@ -1,25 +0,0 @@ -<ul class='issue-list-a full-width'> - [% IF problems.all %] - [% FOREACH p = problems.all %] - [% INCLUDE 'reports/_list-entry.html', problem = p, no_fixed =1 %] - [% END %] - [% ELSE %] - <li class="empty"> - <p>[% loc('There are no reports to show.') %]</p> - </li> - [% END %] -</ul> - -[% IF ! problems.size %] -<!-- Preserve behaviour of map filters despite map not being shown --> -<script type="text/javascript"> - (function($) { - $(function() { - $(".report-list-filters [type=submit]").hide(); - $(".report-list-filters select").change(function() { - $(this).closest("form").submit(); - }); - }) - })(window.jQuery); -</script> -[% END %] diff --git a/templates/web/greenwich/reports/_list-entry.html b/templates/web/greenwich/reports/_list-entry.html index cd70410d3..b24ef2260 100644 --- a/templates/web/greenwich/reports/_list-entry.html +++ b/templates/web/greenwich/reports/_list-entry.html @@ -1,6 +1 @@ -<li class="[% c.cobrand.pin_colour(problem) %]"> - <a href="[% c.uri_for('/report', problem.id ) %]" class="[% problem.category %]"> - <h3>[% problem.title | html %]</h3> - <p>Reported [%- prettify_dt( problem.confirmed, 1 ) %]</p> - </a> -</li> +[% INCLUDE 'report/_item-with-pin.html' %] diff --git a/templates/web/hart/footer.html b/templates/web/hart/footer.html index 14adf983d..312f63ff4 100644 --- a/templates/web/hart/footer.html +++ b/templates/web/hart/footer.html @@ -23,7 +23,7 @@ </div> <div class="nav-wrapper-2 clearfix"> <div id="main-nav" class="clearfix" role="navigation"> - <ul> + <ul class="nav-menu"> <li> <a href="http://www.hart.gov.uk/home">Home</a> </li> diff --git a/templates/web/oxfordshire/around/on_map_list_items.html b/templates/web/oxfordshire/around/on_map_list_items.html deleted file mode 100644 index 893f5c698..000000000 --- a/templates/web/oxfordshire/around/on_map_list_items.html +++ /dev/null @@ -1,11 +0,0 @@ -[% all_reports = on_map.merge(around_map) %] -[% IF all_reports.size %] - [% FOREACH problem IN all_reports %] - [% UNLESS problem.title; problem = problem.problem; END %] - [% INCLUDE "reports/_list-entry.html" %] - [% END %] -[% ELSE %] - <li class="empty"> - <p>[% loc('There are no reports to show.') %]</p> - </li> -[% END %] diff --git a/templates/web/oxfordshire/my/_problem-list.html b/templates/web/oxfordshire/my/_problem-list.html deleted file mode 100644 index 1ff69f9fb..000000000 --- a/templates/web/oxfordshire/my/_problem-list.html +++ /dev/null @@ -1,25 +0,0 @@ -<ul class='issue-list-a full-width'> - [% IF problems.all %] - [% FOREACH p = problems.all %] - [% INCLUDE 'reports/_list-entry.html', problem = p, no_fixed =1 %] - [% END %] - [% ELSE %] - <li class="empty"> - <p>[% loc('There are no reports to show.') %]</p> - </li> - [% END %] -</ul> - -[% IF ! problems.size %] -<!-- Preserve behaviour of map filters despite map not being shown --> -<script type="text/javascript"> - (function($) { - $(function() { - $(".report-list-filters [type=submit]").hide(); - $(".report-list-filters select").change(function() { - $(this).closest("form").submit(); - }); - }) - })(window.jQuery); -</script> -[% END %] diff --git a/templates/web/oxfordshire/reports/_list-entry.html b/templates/web/oxfordshire/reports/_list-entry.html index cd70410d3..b24ef2260 100644 --- a/templates/web/oxfordshire/reports/_list-entry.html +++ b/templates/web/oxfordshire/reports/_list-entry.html @@ -1,6 +1 @@ -<li class="[% c.cobrand.pin_colour(problem) %]"> - <a href="[% c.uri_for('/report', problem.id ) %]" class="[% problem.category %]"> - <h3>[% problem.title | html %]</h3> - <p>Reported [%- prettify_dt( problem.confirmed, 1 ) %]</p> - </a> -</li> +[% INCLUDE 'report/_item-with-pin.html' %] diff --git a/templates/web/zurich/report/_item.html b/templates/web/zurich/report/_item.html index 816afd0ff..22b39a2c8 100644 --- a/templates/web/zurich/report/_item.html +++ b/templates/web/zurich/report/_item.html @@ -12,7 +12,7 @@ [% END %] <small>[% prettify_dt( problem.created, 'zurich' ) %] [%- IF dist %], [% dist %]km[% END %] - [%- IF NOT exclude_lastupdate AND problem.created != problem.lastupdate AND problem.whensent != problem.lastupdate %], + [%- IF include_lastupdate AND problem.created != problem.lastupdate AND problem.whensent != problem.lastupdate %], [% tprintf(loc('last updated %s'), prettify_dt( problem.lastupdate, 'zurich' ) ) %] [%- END %] [% IF NOT no_fixed AND problem.is_fixed %] diff --git a/templates/web/zurich/reports/_list-entry.html b/templates/web/zurich/reports/_list-entry.html deleted file mode 100755 index 070048af6..000000000 --- a/templates/web/zurich/reports/_list-entry.html +++ /dev/null @@ -1 +0,0 @@ -[% INCLUDE 'report/_item.html' include_sentinfo = 1 exclude_lastupdate = 1 %] diff --git a/web/cobrands/eastsussex/layout.scss b/web/cobrands/eastsussex/layout.scss index 3ccfb3f6a..d90a617f1 100644 --- a/web/cobrands/eastsussex/layout.scss +++ b/web/cobrands/eastsussex/layout.scss @@ -211,42 +211,6 @@ body.twothirdswidthpage .content aside { margin-top: 3em; /* required to push "Your Reports" visible on Safari/IE */ } -#main-nav { - margin-top: 106px; - ul { - margin-left: 157px; - float: none; - } -} - -#main-nav ul li { - text-align: center; - text-transform: uppercase; - padding: 0 15px; - font-size: 16px; - border-right: solid 1px white; - line-height: 1.5em; -} - -#main-nav ul li a { - padding: 0; - font-size: inherit; -} - -#main-nav ul li:last-child { - border-right: none; -} - -#main-nav ul li a:link, #main-nav ul li a:visited { - color: #fff; -} - -#main-nav ul li:hover, #main-nav ul li:hover a, { - background-color: white; - color: black; - text-decoration: none; -} - .main-menu-wrapper { display: none; } @@ -254,11 +218,6 @@ body.twothirdswidthpage .content aside { @media only screen and (max-width: 61em) { - #main-nav { - padding-left: 0px; - float:none; - } - #site-header { height: auto; } diff --git a/web/cobrands/hart/hart.scss b/web/cobrands/hart/hart.scss index 0823a4bc5..7cd7306cc 100644 --- a/web/cobrands/hart/hart.scss +++ b/web/cobrands/hart/hart.scss @@ -76,14 +76,13 @@ body.frontpage .nav-wrapper-2 { #main-nav { margin-top: 106px; - - ul { - margin-left: 157px; - float: none; - } + } + .nav-menu { + margin-left: 157px; + float: none; } - #main-nav ul li { + .nav-menu li { text-align: center; text-transform: uppercase; padding: 0 15px; @@ -91,21 +90,16 @@ body.frontpage .nav-wrapper-2 { border-right: solid 1px white; line-height: 1.5em; } - - #main-nav ul li a { - padding: 0; - font-size: inherit; - } - - #main-nav ul li:last-child { + .nav-menu li:last-child { border-right: none; } - #main-nav ul li a:link, #main-nav ul li a:visited { - color: #fff; + .nav-menu a { + padding: 0; + font-size: inherit; } - #main-nav ul li:hover, #main-nav ul li:hover a, { + .nav-menu li:hover, .nav-menu li:hover a, { background-color: white; color: black; text-decoration: none; diff --git a/web/cobrands/sass/_layout.scss b/web/cobrands/sass/_layout.scss index 806f1408c..c9cc3610d 100644 --- a/web/cobrands/sass/_layout.scss +++ b/web/cobrands/sass/_layout.scss @@ -1116,7 +1116,7 @@ body.frontpage { // Left padding is to ensure no overlap of the site-logo // Background styling replicates header styling - #main-nav{ + #main-nav { width: auto; float: $right; padding-#{$left}: 180px; diff --git a/web/cobrands/stevenage/layout.scss b/web/cobrands/stevenage/layout.scss index 49529dd49..17ef6a4c3 100644 --- a/web/cobrands/stevenage/layout.scss +++ b/web/cobrands/stevenage/layout.scss @@ -37,10 +37,8 @@ } // d523b431 -#main-nav { - ul { - float: none; - } +.nav-menu { + float: none; } .nav-menu a, .nav-menu span { margin: 0; @@ -224,7 +222,9 @@ body.frontpage { // d523b431 #main-nav { float: left; + padding-left: 0; } + .nav-wrapper { .nav-wrapper-2 { @include background(linear-gradient(#222, #555 30%, #555 60%, #222)); |