From 25829762bf6d8cfe1488ed0fc7675d346d7989e8 Mon Sep 17 00:00:00 2001 From: Chris Hill-Scott Date: Fri, 1 Jul 2016 11:07:44 +0100 Subject: [PATCH] =?UTF-8?q?Add=20=E2=80=98get=20started=E2=80=99=20back=20?= =?UTF-8?q?to=20the=20dashboard?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Since we’re removing the write email/write text message calls to action from the tour, we should reintroduce them to the dashboard, for users who are unsure what they should do next. --- app/assets/stylesheets/components/banner.scss | 14 ++++++++------ app/templates/views/dashboard/dashboard.html | 6 +++++- .../views/dashboard/write-first-messages.html | 16 ++++++++++++++++ 3 files changed, 29 insertions(+), 7 deletions(-) create mode 100644 app/templates/views/dashboard/write-first-messages.html diff --git a/app/assets/stylesheets/components/banner.scss b/app/assets/stylesheets/components/banner.scss index 97154f5fd..82c45ccec 100644 --- a/app/assets/stylesheets/components/banner.scss +++ b/app/assets/stylesheets/components/banner.scss @@ -76,18 +76,14 @@ @extend %banner; background: $govuk-blue; color: $white; - margin-top: $gutter; + margin: 0 0 $gutter 0; padding: $gutter-half; p { margin: 0 0 10px 0; } - &-action { - - display: block; - text-align: right; - float: right; + a { &:link, &:visited { @@ -107,6 +103,12 @@ } + &-action { + display: block; + text-align: right; + float: right; + } + } .banner-intro { diff --git a/app/templates/views/dashboard/dashboard.html b/app/templates/views/dashboard/dashboard.html index 5af2c752e..ea5e6433e 100644 --- a/app/templates/views/dashboard/dashboard.html +++ b/app/templates/views/dashboard/dashboard.html @@ -10,7 +10,11 @@

Dashboard

- {% if not current_user.has_permissions(['send_texts', 'send_emails', 'send_letters'], any_=True) %} + {% if current_user.has_permissions(['manage_templates'], admin_override=True) %} + {% if not templates %} + {% include 'views/dashboard/write-first-messages.html' %} + {% endif %} + {% elif not current_user.has_permissions(['send_texts', 'send_emails', 'send_letters'], any_=True) %} {% include 'views/dashboard/no-permissions-banner.html' %} {% endif %} diff --git a/app/templates/views/dashboard/write-first-messages.html b/app/templates/views/dashboard/write-first-messages.html new file mode 100644 index 000000000..ad5f61465 --- /dev/null +++ b/app/templates/views/dashboard/write-first-messages.html @@ -0,0 +1,16 @@ +{% from "components/banner.html" import banner_wrapper %} + +

Get started

+ +