mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-24 16:24:08 -04:00
Remove placeholder logs of notifications sent
From the: - dashboard - activity page This info will be confusing for users at the hack day, because it will say they’ve already sent messages when they first sign up. This involved changing the table macro to have a nice ‘no rows’ message.
This commit is contained in:
@@ -41,3 +41,10 @@
|
||||
@extend .table-field;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.table-empty-message {
|
||||
@include core-16;
|
||||
color: $secondary-text-colour;
|
||||
border-bottom: 1px solid $border-colour;
|
||||
padding: 5px 0 8px 0;
|
||||
}
|
||||
|
||||
@@ -19,6 +19,6 @@ def service_dashboard(service_id):
|
||||
return render_template(
|
||||
'views/service_dashboard.html',
|
||||
jobs=jobs,
|
||||
free_text_messages_remaining=560,
|
||||
free_text_messages_remaining='25,000',
|
||||
spent_this_month='0.00',
|
||||
service_id=service_id)
|
||||
|
||||
@@ -50,7 +50,7 @@ messages = [
|
||||
def view_jobs(service_id):
|
||||
return render_template(
|
||||
'views/jobs.html',
|
||||
jobs=jobs,
|
||||
jobs=[], # use `jobs` for placeholder data
|
||||
service_id=service_id
|
||||
)
|
||||
|
||||
|
||||
@@ -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() -%}
|
||||
|
||||
@@ -13,6 +13,7 @@ GOV.UK Notify | Notifications activity
|
||||
jobs,
|
||||
caption="Recent activity",
|
||||
caption_visible=False,
|
||||
empty_message='You haven’t sent any notifications yet',
|
||||
field_headings=['Job', 'File', 'Time', 'Status']
|
||||
) %}
|
||||
{% call field() %}
|
||||
|
||||
@@ -24,9 +24,9 @@
|
||||
</ul>
|
||||
|
||||
{% call(item) list_table(
|
||||
jobs[:3],
|
||||
[],
|
||||
caption="Recent text messages",
|
||||
empty_message="No recent text messages",
|
||||
empty_message='You haven’t 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 %}
|
||||
|
||||
@@ -148,6 +148,21 @@
|
||||
{% endcall %}
|
||||
{% endcall %}
|
||||
|
||||
{% call(item) list_table(
|
||||
[],
|
||||
caption='Jobs',
|
||||
field_headings=['Job', 'Time'],
|
||||
caption_visible=True,
|
||||
empty_message='You haven’t 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) }}
|
||||
|
||||
Reference in New Issue
Block a user