From b7e942e839a431483313e57592b620f866e9eec2 Mon Sep 17 00:00:00 2001 From: j-corry Date: Mon, 11 Nov 2024 12:15:46 +0000 Subject: [PATCH] - Replace 'about this' in secondary information of object views with a 'type' heading & value (subtype used for observations on petitions & petitions) --- app/views/search/fragments/_type.html.erb | 6 ++++++ app/views/search/objects/bill.html.erb | 2 +- app/views/search/objects/church_of_england_measure.html.erb | 2 +- app/views/search/objects/deposited_paper.html.erb | 2 +- app/views/search/objects/edm.html.erb | 2 +- .../search/objects/european_deposited_document.html.erb | 2 +- app/views/search/objects/european_material.html.erb | 2 +- .../european_scrutiny_explanatory_memorandum.html.erb | 2 +- .../european_scrutiny_ministerial_correspondence.html.erb | 2 +- .../objects/european_scrutiny_recommendation.html.erb | 2 +- app/views/search/objects/formal_proceeding.html.erb | 2 +- app/views/search/objects/impact_assessment.html.erb | 2 +- app/views/search/objects/ministerial_correction.html.erb | 2 +- app/views/search/objects/observations_on_petitions.html.erb | 2 +- app/views/search/objects/oral_answer_to_question.html.erb | 2 +- app/views/search/objects/oral_question.html.erb | 2 +- .../search/objects/oral_question_time_intervention.html.erb | 2 +- .../search/objects/paper_ordered_to_be_printed.html.erb | 2 +- app/views/search/objects/paper_petition.html.erb | 2 +- app/views/search/objects/paper_submitted.html.erb | 2 +- app/views/search/objects/parliamentary_paper_laid.html.erb | 2 +- .../search/objects/parliamentary_paper_reported.html.erb | 2 +- app/views/search/objects/parliamentary_proceeding.html.erb | 2 +- app/views/search/objects/private_act.html.erb | 2 +- app/views/search/objects/proceeding_contribution.html.erb | 2 +- app/views/search/objects/public_act.html.erb | 2 +- app/views/search/objects/research_briefing.html.erb | 2 +- app/views/search/objects/statutory_instrument.html.erb | 2 +- .../transport_and_works_act_order_application.html.erb | 2 +- app/views/search/objects/written_question.html.erb | 2 +- app/views/search/objects/written_statement.html.erb | 2 +- 31 files changed, 36 insertions(+), 30 deletions(-) create mode 100644 app/views/search/fragments/_type.html.erb diff --git a/app/views/search/fragments/_type.html.erb b/app/views/search/fragments/_type.html.erb new file mode 100644 index 00000000..eb096901 --- /dev/null +++ b/app/views/search/fragments/_type.html.erb @@ -0,0 +1,6 @@ +<% unless type.blank? %> +
+

Type

+ <%= object_display_name(type) %> +
+<% end %> \ No newline at end of file diff --git a/app/views/search/objects/bill.html.erb b/app/views/search/objects/bill.html.erb index aca8563d..18ce2bb8 100644 --- a/app/views/search/objects/bill.html.erb +++ b/app/views/search/objects/bill.html.erb @@ -28,7 +28,7 @@ <% end %>
-

About this <%= object_display_name(object.type, case_formatting: true) %>

+ <%= render 'search/fragments/type', type: object.type %> <%= render 'search/fragments/reference', reference: object.reference %> <%= render 'search/fragments/session', session: object.parliamentary_session %> <%= render 'search/fragments/corporate_author', label: 'Promoter / Parliamentary agent', author: object.corporate_author %> diff --git a/app/views/search/objects/church_of_england_measure.html.erb b/app/views/search/objects/church_of_england_measure.html.erb index 71cd2a1e..c66869fb 100644 --- a/app/views/search/objects/church_of_england_measure.html.erb +++ b/app/views/search/objects/church_of_england_measure.html.erb @@ -17,7 +17,7 @@
-

About this <%= object_display_name(object.type, case_formatting: true) %>

+ <%= render 'search/fragments/type', type: object.type %> <%= render 'search/fragments/reference', reference: object.reference %> <%= render 'search/fragments/related_items', related_item_ids: object.related_item_ids %> <%= render 'search/fragments/notes', notes: object.notes %> diff --git a/app/views/search/objects/deposited_paper.html.erb b/app/views/search/objects/deposited_paper.html.erb index 25c07ad2..38de4cb9 100644 --- a/app/views/search/objects/deposited_paper.html.erb +++ b/app/views/search/objects/deposited_paper.html.erb @@ -37,7 +37,7 @@
-

About this <%= object_display_name(object.type, case_formatting: true) %>

+ <%= render 'search/fragments/type', type: object.type %> <%= render 'search/fragments/reference', reference: object.reference %> <%= render 'search/fragments/date', title: 'Originated on', date: object.date_originated %> <%= render 'search/fragments/corporate_author', label: 'Author', author: object.authors %> diff --git a/app/views/search/objects/edm.html.erb b/app/views/search/objects/edm.html.erb index 57830e3c..dbc69a83 100644 --- a/app/views/search/objects/edm.html.erb +++ b/app/views/search/objects/edm.html.erb @@ -26,7 +26,7 @@ <% end %>
-

About this <%= object_display_name(object.type, case_formatting: true) %>

+ <%= render 'search/fragments/type', type: object.type %> <%= render 'search/fragments/reference', reference: object.reference %> <%= render 'search/fragments/session', session: object.parliamentary_session %> <%= render 'search/fragments/other_sponsors', sponsors: object.other_sponsors %> diff --git a/app/views/search/objects/european_deposited_document.html.erb b/app/views/search/objects/european_deposited_document.html.erb index 21ef727c..d7a798d5 100644 --- a/app/views/search/objects/european_deposited_document.html.erb +++ b/app/views/search/objects/european_deposited_document.html.erb @@ -17,7 +17,7 @@
-

About this <%= object_display_name(object.type, case_formatting: true) %>

+ <%= render 'search/fragments/type', type: object.type %> <%= render 'search/fragments/commission_number', commission_number: object.commission_number %> <%= render 'search/fragments/elc_number', elc_number: object.elc_number %> <%= render 'search/fragments/council_number', council_number: object.council_number %> diff --git a/app/views/search/objects/european_material.html.erb b/app/views/search/objects/european_material.html.erb index be04f7a4..f6af6b29 100644 --- a/app/views/search/objects/european_material.html.erb +++ b/app/views/search/objects/european_material.html.erb @@ -17,7 +17,7 @@
-

About this <%= object_display_name(object.type, case_formatting: true) %>

+ <%= render 'search/fragments/type', type: object.type %> <%= render 'search/fragments/reference', reference: object.reference %> <%= render 'search/fragments/rapporteur', rapporteur: object.rapporteur %> <%= render 'search/fragments/corporate_author', label: 'Author', author: object.corporate_author %> diff --git a/app/views/search/objects/european_scrutiny_explanatory_memorandum.html.erb b/app/views/search/objects/european_scrutiny_explanatory_memorandum.html.erb index 69363630..92ef6fd9 100644 --- a/app/views/search/objects/european_scrutiny_explanatory_memorandum.html.erb +++ b/app/views/search/objects/european_scrutiny_explanatory_memorandum.html.erb @@ -17,7 +17,7 @@
-

About this <%= object_display_name(object.type, case_formatting: true) %>

+ <%= render 'search/fragments/type', type: object.type %> <%= render 'search/fragments/reference', reference: object.reference %> <%= render 'search/fragments/departments', departments: object.departments %> <%= render 'search/fragments/regarding', regarding_object_ids: object.regarding_object_ids %> diff --git a/app/views/search/objects/european_scrutiny_ministerial_correspondence.html.erb b/app/views/search/objects/european_scrutiny_ministerial_correspondence.html.erb index 30a3f037..06f059ef 100644 --- a/app/views/search/objects/european_scrutiny_ministerial_correspondence.html.erb +++ b/app/views/search/objects/european_scrutiny_ministerial_correspondence.html.erb @@ -17,7 +17,7 @@
-

About this <%= object_display_name(object.type, case_formatting: true) %>

+ <%= render 'search/fragments/type', type: object.type %> <%= render 'search/fragments/reference', reference: object.reference %> <%= render 'search/fragments/regarding', regarding_object_ids: object.regarding_object_ids %> <%= render 'search/fragments/related_items', related_item_ids: object.related_item_ids %> diff --git a/app/views/search/objects/european_scrutiny_recommendation.html.erb b/app/views/search/objects/european_scrutiny_recommendation.html.erb index e6ad34e7..2b3d98dd 100644 --- a/app/views/search/objects/european_scrutiny_recommendation.html.erb +++ b/app/views/search/objects/european_scrutiny_recommendation.html.erb @@ -17,7 +17,7 @@
-

About this <%= object_display_name(object.type, case_formatting: true) %>

+ <%= render 'search/fragments/type', type: object.type %> <%= render 'search/fragments/decision', decision: object.decision %> <%= render 'search/fragments/assessment', assessment: object.assessment %> <%= render 'search/fragments/cleared', cleared: object.is_cleared %> diff --git a/app/views/search/objects/formal_proceeding.html.erb b/app/views/search/objects/formal_proceeding.html.erb index 34734c7f..7775d1b8 100644 --- a/app/views/search/objects/formal_proceeding.html.erb +++ b/app/views/search/objects/formal_proceeding.html.erb @@ -25,7 +25,7 @@ <% end %>
-

About this <%= object_display_name(object.type, case_formatting: true) %>

+ <%= render 'search/fragments/type', type: object.type %> <%= render 'search/fragments/reference', reference: object.reference %> <%= render 'search/fragments/session', session: object.parliamentary_session %> <%= render 'search/fragments/legislative_stage', legislative_stage: object.legislative_stage %> diff --git a/app/views/search/objects/impact_assessment.html.erb b/app/views/search/objects/impact_assessment.html.erb index ecdc9cdb..c5410813 100644 --- a/app/views/search/objects/impact_assessment.html.erb +++ b/app/views/search/objects/impact_assessment.html.erb @@ -17,7 +17,7 @@
-

About this <%= object_display_name(object.type, case_formatting: true) %>

+ <%= render 'search/fragments/type', type: object.type %> <%= render 'search/fragments/reference', reference: object.reference %> <%= render 'search/fragments/corporate_author', label: 'Author', author: object.corporate_author %> <%= render 'search/fragments/paper_type', paper_type: object.paper_type %> diff --git a/app/views/search/objects/ministerial_correction.html.erb b/app/views/search/objects/ministerial_correction.html.erb index 96795a87..1148a5eb 100644 --- a/app/views/search/objects/ministerial_correction.html.erb +++ b/app/views/search/objects/ministerial_correction.html.erb @@ -35,7 +35,7 @@ <% end %>
-

About this <%= object_display_name(object.type, case_formatting: true) %>

+ <%= render 'search/fragments/type', type: object.type %> <%= render 'search/fragments/reference', reference: object.reference %> <%= render 'search/fragments/session', session: object.parliamentary_session %> <%= render 'search/fragments/procedure', procedure: object.procedure %> diff --git a/app/views/search/objects/observations_on_petitions.html.erb b/app/views/search/objects/observations_on_petitions.html.erb index 065c8370..6979727a 100644 --- a/app/views/search/objects/observations_on_petitions.html.erb +++ b/app/views/search/objects/observations_on_petitions.html.erb @@ -25,7 +25,7 @@ <% end %>
-

About these <%= object_display_name(object.subtype, case_formatting: true) %>

+ <%= render 'search/fragments/type', type: object.subtype %> <%= render 'search/fragments/reference', reference: object.reference %> <%= render 'search/fragments/session', session: object.parliamentary_session %> <%= render 'search/fragments/procedure', procedure: object.procedure %> diff --git a/app/views/search/objects/oral_answer_to_question.html.erb b/app/views/search/objects/oral_answer_to_question.html.erb index eed2cce9..ec245eab 100644 --- a/app/views/search/objects/oral_answer_to_question.html.erb +++ b/app/views/search/objects/oral_answer_to_question.html.erb @@ -30,7 +30,7 @@ <% end %>
-

About this <%= object_display_name(object.type, case_formatting: true) %>

+ <%= render 'search/fragments/type', type: object.type %> <%= render 'search/fragments/reference', reference: object.reference %> <%= render 'search/fragments/session', session: object.parliamentary_session %> <%= render 'search/fragments/procedure', procedure: object.procedure %> diff --git a/app/views/search/objects/oral_question.html.erb b/app/views/search/objects/oral_question.html.erb index dda0a4ea..511c0f2c 100644 --- a/app/views/search/objects/oral_question.html.erb +++ b/app/views/search/objects/oral_question.html.erb @@ -39,7 +39,7 @@
-

About this <%= object_display_name(object.type, case_formatting: true) %>

+ <%= render 'search/fragments/type', type: object.type %> <%= render 'search/fragments/reference', reference: object.reference %> <%= render 'search/fragments/session', session: object.parliamentary_session %> <%= render 'search/fragments/oral_question_type', contribution_type: object.contribution_type %> diff --git a/app/views/search/objects/oral_question_time_intervention.html.erb b/app/views/search/objects/oral_question_time_intervention.html.erb index c9cd889e..142badc4 100644 --- a/app/views/search/objects/oral_question_time_intervention.html.erb +++ b/app/views/search/objects/oral_question_time_intervention.html.erb @@ -25,7 +25,7 @@ <% end %>
-

About this <%= object_display_name(object.type, case_formatting: true) %>

+ <%= render 'search/fragments/type', type: object.type %> <%= render 'search/fragments/reference', reference: object.reference %> <%= render 'search/fragments/session', session: object.parliamentary_session %> <%= render 'search/fragments/procedure', procedure: object.procedure %> diff --git a/app/views/search/objects/paper_ordered_to_be_printed.html.erb b/app/views/search/objects/paper_ordered_to_be_printed.html.erb index 541ea6ba..05b0fb5d 100644 --- a/app/views/search/objects/paper_ordered_to_be_printed.html.erb +++ b/app/views/search/objects/paper_ordered_to_be_printed.html.erb @@ -25,7 +25,7 @@ <% end %>
-

About this <%= object_display_name(object.type, case_formatting: true) %>

+ <%= render 'search/fragments/type', type: object.type %> <%= render 'search/fragments/reference', reference: object.reference %> <%= render 'search/fragments/session', session: object.parliamentary_session %> <%= render 'search/fragments/corporate_author', label: 'Author', author: object.corporate_author %> diff --git a/app/views/search/objects/paper_petition.html.erb b/app/views/search/objects/paper_petition.html.erb index 71fa2814..502dac05 100644 --- a/app/views/search/objects/paper_petition.html.erb +++ b/app/views/search/objects/paper_petition.html.erb @@ -25,7 +25,7 @@ <% end %>
-

About this <%= object_display_name(object.subtype, case_formatting: true) %>

+ <%= render 'search/fragments/type', type: object.subtype %> <%= render 'search/fragments/reference', reference: object.reference %> <%= render 'search/fragments/session', session: object.parliamentary_session %> <%= render 'search/fragments/procedure', procedure: object.procedure %> diff --git a/app/views/search/objects/paper_submitted.html.erb b/app/views/search/objects/paper_submitted.html.erb index f25dfd12..a7d7080c 100644 --- a/app/views/search/objects/paper_submitted.html.erb +++ b/app/views/search/objects/paper_submitted.html.erb @@ -25,7 +25,7 @@ <% end %>
-

About this <%= object_display_name(object.type, case_formatting: true) %>

+ <%= render 'search/fragments/type', type: object.type %> <%= render 'search/fragments/reference', reference: object.reference %> <%= render 'search/fragments/session', session: object.parliamentary_session %> <%= render 'search/fragments/corporate_author', label: 'Author', author: object.corporate_author %> diff --git a/app/views/search/objects/parliamentary_paper_laid.html.erb b/app/views/search/objects/parliamentary_paper_laid.html.erb index 5b0b5651..b654957e 100644 --- a/app/views/search/objects/parliamentary_paper_laid.html.erb +++ b/app/views/search/objects/parliamentary_paper_laid.html.erb @@ -25,7 +25,7 @@ <% end %>
-

About this <%= object_display_name(object.type, case_formatting: true) %>

+ <%= render 'search/fragments/type', type: object.type %> <%= render 'search/fragments/reference', reference: object.reference %> <%= render 'search/fragments/session', session: object.parliamentary_session %> <%= render 'search/fragments/coming_into_force', notes: object.coming_into_force, date: object.coming_into_force_date %> diff --git a/app/views/search/objects/parliamentary_paper_reported.html.erb b/app/views/search/objects/parliamentary_paper_reported.html.erb index f3416ddf..0236b685 100644 --- a/app/views/search/objects/parliamentary_paper_reported.html.erb +++ b/app/views/search/objects/parliamentary_paper_reported.html.erb @@ -17,7 +17,7 @@
-

About this <%= object_display_name(object.type, case_formatting: true) %>

+ <%= render 'search/fragments/type', type: object.type %> <%= render 'search/fragments/reference', reference: object.reference %> <%= render 'search/fragments/session', session: object.parliamentary_session %> <%= render 'search/fragments/witnesses', witnesses: object.witnesses %> diff --git a/app/views/search/objects/parliamentary_proceeding.html.erb b/app/views/search/objects/parliamentary_proceeding.html.erb index 770483f6..1b7851ac 100644 --- a/app/views/search/objects/parliamentary_proceeding.html.erb +++ b/app/views/search/objects/parliamentary_proceeding.html.erb @@ -25,7 +25,7 @@ <% end %>
-

About these <%= object_display_name(object.type, singular: false, case_formatting: true) %>

+ <%= render 'search/fragments/type', type: object.type %> <%= render 'search/fragments/reference', reference: object.reference %> <%= render 'search/fragments/session', session: object.parliamentary_session %> <%= render 'search/fragments/departments', departments: object.departments %> diff --git a/app/views/search/objects/private_act.html.erb b/app/views/search/objects/private_act.html.erb index b14a6f75..1ed981f4 100644 --- a/app/views/search/objects/private_act.html.erb +++ b/app/views/search/objects/private_act.html.erb @@ -18,7 +18,7 @@
-

About this <%= object_display_name(object.type, case_formatting: true) %>

+ <%= render 'search/fragments/type', type: object.type %> <%= render 'search/fragments/reference', reference: object.reference %> <%= render 'search/fragments/related_items', related_item_ids: object.related_item_ids %> <%= render 'search/fragments/notes', notes: object.notes %> diff --git a/app/views/search/objects/proceeding_contribution.html.erb b/app/views/search/objects/proceeding_contribution.html.erb index ee7a97a3..e5b8616a 100644 --- a/app/views/search/objects/proceeding_contribution.html.erb +++ b/app/views/search/objects/proceeding_contribution.html.erb @@ -25,7 +25,7 @@ <% end %>
-

About this <%= object_display_name(object.type, case_formatting: true) %>

+ <%= render 'search/fragments/type', type: object.type %> <%= render 'search/fragments/reference', reference: object.reference %> <%= render 'search/fragments/session', session: object.parliamentary_session %> <%= render 'search/fragments/procedure', procedure: object.procedure %> diff --git a/app/views/search/objects/public_act.html.erb b/app/views/search/objects/public_act.html.erb index 3903252a..c126a071 100644 --- a/app/views/search/objects/public_act.html.erb +++ b/app/views/search/objects/public_act.html.erb @@ -26,7 +26,7 @@ <% end %>
-

About this <%= object_display_name(object.type, case_formatting: true) %>

+ <%= render 'search/fragments/type', type: object.type %> <%= render 'search/fragments/reference', reference: object.reference %> <%= render 'search/fragments/related_items', related_item_ids: object.related_item_ids %> <%= render 'search/fragments/ec_documents', ec_documents: object.ec_documents %> diff --git a/app/views/search/objects/research_briefing.html.erb b/app/views/search/objects/research_briefing.html.erb index 38a7ee4a..af5c0b0d 100644 --- a/app/views/search/objects/research_briefing.html.erb +++ b/app/views/search/objects/research_briefing.html.erb @@ -25,7 +25,7 @@ <% end %>
-

About this <%= object_display_name(object.type, case_formatting: true) %>

+ <%= render 'search/fragments/type', type: object.type %> <%= render 'search/fragments/reference', reference: object.reference %> <%= render 'search/fragments/series', series: object.series %> <%= render 'search/fragments/related_items', related_item_ids: object.related_item_ids %> diff --git a/app/views/search/objects/statutory_instrument.html.erb b/app/views/search/objects/statutory_instrument.html.erb index 6c6499a3..50af4936 100644 --- a/app/views/search/objects/statutory_instrument.html.erb +++ b/app/views/search/objects/statutory_instrument.html.erb @@ -25,7 +25,7 @@ <% end %>
-

About this <%= object_display_name(object.type, case_formatting: true) %>

+ <%= render 'search/fragments/type', type: object.type %> <%= render 'search/fragments/reference', reference: object.reference %> <%= render 'search/fragments/session', session: object.parliamentary_session %> <%= render 'search/fragments/coming_into_force', notes: object.coming_into_force, date: object.coming_into_force_date %> diff --git a/app/views/search/objects/transport_and_works_act_order_application.html.erb b/app/views/search/objects/transport_and_works_act_order_application.html.erb index 6ddbbfd5..441d9c0e 100644 --- a/app/views/search/objects/transport_and_works_act_order_application.html.erb +++ b/app/views/search/objects/transport_and_works_act_order_application.html.erb @@ -25,7 +25,7 @@ <% end %>
-

About this <%= object_display_name(object.type, case_formatting: true) %>

+ <%= render 'search/fragments/type', type: object.type %> <%= render 'search/fragments/reference', reference: object.reference %> <%= render 'search/fragments/related_items', related_item_ids: object.related_item_ids %> <%= render 'search/fragments/notes', notes: object.notes %> diff --git a/app/views/search/objects/written_question.html.erb b/app/views/search/objects/written_question.html.erb index a19d41ad..c8ee24e2 100644 --- a/app/views/search/objects/written_question.html.erb +++ b/app/views/search/objects/written_question.html.erb @@ -24,7 +24,7 @@
-

About this <%= object_display_name(object.type, case_formatting: true) %>

+ <%= render 'search/fragments/type', type: object.type %> <%= render 'search/fragments/uin', uins: object.uin %> <%= render 'search/fragments/session', session: object.parliamentary_session %> <%= render 'search/fragments/procedure', procedure: object.procedure %> diff --git a/app/views/search/objects/written_statement.html.erb b/app/views/search/objects/written_statement.html.erb index 32f5b324..8e730da6 100644 --- a/app/views/search/objects/written_statement.html.erb +++ b/app/views/search/objects/written_statement.html.erb @@ -25,7 +25,7 @@ <% end %>
-

About this <%= object_display_name(object.type, case_formatting: true) %>

+ <%= render 'search/fragments/type', type: object.type %> <%= render 'search/fragments/reference', reference: object.reference %> <%= render 'search/fragments/session', session: object.parliamentary_session %> <%= render 'search/fragments/procedure', procedure: object.procedure %>