diff --git a/app/assets/stylesheets/repositories.scss b/app/assets/stylesheets/repositories.scss
index b64087679..9028b65cd 100644
--- a/app/assets/stylesheets/repositories.scss
+++ b/app/assets/stylesheets/repositories.scss
@@ -25,6 +25,10 @@
.fas-custom{
float: right;
}
+
+ a.muted {
+ opacity: .7;
+ }
}
.repository-share-status {
diff --git a/app/controllers/my_modules_controller.rb b/app/controllers/my_modules_controller.rb
index 20dd28547..f19a9d739 100644
--- a/app/controllers/my_modules_controller.rb
+++ b/app/controllers/my_modules_controller.rb
@@ -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
diff --git a/app/views/my_modules/_repositories_dropdown.html.erb b/app/views/my_modules/_repositories_dropdown.html.erb
index 2af29c4d8..530cc814e 100644
--- a/app/views/my_modules/_repositories_dropdown.html.erb
+++ b/app/views/my_modules/_repositories_dropdown.html.erb
@@ -22,13 +22,15 @@
<% Repository.used_on_task_but_unshared(@my_module, current_team).each do |repository| %>
-
+ title="<%= repository.name %>"
+ href="<%= unshared_inventory_my_module_path(inventory_id: repository.id)%>">
+
<% if enable_counters %>
<% cache [repository, @my_module] do %>
<%= truncate(repository.name) %>
- <%= "(#{@my_module.repository_rows_count(repository)})" %>
+ <%= "(#{@my_module.repository_rows_count()})" %>
<% end %>
<% else %>
<%= truncate(repository.name) %>
diff --git a/config/locales/en.yml b/config/locales/en.yml
index 2ae8107c9..91dfedd33 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -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"
diff --git a/config/routes.rb b/config/routes.rb
index 1afc8c5b1..54c1af14e 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -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'