Sha256: 4a3cad958640d044b55fb3bf7ab767b88713a63db7246bbbbc275a23e59f26ae

Contents?: true

Size: 1.12 KB

Versions: 11

Compression:

Stored size: 1.12 KB

Contents

<%- # we don't use the per-form csrf token -%>
<%= form_tag(bookmark_path,
             authenticity_token: false,
             method:  bookmarked? ? :delete : :put,
             class: "bookmark-toggle",
             data: {
               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 <%= bookmark_icon ? 'd-none' : '' %>" data-checkboxsubmit-target="checkbox" <%= 'checked="checked"' if bookmarked? %>>
      <%= bookmark_icon %>
      <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'),
                 class: "bookmark-#{bookmarked? ? 'remove' : 'add'} btn btn-outline-secondary") %>
<% end %>

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
blacklight-8.8.4 app/components/blacklight/document/bookmark_component.html.erb
blacklight-8.8.3 app/components/blacklight/document/bookmark_component.html.erb
blacklight-8.8.2 app/components/blacklight/document/bookmark_component.html.erb
blacklight-8.8.1 app/components/blacklight/document/bookmark_component.html.erb
blacklight-8.8.0 app/components/blacklight/document/bookmark_component.html.erb
blacklight-8.7.0 app/components/blacklight/document/bookmark_component.html.erb
blacklight-8.6.1 app/components/blacklight/document/bookmark_component.html.erb
blacklight-8.6.0 app/components/blacklight/document/bookmark_component.html.erb
blacklight-8.5.1 app/components/blacklight/document/bookmark_component.html.erb
blacklight-8.5.0 app/components/blacklight/document/bookmark_component.html.erb
blacklight-8.4.0 app/components/blacklight/document/bookmark_component.html.erb