Sha256: 130e02ea05df38e02ebb69833e2665f040694348983e2fec00e20e89b0c80de0
Contents?: true
Size: 1.04 KB
Versions: 9
Compression:
Stored size: 1.04 KB
Contents
<% action = document.private?(current_exhibit) ? :make_public : :make_private %> <%= form_tag([:visibility, current_exhibit, document], method: document.private?(current_exhibit) ? :put : :delete, class: 'visibility-toggle', data: { 'doc-id': document.id, present: t('.make_private'), absent: t('.make_public'), inprogress: t('.inprogress'), }) do %> <div class="checkbox toggle-visibility"> <label class="toggle-visibility" data-checkboxsubmit-target="label"> <input type="checkbox" class="toggle-visibility" data-checkboxsubmit-target="checkbox" <%= 'checked="checked"' if document.public?(current_exhibit) %>> <span data-checkboxsubmit-target="span" class="sr-only"> <%= document.private?(current_exhibit) ? t('.make_public') : t('.make_private') %> </span> </label> </div> <%= submit_tag(t(".#{action}"), id: "visibility_toggle_#{document.id.to_s.parameterize}", class: "visibility-#{action}") %> <% end %>
Version data entries
9 entries across 9 versions & 1 rubygems