2017 © Pedro Peláez
 

silverstripe-module cmsworkflow

Two- and three-step approval workflow for page content in SilverStripe CMS

image

silverstripe/cmsworkflow

Two- and three-step approval workflow for page content in SilverStripe CMS

  • Tuesday, February 16, 2016
  • by chillu
  • Repository
  • 14 Watchers
  • 26 Stars
  • 221 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 10 Forks
  • 15 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

CMS Workflow Module

Please note: this module is no longer actively maintained., (*1)

Requirements

  • SilverStripe 2.4 or newer
  • legacydatetimefields module (see http://silverstripe.org/legacydatetimefields-module)

Installation

You need to choose an 'approval path'. This details the actual process a request goes through before it gets published to the live site., (*2)

There are two approval paths supplied: "Two Step" and "Three Step"., (*3)

Two Step

Author submits a request. Publisher approves it change is pushed live immediately., (*4)

This workflow is automatically set up for you and doesn't need any configuration., (*5)

Three Step

Author submits a request. Approver approves it. Publisher publishes it at a later date., (*6)

Attach the following decorators in your mysite/_config.php:, (*7)

// remove two-step decorators
Object::remove_extension('WorkflowRequest', 'WorkflowTwoStepRequest');
Object::remove_extension('SiteTree', 'SiteTreeCMSTwoStepWorkflow');
Object::remove_extension('SiteConfig', 'SiteConfigTwoStepWorkflow');
// add three-step decorators
Object::add_extension('WorkflowRequest', 'WorkflowThreeStepRequest');
Object::add_extension('SiteTree', 'SiteTreeCMSThreeStepWorkflow');
Object::add_extension('LeftAndMain', 'LeftAndMainCMSThreeStepWorkflow');
Object::add_extension('SiteConfig', 'SiteConfigThreeStepWorkflow');

Refresh your database schema through http://<your-host>/dev/build., (*8)

Usage

Based on your permission levels, authors in the CMS will see different actions on a page, and a new "Workflow" tab listing open requests., (*9)

You can allow Administrator users to Publish without giving a comment. by placing the following in your mysite/_config.php file: This will disable the popup for this situation., (*10)

LeftAndMainCMSWorkflow::set_prompt_admin_for_comments(false);

Email alerts

Email alerts are configurable by the developer., (*11)

The following line sets a config option, (*12)

WorkflowRequest::set_alert(CLASS, EVENT, GROUP, NOTIFY);

CLASS is one of either WorkflowPublicationRequest or WorkflowDeletionRequest, (*13)

EVENT is one of, (*14)

  • request
  • publish (3 step only)
  • approve
  • deny
  • cancel
  • comment

GROUP is either author or publisher or approver, (*15)

NOTIFY is either true or false, (*16)

Customising strings via translation

The cmsworkflow uses the translation facilities of SilverStripe extensively. This allows us to support the module in different languages, with many languages available out of the box., (*17)

If you want to customise these strings further, there is another module called customtranslation that allows you to override the strings provided in the lang files, without changing the lang files. The module can override strings across the whole site, not just cmsworkflow. customtranslation will be supported for SilverStripe 2.4.1 and up., (*18)

See customtranslation on silverstripe.org, (*19)

The Versions

16/02 2016

dev-master

9999999-dev

Two- and three-step approval workflow for page content in SilverStripe CMS

  Sources   Download

The Requires

 

by Rainer Spittel

silverstripe workflow