有没有办法禁用媒体项目编辑按钮?无论是在Camaleon配置中还是通过使用钩子......在我的情况下,用户只能上传图片并使用它们,但无法编辑它们!Camaleon-CMS:如何禁用媒体文件版本
谢谢!
有没有办法禁用媒体项目编辑按钮?无论是在Camaleon配置中还是通过使用钩子......在我的情况下,用户只能上传图片并使用它们,但无法编辑它们!Camaleon-CMS:如何禁用媒体文件版本
谢谢!
在当前版本中,您可以通过使用挂钩“admin_before_load”添加css样式来完成此操作。
应用程序/应用程序/主题/ my_theme /配置/ config.json "hooks": { "admin_before_load": ["my_function_admin_before_load"], .... }
应用程序/应用程序/主题/ my_theme/main_helper.rb def my_function_admin_before_load append_asset_content('<style>#cama_media_gallery .media_item .edit_item{display: none;}</style>') end
在当前的开发版本我加个卡钩 “file_manager_edit_file” 和“ file_manager_del_file“
关心!
感谢@Owen Peredo Diaz,它使用append_asset_content方法工作;) – jpac