Skip to content

Commit

Permalink
- Replace 'about this' in secondary information of object views with …
Browse files Browse the repository at this point in the history
…a 'type' heading & value (subtype used for observations on petitions & petitions)
  • Loading branch information
j-corry committed Nov 11, 2024
1 parent a7a51a9 commit b7e942e
Show file tree
Hide file tree
Showing 31 changed files with 36 additions and 30 deletions.
6 changes: 6 additions & 0 deletions app/views/search/fragments/_type.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<% unless type.blank? %>
<div class="about-item">
<h3 class="content-heading" id="type">Type</h3>
<%= object_display_name(type) %>
</div>
<% end %>
2 changes: 1 addition & 1 deletion app/views/search/objects/bill.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<% end %>

<section id="about" class="content-section grey">
<h2 class="content-heading">About this <%= object_display_name(object.type, case_formatting: true) %></h2>
<%= 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 %>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
</section>

<section id="about" class="content-section grey">
<h2 class="content-heading">About this <%= object_display_name(object.type, case_formatting: true) %></h2>
<%= 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 %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/search/objects/deposited_paper.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
</section>

<section id="about" class="content-section grey">
<h2 class="content-heading">About this <%= object_display_name(object.type, case_formatting: true) %></h2>
<%= 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 %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/search/objects/edm.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<% end %>

<section id="about" class="content-section grey">
<h2 class="content-heading">About this <%= object_display_name(object.type, case_formatting: true) %></h2>
<%= 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 %>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
</section>

<section id="about" class="content-section grey">
<h2 class="content-heading">About this <%= object_display_name(object.type, case_formatting: true) %></h2>
<%= 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 %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/search/objects/european_material.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
</section>

<section id="about" class="content-section grey">
<h2 class="content-heading">About this <%= object_display_name(object.type, case_formatting: true) %></h2>
<%= 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 %>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
</section>

<section id="about" class="content-section grey">
<h2 class="content-heading">About this <%= object_display_name(object.type, case_formatting: true) %></h2>
<%= 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 %>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
</section>

<section id="about" class="content-section grey">
<h2 class="content-heading">About this <%= object_display_name(object.type, case_formatting: true) %></h2>
<%= 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 %>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
</section>

<section id="about" class="content-section grey">
<h2 class="content-heading">About this <%= object_display_name(object.type, case_formatting: true) %></h2>
<%= 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 %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/search/objects/formal_proceeding.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<% end %>

<section id="about" class="content-section grey">
<h2 class="content-heading">About this <%= object_display_name(object.type, case_formatting: true) %></h2>
<%= 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 %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/search/objects/impact_assessment.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
</section>

<section id="about" class="content-section grey">
<h2 class="content-heading">About this <%= object_display_name(object.type, case_formatting: true) %></h2>
<%= 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 %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/search/objects/ministerial_correction.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<% end %>

<section id="about" class="content-section grey">
<h2 class="content-heading">About this <%= object_display_name(object.type, case_formatting: true) %></h2>
<%= 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 %>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<% end %>

<section id="about" class="content-section grey">
<h2 class="content-heading">About these <%= object_display_name(object.subtype, case_formatting: true) %></h2>
<%= 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 %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/search/objects/oral_answer_to_question.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<% end %>

<section id="about" class="content-section grey">
<h2 class="content-heading">About this <%= object_display_name(object.type, case_formatting: true) %></h2>
<%= 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 %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/search/objects/oral_question.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
</section>

<section id="about" class="content-section grey">
<h2 class="content-heading">About this <%= object_display_name(object.type, case_formatting: true) %></h2>
<%= 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 %>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<% end %>

<section id="about" class="content-section grey">
<h2 class="content-heading">About this <%= object_display_name(object.type, case_formatting: true) %></h2>
<%= 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 %>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<% end %>

<section id="about" class="content-section grey">
<h2 class="content-heading">About this <%= object_display_name(object.type, case_formatting: true) %></h2>
<%= 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 %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/search/objects/paper_petition.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<% end %>

<section id="about" class="content-section grey">
<h2 class="content-heading">About this <%= object_display_name(object.subtype, case_formatting: true) %></h2>
<%= 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 %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/search/objects/paper_submitted.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<% end %>

<section id="about" class="content-section grey">
<h2 class="content-heading">About this <%= object_display_name(object.type, case_formatting: true) %></h2>
<%= 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 %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/search/objects/parliamentary_paper_laid.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<% end %>

<section id="about" class="content-section grey">
<h2 class="content-heading">About this <%= object_display_name(object.type, case_formatting: true) %></h2>
<%= 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 %>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
</section>

<section id="about" class="content-section grey">
<h2 class="content-heading">About this <%= object_display_name(object.type, case_formatting: true) %></h2>
<%= 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 %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/search/objects/parliamentary_proceeding.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<% end %>

<section id="about" class="content-section grey">
<h2 class="content-heading">About these <%= object_display_name(object.type, singular: false, case_formatting: true) %></h2>
<%= 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 %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/search/objects/private_act.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
</section>

<section id="about" class="content-section grey">
<h2 class="content-heading">About this <%= object_display_name(object.type, case_formatting: true) %></h2>
<%= 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 %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/search/objects/proceeding_contribution.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<% end %>

<section id="about" class="content-section grey">
<h2 class="content-heading">About this <%= object_display_name(object.type, case_formatting: true) %></h2>
<%= 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 %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/search/objects/public_act.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<% end %>

<section id="about" class="content-section grey">
<h2 class="content-heading">About this <%= object_display_name(object.type, case_formatting: true) %></h2>
<%= 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 %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/search/objects/research_briefing.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<% end %>

<section id="about" class="content-section grey">
<h2 class="content-heading">About this <%= object_display_name(object.type, case_formatting: true) %></h2>
<%= 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 %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/search/objects/statutory_instrument.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<% end %>

<section id="about" class="content-section grey">
<h2 class="content-heading">About this <%= object_display_name(object.type, case_formatting: true) %></h2>
<%= 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 %>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<% end %>

<section id="about" class="content-section grey">
<h2 class="content-heading">About this <%= object_display_name(object.type, case_formatting: true) %></h2>
<%= 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 %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/search/objects/written_question.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
</section>

<section id="about" class="content-section grey">
<h2 class="content-heading">About this <%= object_display_name(object.type, case_formatting: true) %></h2>
<%= 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 %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/search/objects/written_statement.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<% end %>

<section id="about" class="content-section grey">
<h2 class="content-heading">About this <%= object_display_name(object.type, case_formatting: true) %></h2>
<%= 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 %>
Expand Down

0 comments on commit b7e942e

Please sign in to comment.