LafayetteCollegeLibraries/spot

View on GitHub
app/views/hyrax/collections/_show_actions.html.erb

Summary

Maintainability
Test Coverage
<div class="col-md-12" style="margin-top: 1rem;">
  <%= link_to 'Edit', edit_dashboard_collection_path(presenter), class: 'btn btn-default' %>

  <% if presenter.collection_featurable? %>
  <%= link_to t('hyrax.base.show_actions.feature'),
              main_app.featured_collection_path(presenter, format: :json),
              data: { behavior: 'feature' },
              class: presenter.display_unfeature_link? ? 'btn btn-default collapse' : 'btn btn-default' %>

  <%= link_to t('hyrax.base.show_actions.unfeature'),
              main_app.featured_collection_path(presenter, format: :json),
              data: { behavior: 'unfeature' },
              class: presenter.display_feature_link? ? 'btn btn-default collapse' : 'btn btn-default' %>
  <% end %>
</div>