Sha256: 6bc45bbcf48c57d81c4d21db4944d28c3c8a48a4340235efc49eb1e18d88445b
Contents?: true
Size: 1.25 KB
Versions: 11
Compression:
Stored size: 1.25 KB
Contents
<%- # the data-doc-id attribute is used by our JS that converts to a checkbox/label. # we don't use the per-form csrf token -%> <%= form_tag(bookmark_path, authenticity_token: false, method: bookmarked? ? :delete : :put, class: "bookmark-toggle", data: { 'doc-id' => @document.id, present: t('blacklight.search.bookmarks.present'), absent: t('blacklight.search.bookmarks.absent'), inprogress: t('blacklight.search.bookmarks.inprogress') }) do %> <div class="checkbox toggle-bookmark"> <label class="toggle-bookmark" data-checkboxsubmit-target="label"> <input type="checkbox" class="toggle-bookmark" data-checkboxsubmit-target="checkbox" <%= 'checked="checked"' if bookmarked? %>> <span data-checkboxsubmit-target="span"><%= bookmarked? ? t('blacklight.search.bookmarks.present') : t('blacklight.search.bookmarks.absent') %></span> </label> </div> <%= submit_tag(t(bookmarked? ? 'remove.button' : 'add.button', scope: 'blacklight.bookmarks'), id: "bookmark_toggle_#{@document.id.to_s.parameterize}", class: "bookmark-#{bookmarked? ? 'remove' : 'add'} btn btn-outline-secondary") %> <% end %>
Version data entries
11 entries across 11 versions & 1 rubygems