Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Content moderation #81

Merged
merged 2 commits into from
Nov 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
langcode: en
status: true
dependencies: { }
id: content_published
workflow: editorial
transitions:
publish: publish
roles: { }
author: true
site_mail: true
emails: ''
subject: 'Content Published at [node:url]'
body:
value: "<style type=\"text/css\">@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600&display=swap');\r\n body {\r\n font-family: 'Open Sans', sans-serif;\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n height: 100vh;\r\n margin: 0;\r\n background-color: #f5f7fa;\r\n }\r\n .email-container {\r\n max-width: 600px;\r\n width: 100%;\r\n background-color: #ffffff;\r\n border: 1px solid #ddd;\r\n border-radius: 8px;\r\n }\r\n .header {\r\n background-color: #f5f5f5;\r\n padding: 20px;\r\n text-align: center;\r\n border-bottom: 1px solid #ddd;\r\n }\r\n .content {\r\n padding: 20px;\r\n display: flex;\r\n flex-direction: column;\r\n gap: 10px;\r\n }\r\n .content p {\r\n margin: 0;\r\n }\r\n .footer {\r\n text-align: center;\r\n padding: 10px;\r\n font-size: 0.8em;\r\n color: #aaa;\r\n border-top: 1px solid #ddd;\r\n }\r\n</style>\r\n<div class=\"email-container\">\r\n<div class=\"header\">\r\n<h1>Your Content is Live!</h1>\r\n</div>\r\n\r\n<div class=\"content\">\r\n<p>Hi [node:author:name],</p>\r\n\r\n<p>We are excited to inform you that your content titled \"<strong>[node:title]</strong>\" is now published and live on our site.</p>\r\n\r\n<p>You can view your content using the following link:</p>\r\n\r\n<p><a href=\"[node:url]\" style=\"color: #007bff; text-decoration: none;\">[node:title]</a></p>\r\n\r\n<p>Thank you for your contribution!</p>\r\n\r\n<p>Best regards,</p>\r\n\r\n<p>The Digital Experience Team via [site:name]</p>\r\n</div>\r\n\r\n<div class=\"footer\">\r\n<p>This is an automated message, please do not reply.</p>\r\n</div>\r\n</div>\r\n"
format: full_html
label: 'Content Published'
66 changes: 66 additions & 0 deletions config/optional/workflows.workflow.editorial.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
langcode: en
status: true
dependencies:
config:
- node.type.page
- node.type.story
module:
- content_moderation
id: editorial
label: Editorial
type: content_moderation
type_settings:
states:
archived:
label: Archived
weight: 5
published: false
default_revision: true
draft:
label: Draft
weight: -5
published: false
default_revision: false
published:
label: Published
weight: 0
published: true
default_revision: true
transitions:
archive:
label: Archive
from:
- published
to: archived
weight: 2
archived_draft:
label: 'Restore to Draft'
from:
- archived
to: draft
weight: 3
archived_published:
label: Restore
from:
- archived
to: published
weight: 4
create_new_draft:
label: 'Create New Draft'
from:
- draft
- published
to: draft
weight: 0
publish:
label: Publish
from:
- draft
- published
to: published
weight: 1
entity_types:
node:
- page
- story
default_moderation_state: draft