mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-02-05 10:53:28 -05:00
Fix users page for research
For the lab sessions, users should just see themselves as the only user, not all the fake users (it might confuse them).
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 971 B |
@@ -12,7 +12,7 @@
|
||||
&-delete-link {
|
||||
|
||||
line-height: 40px;
|
||||
padding: 0 0 0 5px;
|
||||
padding: 1px 0 0 15px;
|
||||
|
||||
a {
|
||||
|
||||
|
||||
@@ -15,55 +15,13 @@ from app.main.forms import InviteUserForm
|
||||
from app.main.dao.services_dao import get_service_by_id_or_404
|
||||
from app import user_api_client
|
||||
|
||||
|
||||
fake_users = [
|
||||
{
|
||||
'name': 'Henry Hadlow',
|
||||
'email_localpart': 'henry.hadlow',
|
||||
'permission_send_messages': True,
|
||||
'permission_manage_service': False,
|
||||
'permission_manage_api_keys': False,
|
||||
'active': True
|
||||
},
|
||||
|
||||
{
|
||||
'name': 'Pete Herlihy',
|
||||
'email_localpart': 'pete.herlihy',
|
||||
'permission_send_messages': False,
|
||||
'permission_manage_service': False,
|
||||
'permission_manage_api_keys': False,
|
||||
'active': True
|
||||
},
|
||||
{
|
||||
'name': 'Chris Hill-Scott',
|
||||
'email_localpart': 'chris.hill-scott',
|
||||
'name': '',
|
||||
'permission_send_messages': True,
|
||||
'permission_manage_service': True,
|
||||
'permission_manage_api_keys': True,
|
||||
'active': True
|
||||
},
|
||||
{
|
||||
'name': 'Martyn Inglis',
|
||||
'email_localpart': 'martyn.inglis',
|
||||
'permission_send_messages': True,
|
||||
'permission_manage_service': True,
|
||||
'permission_manage_api_keys': True,
|
||||
'active': True
|
||||
},
|
||||
{
|
||||
'email_localpart': 'caley.smolska',
|
||||
'permission_send_messages': True,
|
||||
'permission_manage_service': False,
|
||||
'permission_manage_api_keys': False,
|
||||
'active': False
|
||||
},
|
||||
|
||||
{
|
||||
'email_localpart': 'ash.stephens',
|
||||
'permission_send_messages': False,
|
||||
'permission_manage_service': False,
|
||||
'permission_manage_api_keys': False,
|
||||
'active': False
|
||||
}
|
||||
]
|
||||
|
||||
@@ -74,12 +32,9 @@ def manage_users(service_id):
|
||||
return render_template(
|
||||
'views/manage-users.html',
|
||||
service_id=service_id,
|
||||
users=[
|
||||
dict(id=user_id, **user) for (user_id, user) in enumerate(fake_users) if user['active']
|
||||
],
|
||||
invited_users=[
|
||||
dict(id=user_id, **user) for (user_id, user) in enumerate(fake_users) if not user['active']
|
||||
]
|
||||
users=fake_users,
|
||||
current_user=current_user,
|
||||
invited_users=[]
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -1,53 +0,0 @@
|
||||
{% extends "withnav_template.html" %}
|
||||
{% from "components/sms-message.html" import sms_message %}
|
||||
{% from "components/email-message.html" import email_message %}
|
||||
{% from "components/browse-list.html" import browse_list %}
|
||||
|
||||
{% block page_title %}
|
||||
Manage templates – GOV.UK Notify
|
||||
{% endblock %}
|
||||
|
||||
{% block maincolumn_content %}
|
||||
|
||||
<h1 class="heading-large">Manage templates</h1>
|
||||
|
||||
|
||||
{% if not has_jobs %}
|
||||
{{ banner(
|
||||
'<a href="{}">Send yourself a text message</a>'.format(
|
||||
url_for(".choose_sms_template", service_id=service_id)
|
||||
)|safe,
|
||||
subhead='Next step',
|
||||
type="tip"
|
||||
)}}
|
||||
{% endif %}
|
||||
|
||||
<div class="grid-row">
|
||||
<div class="column-two-thirds">
|
||||
|
||||
{% for template in templates %}
|
||||
{% if template.template_type == 'email' %}
|
||||
{{ email_message(
|
||||
template.get_field('subject'),
|
||||
template.get_field('content'),
|
||||
name=template.get_field('name'),
|
||||
edit_link=url_for('.edit_service_template', service_id=service_id, template_id=template.id)
|
||||
) }}
|
||||
{% else %}
|
||||
{{ sms_message(
|
||||
template.formatted_as_markup,
|
||||
name=template.name,
|
||||
id=template.id,
|
||||
edit_link=url_for('.edit_service_template', service_id=service_id, template_id=template.id)
|
||||
) }}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
<p>
|
||||
<a href="{{ url_for('.add_service_template', service_id=service_id) }}" class="button">Add new template</a>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
@@ -20,22 +20,21 @@ Manage users – GOV.UK Notify
|
||||
Manage team
|
||||
</h1>
|
||||
|
||||
<a href="{{ url_for('.invite_user', service_id=service_id) }}" class="button">Invite a team member</a>
|
||||
|
||||
{% call(item) list_table(
|
||||
users, caption='Active', **table_options
|
||||
) %}
|
||||
{% call field() %}
|
||||
{{ item.name }}
|
||||
{{ current_user.name }}
|
||||
{% endcall %}
|
||||
{{ boolean_field(item.permission_send_messages) }}
|
||||
{{ boolean_field(item.permission_manage_service) }}
|
||||
{{ boolean_field(item.permission_manage_api_keys) }}
|
||||
{% call field(align='right') %}
|
||||
<a href="{{ url_for('.edit_user', service_id=service_id, user_id=item.id)}}">Change</a>
|
||||
<a href="{{ url_for('.edit_user', service_id=service_id, user_id=0)}}">Change</a>
|
||||
{% endcall %}
|
||||
{% endcall %}
|
||||
<p class='table-show-more-link'>
|
||||
<a href="{{ url_for('.invite_user', service_id=service_id) }}">Add a new team member</a>
|
||||
</p>
|
||||
|
||||
{% if invited_users %}
|
||||
{% call(item) list_table(
|
||||
|
||||
Reference in New Issue
Block a user