mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-10-03 10:24:30 +08:00
Merge pull request #1156 from okriuchykhin/ok_SCI_2342
Enable editing office online files in inventories [SCI-2342]
This commit is contained in:
commit
7b08529e39
2 changed files with 7 additions and 7 deletions
|
@ -64,7 +64,7 @@ class AssetsController < ApplicationController
|
||||||
'preview-icon' => render_to_string(
|
'preview-icon' => render_to_string(
|
||||||
partial: 'shared/file_preview_icon.html.erb',
|
partial: 'shared/file_preview_icon.html.erb',
|
||||||
locals: { asset: @asset }
|
locals: { asset: @asset }
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -76,7 +76,7 @@ class AssetsController < ApplicationController
|
||||||
elsif @assoc.class == Result
|
elsif @assoc.class == Result
|
||||||
can_manage_module?(@my_module)
|
can_manage_module?(@my_module)
|
||||||
elsif @assoc.class == RepositoryCell
|
elsif @assoc.class == RepositoryCell
|
||||||
# TBD
|
can_manage_repository_rows?(@repository.team)
|
||||||
end
|
end
|
||||||
response_json['wopi-controls'] = render_to_string(
|
response_json['wopi-controls'] = render_to_string(
|
||||||
partial: 'shared/file_wopi_controlls.html.erb',
|
partial: 'shared/file_wopi_controlls.html.erb',
|
||||||
|
@ -141,8 +141,8 @@ class AssetsController < ApplicationController
|
||||||
@protocol = @asset.step.protocol
|
@protocol = @asset.step.protocol
|
||||||
elsif @assoc.class == Result
|
elsif @assoc.class == Result
|
||||||
@my_module = @assoc.my_module
|
@my_module = @assoc.my_module
|
||||||
else
|
elsif @assoc.class == RepositoryCell
|
||||||
# TBD
|
@repository = @assoc.repository_column.repository
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -153,7 +153,7 @@ class AssetsController < ApplicationController
|
||||||
elsif @assoc.class == Result
|
elsif @assoc.class == Result
|
||||||
render_403 and return unless can_read_experiment?(@my_module.experiment)
|
render_403 and return unless can_read_experiment?(@my_module.experiment)
|
||||||
elsif @assoc.class == RepositoryCell
|
elsif @assoc.class == RepositoryCell
|
||||||
# TBD
|
render_403 and return unless can_read_team?(@repository.team)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -164,7 +164,7 @@ class AssetsController < ApplicationController
|
||||||
elsif @assoc.class == Result
|
elsif @assoc.class == Result
|
||||||
render_403 and return unless can_manage_module?(@my_module)
|
render_403 and return unless can_manage_module?(@my_module)
|
||||||
elsif @assoc.class == RepositoryCell
|
elsif @assoc.class == RepositoryCell
|
||||||
# TBD
|
render_403 and return unless can_manage_repository_rows?(@repository.team)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -93,7 +93,7 @@ module WopiUtil
|
||||||
end
|
end
|
||||||
|
|
||||||
activity.save
|
activity.save
|
||||||
else
|
elsif @assoc.class == Result
|
||||||
Activity.create(
|
Activity.create(
|
||||||
type_of: :start_edit_wopi_file,
|
type_of: :start_edit_wopi_file,
|
||||||
user: current_user,
|
user: current_user,
|
||||||
|
|
Loading…
Add table
Reference in a new issue