diff --git a/app/templates/views/choose-template.html b/app/templates/views/choose-template.html index 1b97ad899..2d0b56551 100644 --- a/app/templates/views/choose-template.html +++ b/app/templates/views/choose-template.html @@ -15,6 +15,10 @@

{{ page_heading }}

{% if current_user.has_permissions(permissions=['manage_templates'], any_=True) %} +

+ You need a template before you can send + {{ 'emails' if 'email' == template_type else 'text messages' }} +

Add a new template {% else %}

You need to ask your service manager to add templates before you can send messages

diff --git a/app/templates/views/dashboard/dashboard.html b/app/templates/views/dashboard/dashboard.html index bdf9c1838..4fe589ed5 100644 --- a/app/templates/views/dashboard/dashboard.html +++ b/app/templates/views/dashboard/dashboard.html @@ -10,12 +10,11 @@ {% include 'views/dashboard/trial-mode-banner.html' %} {% endif %} - {% if not jobs %} - {% if current_user.has_permissions(['manage_templates','send_texts', 'send_emails', 'send_letters']) %} - {% include 'views/dashboard/get-started.html' %} - {% endif%} - {% else %} + {% if not templates and current_user.has_permissions(['send_texts', 'send_emails', 'send_letters'], any_=True) %} + {% include 'views/dashboard/get-started.html' %} + {% endif %} + {% if templates %}
Get started -
    - {% if current_user.has_permissions(['manage_templates']) %} +{% if current_user.has_permissions(['manage_templates']) %} +

    + You need to set up a template before you can send messages +

    +
    1. - {% call banner_wrapper(type="tip", subhead='1.' if not templates else None, with_tick=templates|length) %} - Add a template + {% call banner_wrapper(type="tip") %} + + Set up a text message template + {% endcall %}
    2. - {% endif %} - {% if current_user.has_permissions(['send_texts', 'send_emails', 'send_letters']) %}
    3. - {% call banner_wrapper(type="tip", subhead='2.') %} - Send yourself a message + {% call banner_wrapper(type="tip") %} + + Set up an email template + {% endcall %}
    4. - {% endif %} -
    +
+{% else %} +

+

+ You need to ask your service manager to set up some templates before you can send messages +

+

+{% endif %} diff --git a/app/templates/views/service_dashboard.html b/app/templates/views/service_dashboard.html deleted file mode 100644 index de2d7992a..000000000 --- a/app/templates/views/service_dashboard.html +++ /dev/null @@ -1,76 +0,0 @@ -{% extends "withnav_template.html" %} -{% from "components/banner.html" import banner_wrapper %} -{% from "components/table.html" import list_table, field, right_aligned_field_heading %} -{% from "components/big-number.html" import big_number %} - -{% block page_title %} - {{ session.get('service_name', 'Dashboard') }} – GOV.UK Notify -{% endblock %} - -{% block maincolumn_content %} - - - - {% if not template_count and not jobs %} - {% if current_user.has_permissions(['manage_templates', 'send_texts', 'send_emails', 'send_letters'], any_=True, admin_override=True) %} - {% call banner_wrapper(subhead='Get started', type="tip") %} -
    - {% if current_user.has_permissions(['manage_templates'], admin_override=True) %} -
  1. - Add a template -
  2. - {% endif %} - {% if current_user.has_permissions(['send_texts']) %} -
  3. - Send yourself a text message -
  4. - {% endif %} -
- {% endcall %} - {% endif %} - {% elif not jobs %} - {% call banner_wrapper(subhead='Next step', type="tip") %} - {% if current_user.has_permissions(permissions=['send_texts', 'send_emails', 'send_letters']) %} - Send yourself a text message - {% endif %} - {% endcall %} - {% else %} - {% call(item) list_table( - jobs, - caption="Recent text messages", - empty_message='You haven’t sent any batch messages yet', - field_headings=['Job', 'Created', right_aligned_field_heading('completion')] - ) %} - {% call field() %} - {{ item.original_file_name }} - {% endcall %} - {% call field() %} - {{ item.created_at|format_datetime }} - {% endcall %} - {% call field(align='right') %} - {{ (item.notifications_sent / item.notification_count * 100)|round|int }}% - {% endcall %} - {% endcall %} - {% if more_jobs_to_show %} - {% if current_user.has_permissions(permissions=['send_texts', 'send_emails', 'send_letters']) %} - - {% endif %} - {% endif %} - {% endif %} - -{% endblock %}