mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-05-26 08:09:51 -04:00
Creating 2 tables to be put tied into the dropdown event
This commit is contained in:
@@ -59,34 +59,72 @@
|
||||
{% if current_user.has_permissions('manage_service') %}{% endif %}
|
||||
|
||||
{{ ajax_block(partials, updates_url, 'template-statistics') }}
|
||||
<h2 class="margin-top-4 margin-bottom-1">Recent Batches</h2>
|
||||
<div class="table-overflow-x-auto">
|
||||
<table class="usa-table usa-table--borderless job-table">
|
||||
<thead class="table-field-headings">
|
||||
<tr>
|
||||
<th scope="col" class="table-field-heading-first">
|
||||
<span>File name</span>
|
||||
</th>
|
||||
<th scope="col" class="table-field-heading">
|
||||
<span>Template</span>
|
||||
</th>
|
||||
<th scope="col" class="table-field-heading">
|
||||
<span>Job status</span>
|
||||
</th>
|
||||
<th scope="col" class="table-field-heading">
|
||||
<span>Sender</span>
|
||||
</th>
|
||||
<th scope="col" class="table-field-heading">
|
||||
<span># of Recipients</span>
|
||||
</th>
|
||||
<th scope="col" class="table-field-heading">
|
||||
<span>Report</span>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% if jobs %}
|
||||
{% for job in jobs[:5] %}
|
||||
<div class="table-container">
|
||||
<div id="table1" class="table-overflow-x-auto">
|
||||
<h2 class="margin-top-4 margin-bottom-1">My Activity</h2>
|
||||
<table class="usa-table job-table">
|
||||
<thead class="table-field-headings">
|
||||
<tr>
|
||||
<th scope="col" class="table-field-heading-first"><span>File name</span></th>
|
||||
<th scope="col" class="table-field-heading"><span>Template</span></th>
|
||||
<th scope="col" class="table-field-heading"><span>Job status</span></th>
|
||||
<th scope="col" class="table-field-heading"><span># of Recipients</span></th>
|
||||
<th scope="col" class="table-field-heading"><span>Report</span></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% if jobs %}
|
||||
{% for job in jobs[:5] %}
|
||||
{% if job.created_by.name == current_user.name %}
|
||||
{% set notification = job.notifications[0] %}
|
||||
<tr id="{{ job.job_id }}">
|
||||
<td class="table-field file-name">
|
||||
{{ job.original_file_name[:12] if job.original_file_name else 'Manually entered number'}}
|
||||
<br>
|
||||
<a class="usa-link file-list-filename" href="{{ job.view_job_link }}">View Batch</a>
|
||||
</td>
|
||||
<td class="table-field template">{{ job.template_name }}</td>
|
||||
<td class="table-field time-sent">
|
||||
{{ (job.processing_finished if job.processing_finished else job.processing_started
|
||||
if job.processing_started else job.created_at)|format_datetime_table }}
|
||||
</td>
|
||||
<td class="table-field count-of-recipients">{{ job.notification_count }}</td>
|
||||
<td class="table-field report">
|
||||
{% if job.time_left != "Data no longer available" %}
|
||||
<a class="usa-link file-list-filename" href="{{ job.download_link }}">Download</a>
|
||||
<span class="usa-hint">{{ job.time_left }}</span>
|
||||
{% elif job %}
|
||||
<span>{{ job.time_left }}</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<tr class="table-row">
|
||||
<td class="table-empty-message" colspan="10">No batched job messages found  (messages are kept for {{ service_data_retention_days }} days).</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div id="table2" class="table-overflow-x-auto" style="display:none;">
|
||||
<h2 class="margin-top-4 margin-bottom-1">All Activity</h2>
|
||||
<table class="usa-table job-table">
|
||||
<thead class="table-field-headings">
|
||||
<tr>
|
||||
<th scope="col" class="table-field-heading-first"><span>File name</span></th>
|
||||
<th scope="col" class="table-field-heading"><span>Template</span></th>
|
||||
<th scope="col" class="table-field-heading"><span>Job status</span></th>
|
||||
<th scope="col" class="table-field-heading"><span>Sender</span></th>
|
||||
<th scope="col" class="table-field-heading"><span># of Recipients</span></th>
|
||||
<th scope="col" class="table-field-heading"><span>Report</span></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% if jobs %}
|
||||
{% for job in jobs[:5] %}
|
||||
{% set notification = job.notifications[0] %}
|
||||
<tr id="{{ job.job_id }}">
|
||||
<td class="table-field file-name">
|
||||
@@ -94,19 +132,13 @@
|
||||
<br>
|
||||
<a class="usa-link file-list-filename" href="{{ job.view_job_link }}">View Batch</a>
|
||||
</td>
|
||||
<td class="table-field template">
|
||||
{{ job.template_name }}
|
||||
</td>
|
||||
<td class="table-field template">{{ job.template_name }}</td>
|
||||
<td class="table-field time-sent">
|
||||
{{ (job.processing_finished if job.processing_finished else job.processing_started
|
||||
if job.processing_started else job.created_at)|format_datetime_table }}
|
||||
</td>
|
||||
<td class="table-field sender">
|
||||
{{ job.created_by.name }}
|
||||
</td>
|
||||
<td class="table-field count-of-recipients">
|
||||
{{ job.notification_count}}
|
||||
</td>
|
||||
<td class="table-field sender">{{ job.created_by.name }}</td>
|
||||
<td class="table-field count-of-recipients">{{ job.notification_count }}</td>
|
||||
<td class="table-field report">
|
||||
{% if job.time_left != "Data no longer available" %}
|
||||
<a class="usa-link file-list-filename" href="{{ job.download_link }}">Download</a>
|
||||
@@ -116,14 +148,15 @@
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<tr class="table-row">
|
||||
<td class="table-empty-message" colspan="10">No batched job messages found  (messages are kept for {{ service_data_retention_days }} days).</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<tr class="table-row">
|
||||
<td class="table-empty-message" colspan="10">No batched job messages found  (messages are kept for {{ service_data_retention_days }} days).</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h2>Recent templates</h2>
|
||||
|
||||
Reference in New Issue
Block a user