Files
notifications-admin/app/templates/views/dashboard/_upcoming.html
Chris Hill-Scott c551ce9a42 Show jobs in basic view
There are some teams who send jobs on a daily/weekly basis. They have
team members who only use Notify for this purpose. So they would
probably benefit from basic view, because they don’t need to see the
dashboard.

This commit:
- adds a new item (uploaded files) to the basic view navigation for
  teams that have sent at least one job
- makes the job pages visible to basic view users

I think we should do this now, rather than as a later enhancement to
basic view. We only have one chance to announce the feature, so teams
who do send jobs may otherwise discount it as not useful for them and
the opportunity to have them use it is lost.
2018-08-01 10:45:02 +01:00

43 lines
1.4 KiB
HTML

{% from "components/table.html" import list_table, field, right_aligned_field_heading, row_heading %}
{% from "components/big-number.html" import big_number %}
{% from "components/show-more.html" import show_more %}
<div class="ajax-block-container">
{% if scheduled_jobs %}
<div class='dashboard-table'>
{% if not hide_heading %}
<h2 class="heading-medium">
In the next few days
</h2>
{% endif %}
{% call(item, row_number) list_table(
scheduled_jobs,
caption="In the next few days",
caption_visible=False,
empty_message='Nothing to see here',
field_headings=[
'File',
'Messages to be sent'
],
field_headings_visible=True
) %}
{% call row_heading() %}
<div class="file-list">
<a class="file-list-filename" href="{{ url_for('.view_job', service_id=current_service.id, job_id=item.id) }}">{{ item.original_file_name }}</a>
<span class="file-list-hint">
Sending {{ item.scheduled_for|format_datetime_relative }}
</span>
</div>
{% endcall %}
{% call field() %}
{{ big_number(
item.notification_count,
smallest=True
) }}
{% endcall %}
{% endcall %}
{{ show_more() }}
</div>
{% endif %}
</div>