Skip to content

Commit

Permalink
TEMPORARY
Browse files Browse the repository at this point in the history
This should fall out if #2988 is
merged before this
  • Loading branch information
yndajas committed Jun 27, 2024
1 parent ebf937a commit d1dfed3
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 10 deletions.
1 change: 1 addition & 0 deletions app/helpers/components/table_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ def row

def header(str, opt = {})
classes = %w[govuk-table__header]
classes << opt[:classes] if opt[:classes]
classes << "govuk-table__header--#{opt[:format]}" if opt[:format]
classes << "govuk-table__header--active" if opt[:sort_direction]
link_classes = %w[app-table__sort-link]
Expand Down
8 changes: 4 additions & 4 deletions app/views/account/applications/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
<%= render "components/table", {
caption: "Apps you have access to",
head: [
{ text: "Name" },
{ text: "Description" },
{ text: "Name", classes: "govuk-!-width-one-quarter" },
{ text: "Description", classes: "govuk-!-width-one-third" },
{ text: content_tag(:span, "Actions", class: "govuk-visually-hidden"), visually_hidden: true },
],
rows: @applications_with_signin.map do |application|
Expand All @@ -50,8 +50,8 @@
<%= render "components/table", {
caption: "Apps you don't have access to",
head: [
{ text: "Name" },
{ text: "Description" },
{ text: "Name", classes: "govuk-!-width-one-quarter" },
{ text: "Description", classes: "govuk-!-width-one-third" },
{ text: content_tag(:span, "Actions", class: "govuk-visually-hidden"), visually_hidden: true }
],
rows: @applications_without_signin.map do |application|
Expand Down
4 changes: 2 additions & 2 deletions app/views/api_users/applications/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
<%= render "components/table", {
caption: "Apps #{@api_user.name} has access to",
head: [
{ text: "Name" },
{ text: "Description" },
{ text: "Name", classes: "govuk-!-width-one-quarter" },
{ text: "Description", classes: "govuk-!-width-one-third" },
{ text: content_tag(:span, "Actions", class: "govuk-visually-hidden"), visually_hidden: true },
],
rows: @applications.map do |application|
Expand Down
1 change: 1 addition & 0 deletions app/views/components/_table.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
<%= t.head do %>
<% head.each_with_index do |item, cellindex| %>
<%= t.header item[:text], {
classes: item[:classes],
format: item[:format],
href: item[:href],
data_attributes: item[:data_attributes],
Expand Down
8 changes: 4 additions & 4 deletions app/views/users/applications/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
<%= render "components/table", {
caption: "Apps #{@user.name} has access to",
head: [
{ text: "Name" },
{ text: "Description" },
{ text: "Name", classes: "govuk-!-width-one-quarter" },
{ text: "Description", classes: "govuk-!-width-one-third" },
{ text: content_tag(:span, "Actions", class: "govuk-visually-hidden"), visually_hidden: true },
],
rows: @applications_with_signin.map do |application|
Expand All @@ -54,8 +54,8 @@
<%= render "components/table", {
caption: "Apps #{@user.name} does not have access to",
head: [
{ text: "Name" },
{ text: "Description" },
{ text: "Name", classes: "govuk-!-width-one-quarter" },
{ text: "Description", classes: "govuk-!-width-one-third" },
{ text: content_tag(:span, "Actions", class: "govuk-visually-hidden"), visually_hidden: true }
],
rows: @applications_without_signin.map do |application|
Expand Down

0 comments on commit d1dfed3

Please sign in to comment.