add counties page
What was previously ward -> local authority is now a ward -> local
authority -> county. County only covers rural counties and not
metropolitan boroughs and other unitary authorities. Previously, there
was a page full of local authorities (unitary authorities and
districts), and each one of those would have a list of electoral wards.
However, now there are counties that contain a list of districts - so
this needs a new page - a checkbox for "select the county" and then a
list of links to district pages.
If you want to select multiple districts, you'll need to go into each
one of those sub-sections in turn and click select all.
Needed to tweak the query to retrieve the list of areas in a list for a
library. Previously, it just returned anything at top level (ie: didn't
have a parent). However, rural districts now have parents (the rural
counties themselves). So the query now returns "everything that isn't a
leaf node", or in more specific terms, everything that has at least
other row referring to it as a parent. So no electoral wards, since
they dont have any children, but yes to districts and counties.
2020-09-04 15:22:32 +01:00
|
|
|
{% from "components/page-header.html" import page_header %}
|
|
|
|
|
{% from "components/live-search.html" import live_search %}
|
|
|
|
|
{% from "components/page-footer.html" import sticky_page_footer %}
|
|
|
|
|
{% from "components/form.html" import form_wrapper %}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{% extends "withnav_template.html" %}
|
|
|
|
|
|
|
|
|
|
{% block service_page_title %}
|
|
|
|
|
{{ page_title }}
|
|
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
|
|
{% block maincolumn_content %}
|
|
|
|
|
|
|
|
|
|
{{ page_header(
|
|
|
|
|
page_title,
|
2020-09-15 13:53:38 +01:00
|
|
|
back_link=back_link,
|
add counties page
What was previously ward -> local authority is now a ward -> local
authority -> county. County only covers rural counties and not
metropolitan boroughs and other unitary authorities. Previously, there
was a page full of local authorities (unitary authorities and
districts), and each one of those would have a list of electoral wards.
However, now there are counties that contain a list of districts - so
this needs a new page - a checkbox for "select the county" and then a
list of links to district pages.
If you want to select multiple districts, you'll need to go into each
one of those sub-sections in turn and click select all.
Needed to tweak the query to retrieve the list of areas in a list for a
library. Previously, it just returned anything at top level (ie: didn't
have a parent). However, rural districts now have parents (the rural
counties themselves). So the query now returns "everything that isn't a
leaf node", or in more specific terms, everything that has at least
other row referring to it as a parent. So no electoral wards, since
they dont have any children, but yes to districts and counties.
2020-09-04 15:22:32 +01:00
|
|
|
)}}
|
|
|
|
|
|
|
|
|
|
{% call form_wrapper() %}
|
|
|
|
|
|
|
|
|
|
<div class="form-group govuk-!-margin-bottom-4">
|
|
|
|
|
{{ form.select_all }}
|
|
|
|
|
</div>
|
|
|
|
|
{{ live_search(target_selector='.file-list-item', show=show_search_form, form=search_form, label='Or by district') }}
|
|
|
|
|
|
|
|
|
|
{% for area in county.sub_areas|sort %}
|
|
|
|
|
<div class="file-list-item">
|
|
|
|
|
{# these are districts within a county#}
|
|
|
|
|
<a
|
|
|
|
|
class="file-list-filename-large govuk-link govuk-link--no-visited-state"
|
2020-09-15 13:53:38 +01:00
|
|
|
href="{{ url_for('.choose_broadcast_sub_area', service_id=current_service.id, broadcast_message_id=broadcast_message.id, library_slug=library_slug, area_slug=area.id, prev_area_slug=county.id) }}"
|
add counties page
What was previously ward -> local authority is now a ward -> local
authority -> county. County only covers rural counties and not
metropolitan boroughs and other unitary authorities. Previously, there
was a page full of local authorities (unitary authorities and
districts), and each one of those would have a list of electoral wards.
However, now there are counties that contain a list of districts - so
this needs a new page - a checkbox for "select the county" and then a
list of links to district pages.
If you want to select multiple districts, you'll need to go into each
one of those sub-sections in turn and click select all.
Needed to tweak the query to retrieve the list of areas in a list for a
library. Previously, it just returned anything at top level (ie: didn't
have a parent). However, rural districts now have parents (the rural
counties themselves). So the query now returns "everything that isn't a
leaf node", or in more specific terms, everything that has at least
other row referring to it as a parent. So no electoral wards, since
they dont have any children, but yes to districts and counties.
2020-09-04 15:22:32 +01:00
|
|
|
>{{ area.name }}</a>
|
|
|
|
|
</div>
|
|
|
|
|
{% endfor %}
|
|
|
|
|
|
|
|
|
|
{{ sticky_page_footer('Add to broadcast') }}
|
|
|
|
|
|
|
|
|
|
{% endcall %}
|
|
|
|
|
|
|
|
|
|
{% endblock %}
|