From 9435f69a6e94cc3c20745ef6af19c81f385fde62 Mon Sep 17 00:00:00 2001 From: Chris Hill-Scott Date: Mon, 12 Mar 2018 15:49:52 +0000 Subject: [PATCH] Remove warning banner from dashboard (and app) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We have teams who are using the dashboard every day, and being confronted with this alarming yellow banner. There’s no action they need to do since they’re only looking at the messages sent. So this commit removes that banner from the dashboard. It also removes the CSS and HTML for it from the app entirely because this is the last remaining place we were using this style of banner. --- app/assets/stylesheets/components/banner.scss | 27 ------------------- app/templates/views/dashboard/dashboard.html | 8 ++---- .../dashboard/no-permissions-banner.html | 6 ----- 3 files changed, 2 insertions(+), 39 deletions(-) delete mode 100644 app/templates/views/dashboard/no-permissions-banner.html diff --git a/app/assets/stylesheets/components/banner.scss b/app/assets/stylesheets/components/banner.scss index 610785e5a..54124afa6 100644 --- a/app/assets/stylesheets/components/banner.scss +++ b/app/assets/stylesheets/components/banner.scss @@ -153,30 +153,3 @@ } } - -.banner-warning { - - @extend %banner; - @include bold-19; - background: $yellow; - color: $text-colour; - border: 5px solid $text-colour; - margin: $gutter-half 0 $gutter 0; - text-align: left; - padding: 20px; - - .heading-medium { - @include bold-24; - margin: 0 0 $gutter-half 0; - } - - .list { - margin-bottom: 10px; - } - - a:link, - a:visited { - color: $text-colour; - } - -} diff --git a/app/templates/views/dashboard/dashboard.html b/app/templates/views/dashboard/dashboard.html index c347e86e0..dfabe6297 100644 --- a/app/templates/views/dashboard/dashboard.html +++ b/app/templates/views/dashboard/dashboard.html @@ -15,12 +15,8 @@

Dashboard

- {% if current_user.has_permissions('manage_templates') %} - {% if not templates %} - {% include 'views/dashboard/write-first-messages.html' %} - {% endif %} - {% elif not current_user.has_permissions('send_messages', 'manage_api_keys') %} - {% include 'views/dashboard/no-permissions-banner.html' %} + {% if current_user.has_permissions('manage_templates') and not templates %} + {% include 'views/dashboard/write-first-messages.html' %} {% endif %} {{ ajax_block(partials, updates_url, 'upcoming') }} diff --git a/app/templates/views/dashboard/no-permissions-banner.html b/app/templates/views/dashboard/no-permissions-banner.html deleted file mode 100644 index fdc8ad68c..000000000 --- a/app/templates/views/dashboard/no-permissions-banner.html +++ /dev/null @@ -1,6 +0,0 @@ -{% from "components/banner.html" import banner_wrapper %} - -{% call banner_wrapper(type="warning") %} - You only have permission to view this service. To send messages, edit - templates or manage team members, contact the person who invited you. -{% endcall %}