Moderation Dashboard
moderation_dashboard
Provides a per-user dashboard for managing moderated content with customizable views and activity visualization.
Overview
Moderation Dashboard provides a per-user dashboard that contains useful blocks related to managing moderated content. This module is designed as a customizable jumping-off point for administrators to help content editors manage their editorial workflow efficiently.
The dashboard displays multiple views including content in review, content drafts, recent changes, and recently created content. It also provides an activity visualization chart showing editor activity over the last 30 days using Chart.js. The dashboard is built entirely with Views and Layout Builder, allowing administrators to configure everything via the UI without writing code.
Each user with appropriate permissions gets their own personalized dashboard showing their content activity, drafts, and items awaiting review. Administrators can view any user's dashboard to monitor team activity.
Install
composer require 'drupal/moderation_dashboard:^4.0'
composer require 'drupal/moderation_dashboard:^3.1'
Features
- Per-user moderation dashboard accessible at /user/{user}/moderation-dashboard
- Displays content currently in review workflow states
- Shows content drafts (both all drafts and user-specific drafts)
- Recent changes and updates view with revision tracking
- Recently created content listing
- Editor activity visualization chart showing content edited vs authored in the last 30 days using Chart.js
- Quick links to create new content types the user has access to
- Optional automatic redirect to dashboard after user login
- Customizable 3-column layout using Layout Builder
- Link to latest version field for Views showing pending revisions
- Toolbar integration with dashboard link in user menu
- Responsive design with mobile-friendly single column layout
Use Cases
Editorial Team Management
Site managers can use the dashboard to monitor their editorial team's activity. By granting the 'view any moderation dashboard' permission, managers can visit any team member's dashboard to see their content output, items in review, and drafts. The activity chart provides a visual overview of who has been most active.
Content Editor Workflow
Content editors can use their personal dashboard as a home base for their daily work. After logging in (with automatic redirect enabled), they immediately see content awaiting their review, their own drafts that need completion, recent changes across the site, and quick links to create new content.
Content Review Process
Reviewers can use the 'Content in review' block to quickly see all content items that are pending approval. The 'Link to latest version' field ensures they're always viewing the most recent revision, even when the published version differs from the pending revision.
Custom Department Dashboards
Using Layout Builder, administrators can create different dashboard layouts for different user roles or departments. Remove blocks that aren't relevant, add additional Views blocks, or rearrange the layout to match specific team workflows.
Tips
- Enable Views UI module to customize the dashboard views and add additional filters or fields
- Use Layout Builder to create role-specific dashboard layouts by placing condition blocks
- For security, prefer installing Chart.js locally rather than using the CDN option
- The dashboard link appears in the toolbar under your username - no need to remember the URL
- Grant 'view all revisions' permission to users who need to see the full content history in dashboard views
Dependencies
Related Projects
Deep integration with Drupal core's Content Moderation module. Uses ModerationInformationInterface to check for moderated content types and pending revisions. Dashboard views filter content based on moderation states.
Uses Layout Builder for dashboard customization. The moderation_dashboard view mode on user entities can be configured through Layout Builder UI at /admin/config/people/accounts/display/moderation_dashboard.
Provides four Views for displaying dashboard content: main dashboard view, content in review, recent changes, and recently created. Also provides custom Views access and field plugins.
Integrates with admin toolbar to add a dashboard link in the user menu tray for quick access.
Admin Pages
| Title | Path | Description |
|---|---|---|
| Moderation Dashboard Settings | /admin/config/people/moderation_dashboard |
Configure global settings for the Moderation Dashboard module including login redirect behavior and Chart.js library source. |
| Moderation Dashboard Layout | /admin/config/people/accounts/display/moderation_dashboard |
Customize the moderation dashboard layout using Layout Builder. Add, remove, reorder, and configure blocks displayed on the dashboard. |
| Moderation Dashboard | /user/{user}/moderation-dashboard |
The main per-user moderation dashboard page. Displays blocks showing content in review, drafts, recent changes, recently created content, activity chart, and quick links to create new content. Content is filtered based on the dashboard owner's activity. |
Permissions
| Permission | Description |
|---|---|
|
Allows users to access their own Moderation Dashboard. Users with this permission can view their personal dashboard at /user/{uid}/moderation-dashboard. |
|
Allows users to access other users' Moderation Dashboards. Useful for administrators and managers who need to monitor team activity. |
Hooks
| Hook | Description |
|---|---|
hook_views_data |
Adds the 'Link to latest version' field to all revisionable content entity types in Views. |
hook_preprocess_views_view |
Hides the pager on moderation dashboard views when there's no need to page (current page is 0 and total rows is less than items per page). |
hook_toolbar_alter |
Adds a link to the moderation dashboard in the user toolbar tray for users with the 'use moderation dashboard' permission. |
hook_preprocess_block |
Adds the 'moderation-dashboard-block' CSS class to blocks displayed on the moderation dashboard page. |
hook_plugin_filter_condition__block_ui_alter |
Removes moderation dashboard condition plugins from the block UI to prevent confusion, as they are meant for internal use. |
hook_library_info_alter |
Dynamically adds Chart.js library dependency to the activity library based on configuration (CDN vs local). |
Troubleshooting
Ensure Chart.js library is properly installed. Either download it locally to libraries/chartjs/ or libraries/chart.js/, or enable the 'Pull chart.js from CDN' option in module settings. Check the status report at /admin/reports/status for warnings.
Verify that: 1) The 'Redirect on login' setting is enabled, 2) The user has 'use moderation dashboard' permission, 3) At least one content type has content moderation enabled, 4) No destination parameter is set in the login URL.
Grant the 'view any moderation dashboard' permission to users who need to view other users' dashboards, such as managers or administrators.
The dashboard uses Layout Builder. Go to /admin/config/people/accounts/display/moderation_dashboard to configure which blocks appear and their arrangement.
Run database updates (drush updatedb). The update hook will automatically migrate from Page Manager to Layout Builder configuration. Note that custom Page Manager configurations will need to be recreated in Layout Builder.
Security Notes
- For production sites, install Chart.js locally rather than using the CDN to avoid external dependencies and ensure content security policy compliance
- The 'view any moderation dashboard' permission should only be granted to trusted administrative roles
- Dashboard access is controlled by both route-level and Views-level access checks for defense in depth