Skip to content

Commit

Permalink
- Add IDs to partials
Browse files Browse the repository at this point in the history
  • Loading branch information
j-corry committed Sep 20, 2023
1 parent 46c26eb commit 88833b8
Show file tree
Hide file tree
Showing 29 changed files with 36 additions and 50 deletions.
2 changes: 1 addition & 1 deletion app/views/search/fragments/_amendments.html.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div class="about-item">
<h3 class="content-heading">Amendments</h3>
<h3 class="content-heading" id="amendments">Amendments</h3>
<div>
<div class="content-list">
<% amendments.each do |amendment| %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/search/fragments/_answer.html.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<section id="text" class="content-section">
<div class="about-item">
<h3 class="content-heading">Answer</h3>
<h3 class="content-heading" id="answer">Answer</h3>
<%= raw(object.answer_text) %>
</div>
</section>
2 changes: 1 addition & 1 deletion app/views/search/fragments/_attachment.html.erb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="about-item">
<h3 class="content-heading">Attachment</h3>
<h3 class="content-heading" id="attachment">Attachment</h3>
<%= attachments.join('; ') %>
</div>
2 changes: 1 addition & 1 deletion app/views/search/fragments/_back_to_top_button.html.erb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<div class="button-container">
<a class="button-link" href="#top">Back to top</a>
<a class="button-link" id="back-to-top" href="#top">Back to top</a>
</div>
4 changes: 2 additions & 2 deletions app/views/search/fragments/_bibliographic_citations.html.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div id="bibliographic-citations">
<h2>Bibliographic citations</h2>
<div class="about-item">
<h3 class="content-heading" id="bibliographic-citations">Bibliographic citations</h3>
<ul>
<% bibliographic_citations.each do |citation| %>
<li><%= citation %></li>
Expand Down
10 changes: 0 additions & 10 deletions app/views/search/fragments/_copy_text_button.html.erb

This file was deleted.

2 changes: 1 addition & 1 deletion app/views/search/fragments/_edm_prelim.html.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="content-prelim-box">
<div class="content-prelim-inner">
<div class="content-prelim-text">
<div class="content-prelim-text" id="prelim-text">
An <%= object_link('Early Day Motion', '/') %> tabled by <%= object_link(object.primary_sponsor, '/') %>
on <strong><%= object.date_tabled&.strftime(ApplicationHelper::DATE_DISPLAY_FORMAT) %></strong>.
</div>
Expand Down
2 changes: 1 addition & 1 deletion app/views/search/fragments/_legislation.html.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div class="about-item">
<h3 class="content-heading">Legislation</h3>
<h3 class="content-heading" id="legislation">Legislation</h3>
<% legislation.each do |legislation| %>
<%= link_to legislation.to_s.titleize, '/' %>
<% end %>
Expand Down
8 changes: 3 additions & 5 deletions app/views/search/fragments/_link.html.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
<div id="link">
<h2>Link</h2>
<p>
<%= link_to(link, link) %>
</p>
<div class="about-item">
<h3 class="content-heading" id="link">Link</h3>
<%= link_to(link, link) %>
</div>
2 changes: 1 addition & 1 deletion app/views/search/fragments/_links.html.erb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="about-item">
<h3 class="content-heading">Links</h3>
<h3 class="content-heading" id="links">Links</h3>
<%= link_to "View this #{object.object_name} on #{ URI.parse(object.display_link).host}", object.display_link %>
</div>
14 changes: 6 additions & 8 deletions app/views/search/fragments/_notes.html.erb
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
<!--No data currently available to test-->

<!--<div class="about-item">-->
<!-- <h3 class="content-heading">Notes</h3>-->
<!-- <div>-->
<!-- Written statement made by the Department of Health-->
<!-- </div>-->
<!--</div>-->
<div class="about-item">
<h3 class="content-heading" id="notes">Notes</h3>
<div>
<%= notes %>
</div>
</div>
2 changes: 1 addition & 1 deletion app/views/search/fragments/_other_supporters.html.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div class="about-item">
<h3 class="content-heading">Other supporters</h3>
<h3 class="content-heading" id="other_supporters">Other supporters</h3>
<ul>
<% supporters.each do |supporter| %>
<li>- <%= link_to supporter, '/' %></li>
Expand Down
2 changes: 1 addition & 1 deletion app/views/search/fragments/_pills.html.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div class="about-item">
<h3 class="content-heading"><%= pills_heading %></h3>
<h3 class="content-heading" id="<%= pills_heading.downcase %>"><%= pills_heading %></h3>
<div class="pill-section">
<% pills.each do |pill| %>
<div class="pill-wrapper">
Expand Down
2 changes: 1 addition & 1 deletion app/views/search/fragments/_published_by.html.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div class="about-item">
<h3 class="content-heading">Published by</h3>
<h3 class="content-heading" id="published_by">Published by</h3>
<div class="publisher-logo">
<% if lookup_context.template_exists?('/search/logo_svgs/house-of-commons-library', nil, :partial) %>
<%= render object.publisher_logo_partial %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/search/fragments/_question.html.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<section id="text" class="content-section">
<div class="about-item">
<h3 class="content-heading">Question</h3>
<h3 class="content-heading" id="question">Question</h3>
<%= raw(object.question_text) %>
</div>
</section>
2 changes: 1 addition & 1 deletion app/views/search/fragments/_reference.html.erb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="about-item">
<h3 class="content-heading">Reference</h3>
<h3 class="content-heading" id="reference">Reference</h3>
<%= reference %>
</div>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="about-item">
<h3 class="content-heading">Registered interest declared</h3>
<h3 class="content-heading" id="registered_interest_declared">Registered interest declared</h3>
<%= registered_interest_declared %>
</div>
2 changes: 1 addition & 1 deletion app/views/search/fragments/_related_items.html.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div class="about-item">
<h3 class="content-heading">Related items</h3>
<h3 class="content-heading" id="related_items">Related items</h3>
<% related_items.each do |related_item| %>
<div>
<%= link_to related_item, '/' %><br/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="content-prelim-box">
<div class="content-prelim-inner">
<div class="content-prelim-text">
<div class="content-prelim-text" id="prelim-text">
An <%= object_link("#{object.object_name.titleize}", '/') %>
by <%= object_link("#{object.creator}", '/') %>
published on <strong><%= object.published_on&.strftime(ApplicationHelper::DATE_DISPLAY_FORMAT) %></strong>.
Expand Down
2 changes: 1 addition & 1 deletion app/views/search/fragments/_session.html.erb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="about-item">
<h3 class="content-heading">Session</h3>
<h3 class="content-heading" id="session">Session</h3>
<%= session %>
</div>
2 changes: 1 addition & 1 deletion app/views/search/fragments/_transferred.html.erb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="about-item">
<h3 class="content-heading">Transferred</h3>
<h3 class="content-heading" id="transferred">Transferred</h3>
<%= boolean_yes_no(transferred) %>
</div>
2 changes: 1 addition & 1 deletion app/views/search/fragments/_uin.html.erb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="about-item">
<h3 class="content-heading">Reference</h3>
<h3 class="content-heading" id="reference">Reference</h3>
<%= uins.join('; ') %>
</div>
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="content-prelim-box">
<div class="content-prelim-inner">
<div class="content-prelim-text">
<div class="content-prelim-text" id="prelim-text">
A <%= object_link("#{object.object_name.titleize}", '/') %>
was asked by <%= object_link("#{object.tabling_member}", '/') %>
on <strong><%= object.date_of_question.strftime(ApplicationHelper::DATE_DISPLAY_FORMAT) %></strong>,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="content-prelim-box">
<div class="content-prelim-inner">
<div class="content-prelim-text">
<div class="content-prelim-text" id="prelim-text">
A <%= object_link("#{object.object_name.titleize}", '/') %>
was asked by <%= object_link("#{object.tabling_member}", '/') %>
on <strong><%= object.date_of_question&.strftime(ApplicationHelper::DATE_DISPLAY_FORMAT) %></strong>,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="content-prelim-box">
<div class="content-prelim-inner">
<div class="content-prelim-text">
<div class="content-prelim-text" id="prelim-text">
A <%= object_link("#{object.object_name.titleize}", '/') %>
was asked by <%= object_link("#{object.tabling_member}", '/') %>
on <strong><%= object.date_of_question&.strftime(ApplicationHelper::DATE_DISPLAY_FORMAT) %></strong>,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="content-prelim-box">
<div class="content-prelim-inner">
<div class="content-prelim-text">
<div class="content-prelim-text" id="prelim-text">
A <%= object_link("#{object.object_name.titleize}", '/') %>
was asked by <%= object_link("#{object.tabling_member}", '/') %>
on <strong><%= object.date_of_question&.strftime(ApplicationHelper::DATE_DISPLAY_FORMAT) %></strong>,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="content-prelim-box">
<div class="content-prelim-inner">
<div class="content-prelim-text">
<div class="content-prelim-text" id="prelim-text">
A <%= object_link("#{object.object_name.titleize}", '/') %>
was tabled by <%= object_link("#{object.tabling_member}", '/') %>
on <strong><%= object.date_of_question&.strftime(ApplicationHelper::DATE_DISPLAY_FORMAT) %></strong>,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="content-prelim-box">
<div class="content-prelim-inner">
<div class="content-prelim-text">
<div class="content-prelim-text" id="prelim-text">
A <%= object_link("#{object.object_name.titleize}", '/') %>
was asked by <%= object_link("#{object.tabling_member}", '/') %>
on <strong><%= object.date_of_question&.strftime(ApplicationHelper::DATE_DISPLAY_FORMAT) %></strong>,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="content-prelim-box">
<div class="content-prelim-inner">
<div class="content-prelim-text">
<div class="content-prelim-text" id="prelim-text">
A <%= object_link("#{object.object_name}", '/') %>
made by <%= object_link("#{object.member}", '/') %> (<%= object_link("#{object.member_party}", '/') %>)
on <strong><%= object.statement_date&.strftime(ApplicationHelper::DATE_DISPLAY_FORMAT) %></strong>
Expand Down

0 comments on commit 88833b8

Please sign in to comment.