2016-02-01 12:15:38 +00:00
|
|
|
|
{% extends "withoutnav_template.html" %}
|
2016-01-11 11:13:06 +00:00
|
|
|
|
|
|
|
|
|
|
{% from "components/banner.html" import banner %}
|
|
|
|
|
|
{% from "components/big-number.html" import big_number %}
|
|
|
|
|
|
{% from "components/browse-list.html" import browse_list %}
|
|
|
|
|
|
{% from "components/page-footer.html" import page_footer %}
|
2016-02-21 11:15:15 +00:00
|
|
|
|
{% from "components/table.html" import mapping_table, list_table, row, field, text_field, boolean_field, right_aligned_field_heading %}
|
2016-01-11 11:13:06 +00:00
|
|
|
|
{% from "components/textbox.html" import textbox %}
|
2016-02-02 17:28:30 +00:00
|
|
|
|
{% from "components/file-upload.html" import file_upload %}
|
2016-01-15 10:50:10 +00:00
|
|
|
|
{% from "components/api-key.html" import api_key %}
|
2016-01-11 11:13:06 +00:00
|
|
|
|
|
2017-02-13 10:45:15 +00:00
|
|
|
|
{% block per_page_title %}
|
|
|
|
|
|
Styleguide
|
2016-01-11 11:13:06 +00:00
|
|
|
|
{% endblock %}
|
|
|
|
|
|
|
2016-02-01 12:15:38 +00:00
|
|
|
|
{% block maincolumn_content %}
|
2016-01-11 11:13:06 +00:00
|
|
|
|
|
2016-02-02 14:05:45 +00:00
|
|
|
|
<h1 class="heading-large">
|
2019-12-06 07:53:46 +00:00
|
|
|
|
<a class="govuk-link govuk-link--no-visited-state" href="http://www.notify.works/_styleguide" style="text-decoration: none;">www.notify.works/_styleguide</a>
|
2016-01-11 11:13:06 +00:00
|
|
|
|
</h1>
|
|
|
|
|
|
|
2020-05-29 17:11:01 +01:00
|
|
|
|
<p class="govuk-body">
|
2019-12-06 07:53:46 +00:00
|
|
|
|
<a class="govuk-link govuk-link--no-visited-state" href="https://github.com/alphagov/notifications-admin/blob/master/app/templates/views/styleguide.html">View source</a>
|
2016-02-02 09:38:31 +00:00
|
|
|
|
</p>
|
2016-01-11 11:37:05 +00:00
|
|
|
|
|
2016-01-11 11:13:06 +00:00
|
|
|
|
<h2 class="heading-large">Banner</h2>
|
2020-02-19 11:57:15 +00:00
|
|
|
|
<div class="govuk-grid-row">
|
2020-02-20 16:55:56 +00:00
|
|
|
|
<div class="govuk-grid-column-three-quarters">
|
2020-05-29 17:11:01 +01:00
|
|
|
|
<p class="govuk-body">Used to show the status of a thing or action.</p>
|
2016-01-26 16:20:57 +00:00
|
|
|
|
|
2016-02-21 11:15:15 +00:00
|
|
|
|
{{ banner("You sent 1,234 text messages", with_tick=True) }}
|
2016-01-26 16:20:57 +00:00
|
|
|
|
|
2016-02-21 11:15:15 +00:00
|
|
|
|
{{ banner('You’re not allowed to do this', 'dangerous')}}
|
2016-01-26 16:20:57 +00:00
|
|
|
|
|
2016-02-21 11:15:15 +00:00
|
|
|
|
{{ banner('Are you sure you want to delete?', 'dangerous', delete_button="Yes, delete this thing")}}
|
2016-01-26 16:20:57 +00:00
|
|
|
|
|
2016-02-21 11:15:15 +00:00
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
2016-02-02 09:38:31 +00:00
|
|
|
|
|
2016-02-05 10:33:14 +00:00
|
|
|
|
|
2016-01-11 11:13:06 +00:00
|
|
|
|
<h2 class="heading-large">Big number</h2>
|
|
|
|
|
|
|
2020-05-29 17:11:01 +01:00
|
|
|
|
<p class="govuk-body">Used to show some important statistics.</p>
|
2016-01-11 11:13:06 +00:00
|
|
|
|
|
2020-02-19 11:57:15 +00:00
|
|
|
|
<div class="govuk-grid-row">
|
2020-02-19 12:29:28 +00:00
|
|
|
|
<div class="govuk-grid-column-one-third">
|
2016-01-11 11:13:06 +00:00
|
|
|
|
{{ big_number("567") }}
|
|
|
|
|
|
</div>
|
2020-02-19 12:29:28 +00:00
|
|
|
|
<div class="govuk-grid-column-one-third">
|
2016-04-07 14:52:04 +01:00
|
|
|
|
{{ big_number("2", "Messages delivered") }}
|
2016-01-11 11:13:06 +00:00
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<h2 class="heading-large">Browse list</h2>
|
|
|
|
|
|
|
2020-05-29 17:11:01 +01:00
|
|
|
|
<p class="govuk-body">Used to navigate to child pages.</p>
|
2016-01-11 11:13:06 +00:00
|
|
|
|
|
|
|
|
|
|
{{ browse_list([
|
|
|
|
|
|
{
|
|
|
|
|
|
'title': 'Change your username',
|
|
|
|
|
|
'link': 'http://example.com',
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
'title': 'Change your password',
|
|
|
|
|
|
'link': 'http://example.com',
|
|
|
|
|
|
'hint': 'Your password is used to log in'
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
'title': 'Delete everything',
|
|
|
|
|
|
'link': 'http://example.com',
|
2019-09-13 10:11:56 +01:00
|
|
|
|
'hint': 'You cannot undo this',
|
2016-01-11 11:13:06 +00:00
|
|
|
|
'destructive': True
|
|
|
|
|
|
}
|
|
|
|
|
|
]) }}
|
|
|
|
|
|
|
|
|
|
|
|
<h2 class="heading-large">Page footer</h2>
|
|
|
|
|
|
|
2020-05-29 17:11:01 +01:00
|
|
|
|
<p class="govuk-body">
|
2016-01-11 11:13:06 +00:00
|
|
|
|
Used to submit forms and optionally provide a link to go back to the
|
|
|
|
|
|
previous page.
|
|
|
|
|
|
</p>
|
2020-05-29 17:11:01 +01:00
|
|
|
|
<p class="govuk-body">
|
2016-01-11 11:13:06 +00:00
|
|
|
|
Must be used inside a form.
|
|
|
|
|
|
</p>
|
2020-05-29 17:11:01 +01:00
|
|
|
|
<p class="govuk-body">
|
2016-01-11 11:13:06 +00:00
|
|
|
|
Adds a hidden CSRF token to the page.
|
|
|
|
|
|
</p>
|
|
|
|
|
|
|
|
|
|
|
|
{{ page_footer(
|
2017-07-19 12:41:14 +01:00
|
|
|
|
button_text='Continue'
|
2016-01-11 11:13:06 +00:00
|
|
|
|
) }}
|
|
|
|
|
|
|
2016-02-02 09:38:31 +00:00
|
|
|
|
{{ page_footer(
|
|
|
|
|
|
button_text='Save',
|
|
|
|
|
|
delete_link='http://example.com',
|
|
|
|
|
|
delete_link_text='delete this thing'
|
|
|
|
|
|
)}}
|
|
|
|
|
|
|
2016-01-11 11:13:06 +00:00
|
|
|
|
{{ page_footer(
|
|
|
|
|
|
button_text='Delete', destructive=True
|
|
|
|
|
|
) }}
|
|
|
|
|
|
|
|
|
|
|
|
{{ page_footer(
|
2019-04-29 11:44:05 +01:00
|
|
|
|
button_text='Send'
|
2016-01-11 11:13:06 +00:00
|
|
|
|
) }}
|
|
|
|
|
|
|
2016-02-05 09:55:27 +00:00
|
|
|
|
{{ page_footer(
|
|
|
|
|
|
button_text='Sign in', secondary_link='http://example.com', secondary_link_text="I’ve forgotten my password"
|
|
|
|
|
|
) }}
|
|
|
|
|
|
|
2016-01-11 11:13:06 +00:00
|
|
|
|
<h2 class="heading-large">Tables</h2>
|
2020-02-19 11:57:15 +00:00
|
|
|
|
<div class="govuk-grid-row">
|
2020-02-20 16:55:56 +00:00
|
|
|
|
<div class="govuk-grid-column-three-quarters">
|
2020-05-29 17:11:01 +01:00
|
|
|
|
<p class="govuk-body">
|
2016-02-21 11:15:15 +00:00
|
|
|
|
Used for comparing rows of data.
|
|
|
|
|
|
</p>
|
|
|
|
|
|
{% call mapping_table(
|
|
|
|
|
|
caption='Account settings',
|
|
|
|
|
|
field_headings=['Label', 'True', 'False', 'Action'],
|
|
|
|
|
|
field_headings_visible=False,
|
|
|
|
|
|
caption_visible=True
|
|
|
|
|
|
) %}
|
|
|
|
|
|
{% call row() %}
|
|
|
|
|
|
{{ text_field('Username' )}}
|
|
|
|
|
|
{{ boolean_field(True) }}
|
|
|
|
|
|
{{ boolean_field(False) }}
|
|
|
|
|
|
{% call field(align='right') %}
|
2019-12-06 07:53:46 +00:00
|
|
|
|
<a class="govuk-link govuk-link--no-visited-state" href="#">Change</a>
|
2016-02-21 11:15:15 +00:00
|
|
|
|
{% endcall %}
|
|
|
|
|
|
{% endcall %}
|
2016-01-11 11:13:06 +00:00
|
|
|
|
{% endcall %}
|
2016-02-21 11:15:15 +00:00
|
|
|
|
|
2016-04-05 11:16:29 +01:00
|
|
|
|
{% call(item, row_number) list_table(
|
2016-02-21 11:15:15 +00:00
|
|
|
|
[
|
|
|
|
|
|
{
|
|
|
|
|
|
'file': 'dispatch_20151114.csv', 'status': 'Queued'
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
'file': 'dispatch_20151117.csv', 'status': 'Delivered'
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
'file': 'remdinder_monday.csv', 'status': 'Failed'
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
caption='Messages',
|
|
|
|
|
|
field_headings=['File', right_aligned_field_heading('Status')],
|
|
|
|
|
|
field_headings_visible=True,
|
|
|
|
|
|
caption_visible=False
|
|
|
|
|
|
) %}
|
|
|
|
|
|
{% call field() %}
|
|
|
|
|
|
{{ item.file }}
|
|
|
|
|
|
{% endcall %}
|
|
|
|
|
|
{% call field(
|
|
|
|
|
|
align='right',
|
|
|
|
|
|
status='error' if item.status == 'Failed' else 'default'
|
|
|
|
|
|
) %}
|
|
|
|
|
|
{{ item.status }}
|
|
|
|
|
|
{% endcall %}
|
2016-01-11 11:13:06 +00:00
|
|
|
|
{% endcall %}
|
2016-02-21 11:15:15 +00:00
|
|
|
|
|
2016-04-05 11:16:29 +01:00
|
|
|
|
{% call(item, row_number) list_table(
|
2016-02-21 11:15:15 +00:00
|
|
|
|
[],
|
|
|
|
|
|
caption='Jobs',
|
|
|
|
|
|
field_headings=['Job', 'Time'],
|
|
|
|
|
|
caption_visible=True,
|
2019-09-13 12:57:10 +01:00
|
|
|
|
empty_message='You have not scheduled any jobs yet'
|
2016-02-21 11:15:15 +00:00
|
|
|
|
) %}
|
|
|
|
|
|
{% call field() %}
|
|
|
|
|
|
{{ item.job }}
|
|
|
|
|
|
{% endcall %}
|
|
|
|
|
|
{% call field() %}
|
|
|
|
|
|
{{ item.time }}
|
|
|
|
|
|
{% endcall %}
|
2016-02-15 11:32:27 +00:00
|
|
|
|
{% endcall %}
|
2016-02-21 11:15:15 +00:00
|
|
|
|
<p class="table-show-more-link">
|
2019-12-06 07:53:46 +00:00
|
|
|
|
<a class="govuk-link govuk-link--no-visited-state" href="#">Add a job now</a>
|
2016-02-21 11:15:15 +00:00
|
|
|
|
</p>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
2016-01-19 11:15:00 +00:00
|
|
|
|
|
2016-01-11 11:13:06 +00:00
|
|
|
|
<h2 class="heading-large">Textbox</h2>
|
2016-01-11 13:15:10 +00:00
|
|
|
|
{{ textbox(form.username) }}
|
|
|
|
|
|
{{ textbox(form.password) }}
|
2019-10-16 15:20:05 +01:00
|
|
|
|
{{ textbox(form.message, highlight_placeholders=True) }}
|
2016-02-15 11:32:27 +00:00
|
|
|
|
{{ textbox(form.code, width='1-8') }}
|
2016-01-11 11:13:06 +00:00
|
|
|
|
|
2016-02-02 17:28:30 +00:00
|
|
|
|
<h2 class="heading-large">File upload</h2>
|
|
|
|
|
|
{{ file_upload(form.file_upload) }}
|
|
|
|
|
|
|
2016-01-15 10:50:10 +00:00
|
|
|
|
<h2 class="heading-large">API key</h2>
|
|
|
|
|
|
|
2020-02-04 14:44:19 +00:00
|
|
|
|
{{ api_key('00000000-0000-0000-0000-000000000000') }}
|
2016-01-15 10:50:10 +00:00
|
|
|
|
|
2016-06-03 14:30:17 +01:00
|
|
|
|
|
|
|
|
|
|
<h2 class="heading-large">Formatted list</h2>
|
|
|
|
|
|
|
2020-05-29 17:11:01 +01:00
|
|
|
|
<p class="govuk-body">
|
2017-02-13 13:11:29 +00:00
|
|
|
|
{{ 'A' | formatted_list(prefix="one item called") }}
|
2016-06-03 14:30:17 +01:00
|
|
|
|
</p>
|
|
|
|
|
|
|
2020-05-29 17:11:01 +01:00
|
|
|
|
<p class="govuk-body">
|
2017-02-13 13:11:29 +00:00
|
|
|
|
{{ 'AB' | formatted_list(prefix_plural="two items called") }}
|
2016-06-03 14:30:17 +01:00
|
|
|
|
</p>
|
|
|
|
|
|
|
2020-05-29 17:11:01 +01:00
|
|
|
|
<p class="govuk-body">
|
2017-02-13 13:11:29 +00:00
|
|
|
|
{{ 'ABC' | formatted_list }}
|
2016-06-03 14:30:17 +01:00
|
|
|
|
</p>
|
|
|
|
|
|
|
2020-05-29 17:11:01 +01:00
|
|
|
|
<p class="govuk-body">
|
2017-02-13 13:11:29 +00:00
|
|
|
|
{{ 'ABCD' | formatted_list(before_each='<strike>', after_each='</strike>', conjunction='or') }}
|
2016-06-03 14:30:17 +01:00
|
|
|
|
</p>
|
|
|
|
|
|
|
2016-01-11 11:13:06 +00:00
|
|
|
|
{% endblock %}
|