mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-26 17:51:13 +08:00
Merge pull request #7888 from aignatov-bio/ai-sci-11097-fix-team-switch-in-storage-locations
Add team switch to storage locations [SCI-11097]
This commit is contained in:
commit
6b42ea9cb1
2 changed files with 4 additions and 2 deletions
|
@ -3,8 +3,10 @@
|
|||
class StorageLocationsController < ApplicationController
|
||||
include ActionView::Helpers::TextHelper
|
||||
include ApplicationHelper
|
||||
include TeamsHelper
|
||||
include Rails.application.routes.url_helpers
|
||||
|
||||
before_action :switch_team_with_param, only: %i(index show)
|
||||
before_action :check_storage_locations_enabled, except: :unassign_rows
|
||||
before_action :load_storage_location, only: %i(update destroy duplicate move show available_positions unassign_rows export_container import_container)
|
||||
before_action :check_read_permissions, except: %i(index create tree actions_toolbar)
|
||||
|
|
|
@ -62,9 +62,9 @@ module BreadcrumbsHelper
|
|||
when StorageLocation
|
||||
parent = subject.team
|
||||
url = if subject.container
|
||||
storage_location_path(subject)
|
||||
storage_location_path(subject, team: subject.team_id)
|
||||
else
|
||||
storage_locations_path(parent_id: subject.id)
|
||||
storage_locations_path(parent_id: subject.id, team: subject.team_id)
|
||||
end
|
||||
when Team
|
||||
parent = nil
|
||||
|
|
Loading…
Reference in a new issue