mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-05 21:38:24 -04:00
Most of the content of our ‘settings’ tables is in the value, not the key. The value is in the middle column. So we should allocate the most space to the value. The previous layout was based on the premise that most pages divided the grid like this: ``` _______ _______ _______ _______ _______ _______ _______ _______ | 1/8 | 1/8 | 1/8 | 1/8 | 1/8 | 1/8 | 1/8 | 1/8 | | | | | | | 2/8 | 2/8 | 2/8 | 2/8 | | | | | | |–Navigation––––|–Main column–––––––––––––––––––––––––––––––––––| | | | | | | 3/8 | 3/8 | | | | | | |–Label–––––––––––––––––|–Value––––––––––––Link–| | | | | |_______________|_______________________|_______________________| ``` This was because a lot of pages had a left column for emails, and a right column for text messages, so it felt consistent for tables to always default to 50% of the width of the main column. This consistency has faded with time, especially as we added letters. So this commit changes these tables to allocate more space to the central column, but still sticking to the grid like this: ``` _______ _______ _______ _______ _______ _______ _______ _______ | 1/8 | 1/8 | 1/8 | 1/8 | 1/8 | 1/8 | 1/8 | 1/8 | | | | | | | | | | | 2/8 | 2/8 | 4/8 | | | | | |–Navigation––––|–Main column–––––––––––––––––––––––––––––––––––| | | | | | | | 2/8 | 3/8 | 1/8 | | | | | | | |–Label–––––––––|–Value–––––––––––––––––|–––Link| |_______________|_______________|_______________________|_______| ``` Since there’s more space to display the value of a setting this commit also truncates settings that are too long to fit in the width of the column (for example a long email address) rather than the previous behaviour of truncating them. This all just makes things look a bit cleaner.
116 lines
3.6 KiB
HTML
116 lines
3.6 KiB
HTML
{% extends "org_template.html" %}
|
|
{% from "components/table.html" import mapping_table, optional_text_field, row, text_field, edit_field with context %}
|
|
|
|
{% block org_page_title %}
|
|
Settings
|
|
{% endblock %}
|
|
|
|
{% block maincolumn_content %}
|
|
<h1 class="heading-large">Settings</h1>
|
|
<div class="bottom-gutter-3-2 dashboard-table body-copy-table">
|
|
{% call mapping_table(
|
|
caption='General',
|
|
field_headings=['Label', 'Value', 'Action'],
|
|
field_headings_visible=False,
|
|
caption_visible=False
|
|
) %}
|
|
{% call row() %}
|
|
{{ text_field('Organisation name') }}
|
|
{{ text_field(current_org.name) }}
|
|
{{ edit_field(
|
|
'Change',
|
|
url_for('.edit_organisation_name', org_id=current_org.id)
|
|
)
|
|
}}
|
|
{% endcall %}
|
|
{% endcall %}
|
|
</div>
|
|
|
|
|
|
{% if current_user.platform_admin %}
|
|
<h2 class="heading-medium">Platform admin settings</h2>
|
|
<div class="bottom-gutter-3-2 settings-table body-copy-table">
|
|
{% call mapping_table(
|
|
caption='Platform admin settings',
|
|
field_headings=['Label', 'Value', 'Action'],
|
|
field_headings_visible=False,
|
|
caption_visible=False
|
|
) %}
|
|
{% call row() %}
|
|
{{ text_field('Organisation type') }}
|
|
{{ optional_text_field({
|
|
'central': 'Central government',
|
|
'local': 'Local government',
|
|
'nhs': 'NHS',
|
|
}.get(current_org.organisation_type)) }}
|
|
{{ edit_field(
|
|
'Change',
|
|
url_for('.edit_organisation_type', org_id=current_org.id)
|
|
)
|
|
}}
|
|
{% endcall %}
|
|
{% call row() %}
|
|
{{ text_field('Crown organisation') }}
|
|
{{ optional_text_field(
|
|
{
|
|
True: 'Yes',
|
|
False: 'No',
|
|
}.get(current_org.crown),
|
|
default='Not sure'
|
|
) }}
|
|
{{ edit_field(
|
|
'Change',
|
|
url_for('.edit_organisation_crown_status', org_id=current_org.id)
|
|
)
|
|
}}
|
|
{% endcall %}
|
|
{% call row() %}
|
|
{{ text_field('Data sharing and financial agreement') }}
|
|
{{ text_field(
|
|
{
|
|
True: 'Signed',
|
|
False: 'Not signed',
|
|
None: 'Not signed (but we have some service-specific agreements in place)'
|
|
}.get(current_org.agreement_signed)
|
|
) }}
|
|
{{ edit_field(
|
|
'Change',
|
|
url_for('.edit_organisation_agreement', org_id=current_org.id)
|
|
)
|
|
}}
|
|
{% endcall %}
|
|
{% call row() %}
|
|
{{ text_field('Default email branding') }}
|
|
{{ text_field(email_branding) }}
|
|
{{ edit_field(
|
|
'Change',
|
|
url_for('.edit_organisation_email_branding', org_id=current_org.id)
|
|
)
|
|
}}
|
|
{% endcall %}
|
|
{% call row() %}
|
|
{{ text_field('Default letter branding') }}
|
|
{{ optional_text_field(
|
|
letter_branding,
|
|
default='No branding'
|
|
) }}
|
|
{{ edit_field(
|
|
'Change',
|
|
url_for('.edit_organisation_letter_branding', org_id=current_org.id)
|
|
)
|
|
}}
|
|
{% endcall %}
|
|
{% call row() %}
|
|
{{ text_field('Known email domains') }}
|
|
{{ optional_text_field(current_org.domains or None, default='None') }}
|
|
{{ edit_field(
|
|
'Change',
|
|
url_for('.edit_organisation_domains', org_id=current_org.id)
|
|
)
|
|
}}
|
|
{% endcall %}
|
|
{% endcall %}
|
|
</div>
|
|
{% endif %}
|
|
{% endblock %}
|