You are here

function theme_rotor_admin_list in Rotor Banner 5.7

Same name and namespace in other branches
  1. 5 rotor.module \theme_rotor_admin_list()
  2. 6 rotor.module \theme_rotor_admin_list()

Theme the admin list to include in the rotor administration page.

Parameters

array $list The list of rotor_item nodes to display in the list.:

1 theme call to theme_rotor_admin_list()
rotor_admin_form in ./rotor.module
Admin settings form page.

File

./rotor.module, line 387
A rotor banner consists in a set of images that will be changing. This module is made using jquery.

Code

function theme_rotor_admin_list($list = array()) {
  $headers = array(
    t('Tab'),
    t('Content'),
    t('Actions'),
  );
  $rows = array();
  $count = 0;
  foreach ($list as $item) {
    if ($item->rotor_image) {
    }
    $rows[] = array(
      l($item->title, 'node/' . $item->nid . '/edit'),
      $item->rotor_image ? theme('image', file_create_url($item->rotor_image), '', '', NULL, FALSE) : $item->body,
      l(t('Edit'), 'node/' . $item->nid . '/edit') . ' | ' . l(t('Remove'), 'node/' . $item->nid . '/delete'),
    );
  }
  $output = l(t('Add new item'), 'node/add/rotor-item');
  $output .= theme('table', $headers, $rows, array(
    'class' => 'rotor_admin_list',
  ));
  return $output;
}