You are here

function theme_jeditable_workflow in jEditable inline content editing 7

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

Theme a workflow state name as a jeditable select list.

Parameters

object $node: The node object to be displayed

Return value

string

File

./jeditable.module, line 527
jeditable.module TODO: Provides integration between Drupal and the jEditable jquery plugin @todo: Datepicker support @todo: Ajax upload support @todo: Radioboxes/checkboxes support @todo: add required handler for date @todo: add compatibility for…

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>';
}