mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-02-05 06:32:07 +08:00
Merge pull request #2034 from biosistemika/SCI3818-unshared-inventory-screen
SCI-3818-unshared-inventory-screen
This commit is contained in:
commit
12d6804263
5 changed files with 25 additions and 8 deletions
|
@ -25,6 +25,10 @@
|
|||
.fas-custom{
|
||||
float: right;
|
||||
}
|
||||
|
||||
a.muted {
|
||||
opacity: .7;
|
||||
}
|
||||
}
|
||||
|
||||
.repository-share-status {
|
||||
|
|
|
@ -16,7 +16,7 @@ class MyModulesController < ApplicationController
|
|||
assign_repository_records unassign_repository_records
|
||||
unassign_repository_records_modal
|
||||
assign_repository_records_modal
|
||||
repositories_dropdown update_description update_protocol_description)
|
||||
repositories_dropdown update_description update_protocol_description unshared_inventory)
|
||||
before_action :load_vars_nested, only: %i(new create)
|
||||
before_action :load_repository, only: %i(assign_repository_records
|
||||
unassign_repository_records
|
||||
|
@ -24,7 +24,7 @@ class MyModulesController < ApplicationController
|
|||
assign_repository_records_modal
|
||||
repository_index)
|
||||
before_action :load_projects_tree, only: %i(protocols results activities
|
||||
samples repository archive)
|
||||
samples repository archive unshared_inventory)
|
||||
before_action :check_manage_permissions_archive, only: %i(update destroy)
|
||||
before_action :check_manage_permissions,
|
||||
only: %i(description due_date update_description update_protocol_description)
|
||||
|
@ -623,6 +623,11 @@ class MyModulesController < ApplicationController
|
|||
end
|
||||
end
|
||||
|
||||
def unshared_inventory
|
||||
@inventory = Repository.used_on_task_but_unshared(@my_module, current_team).find(params[:inventory_id])
|
||||
@inventory_admin = @inventory.created_by
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def task_completion_activity
|
||||
|
|
|
@ -22,13 +22,15 @@
|
|||
|
||||
<% Repository.used_on_task_but_unshared(@my_module, current_team).each do |repository| %>
|
||||
<li>
|
||||
<a class="disabled dropdown-item help_tooltips"
|
||||
<a class="muted dropdown-item help_tooltips"
|
||||
data-tooltipcontent="<%= I18n.t('tooltips.text.protocol.unshared_inventory') + repository.team.name %>"
|
||||
title="<%= repository.name %>">
|
||||
title="<%= repository.name %>"
|
||||
href="<%= unshared_inventory_my_module_path(inventory_id: repository.id)%>">
|
||||
|
||||
<% if enable_counters %>
|
||||
<% cache [repository, @my_module] do %>
|
||||
<%= truncate(repository.name) %>
|
||||
<span class="assigned-items-counter"><%= "(#{@my_module.repository_rows_count(repository)})" %></span>
|
||||
<span class="assigned-items-counter"><%= "(#{@my_module.repository_rows_count()})" %></span>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<%= truncate(repository.name) %>
|
||||
|
|
|
@ -757,6 +757,9 @@ en:
|
|||
task_and_downstream: 'Task & Downstream'
|
||||
unassign_title: "Unassign %{repository_name} items from task %{my_module_name}"
|
||||
unassign_message: "Do you want to unassign %{size} items only from this task, or unassign them from this task & downstream tasks in the workflow as well?"
|
||||
unshared_inventory:
|
||||
title: The inventory %{inventory_name} is no longer shared with your team.
|
||||
body: This inventory has been ushared with your team by the inventory’s owner (%{team_name} team). To view the item/s that are assigned to your task/s contact the %{team_name} team administrator (%{admin_name}, %{admin_email}).
|
||||
experiments:
|
||||
new:
|
||||
create: 'New Experiment'
|
||||
|
@ -1032,7 +1035,7 @@ en:
|
|||
can_edit: "Can Edit"
|
||||
all_teams: "All teams (current & new)"
|
||||
all_teams_tooltip: "This will disable individual team settings"
|
||||
success_message: “Selected sharing options for the Inventory %{inventory_name} have been saved.”
|
||||
success_message: “Selected sharing options for the Inventory %{inventory_name} have been saved.”
|
||||
table:
|
||||
id: 'ID'
|
||||
assigned: "Assigned"
|
||||
|
|
|
@ -403,8 +403,11 @@ Rails.application.routes.draw do
|
|||
to: 'my_modules#unassign_repository_records_modal',
|
||||
as: :unassign_repository_records_modal
|
||||
post 'unassign_repository_records/:repository_id',
|
||||
to: 'my_modules#unassign_repository_records',
|
||||
as: :unassign_repository_records
|
||||
to: 'my_modules#unassign_repository_records',
|
||||
as: :unassign_repository_records
|
||||
get 'unshared_inventory/:inventory_id',
|
||||
to: 'my_modules#unshared_inventory',
|
||||
as: :unshared_inventory
|
||||
get 'archive' # Archive view for single module
|
||||
get 'complete_my_module'
|
||||
post 'toggle_task_state'
|
||||
|
|
Loading…
Reference in a new issue