Merge with master.

This commit is contained in:
Nicholas Staples
2016-01-19 16:35:52 +00:00
21 changed files with 355 additions and 102 deletions

View File

@@ -51,13 +51,13 @@
<nav class="management-navigation">
<div class="grid-row">
<div class="column-half">
<div class="dropdown" data-module="dropdown">
<div class="dropdown-toggle">
<details class="dropdown">
<summary class="dropdown-toggle">
Service name
</div>
</summary>
<a href="#">Switch to A N Other service</a>
<a href="{{ url_for('.add_service') }}">Add a new service to GOV.UK Notify</a>
</div>
</details>
</div>
<div class="column-half management-navigation-account">
<a href="{{ url_for('main.user_profile') }}">{{ current_user.name }}</a>

View File

@@ -23,20 +23,21 @@
{%- endmacro %}
{% macro list_table(items, caption='', empty_message='', field_headings=[], field_headings_visible=True, caption_visible=True) -%}
{% if items %}
{% set parent_caller = caller %}
{% call mapping_table(caption, field_headings, field_headings_visible, caption_visible) %}
{% for item in items %}
{% call row() %}
{{ parent_caller(item) }}
{% endcall %}
{% endfor %}
{%- endcall %}
{% else %}
<p class="summary-item-no-content">
{% set parent_caller = caller %}
{% call mapping_table(caption, field_headings, field_headings_visible, caption_visible) %}
{% for item in items %}
{% call row() %}
{{ parent_caller(item) }}
{% endcall %}
{% endfor %}
{%- endcall %}
{% if not items %}
<p class="table-empty-message">
{{ empty_message }}
</p>
{% endif %}
{%- endmacro %}
{% macro row() -%}

View File

@@ -13,6 +13,7 @@ GOV.UK Notify | Notifications activity
jobs,
caption="Recent activity",
caption_visible=False,
empty_message='You havent sent any notifications yet',
field_headings=['Job', 'File', 'Time', 'Status']
) %}
{% call field() %}

View File

@@ -24,9 +24,9 @@
</ul>
{% call(item) list_table(
jobs[:3],
[],
caption="Recent text messages",
empty_message="No recent text messages",
empty_message='You havent sent any text messages yet',
field_headings=['Job', 'File', 'Time', 'Status']
) %}
{% call field() %}
@@ -42,9 +42,5 @@
{{ item.status }}
{% endcall %}
{% endcall %}
<p>
<a href={{ url_for('.view_jobs', service_id=service_id) }}>See all notifications activity</a>
</p>
{% endblock %}

View File

@@ -148,6 +148,21 @@
{% endcall %}
{% endcall %}
{% call(item) list_table(
[],
caption='Jobs',
field_headings=['Job', 'Time'],
caption_visible=True,
empty_message='You havent scheduled any jobs yet'
) %}
{% call field() %}
{{ item.job }}
{% endcall %}
{% call field() %}
{{ item.time }}
{% endcall %}
{% endcall %}
<h2 class="heading-large">Textbox</h2>
{{ textbox(form.username) }}
{{ textbox(form.password) }}