mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-02-25 16:24:27 +08:00
Merge pull request #2717 from aignatov-bio/ai-sci-4844-fix-dropdown-options-for-active-repository
Small archived repositories fixes [SCI-4844]
This commit is contained in:
commit
b2a42c182b
5 changed files with 24 additions and 15 deletions
|
@ -163,7 +163,7 @@
|
|||
|
||||
$('.repository-title-name .inline-editing-container').on('inlineEditing::updated', function(e, value, viewValue) {
|
||||
$('.repository-archived-title-name')
|
||||
.text(I18n.t('repositories.show.archived_inventory', { repository_name: viewValue }));
|
||||
.text(I18n.t('repositories.show.archived_inventory_items', { repository_name: viewValue }));
|
||||
$('#toolbarButtonsDatatable .archived-label')
|
||||
.text(I18n.t('repositories.show.archived_view_label.active', { repository_name: viewValue }));
|
||||
});
|
||||
|
|
|
@ -41,9 +41,9 @@ module RepositoriesDatatableHelper
|
|||
return I18n.t('libraries.index.not_shared') unless repository.shared_with?(team)
|
||||
|
||||
if repository.shared_with_read?(team)
|
||||
I18n.t('libraries.index.shared_for_editing')
|
||||
else
|
||||
I18n.t('libraries.index.shared_for_viewing')
|
||||
else
|
||||
I18n.t('libraries.index.shared_for_editing')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -64,10 +64,12 @@
|
|||
<span class="fas fa-pencil-alt"></span>
|
||||
<%= t('libraries.index.buttons.edit') %>
|
||||
</a>
|
||||
<a id="copyRepoBtn" class="btn btn-light disabled" data-view-mode="active" href="#" data-action-mode="single" data-remote="true">
|
||||
<span class="fas fa-copy"></span>
|
||||
<%= t('libraries.index.buttons.duplicate') %>
|
||||
</a>
|
||||
<% if can_create_repositories?(current_team) %>
|
||||
<a id="copyRepoBtn" class="btn btn-light disabled" data-view-mode="active" href="#" data-action-mode="single" data-remote="true">
|
||||
<span class="fas fa-copy"></span>
|
||||
<%= t('libraries.index.buttons.duplicate') %>
|
||||
</a>
|
||||
<% end %>
|
||||
<a id="archiveRepoBtn"
|
||||
class="btn btn-light disabled"
|
||||
data-view-mode="active"
|
||||
|
|
|
@ -36,7 +36,11 @@
|
|||
</div>
|
||||
<% end %>
|
||||
<div class="repository-archived-title-name" data-view-mode="archived">
|
||||
<%= t('repositories.show.archived_inventory', repository_name: @repository.name) %>
|
||||
<% if @repository.archived? %>
|
||||
<%= t('repositories.show.archived_inventory', repository_name: @repository.name) %>
|
||||
<% else %>
|
||||
<%= t('repositories.show.archived_inventory_items', repository_name: @repository.name) %>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="repo-datatables-buttons">
|
||||
<div class="share-repository-button" data-view-mode="active">
|
||||
|
@ -100,14 +104,16 @@
|
|||
class: "archive-repository-option",
|
||||
data: { repository_id: @repository.id } %>
|
||||
</li>
|
||||
<li data-view-mode="archived">
|
||||
<%= link_to t('repositories.index.options_dropdown.restore'),
|
||||
restore_team_repositories_path(current_team),
|
||||
class: "archive-repository-option",
|
||||
data: { repository_id: @repository.id } %>
|
||||
</li>
|
||||
<% if @repository.archived? %>
|
||||
<li data-view-mode="archived">
|
||||
<%= link_to t('repositories.index.options_dropdown.restore'),
|
||||
restore_team_repositories_path(current_team),
|
||||
class: "archive-repository-option",
|
||||
data: { repository_id: @repository.id } %>
|
||||
</li>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% if can_manage_repository?(@repository) %>
|
||||
<% if can_manage_repository?(@repository) && @repository.archived? %>
|
||||
<li data-view-mode="archived" data-hook="destroy-repository-option">
|
||||
<%= link_to t('repositories.index.options_dropdown.delete'),
|
||||
team_repository_destroy_modal_path(current_team, repository_id: @repository),
|
||||
|
|
|
@ -1121,6 +1121,7 @@ en:
|
|||
all_teams_tooltip: "This will disable individual team settings"
|
||||
success_message: "Selected sharing options for the Inventory %{inventory_name} have been saved."
|
||||
show:
|
||||
archived_inventory_items: "%{repository_name} archived items"
|
||||
archived_inventory: "Archived %{repository_name}"
|
||||
subtitle: "Owned by %{team_name}"
|
||||
your_team: "your Team"
|
||||
|
|
Loading…
Reference in a new issue