diff options
-rw-r--r-- | web/cobrands/buckinghamshire/assets.js | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/web/cobrands/buckinghamshire/assets.js b/web/cobrands/buckinghamshire/assets.js index 1c0823c17..32c551d1a 100644 --- a/web/cobrands/buckinghamshire/assets.js +++ b/web/cobrands/buckinghamshire/assets.js @@ -428,4 +428,39 @@ fixmystreet.assets.add($.extend(true, {}, defaults, { filter_value: types_to_show, })); +fixmystreet.assets.add($.extend(true, {}, defaults, { + http_options: { + params: { + TYPENAME: "WinterRoutes" + } + }, + asset_category: "Snow and ice problem/winter salting", + asset_item: "road", + non_interactive: true, + road: true, + actions: { + found: function() { + var $div = $("#category_meta .js-gritting-notice"); + if ($div.length) { + $div.show(); + } else { + var msg = "<div class='box-warning js-gritting-notice'>" + + "<h1>Winter Gritting</h1>" + + "<p>The road you have selected is on a regular " + + "gritting route, and will be gritted according " + + "to the published " + + "<a href='https://www.buckscc.gov.uk/services/transport-and-roads/road-maintenance-and-repairs/winter-maintenance/'>" + + "policy</a>.</p>" + + "</div>"; + $div = $(msg); + $div.prependTo("#category_meta"); + } + }, + not_found: function() { + $("#category_meta .js-gritting-notice").hide(); + } + } +})); + + })(); |