<% 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' }, id: 'add-new-work-button', 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]), id: 'add-new-work-button', class: 'btn btn-primary' ) %> <% end %>
<% end %> <% end %>
<%= render 'tabs' if current_page?(hyrax.dashboard_works_path(locale: nil)) || @managed_works_count > 0 %>
<% if current_page?(hyrax.my_works_path(locale: nil)) %> <%= I18n.t('hyrax.my.count.works.you_own', total_count: @response.total_count).html_safe %> <% elsif current_page?(hyrax.dashboard_works_path(locale: nil)) && !current_ability.admin? %> <%= I18n.t('hyrax.my.count.works.you_manage', total_count: @response.total_count).html_safe %> <% else %> <%= I18n.t('hyrax.my.count.works.in_repo', total_count: @response.total_count).html_safe %> <% end %>
<%= render 'search_header' %>

<%= t('hyrax.my.count.works.works_listing') %>

<%= render 'document_list' %> <%= render 'results_pagination' %>
<%= render '/shared/select_work_type_modal', create_work_presenter: @create_work_presenter if @create_work_presenter.many? %>