mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-09 04:33:13 -04:00
Limit number of jobs on dashboard to 5
…and add a link to view the rest of the jobs if there are more than 5.
This commit is contained in:
@@ -60,3 +60,10 @@
|
|||||||
border-bottom: 1px solid $border-colour;
|
border-bottom: 1px solid $border-colour;
|
||||||
padding: 0.75em 0 0.5625em 0;
|
padding: 0.75em 0 0.5625em 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.table-show-more-link {
|
||||||
|
margin-top: -20px;
|
||||||
|
border-bottom: 1px solid $border-colour;
|
||||||
|
padding-bottom: 10px;
|
||||||
|
@include bold-16;
|
||||||
|
}
|
||||||
|
|||||||
@@ -28,7 +28,8 @@ def service_dashboard(service_id):
|
|||||||
raise e
|
raise e
|
||||||
return render_template(
|
return render_template(
|
||||||
'views/service_dashboard.html',
|
'views/service_dashboard.html',
|
||||||
jobs=list(reversed(jobs)),
|
jobs=list(reversed(jobs))[:5],
|
||||||
|
more_jobs_to_show=(len(jobs) > 5),
|
||||||
free_text_messages_remaining='250,000',
|
free_text_messages_remaining='250,000',
|
||||||
spent_this_month='0.00',
|
spent_this_month='0.00',
|
||||||
template_count=len(templates),
|
template_count=len(templates),
|
||||||
|
|||||||
@@ -58,6 +58,11 @@
|
|||||||
{{ item.status }}
|
{{ item.status }}
|
||||||
{% endcall %}
|
{% endcall %}
|
||||||
{% endcall %}
|
{% endcall %}
|
||||||
|
{% if more_jobs_to_show %}
|
||||||
|
<p class="table-show-more-link">
|
||||||
|
<a href="{{ url_for('.view_jobs', service_id=service_id) }}">See all sent text messages</a>
|
||||||
|
</p>
|
||||||
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
Reference in New Issue
Block a user