From a32dd54a6e62a29b9100ad09ab39333a05980350 Mon Sep 17 00:00:00 2001 From: aignatov-bio <47317017+aignatov-bio@users.noreply.github.com> Date: Thu, 31 Mar 2022 14:04:00 +0200 Subject: [PATCH] Toolbar fixes [SCI-6670] (#3973) Co-authored-by: Anton --- .../javascripts/repositories/repository_datatable.js | 10 ++++++++++ app/views/repositories/_toolbar_buttons.html.erb | 2 +- config/locales/en.yml | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/repositories/repository_datatable.js b/app/assets/javascripts/repositories/repository_datatable.js index 92d7670b2..3092cc113 100644 --- a/app/assets/javascripts/repositories/repository_datatable.js +++ b/app/assets/javascripts/repositories/repository_datatable.js @@ -55,6 +55,11 @@ var RepositoryDatatable = (function(global) { $('th').removeClass('disable-click'); $('.repository-row-selector').prop('disabled', false); $('.dataTables_filter input').prop('disabled', false); + $('#addRepositoryRecord').show(); + if (!$('#saveRepositoryFilters').hasClass('hidden')) { + $('#saveRepositoryFilters').show(); + } + $('#hideRepositoryReminders').show(); $('#importRecordsButton').show(); if (rowsSelected.length === 0) { $('#exportRepositoriesButton').addClass('disabled'); @@ -89,6 +94,11 @@ var RepositoryDatatable = (function(global) { $(TABLE_WRAPPER_ID).addClass('editing'); $('#importRecordsButton').hide(); $('#editDeleteCopy').hide(); + $('#addRepositoryRecord').hide(); + $('#hideRepositoryReminders').hide(); + if (!$('#saveRepositoryFilters').hasClass('hidden')) { + $('#saveRepositoryFilters').hide(); + } $('#saveCancel').show(); $('.manage-repo-column-index').prop('disabled', true); $('#repository-acitons-dropdown').prop('disabled', true); diff --git a/app/views/repositories/_toolbar_buttons.html.erb b/app/views/repositories/_toolbar_buttons.html.erb index ed756a4b1..84c740ceb 100644 --- a/app/views/repositories/_toolbar_buttons.html.erb +++ b/app/views/repositories/_toolbar_buttons.html.erb @@ -46,12 +46,12 @@
-
<% if @repository.is_a?(BmtRepository) %>
<%= render partial: 'repositories/toolbar/bmt' %>
<% end %> +
diff --git a/config/locales/en.yml b/config/locales/en.yml index 9940a73ad..5980d2164 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1848,7 +1848,7 @@ en: active: Show active inventories archived: Show archived inventories buttons: - edit: "Edit" + edit: "Rename" duplicate: "Duplicate" archive: "Archive" restore: "Restore"