Skip to content

Commit

Permalink
Merge pull request #1655 from alphagov/update-reports-content
Browse files Browse the repository at this point in the history
Update content on question type usage reports
  • Loading branch information
chao-xian authored Dec 9, 2024
2 parents 953e610 + 27fa1b5 commit c4ad6dd
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 18 deletions.
3 changes: 2 additions & 1 deletion app/views/reports/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
<div class="govuk-grid-column-two-thirds">
<h1 class="govuk-heading-l"><%= t(".title") %></h1>
<ul class="govuk-list">
<li><%= govuk_link_to t("reports.add_another_answer.title"), report_add_another_answer_path %></li>
<li><%= govuk_link_to t("reports.features.title"), report_features_path %></li>
<li><%= govuk_link_to t("reports.features.long_list_usage.title"), report_selection_questions_summary_path %></li>
<li><%= govuk_link_to t("reports.users.title"), report_users_path %></li>
<li><%= govuk_link_to t("reports.add_another_answer.title"), report_add_another_answer_path %></li>
<li><%= govuk_link_to t("reports.last_signed_in_at.title"), report_last_signed_in_at_path %></li>
</ul>
</div>
Expand Down
6 changes: 3 additions & 3 deletions app/views/reports/selection_questions/summary.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<h1 class="govuk-heading-l"><%= t(".title") %></h1>

<h2 class="govuk-heading-m"><%= t(".autocomplete.heading") %></h2>
<p><%= govuk_link_to t(".view_questions"), report_selection_questions_with_autocomplete_path, no_visited_state: true %></p>
<p><%= govuk_link_to t(".autocomplete.view_questions"), report_selection_questions_with_autocomplete_path, no_visited_state: true %></p>
<%= govuk_summary_list do |summary_list|%>
<%= summary_list.with_row do |row| %>
<%= row.with_key(text: t(".autocomplete.live_forms")) %>
Expand All @@ -22,7 +22,7 @@
<%end%>

<h2 class="govuk-heading-m"><%= t(".radios.heading") %></h2>
<p><%= govuk_link_to t(".view_questions"), report_selection_questions_with_radios_path, no_visited_state: true %></p>
<p><%= govuk_link_to t(".radios.view_questions"), report_selection_questions_with_radios_path, no_visited_state: true %></p>
<%= govuk_summary_list do |summary_list|%>
<%= summary_list.with_row do |row| %>
<%= row.with_key(text: t(".radios.live_forms")) %>
Expand All @@ -39,7 +39,7 @@
<%end%>

<h2 class="govuk-heading-m"><%= t(".checkboxes.heading") %></h2>
<p><%= govuk_link_to t(".view_questions"), report_selection_questions_with_checkboxes_path, no_visited_state: true %></p>
<p><%= govuk_link_to t(".checkboxes.view_questions"), report_selection_questions_with_checkboxes_path, no_visited_state: true %></p>
<%= govuk_summary_list do |summary_list|%>
<%= summary_list.with_row do |row| %>
<%= row.with_key(text: t(".checkboxes.live_forms")) %>
Expand Down
18 changes: 11 additions & 7 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1272,6 +1272,8 @@ en:
live_forms_with_payments: Live forms with payments
live_forms_with_routes: Live forms with routes
total_live_forms: Total live forms
long_list_usage:
title: Selection from a list of options feature usage in live forms
title: Feature and answer type usage in live forms
index:
title: Reports
Expand All @@ -1283,9 +1285,9 @@ en:
title: When users last signed in
selection_questions:
autocomplete:
title: Select one only - more than 30 options in live forms
title: Questions where you can select one from over 30 options
checkboxes:
title: Select one or more in live forms
title: Questions where you can select one or more from up to 30 options
questions:
back_link: Back to selection from a list of options usage
none_of_the_above_no: 'No'
Expand All @@ -1296,21 +1298,23 @@ en:
number_of_options: Number of options
question: Question
radios:
title: Select one only - 30 options or fewer in live forms
title: Questions where you can select one from up to 30 options
summary:
autocomplete:
heading: Select one only - more than 30 options
heading: Select one from over 30 options
live_forms: Live forms with more than 30 options
view_questions: Questions where you can select one from over 30 options
back_link: Back to feature usage
checkboxes:
heading: Select one or more
live_forms: Live forms using one or more
view_questions: Questions where you can select one or more from up to 30 questions
number_of_questions: Number of questions
radios:
heading: Select one only - 30 options or fewer
heading: Select one from up to 30 options
live_forms: Live forms with 30 options or fewer
title: Selection from a list of options in live forms
view_questions: View questions
view_questions: Questions where you can select one from up to 30 options
title: Selection from a list of options answer type usage in live forms
with_none_of_the_above: Questions with ‘None of the above’
users:
heading: Number of users per organisation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
end

it "has expected page title" do
expect(view.content_for(:title)).to eq "Select one only - more than 30 options in live forms"
expect(view.content_for(:title)).to eq "Questions where you can select one from over 30 options"
end

it "has a back link to the selection from a list of options usage report" do
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
end

it "has expected page title" do
expect(view.content_for(:title)).to eq "Select one or more in live forms"
expect(view.content_for(:title)).to eq "Questions where you can select one or more from up to 30 options"
end

it "has a back link to the selection from a list of options usage report" do
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
end

it "has expected page title" do
expect(view.content_for(:title)).to eq "Select one only - 30 options or fewer in live forms"
expect(view.content_for(:title)).to eq "Questions where you can select one from up to 30 options"
end

it "has a back link to the selection from a list of options usage report" do
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
end

it "has expected page title" do
expect(view.content_for(:title)).to eq "Selection from a list of options in live forms"
expect(view.content_for(:title)).to eq "Selection from a list of options answer type usage in live forms"
end

it "has a back link to the selection from a list of options usage report" do
Expand All @@ -43,7 +43,7 @@
end

it "has link to questions with autocomplete report" do
expect(rendered).to have_link("View questions", href: report_selection_questions_with_autocomplete_path)
expect(rendered).to have_link("Questions where you can select one from over 30 options", href: report_selection_questions_with_autocomplete_path)
end

it "has statistics about questions with radio buttons" do
Expand All @@ -56,7 +56,7 @@
end

it "has link to questions with radio buttons report" do
expect(rendered).to have_link("View questions", href: report_selection_questions_with_radios_path)
expect(rendered).to have_link("Questions where you can select one from up to 30 options", href: report_selection_questions_with_radios_path)
end

it "has statistics about questions with checkboxes buttons" do
Expand All @@ -69,6 +69,6 @@
end

it "has link to questions with checkboxes report" do
expect(rendered).to have_link("View questions", href: report_selection_questions_with_checkboxes_path)
expect(rendered).to have_link("Questions where you can select one or more from up to 30 questions", href: report_selection_questions_with_checkboxes_path)
end
end

0 comments on commit c4ad6dd

Please sign in to comment.