mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-05 14:11:41 -04:00
Our research and prototyping around ‘basic view’ found that: - a lot of users who send messages rarely or never look at the dashboard (yet it’s the first page they see when they sign in) - team managers like the idea of taking away things that users don’t need in order to make the interface simpler We’ve disentangled the simpler way of sending messages from being part of ‘basic view’. This means we can give managers the option of taking away the dashboard as an independent choice, not something that’s wrapped up in a separate ‘view’. I think that this checkbox is a more straightforward proposition than ‘basic view’ ever was (despite all the work we did to explain it and develop the nested checkbox pattern). In research users would often explain the feature back to us as being about hiding the dashboard – we should try to make Notify operate in terms of concepts that come naturally to people wherever possible.
111 lines
3.8 KiB
HTML
111 lines
3.8 KiB
HTML
{% extends "withnav_template.html" %}
|
|
{% from "components/table.html" import list_table, row, field, hidden_field_heading %}
|
|
{% from "components/page-footer.html" import page_footer %}
|
|
{% from "components/tick-cross.html" import tick_cross %}
|
|
{% from "components/textbox.html" import textbox %}
|
|
|
|
{% set table_options = {
|
|
'field_headings': [
|
|
'Name', 'Send messages', 'Modify service', 'Access API keys', hidden_field_heading('Link to change')
|
|
],
|
|
'field_headings_visible': True,
|
|
'caption_visible': True
|
|
} %}
|
|
|
|
{% block service_page_title %}
|
|
Team members
|
|
{% endblock %}
|
|
|
|
{% block maincolumn_content %}
|
|
|
|
<div class="grid-row bottom-gutter">
|
|
<div class="column-two-thirds">
|
|
<h1 class="heading-large">
|
|
Team members
|
|
</h1>
|
|
</div>
|
|
{% if current_user.has_permissions('manage_service') %}
|
|
<div class="column-one-third">
|
|
<a href="{{ url_for('.invite_user', service_id=current_service.id) }}" class="button align-with-heading">Invite team member</a>
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
|
|
{% if show_search_box %}
|
|
<div data-module="autofocus">
|
|
<div class="live-search" data-module="live-search" data-targets=".user-list-item">
|
|
{{ textbox(
|
|
form.search,
|
|
width='1-1'
|
|
) }}
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
|
|
<div class="user-list">
|
|
{% for user in users %}
|
|
<div class="user-list-item">
|
|
<h3>
|
|
{%- if user.name -%}
|
|
<span class="heading-small">{{ user.name }}</span> 
|
|
{%- endif -%}
|
|
<span class="hint">
|
|
{%- if user.status == 'pending' -%}
|
|
{{ user.email_address }} (invited)
|
|
{%- elif user.status == 'cancelled' -%}
|
|
{{ user.email_address }} (cancelled invite)
|
|
{%- elif user.id == current_user.id -%}
|
|
(you)
|
|
{% else %}
|
|
{{ user.email_address }}
|
|
{% endif %}
|
|
</span>
|
|
</h3>
|
|
<ul class="tick-cross-list">
|
|
<div class="tick-cross-list-permissions">
|
|
{{ tick_cross(
|
|
user.has_permission_for_service(current_service.id, 'view_activity'),
|
|
'See dashboard and reports'
|
|
) }}
|
|
{{ tick_cross(
|
|
user.has_permission_for_service(current_service.id, 'send_messages'),
|
|
'Send messages'
|
|
) }}
|
|
{{ tick_cross(
|
|
user.has_permission_for_service(current_service.id, 'manage_templates'),
|
|
'Add and edit templates'
|
|
) }}
|
|
{{ tick_cross(
|
|
user.has_permission_for_service(current_service.id, 'manage_service'),
|
|
'Manage service'
|
|
) }}
|
|
{{ tick_cross(
|
|
user.has_permission_for_service(current_service.id, 'manage_api_keys'),
|
|
'Access API keys'
|
|
) }}
|
|
{% if current_service.has_permission('email_auth') %}
|
|
<div class="tick-cross-list-hint">
|
|
{% if user.auth_type == 'sms_auth' %}
|
|
Signs in with a text message code
|
|
{% else %}
|
|
Signs in with an email link
|
|
{% endif %}
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
{% if current_user.has_permissions('manage_service') %}
|
|
<li class="tick-cross-list-edit-link">
|
|
{% if user.status == 'pending' %}
|
|
<a href="{{ url_for('.cancel_invited_user', service_id=current_service.id, invited_user_id=user.id)}}">Cancel invitation</a>
|
|
{% elif user.state == 'active' and current_user.id != user.id %}
|
|
<a href="{{ url_for('.edit_user_permissions', service_id=current_service.id, user_id=user.id)}}">Edit permissions</a>
|
|
{% endif %}
|
|
</li>
|
|
{% endif %}
|
|
</ul>
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
|
|
{% endblock %}
|