I had the need to select whether or not a panel (variant) is displayed based upon the current workflow and/or workflow state of the current node.
With the attached path you can select the workflow and/or workflow state as criteria.
Select workflow stage

Please note that #1511694: Better integration with panels offers a patch to display the 'workflow widget' in panels. Both use hook_ctools_plugin_directory() but currently this patch based on a plugin variable so untill these get in sync you can only use these together when using $plugin as in this patch.

Comments

botris’s picture

StatusFileSize
new5.36 KB

And the patch.

johnv’s picture

Version: 7.x-2.0-beta10 » 7.x-2.x-dev
Component: Features » Workflow Node API
Status: Active » Needs review

I guess this is only needed for workflow_node?

  • Commit 8d102da on 7.x-2.x authored by boris sondagh, committed by johnv:
    Issue #2187731 by boris sondagh: Added Panels access/selection rules...
johnv’s picture

Version: 7.x-2.x-dev » 7.x-2.4-beta2
Assigned: botris » Unassigned
Status: Needs review » Fixed

Committed with contribution, @boris sondagh.
It was added to workflow_node module, not the main workflow module (since it is not relevant for workflow_field).

I think there is an error in below code, where IMO it shows the state name twice.

function workflow_state_ctools_summary($conf, $context) {
  $state = workflow_get_workflow_states_by_sid($conf['workflow_state']);
  return t('Nodes that have the workflow state "@state" in workflow "@workflow"', array(
      '@state' => $state->state,
      '@workflow' => $state->name,
    )
  );
}

Please reopen this issue if there is still a problem.

botris’s picture

Thanks

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.