Skip to content

Commit

Permalink
Merge pull request #1379 from alphagov/use-summary-list
Browse files Browse the repository at this point in the history
Use summary card instead of list
  • Loading branch information
csutter authored Feb 19, 2025
2 parents 3749bab + 429b1b5 commit 6b0d448
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 18 deletions.
8 changes: 4 additions & 4 deletions app/views/controls/_boost_action.html.erb
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<%= render "govuk_publishing_components/components/summary_list", {
<%= render "govuk_publishing_components/components/summary_card", {
title: t(".action_heading"),
items: [
rows: [
{
field: t_model_attr(:filter_expression, on: boost_action),
key: t_model_attr(:filter_expression, on: boost_action),
value: tag.code(boost_action.filter_expression),
},
{
field: t_model_attr(:boost_factor, on: boost_action),
key: t_model_attr(:boost_factor, on: boost_action),
value: boost_action.boost_factor
},
]
Expand Down
6 changes: 3 additions & 3 deletions app/views/controls/_filter_action.html.erb
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<%= render "govuk_publishing_components/components/summary_list", {
<%= render "govuk_publishing_components/components/summary_card", {
title: t(".action_heading"),
items: [
rows: [
{
field: t_model_attr(:filter_expression, on: filter_action),
key: t_model_attr(:filter_expression, on: filter_action),
value: tag.code(filter_action.filter_expression),
},
]
Expand Down
8 changes: 4 additions & 4 deletions app/views/controls/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@
) %>
</div>

<%= render "govuk_publishing_components/components/summary_list", {
<%= render "govuk_publishing_components/components/summary_card", {
title: t(".control_heading"),
items: [
rows: [
{
field: t_model_attr(:display_name),
key: t_model_attr(:display_name),
value: @control.display_name,
},
{
field: t_model_attr(:name),
key: t_model_attr(:name),
value: tag.code(@control.name),
}
]
Expand Down
15 changes: 8 additions & 7 deletions app/views/serving_configs/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -26,26 +26,27 @@
} %>
</div>

<%= render "govuk_publishing_components/components/summary_list", {
items: [
<%= render "govuk_publishing_components/components/summary_card", {
title: t(".serving_config_heading"),
rows: [
{
field: t_model_attr(:display_name),
key: t_model_attr(:display_name),
value: @serving_config.display_name,
},
{
field: t_model_attr(:use_case),
key: t_model_attr(:use_case),
value: serving_config_use_case_tag(@serving_config),
},
{
field: t_model_attr(:description),
key: t_model_attr(:description),
value: @serving_config.description,
},
{
field: t_model_attr(:remote_resource_id),
key: t_model_attr(:remote_resource_id),
value: tag.code(@serving_config.remote_resource_id),
},
{
field: t_model_attr(:name),
key: t_model_attr(:name),
value: tag.code(@serving_config.name),
}
]
Expand Down
1 change: 1 addition & 0 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -171,5 +171,6 @@ en:
index:
page_title: Serving configs
show:
serving_config_heading: Serving config details
buttons:
preview: Preview on GOV.UK

0 comments on commit 6b0d448

Please sign in to comment.