diff --git a/app/helpers/hyrax/dashboard_helper_behavior.rb b/app/helpers/hyrax/dashboard_helper_behavior.rb index 09a01b1057..a91be7944c 100644 --- a/app/helpers/hyrax/dashboard_helper_behavior.rb +++ b/app/helpers/hyrax/dashboard_helper_behavior.rb @@ -4,10 +4,6 @@ def on_the_dashboard? params[:controller].match(%r{^hyrax/dashboard|hyrax/my}) end - def on_my_works? - params[:controller].match(%r{^hyrax/my/works}) - end - def number_of_works(user = current_user) Hyrax::WorkRelation.new.where(DepositSearchBuilder.depositor_field => user.user_key).count rescue RSolr::Error::ConnectionRefused diff --git a/app/views/hyrax/dashboard/works/_default_group.html.erb b/app/views/hyrax/dashboard/works/_default_group.html.erb index 9728820dc3..8523d0249e 100644 --- a/app/views/hyrax/dashboard/works/_default_group.html.erb +++ b/app/views/hyrax/dashboard/works/_default_group.html.erb @@ -2,6 +2,7 @@ <%= t("hyrax.dashboard.my.sr.listing") %> <%= application_name %> + <%= render_check_all %> <%= t("hyrax.dashboard.my.heading.title") %> <%= t("hyrax.dashboard.my.heading.date_uploaded") %> <%= t("blacklight.search.fields.facet.suppressed_bsi") %> diff --git a/app/views/hyrax/dashboard/works/_list_works.html.erb b/app/views/hyrax/dashboard/works/_list_works.html.erb index 722554a963..4eb03ed8ae 100644 --- a/app/views/hyrax/dashboard/works/_list_works.html.erb +++ b/app/views/hyrax/dashboard/works/_list_works.html.erb @@ -1,4 +1,8 @@ + + + <%= render 'hyrax/batch_select/add_button', document: document %>  +
<%= link_to [main_app, document], class: 'media-left', 'aria-hidden' => true do %> diff --git a/app/views/hyrax/my/_search_header.html.erb b/app/views/hyrax/my/_search_header.html.erb index 873e078ddf..f04d990321 100644 --- a/app/views/hyrax/my/_search_header.html.erb +++ b/app/views/hyrax/my/_search_header.html.erb @@ -12,18 +12,4 @@
-<% if on_my_works? %> -
- <%= render 'hyrax/dashboard/collections/form_for_select_collection', user_collections: @user_collections if params[:controller] != 'hyrax/my/collections' %> - -
- <% session[:batch_edit_state] = "on" %> -
- <%= button_to "Edit Selected", hyrax.edit_batch_edits_path, method: :get, class: "btn btn-update btn-primary hidden submits-batches", data: { behavior: 'batch-edit' }, id: 'batch-edit' %> -
- <%= batch_delete %> - <%= button_tag "Add to Collection", class: 'btn btn-primary submits-batches submits-batches-add', - data: { toggle: "modal", target: "#collection-list-container" } %> -
-
-<% end %> +<%= render 'batch_actions' %> diff --git a/app/views/hyrax/my/collections/_batch_actions.html.erb b/app/views/hyrax/my/collections/_batch_actions.html.erb new file mode 100644 index 0000000000..a54abef01d --- /dev/null +++ b/app/views/hyrax/my/collections/_batch_actions.html.erb @@ -0,0 +1,5 @@ +
+
+ +
+
diff --git a/app/views/hyrax/my/collections/_default_group.html.erb b/app/views/hyrax/my/collections/_default_group.html.erb index b76a6f209e..049ba2ea88 100644 --- a/app/views/hyrax/my/collections/_default_group.html.erb +++ b/app/views/hyrax/my/collections/_default_group.html.erb @@ -1,5 +1,3 @@ - - diff --git a/app/views/hyrax/my/works/_batch_actions.html.erb b/app/views/hyrax/my/works/_batch_actions.html.erb new file mode 100644 index 0000000000..aa3cc2dd48 --- /dev/null +++ b/app/views/hyrax/my/works/_batch_actions.html.erb @@ -0,0 +1,14 @@ +
+ <%= render 'hyrax/dashboard/collections/form_for_select_collection', user_collections: @user_collections %> + +
+ <% session[:batch_edit_state] = "on" %> +
+ <%= button_to t('hyrax.dashboard.my.action.edit_selected'), hyrax.edit_batch_edits_path, method: :get, class: "btn btn-update btn-primary hidden submits-batches", data: { behavior: 'batch-edit' }, id: 'batch-edit' %> +
+ <%= batch_delete %> + <%= button_tag t('hyrax.dashboard.my.action.add_to_collection'), + class: 'btn btn-primary submits-batches submits-batches-add', + data: { toggle: "modal", target: "#collection-list-container" } %> +
+
diff --git a/app/views/hyrax/my/works/_tabs.html.erb b/app/views/hyrax/my/works/_tabs.html.erb index 75206968fd..264d506937 100644 --- a/app/views/hyrax/my/works/_tabs.html.erb +++ b/app/views/hyrax/my/works/_tabs.html.erb @@ -1,7 +1,7 @@
<%= t("hyrax.dashboard.my.sr.listing") %> <%= application_name %>