% provide :page_title, t("hyrax.admin.sidebar.works") %>
<% provide :head do %>
<%= rss_feed_link_tag route_set: hyrax %>
<%= atom_feed_link_tag route_set: hyrax %>
<% end %>
<% provide :page_header do %>
<%= t("hyrax.admin.sidebar.works") %>
<% if current_ability.can_create_any_work? %>
<% if @create_work_presenter.many? %>
<% if Flipflop.batch_upload? %>
<%= link_to(
t(:'helpers.action.batch.new'),
'#',
data: { behavior: "select-work", target: "#worktypes-to-create", 'create-type' => 'batch' },
class: 'btn btn-primary'
) %>
<% end %>
<%= link_to(
t(:'helpers.action.work.new'),
'#',
data: { behavior: "select-work", target: "#worktypes-to-create", 'create-type' => 'single' },
class: 'btn btn-primary'
) %>
<% else # simple link to the first work type %>
<% if Flipflop.batch_upload? %>
<%= link_to(
t(:'helpers.action.batch.new'),
hyrax.new_batch_upload_path(payload_concern: @create_work_presenter.first_model),
class: 'btn btn-primary'
) %>
<% end %>
<%= link_to(
t(:'helpers.action.work.new'),
new_polymorphic_path([main_app, @create_work_presenter.first_model]),
class: 'btn btn-primary'
) %>
<% end %>