Skip to content

Commit

Permalink
Add specific styles for status
Browse files Browse the repository at this point in the history
  • Loading branch information
davidtrussler committed May 31, 2024
1 parent 7b675e0 commit 0967537
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 2 deletions.
44 changes: 44 additions & 0 deletions app/assets/stylesheets/components/table.scss
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,50 @@
}

.govuk-table__row {
.govuk-table__cell {
.status {
display: inline-block;
padding: govuk-spacing(1) govuk-spacing(2);

&--amends-needed {
background-color: #f4cdc6;
}

&--archived {
background-color: #e5e6e7;
}

&--draft {
background-color: #fef7bf;
}

&--out-for-fact-check {
background-color: #efdfed;
}

&--fact-check-received {
background-color: #fcd6c3;
}

&--ready,
&--scheduled-for-publishing {
background-color: #d4ecea;
}

&--published {
background-color: #cce2d8;
}

&--awaiting-2i {
background-color: #bbd4ea;
}

&--in-2i {
background-color: #e5e6e7;
}
}
}

&:nth-of-type(2) {
background: govuk-colour("light-grey");

Expand Down
2 changes: 1 addition & 1 deletion app/views/components/_table.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
<%= t.row do %>
<%= t.cell sanitize("<p class='title govuk-body'><a href='#{row[:href]}' class='govuk-!-font-weight-bold'>#{row[:title]}</a><span class='updated govuk-!-font-size-16'>Last updated: #{row[:updated]}</span></p>") %>
<%= t.cell row[:assigned] %>
<%= t.cell row[:status] %>
<%= t.cell sanitize("<span class='status status--#{row[:status].downcase.parameterize(separator: '-')}'>#{row[:status]}</span>") %>
<%= t.cell "" %>
<% end %>
<%= t.row do %>
Expand Down
13 changes: 12 additions & 1 deletion app/views/components/docs/table.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,18 @@ examples:
href: https://draft-origin.integration.publishing.service.gov.uk/software-company-changes
updated: 21 May 2024
assigned: Jane Regan
status: In review
status: Awaiting 2i
edition: 1
format: Answer
note: Please leave for Hannah M, Gav and Sarah. Once 2i’d, send for FC to [email protected], [email protected], [email protected]
awaiting_review: 3 days
reviewer: Sarah Nicholson
-
title: Find software for filing company changes and registrations
href: https://draft-origin.integration.publishing.service.gov.uk/software-company-changes
updated: 21 May 2024
assigned: Jane Regan
status: In 2i
edition: 1
format: Answer
note: Please leave for Hannah M, Gav and Sarah. Once 2i’d, send for FC to [email protected], [email protected], [email protected]
Expand Down

0 comments on commit 0967537

Please sign in to comment.