mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-18 21:49:37 -04:00
Rename dashboard to ‘current alerts’
The dashboard for normal services is quite general, because it tells you a bit about channels, templates and spend. What is now the dashboard for broadcast services is much more specific, therefore less like a dashboard. We can reflect this by giving it a more specific name. This should reduce the amount of navigation surfing people need to do in order to find the thing they’re looking for.
This commit is contained in:
@@ -30,7 +30,7 @@ def broadcast_tour(service_id, step_index):
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@main.route('/services/<uuid:service_id>/broadcast-dashboard')
|
@main.route('/services/<uuid:service_id>/current-alerts')
|
||||||
@user_has_permissions()
|
@user_has_permissions()
|
||||||
@service_has_permission('broadcast')
|
@service_has_permission('broadcast')
|
||||||
def broadcast_dashboard(service_id):
|
def broadcast_dashboard(service_id):
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<ul>
|
<ul>
|
||||||
{% if current_user.has_permissions() %}
|
{% if current_user.has_permissions() %}
|
||||||
{% if current_service.has_permission('broadcast') %}
|
{% if current_service.has_permission('broadcast') %}
|
||||||
<li><a class="govuk-link govuk-link--no-visited-state{{ main_navigation.is_selected('dashboard') }}" href="{{ url_for('.broadcast_dashboard', service_id=current_service.id) }}">Dashboard</a></li>
|
<li><a class="govuk-link govuk-link--no-visited-state{{ main_navigation.is_selected('dashboard') }}" href="{{ url_for('.broadcast_dashboard', service_id=current_service.id) }}">Current alerts</a></li>
|
||||||
<li><a class="govuk-link govuk-link--no-visited-state{{ main_navigation.is_selected('previous_broadcasts') }}" href="{{ url_for('.broadcast_dashboard_previous', service_id=current_service.id) }}">Previous alerts</a></li>
|
<li><a class="govuk-link govuk-link--no-visited-state{{ main_navigation.is_selected('previous_broadcasts') }}" href="{{ url_for('.broadcast_dashboard_previous', service_id=current_service.id) }}">Previous alerts</a></li>
|
||||||
{% elif current_user.has_permissions('view_activity') %}
|
{% elif current_user.has_permissions('view_activity') %}
|
||||||
<li><a class="govuk-link govuk-link--no-visited-state{{ main_navigation.is_selected('dashboard') }}" href="{{ url_for('.service_dashboard', service_id=current_service.id) }}">Dashboard</a></li>
|
<li><a class="govuk-link govuk-link--no-visited-state{{ main_navigation.is_selected('dashboard') }}" href="{{ url_for('.service_dashboard', service_id=current_service.id) }}">Dashboard</a></li>
|
||||||
|
|||||||
@@ -33,7 +33,7 @@
|
|||||||
</p>
|
</p>
|
||||||
<p class="govuk-body heading-medium">
|
<p class="govuk-body heading-medium">
|
||||||
<a class="govuk-link govuk-link--no-visited-state" href='{{ url_for(".service_dashboard", service_id=current_service.id) }}'>
|
<a class="govuk-link govuk-link--no-visited-state" href='{{ url_for(".service_dashboard", service_id=current_service.id) }}'>
|
||||||
Continue to dashboard
|
Continue
|
||||||
</a>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
</p>
|
</p>
|
||||||
<p class="govuk-body heading-medium">
|
<p class="govuk-body heading-medium">
|
||||||
<a class="govuk-link govuk-link--no-visited-state" href='{{ url_for(".service_dashboard", service_id=current_service.id) }}'>
|
<a class="govuk-link govuk-link--no-visited-state" href='{{ url_for(".service_dashboard", service_id=current_service.id) }}'>
|
||||||
Continue to dashboard
|
Continue
|
||||||
</a>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -143,8 +143,8 @@ def test_broadcast_pages_403_for_user_without_permission(
|
|||||||
(2, 'Continue', partial(url_for, '.broadcast_tour', step_index=3)),
|
(2, 'Continue', partial(url_for, '.broadcast_tour', step_index=3)),
|
||||||
(3, 'Continue', partial(url_for, '.broadcast_tour', step_index=4)),
|
(3, 'Continue', partial(url_for, '.broadcast_tour', step_index=4)),
|
||||||
(4, 'Continue', partial(url_for, '.broadcast_tour', step_index=5)),
|
(4, 'Continue', partial(url_for, '.broadcast_tour', step_index=5)),
|
||||||
(5, 'Continue to dashboard', partial(url_for, '.service_dashboard')),
|
(5, 'Continue', partial(url_for, '.service_dashboard')),
|
||||||
(6, 'Continue to dashboard', partial(url_for, '.service_dashboard')),
|
(6, 'Continue', partial(url_for, '.service_dashboard')),
|
||||||
))
|
))
|
||||||
def test_broadcast_tour_pages_have_continue_link(
|
def test_broadcast_tour_pages_have_continue_link(
|
||||||
client_request,
|
client_request,
|
||||||
|
|||||||
@@ -188,7 +188,7 @@ def test_navigation_for_services_with_broadcast_permission(
|
|||||||
assert [
|
assert [
|
||||||
a['href'] for a in page.select('.navigation a')
|
a['href'] for a in page.select('.navigation a')
|
||||||
] == [
|
] == [
|
||||||
'/services/{}/broadcast-dashboard'.format(SERVICE_ONE_ID),
|
'/services/{}/current-alerts'.format(SERVICE_ONE_ID),
|
||||||
'/services/{}/previous-alerts'.format(SERVICE_ONE_ID),
|
'/services/{}/previous-alerts'.format(SERVICE_ONE_ID),
|
||||||
'/services/{}/templates'.format(SERVICE_ONE_ID),
|
'/services/{}/templates'.format(SERVICE_ONE_ID),
|
||||||
'/services/{}/users'.format(SERVICE_ONE_ID),
|
'/services/{}/users'.format(SERVICE_ONE_ID),
|
||||||
|
|||||||
Reference in New Issue
Block a user