You are here

function theme_ctools_context_item_row in Chaos Tool Suite (ctools) 7

Same name and namespace in other branches
  1. 6 includes/context.theme.inc \theme_ctools_context_item_row()

Theme the form item for the context entry.

3 theme calls to theme_ctools_context_item_row()
ctools_context_ajax_item_add in includes/context-admin.inc
Ajax entry point to add an context
ctools_context_ajax_item_edit in includes/context-admin.inc
Ajax entry point to edit an item
theme_ctools_context_item_form in includes/context.theme.inc
Display the context item.

File

includes/context.theme.inc, line 39
Contains theme registry and theme implementations for the context tool.

Code

function theme_ctools_context_item_row($vars) {
  $type = $vars['type'];
  $form = $vars['form'];
  $position = $vars['position'];
  $count = $vars['count'];
  $with_tr = $vars['with_tr'];
  $output = '<td class="title">&nbsp;' . render($form['title']) . '</td>';
  if (!empty($form['position'])) {
    $output .= '<td class="position">&nbsp;' . render($form['position']) . '</td>';
  }
  $output .= '<td class="operation">' . render($form['settings']);
  $output .= render($form['remove']) . '</td>';
  if ($with_tr) {
    $output = '<tr id="' . $type . '-row-' . $position . '" class="draggable ' . $type . '-row ' . ($count % 2 ? 'even' : 'odd') . '">' . $output . '</tr>';
  }
  return $output;
}