Add ‘get started’ back to the dashboard

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.
This commit is contained in:
Chris Hill-Scott
2016-07-01 11:07:44 +01:00
parent 9e98ed3304
commit 25829762bf
3 changed files with 29 additions and 7 deletions

View File

@@ -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 {

View File

@@ -10,7 +10,11 @@
<h1 class="visuallyhidden">Dashboard</h1>
{% 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 %}

View File

@@ -0,0 +1,16 @@
{% from "components/banner.html" import banner_wrapper %}
<h2 class="heading-medium">Get started</h2>
<nav class="grid-row">
<div class="column-half">
{% call banner_wrapper(type="mode") %}
<a href="{{ url_for('.choose_template', service_id=current_service.id, template_type='email') }}">Write an email
{% endcall %}
</div>
<div class="column-half">
{% call banner_wrapper(type="mode") %}
<a href="{{ url_for('.choose_template', service_id=current_service.id, template_type='email') }}">Write a text message</a>
{% endcall %}
</div>
</nav>