mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-26 09:42:46 +08:00
Merge pull request #8002 from artoscinote/ma_SCI_11041
Enable file editing for inventory files [SCI-11041]
This commit is contained in:
commit
2af9ab7f5d
1 changed files with 1 additions and 2 deletions
|
@ -22,12 +22,11 @@ class AssetsController < ApplicationController
|
|||
before_action :check_restore_permission, only: :restore_version
|
||||
|
||||
def file_preview
|
||||
editable = can_manage_asset?(@asset) && @asset.repository_asset_value.blank?
|
||||
render json: { html: render_to_string(
|
||||
partial: 'shared/file_preview/content',
|
||||
locals: {
|
||||
asset: @asset,
|
||||
can_edit: editable,
|
||||
can_edit: can_manage_asset?(@asset),
|
||||
gallery: params[:gallery],
|
||||
preview: params[:preview]
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue