承接 fromholdio/silverstripe-no-edit-message 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

fromholdio/silverstripe-no-edit-message

最新稳定版本:2.0.0

Composer 安装命令:

composer require fromholdio/silverstripe-no-edit-message

包简介

Display friendly message in CMS on pages where user has no edit perm, rather than read-only form.

README 文档

README

Display friendly message in CMS on pages where user has no edit perm, rather than read-only form.

Includes replacing page History interface with message too.

To implement:

Page:
  is_no_edit_message_enabled: true    # default: true

And the following must be added to your Page

public function getCMSFields()
{
    if ($this->doShowNoEditMessage() && Controller::curr() instanceof LeftAndMain) {
        return $this->getNoEditCMSFields();
    }
    
    # ... any other regular code.
}

public function getSettingsFields()
{
    if ($this->doShowNoEditMessage() && Controller::curr() instanceof LeftAndMain) {
        return $this->getNoEditCMSFields();
    }
    
    # ... any other regular code.
}

Hooks are in place to amend the message, the tab path and fields, and even the trigger for when to display this (OOTB this applies when canEdit is false).

统计信息

  • 总下载量: 75
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 2
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2024-07-23