You are here

function theme_jeditable_workflow in jEditable inline content editing 6

Same name and namespace in other branches
  1. 6.2 jeditable.module \theme_jeditable_workflow()
  2. 7 jeditable.module \theme_jeditable_workflow()

Theme a workflow state name as a jeditable select list.

Parameters

object $node: The node object to be displayed

File

./jeditable.module, line 179
jeditable.module

Code

function theme_jeditable_workflow($node) {
  $id = $node->nid;

  // in this case we can use field to store the current workflow id
  $field = $node->_workflow ? $node->_workflow : $node->workflow;

  // named differently depending on how far the node has loaded
  $state = workflow_get_state_name($field);
  return '<span id="workflow-' . $id . '-' . $field . '" class="jeditable-select">' . $state . '</span>';
}