mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-09 11:29:49 -04:00
Add table to user profile page
This commit is contained in:
@@ -1,19 +1,35 @@
|
|||||||
{% extends "withnav_template.html" %}
|
{% extends "withnav_template.html" %}
|
||||||
{% from "components/page-footer.html" import page_footer %}
|
{% from "components/table.html" import list_table, row, field %}
|
||||||
|
|
||||||
{% block page_title %}
|
{% block page_title %}
|
||||||
GOV.UK Notify | User settings
|
GOV.UK Notify | Your profile
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block maincolumn_content %}
|
{% block maincolumn_content %}
|
||||||
|
|
||||||
<h1 class="heading-xlarge">User profile</h1>
|
<h1 class="heading-xlarge">Your profile</h1>
|
||||||
|
|
||||||
<p>Here's where users can update their profile, password etc.</p>
|
{% call(item) list_table(
|
||||||
|
[
|
||||||
{{ page_footer(
|
{'label': 'Name', 'value': current_user.name, 'url': url_for('.userprofile_name')},
|
||||||
back_link = url_for('.dashboard'),
|
{'label': 'Email address', 'value': current_user.email_address, 'url': url_for('.userprofile_email')},
|
||||||
back_link_text = 'Back to dashboard'
|
{'label': 'Mobile number', 'value': current_user.mobile_number, 'url': url_for('.userprofile_mobile_number')},
|
||||||
) }}
|
{'label': 'Password', 'value': 'Last changed 1 January 2016, 10:00AM', 'url': url_for('.userprofile_password')},
|
||||||
|
],
|
||||||
|
caption='Account settings',
|
||||||
|
field_headings=['Setting', 'Value', 'Link to change'],
|
||||||
|
field_headings_visible=False,
|
||||||
|
caption_visible=False
|
||||||
|
) %}
|
||||||
|
{% call field() %}
|
||||||
|
{{ item.label }}
|
||||||
|
{% endcall %}
|
||||||
|
{% call field() %}
|
||||||
|
{{ item.value }}
|
||||||
|
{% endcall %}
|
||||||
|
{% call field(align='right') %}
|
||||||
|
<a href="{{ item.url }}">Change</a>
|
||||||
|
{% endcall %}
|
||||||
|
{% endcall %}
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
def test_should_show_overview_page(notifications_admin):
|
def test_should_show_overview_page(notifications_admin):
|
||||||
response = notifications_admin.test_client().get('/user-profile')
|
response = notifications_admin.test_client().get('/user-profile')
|
||||||
|
|
||||||
|
assert 'Your profile' in response.get_data(as_text=True)
|
||||||
assert response.status_code == 200
|
assert response.status_code == 200
|
||||||
|
|||||||
Reference in New Issue
Block a user