Sha256: cdafd18cf8f393fa3a03290412653c5bce571ccabeea313ec76f77914134d85f
Contents?: true
Size: 1.45 KB
Versions: 11
Compression:
Stored size: 1.45 KB
Contents
<% if current_or_guest_user %> <%- # Note these two forms are pretty similar but for different :methods, classes, and labels. # but it was simpler to leave them seperate instead of DRYing them, got confusing trying that. # the data-doc-id attribute is used by our JS that converts to a checkbox/label. -%> <% if current_bookmarks.find { |x| x.document_id == document.id and x.document_type == document.class }.blank? %> <%= form_tag( bookmark_path( document ), :method => :put, :class => "bookmark_toggle", "data-doc-id" => document.id, :'data-present' => t('blacklight.search.bookmarks.present'), :'data-absent' => t('blacklight.search.bookmarks.absent'), :'data-inprogress' => t('blacklight.search.bookmarks.inprogress')) do %> <%= submit_tag(t('blacklight.bookmarks.add.button'), :id => "bookmark_toggle_#{document.id.to_s.parameterize}", :class => "bookmark_add") %> <% end %> <% else %> <%= form_tag( bookmark_path( document ), :method => :delete, :class => "bookmark_toggle", "data-doc-id" => document.id, :'data-present' => t('blacklight.search.bookmarks.present'), :'data-absent' => t('blacklight.search.bookmarks.absent'), :'data-inprogress' => t('blacklight.search.bookmarks.inprogress')) do %> <%= submit_tag(t('blacklight.bookmarks.remove.button'), :id => "bookmark_toggle_#{document.id.to_s.parameterize}", :class => "bookmark_remove") %> <% end %> <% end %> <% else %> <% end %>
Version data entries
11 entries across 11 versions & 1 rubygems