You are here

function finder_ui_item in Finder 7.2

Finder UI item.

Parameters

$form: The form array.

&$form_state: The form state array.

Return value

The output.

2 calls to finder_ui_item()
finder_ui_item_page in modules/finder_ui/includes/item.inc
Finder UI item page.
finder_ui_page in modules/finder_ui/includes/finder.inc
Finder UI page.

File

modules/finder_ui/includes/item.inc, line 127

Code

function finder_ui_item($finder, $item_key, $item) {
  $output = $item['#item']['#title'] ? '<span class="label">' . $item['#item']['#title'] . ':</span>' : '';
  $value = strip_tags($item['#item']['#value']);

  // Ensure the value works out to something clickable.
  if (!$item['#item']['#value']) {

    // There is no original value.
    $value = '<em>' . t('empty') . '</em>';
  }
  elseif (!trim($value)) {

    // There is a value, but it is dodgy to display.
    $value = t('Yes');
  }
  $output .= finder_ui_modal_link($value, 'admin/structure/finder/list/' . $finder->name . '/item/' . $item_key . '/nojs', t('Edit'), 'ctools-modal-finder-modal-style');
  if (!empty($item['#item']['#extra'])) {
    $output .= '<span class="extra">' . $item['#item']['#extra'] . '</span>';
  }
  $getq = explode('/', $_GET['q']);
  if (end($getq) == 'ajax' && !empty($item['#item']['#refresh'])) {
    $output .= '<div class="finder-ui-needs-reload"></div>';
  }
  return $output;
}