Commit aa7c4ab0 authored by xjm's avatar xjm

Issue #2900047 by karthikkumarbodu, Sam152: Add a link to install...

Issue #2900047 by karthikkumarbodu, Sam152: Add a link to install content_moderation when no workflow types are present
parent 864c9ed6
......@@ -93,7 +93,7 @@ public function render() {
$build = parent::render();
$workflow_types_count = count($this->workflowTypeManager->getDefinitions());
if ($workflow_types_count === 0) {
$build['table']['#empty'] = $this->t('There are no workflow types available. In order to create workflows you need to install a module that provides a workflow type. For example, the Content Moderation module provides a workflow type that enables workflows for content entities.');
$build['table']['#empty'] = $this->t('There are no workflow types available. In order to create workflows you need to install a module that provides a workflow type. For example, the <a href=":content-moderation">Content Moderation</a> module provides a workflow type that enables workflows for content entities.', [':content-moderation' => '/admin/modules#module-content-moderation']);
}
return $build;
}
......
......@@ -38,6 +38,7 @@ public function testWorkflowUiWithNoType() {
$this->drupalGet('admin/config/workflow/workflows');
$this->assertSession()->pageTextContains('There are no workflow types available. In order to create workflows you need to install a module that provides a workflow type. For example, the Content Moderation module provides a workflow type that enables workflows for content entities.');
$this->assertSession()->linkExists('Content Moderation');
$this->assertSession()->pageTextNotContains('Add workflow');
$this->container->get('module_installer')->install(['workflow_type_test']);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment