Skip to content

Commit

Permalink
[Bristol] Add layers for allowed reports
Browse files Browse the repository at this point in the history
Setup for two asset layers to have either selected to allow reports
in Bristol on relevant categories.

mysociety/societyworks#4692
  • Loading branch information
MorayMySoc committed Jan 24, 2025
1 parent fbbb05a commit d5fb4a9
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 0 deletions.
8 changes: 8 additions & 0 deletions templates/web/bristol/report/new/roads_message.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<div id="bristol-not-owned" class="hidden js-responsibility-message js-roads-bristol">
<strong>
The area selected is not maintained by Bristol City Council
</strong>
<p>
To enable you to find out who owns/maintains this area please contact HM Land Registry at https://www.gov.uk/search-property-information-land-registry.
</p>
</div>
8 changes: 8 additions & 0 deletions templates/web/fixmystreet.com/report/new/roads_message.html
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,14 @@
</a> who own and manage it.
</p>
</div>
<div id="bristol-not-owned" class="hidden js-responsibility-message js-roads-bristol">
<strong>
The area selected is not maintained by Bristol City Council
</strong>
<p>
To enable you to find out who owns/maintains this area please contact HM Land Registry at https://www.gov.uk/search-property-information-land-registry.
</p>
</div>
</div>
<div id="js-environment-message" class="hidden">
<p>
Expand Down
17 changes: 17 additions & 0 deletions web/cobrands/fixmystreet-uk-councils/assets.js
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,23 @@ fixmystreet.assets.bristol.park_stylemap = new OpenLayers.StyleMap({
})
});


var bristol_owned_asset = false;

fixmystreet.assets.bristol.road_found = function(layer) {
bristol_owned_asset = true;
fixmystreet.message_controller.road_found(layer);
};

fixmystreet.assets.bristol.road_not_found = function(layer) {
if (bristol_owned_asset) {
bristol_owned_asset = false;
return;
} else {
fixmystreet.message_controller.road_not_found(layer, function() {return true;});
}
};

/* Bromley */

fixmystreet.assets.bromley = {};
Expand Down

0 comments on commit d5fb4a9

Please sign in to comment.