From 0393cc04b67d707ffc51f1d0b258f36190d8d555 Mon Sep 17 00:00:00 2001 From: Felix Clack Date: Thu, 5 Oct 2023 11:12:16 +0100 Subject: [PATCH] Update the teacher show page CSS There's some variations in how the prototype displays the restrictions placed on a teacher. --- app/assets/stylesheets/check_records.scss | 25 ++++------------- .../check_records/teachers/show.html.erb | 28 +++++++++---------- 2 files changed, 18 insertions(+), 35 deletions(-) diff --git a/app/assets/stylesheets/check_records.scss b/app/assets/stylesheets/check_records.scss index 155b9843..cdac457b 100644 --- a/app/assets/stylesheets/check_records.scss +++ b/app/assets/stylesheets/check_records.scss @@ -96,26 +96,11 @@ $govuk-assets-path: "/"; padding-right: 0; } -.app__search-detail-heading { - align-items: center; - display: flex; - flex-direction: row; - margin-bottom: 20px; - - .govuk-heading-l { - margin-bottom: 0; - } - - .govuk-tag { - margin-left: 10px; - } +h1 .govuk-tag { + position: relative; + top: -5px; } -.app__restrictions { - margin-bottom: govuk-spacing(9); - margin-top: govuk-spacing(9); - - .govuk-inset-text { - border-left-color: red; - } +.app-inset-text--red { + border-color: govuk-colour("red"); } diff --git a/app/views/check_records/teachers/show.html.erb b/app/views/check_records/teachers/show.html.erb index 612d4e5c..644d2b26 100644 --- a/app/views/check_records/teachers/show.html.erb +++ b/app/views/check_records/teachers/show.html.erb @@ -3,27 +3,25 @@
-
-

<%= @teacher.name %>

+

+ <%= @teacher.name %> "%> <%= @teacher.sanctions.any? ? "Restrictions" : "No restrictions" %> -

+ <% if @teacher.sanctions.any? %> -
-

Restrictions

- <%= govuk_inset_text classes: "govuk-!-padding-bottom-2 govuk-!-padding-top-3 govuk-!-margin-bottom- govuk-!-margin-top-0" do %> - <% @teacher.sanctions.each do |sanction| %> -

- <%= sanction.title %> -

-

- <%= sanction.start_date.to_fs(:long_uk) if sanction.start_date %> -

- <% end %> +

Restrictions

+ <%= govuk_inset_text classes: "app-inset-text--red govuk-!-padding-bottom-2 govuk-!-padding-top-3 govuk-!-margin-bottom- govuk-!-margin-top-0" do %> + <% @teacher.sanctions.each do |sanction| %> +

+ <%= sanction.title %> +

+

+ <%= sanction.start_date.to_fs(:long_uk) if sanction.start_date %> +

<% end %> -
+ <% end %> <% end %>