Sha256: d9cf64a741574fb402af25f88411f43a8cb68d2d3e0eecfd9467c29aabb294ee

Contents?: true

Size: 773 Bytes

Versions: 1

Compression:

Stored size: 773 Bytes

Contents

<%-
# the data-doc-id attribute is used by our JS that converts to a checkbox/label.
-%>
<%= form_tag(@bookmark_path,
             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 %>
  <%= 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

1 entries across 1 versions & 1 rubygems

Version Path
blacklight-7.11.1 app/components/blacklight/document/bookmark_component.html.erb