Skip to content

Commit b79c73e

Browse files
committed
User doc updates for new feature
1 parent e3303b5 commit b79c73e

7 files changed

Lines changed: 24 additions & 16 deletions

docs/en/index.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,21 @@
66

77
The module is set up in the `Settings` section of the CMS, see the [User guide](userguide/index.md).
88

9-
### Reminder emails
9+
### Email notifications
1010

11-
In order for the contentreview module to send emails, you need to *either*:
11+
In order for the contentreview module to send overdue review and reminder email notifications, you need to *either*:
1212

1313
* Setup the `ContentReviewEmails` script to run daily via a system cron job.
14+
* Setup the `ContentReviewReminderEmails` script to run daily via a system cron job.
1415
* Install the [queuedjobs](https://github.com/symbiote/silverstripe-queuedjobs) module and follow the configuration steps to create a cron job for that module. Once installed, you can just run `dev/build` to have a job created, which will run at 9am every day by default.
1516

17+
## Reminders
18+
Content Review module has two notification workflows.
19+
This allows for authors to be reminded of upcoming reviews and then reminded of overdue review(s).
20+
21+
1. A review date is assigned to a page that will send notifications to the author on the review date at a frequency specified by site admins.
22+
2. Concurrent to the review date an interval configuration of `7`, `30` and `60` days will check if a piece of content is x days away from review and send a reminder that day to the author.
23+
1624
## Using
1725

1826
See the [user guide](userguide/index.md).
101 KB
Loading
109 KB
Loading
-129 KB
Binary file not shown.

docs/en/userguide/index.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ summary: Mark pages in the CMS with a date and an owner for future reviews.
88
Global settings can be configured via the global settings admin in the CMS under the "Content Review" tab.
99
This includes global groups, users, as well as a template editor that supports a limited number of variables.
1010

11-
![SiteConfig settings](_images/content-review-siteconfig-settings.png)
11+
![SiteConfig settings](_images/content-review-siteconfig-settings-part-1.png)
12+
![SiteConfig settings](_images/content-review-siteconfig-settings-part-2.png)
1213

1314
## Schedules
1415

src/Extensions/ContentReviewDefaultSettings.php

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
use SilverStripe\Forms\HTMLEditor\TinyMCEConfig;
1111
use SilverStripe\Forms\ListboxField;
1212
use SilverStripe\Forms\LiteralField;
13-
use SilverStripe\Forms\TextField;
1413
use SilverStripe\Forms\TextAreaField;
14+
use SilverStripe\Forms\TextField;
1515
use SilverStripe\ORM\DataExtension;
1616
use SilverStripe\Security\Group;
1717
use SilverStripe\Security\Member;
@@ -181,33 +181,32 @@ public function updateCMSFields(FieldList $fields)
181181
[
182182
TextField::create('ReviewFrom', _t(__CLASS__ . '.EMAILFROM', 'From email address'))
183183
->setDescription(_t(__CLASS__ . '.EMAILFROM_RIGHTTITLE', 'e.g: do-not-reply@site.com')),
184-
$wysiwygConfig = HTMLEditorField::create(
185-
'ReviewBody',
186-
_t(__CLASS__ . '.EMAILTEMPLATE', 'Email template')
187-
),
188184
TextField::create(
189185
'ReviewSubject',
190186
_t(__CLASS__ . '.OVERDUEEMAILSUBJECT', 'Overdue review subject line')
191187
),
192-
TextAreaField::create(
188+
$overdueReviewBody = HTMLEditorField::create(
193189
'ReviewBody',
194-
_t(__CLASS__ . '.OVERDUEEMAILTEMPLATE', 'Overdue review email template')
190+
_t(__CLASS__ . '.OVERDUEEMAILTEMPLATE', 'Overdue email template')
195191
),
196192
TextField::create(
197193
'ReminderSubject',
198194
_t(__CLASS__ . '.REMINDEREMAILSUBJECT', 'Reminder review subject line')
199195
),
200-
$wysiwygConfig = HTMLEditorField::create(
201-
'ReminderBody',
202-
_t(__CLASS__ . '.REMINDEREMAILTEMPLATE', 'Reminder Email template')
203-
),
196+
$reminderReviewBody = HTMLEditorField::create(
197+
'ReminderBody',
198+
_t(__CLASS__ . '.REMINDEREMAILTEMPLATE', 'Reminder Email template')
199+
),
204200
LiteralField::create(
205201
'TemplateHelp',
206202
$this->owner->renderWith('SilverStripe\\ContentReview\\ContentReviewAdminHelp')
207203
),
208204
]
209205
);
210-
$wysiwygConfig->setEditorConfig($this->getTinyMCEConfig($wysiwygConfig->getEditorConfig()));
206+
207+
// set up tinymce config for our body fields
208+
$overdueReviewBody->setEditorConfig($this->getTinyMCEConfig($overdueReviewBody->getEditorConfig()));
209+
$reminderReviewBody->setEditorConfig($this->getTinyMCEConfig($reminderReviewBody->getEditorConfig()));
211210
}
212211

213212
/**

src/Tasks/ContentReviewReminderEmails.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ protected function getOverduePagesForOwners(SS_List $pages)
6262
$upcomingForReviewDateInDays = $this->getUpcomingForReviewDateInDays($page->NextReviewDate);
6363
$reminderIntervals = array_values($reminderIntervals);
6464

65-
if ( in_array($upcomingForReviewDateInDays, $reminderIntervals)) {
65+
if (in_array($upcomingForReviewDateInDays, $reminderIntervals)) {
6666
$options = $page->getOptions();
6767

6868
if ($options) {

0 commit comments

Comments
 (0)