Skip to content

Commit

Permalink
Deprecate the start_over partial. Render the component instead
Browse files Browse the repository at this point in the history
  • Loading branch information
jcoyne committed Sep 23, 2024
1 parent 739b6eb commit 2eda746
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div id="appliedParams" class="clearfix constraints-container">
<%= render 'start_over' %>
<%= start_over %>
<%= link_back_to_catalog class: 'btn btn-outline-secondary' %>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,14 @@ class ServerAppliedParamsComponent < Blacklight::Component
def render?
current_search_session
end

def start_over
render 'start_over', silence_deprecation: true
end

def start_over_component
Blacklight::StartOverButtonComponent
end
end
end
end
3 changes: 2 additions & 1 deletion app/views/catalog/_start_over.html.erb
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
<%= render Blacklight::StartOverButtonComponent.new %>
<% Blacklight.deprecation.warn('The partial _start_over.html.erb will be removed in Blacklight 9.0.') unless local_assigns[:silence_deprecation] %>
<%= render start_over_component.new %>

0 comments on commit 2eda746

Please sign in to comment.