mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-11-12 09:20:45 +08:00
Enable file editing for inventory files [SCI-11041]
This commit is contained in:
parent
0b7705f95f
commit
c6a4e71d69
1 changed files with 1 additions and 2 deletions
|
|
@ -22,12 +22,11 @@ class AssetsController < ApplicationController
|
||||||
before_action :check_restore_permission, only: :restore_version
|
before_action :check_restore_permission, only: :restore_version
|
||||||
|
|
||||||
def file_preview
|
def file_preview
|
||||||
editable = can_manage_asset?(@asset) && @asset.repository_asset_value.blank?
|
|
||||||
render json: { html: render_to_string(
|
render json: { html: render_to_string(
|
||||||
partial: 'shared/file_preview/content',
|
partial: 'shared/file_preview/content',
|
||||||
locals: {
|
locals: {
|
||||||
asset: @asset,
|
asset: @asset,
|
||||||
can_edit: editable,
|
can_edit: can_manage_asset?(@asset),
|
||||||
gallery: params[:gallery],
|
gallery: params[:gallery],
|
||||||
preview: params[:preview]
|
preview: params[:preview]
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue