Skip to content

Commit 2eda746

Browse files
committed
Deprecate the start_over partial. Render the component instead
1 parent 739b6eb commit 2eda746

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
<div id="appliedParams" class="clearfix constraints-container">
2-
<%= render 'start_over' %>
2+
<%= start_over %>
33
<%= link_back_to_catalog class: 'btn btn-outline-secondary' %>
44
</div>

app/components/blacklight/search_context/server_applied_params_component.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,14 @@ class ServerAppliedParamsComponent < Blacklight::Component
88
def render?
99
current_search_session
1010
end
11+
12+
def start_over
13+
render 'start_over', silence_deprecation: true
14+
end
15+
16+
def start_over_component
17+
Blacklight::StartOverButtonComponent
18+
end
1119
end
1220
end
1321
end
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
<%= render Blacklight::StartOverButtonComponent.new %>
1+
<% Blacklight.deprecation.warn('The partial _start_over.html.erb will be removed in Blacklight 9.0.') unless local_assigns[:silence_deprecation] %>
2+
<%= render start_over_component.new %>

0 commit comments

Comments
 (0)