mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-10 17:36:33 +08:00
PR fixes, codestyle fixes
This commit is contained in:
parent
2486bd0077
commit
7fc5035d2d
4 changed files with 13 additions and 9 deletions
|
@ -27,7 +27,7 @@
|
|||
}
|
||||
|
||||
a.muted {
|
||||
opacity: 0.7
|
||||
opacity: .7;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
@ -624,7 +624,11 @@ class MyModulesController < ApplicationController
|
|||
end
|
||||
|
||||
def unshared_inventory
|
||||
render_403 unless Repository.used_on_task_but_unshared(@my_module, current_team).pluck(:id).include?(params[:inventory_id].to_i)
|
||||
#binding.pry
|
||||
render_403 unless Repository.used_on_task_but_unshared(@my_module, current_team)
|
||||
.where(id: params[:inventory_id])
|
||||
.any?
|
||||
|
||||
@inventory = Repository.find(params[:inventory_id])
|
||||
@inventory_admin = @inventory.created_by
|
||||
end
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
<a class="muted dropdown-item help_tooltips"
|
||||
data-tooltipcontent="<%= I18n.t('tooltips.text.protocol.unshared_inventory') + repository.team.name %>"
|
||||
title="<%= repository.name %>"
|
||||
href="<%= unshared_inventory_my_module_url(inventory_id: repository.id)%>">
|
||||
href="<%= unshared_inventory_my_module_path(inventory_id: repository.id)%>">
|
||||
|
||||
<% if enable_counters %>
|
||||
<% cache [repository, @my_module] do %>
|
||||
|
|
|
@ -403,11 +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
|
||||
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