mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-07 18:58:25 -04:00
Make a macro for the AJAX update module
This is less repetitive than typing out the HTML with all its attributes every time. It also lets us wrap up the idea of ‘finished’ as a parameter, so the AJAX code will only be initiated when it’s needed, eg if a job is still processing.
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
{% from "components/table.html" import list_table, field, right_aligned_field_heading, date_field, row_heading %}
|
||||
|
||||
<div class="dashboard-table">
|
||||
{% if notifications %}
|
||||
<div class="dashboard-table">
|
||||
{% endif %}
|
||||
|
||||
{% if notifications %}
|
||||
<p class="bottom-gutter">
|
||||
<a href="{{ url_for('.view_job_csv', service_id=current_service.id, job_id=job.id, status=status) }}" download="download" class="heading-small">Download as a CSV file</a>
|
||||
@@ -34,4 +37,7 @@
|
||||
{{ item.status|format_notification_status(item.template.template_type) }}
|
||||
{% endcall %}
|
||||
{% endcall %}
|
||||
</div>
|
||||
|
||||
{% if notifications %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
<p class='heading-small bottom-gutter'>
|
||||
Uploaded by {{ job.created_by.name }} on {{ job.created_at|format_datetime_short }}
|
||||
</p>
|
||||
<div>
|
||||
<p class='heading-small bottom-gutter'>
|
||||
Uploaded by {{ job.created_by.name }} on {{ job.created_at|format_datetime_short }}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user