Problem/Motivation
There is no way to navigate to the preview link generate form from entity list/admin pages (e.g. /admin/content). The generate form is only accessible via a local task tab on the entity edit page, but this tab is not always visible — for example when using editors like Mercury Editor that replace the standard node edit page with a custom interface.
Steps to reproduce
Enable the preview_link module.
Go to /admin/content.
Open the "Operations" dropdown for any node.
Notice there is no "Preview link" option.
Proposed resolution
Implement hook_entity_operation() in preview_link.module to add a "Preview link" entry to the entity operations dropdown, linking to the preview-link-generate route. The operation is only shown when the entity type is supported, the entity is not new, and the current user has the generate preview links permission.
Remaining tasks
Review and feedback
Add test coverage
User interface changes
A "Preview link" option is added to the operations dropdown on entity list pages for all supported entity types.
API changes
None.
Data model changes
None.
Issue fork preview_link-3585414
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
dripa commented