-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Allow research material to be surfaced in search results
- Loading branch information
Showing
3 changed files
with
146 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
class ResearchMaterial < ContentObject | ||
|
||
def initialize(content_object_data) | ||
super | ||
end | ||
|
||
def template | ||
'search/objects/research_material' | ||
end | ||
|
||
def search_result_partial | ||
'search/results/research_material' | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,131 @@ | ||
<div class="result-item"> | ||
<div class="row" id="title"> | ||
<%= format_object_title(object.object_title, @ses_data) %> | ||
</div> | ||
|
||
<div class="row" id="content"> | ||
<%#= render 'search/results/item_details/description', description: object.abstract_text %> | ||
</div> | ||
|
||
<div class="row"> | ||
<div class="three-panel"> | ||
<div class="left" id="primary-person"> | ||
<%#= render 'search/results/item_details/member', member: object.member, member_party: object.member_party %> | ||
</div> | ||
<div class="centre" id="secondary-person"> | ||
<%#= render 'search/results/item_details/member', member: object.member, member_party: object.member_party %> | ||
</div> | ||
<div class="right" id="primary-group"> | ||
<%#= render 'search/results/item_details/departments', departments: object.departments, hide_label: false %> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<div class="row"> | ||
<div class="three-panel"> | ||
<div class="left" id="type"> | ||
<%= render 'search/results/item_details/type', type: object.object_name %> | ||
</div> | ||
<div class="centre" id="status"> | ||
|
||
</div> | ||
<div class="right" id="secondary-group"> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<div <%= 'hidden' unless params[:show_detailed] == "true" %> class="row" id="detailed-view" data-detailed-results-target="toggleHidden"> | ||
|
||
<div class="row"> | ||
<div class="two-panel"> | ||
<div class="left" id="legislative-stage"> | ||
</div> | ||
<div class="right" id="procedure"> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<div class="row"> | ||
<div class="four-panel"> | ||
<div class="left-outer" id="specific-date-1"> | ||
</div> | ||
<div class="left-inner" id="specific-date-2"> | ||
</div> | ||
<div class="right-inner" id="specific-date-3"> | ||
|
||
</div> | ||
<div class="right-outer" id="specific-date-4"> | ||
|
||
</div> | ||
</div> | ||
</div> | ||
|
||
<div class="row"> | ||
<div id="coming-into-force"> | ||
|
||
</div> | ||
</div> | ||
|
||
<div class="row"> | ||
<div id="supplementary-content"> | ||
|
||
</div> | ||
</div> | ||
|
||
<div class="row"> | ||
<div id="corrected"> | ||
|
||
</div> | ||
</div> | ||
|
||
<% unless object.amendments.blank? %> | ||
<% object.amendments.each do |amendment| %> | ||
<div class="row"> | ||
<div class="two-panel"> | ||
<div class="left" id="amending-member"> | ||
<%#= render 'search/results/item_details/amended_by', primary_sponsor: amendment.dig(:primary_sponsor, :value) unless amendment.dig(:primary_sponsor, :value).blank? %> | ||
</div> | ||
<div class="right" id="amendment-date"> | ||
<%#= render 'search/results/item_details/amended_on', date_tabled: amendment.dig(:date_tabled, :value) unless amendment.dig(:date_tabled, :value).blank? %> | ||
</div> | ||
</div> | ||
</div> | ||
<% end %> | ||
<% end %> | ||
<%#= render 'search/results/item_details/legislation', legislation: object.legislation unless object.legislation.blank? %> | ||
<%#= render 'search/results/item_details/witnesses', witnesses: object.witnesses unless object.witnesses.blank? %> | ||
<%#= render 'search/results/item_details/subjects', subjects: object.subjects unless object.subjects.blank? %> | ||
<%#= render 'search/results/item_details/topics', topics: object.topics unless object.topics.blank? %> | ||
<%#= render 'search/results/item_details/notes', notes: object.notes unless object.notes.blank? %> | ||
<% unless object.commons_library_location.blank? && object.lords_library_location.blank? %> | ||
<div class="row"> | ||
<div class="two-panel"> | ||
<div class="left" id="commons-library-location"> | ||
<%#= render 'search/results/item_details/commons_library_location', location: object.commons_library_location unless object.commons_library_location.blank? %> | ||
</div> | ||
<div class="right" id="lords-library-location"> | ||
<%#= render 'search/results/item_details/lords_library_location', location: object.lords_library_location unless object.lords_library_location.blank? %> | ||
</div> | ||
</div> | ||
</div> | ||
<% end %> | ||
|
||
</div> | ||
|
||
<div class="row"> | ||
<div class="three-panel"> | ||
<div class="left" id="significant-date"> | ||
<%= render 'search/results/item_details/date', date: object.standard_date %> | ||
</div> | ||
<div class="centre" id="reference"> | ||
<%= render 'search/results/item_details/reference', reference: object.standard_reference %> | ||
</div> | ||
<div class="right" id="house"> | ||
<%= render 'search/results/item_details/legislature', legislature: object.legislature %> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
<hr/> |