Skip to content

Commit

Permalink
Merge pull request #3766 from sul-dlss/replace-ujs-with-turbo
Browse files Browse the repository at this point in the history
Replace Rails-ujs directives with turbo-rails directives
  • Loading branch information
corylown authored Jan 23, 2024
2 parents 0bf77cf + f995ffe commit 934bd19
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/views/catalog/_search_bar_selections_widget.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<a class="dropdown-toggle" data-toggle="dropdown" href="#" role="button" aria-haspopup="true">
Selections (<span data-role='bookmark-counter'><%= current_or_guest_user.bookmarks.count %></span>)</a>
<div id="show-list" class="dropdown-menu recent-selections" role="menu">
<%= link_to "Clear all lists", clear_bookmarks_path, method: :delete, data: { confirm: t('searchworks.bookmarks.clear_all.action_confirm') }, id: "clear-list", class: "dropdown-item #{disabled_class_for_no_selections(current_or_guest_user.bookmarks.length)}", role: 'menuitem', tabindex: '-1' %>
<%= link_to "Clear all lists", clear_bookmarks_path, data: { turbo_method: 'delete', turbo_confirm: t('searchworks.bookmarks.clear_all.action_confirm') }, id: "clear-list", class: "dropdown-item #{disabled_class_for_no_selections(current_or_guest_user.bookmarks.length)}", role: 'menuitem', tabindex: '-1' %>
</div>
</div>
</li>
2 changes: 1 addition & 1 deletion app/views/catalog/_sort_and_per_page.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<span id="bookmarksWidgets">
<%= link_to t('blacklight.tools.cite_entries', current_range: current_entries_info(ivar_to_paginate)).html_safe, polymorphic_path(article_selections? ? :citation_articles : :citation_solr_documents, :sort=>params[:sort], :per_page=>params[:per_page], :id => @response.documents.map {|doc| doc.id}), {:id => 'citeLink', :name => 'citation', :class => 'btn btn-secondary', :data => {blacklight_modal: "trigger"}} %>
<%= render "tool_dropdown" %>
<%= link_to clear_bookmarks_path(type: article_selections? ? 'article' : 'catalog'), method: :delete, class: 'btn btn-secondary', data: { confirm: t("searchworks.bookmarks.#{article_selections? ? 'article' : 'catalog'}.clear.action_confirm") } do %>
<%= link_to clear_bookmarks_path(type: article_selections? ? 'article' : 'catalog'), class: 'btn btn-secondary', data: { turbo_method: 'delete', turbo_confirm: t("searchworks.bookmarks.#{article_selections? ? 'article' : 'catalog'}.clear.action_confirm") } do %>
<i class="fa fa-times" aria-hidden="true"></i> Clear list
<% end %>
</span>
Expand Down

0 comments on commit 934bd19

Please sign in to comment.