You are here

function theme_gallery_assist_items_form in Gallery Assist 7

2 theme calls to theme_gallery_assist_items_form()
gallery_assist_items_form in ./gallery_assist_form.inc
Form builder; GA items data form.
gallery_assist_items_form in ./gallery_assist_form_BUP.inc
Form builder; GA items data form.

File

./gallery_assist.module, line 142
Extend drupal with gallery functionalities. Manage galleries.

Code

function theme_gallery_assist_items_form($variables) {
  $output = '';
  $form = $variables['form'];
  $output .= drupal_render($form['pager_top']);
  $rows = array();
  foreach ($form['gallery_items'] as $pid => $item) {
    if (is_numeric($pid)) {
      $row = array();
      $row[] = array(
        'data' => drupal_render($form['gallery_items'][$pid]['delete']),
        'valign' => 'top',
      );
      $row[] = array(
        'data' => drupal_render($form['gallery_items'][$pid]['image']),
        'valign' => 'top',
        'align' => 'center',
        'class' => $form['gallery_items'][$pid]['cover']['#value'] ? 'ga-cover' : '',
      );
      $row[] = drupal_render($form['gallery_items'][$pid]['ptitle']) . drupal_render($form['gallery_items'][$pid]['palt']) . drupal_render($form['gallery_items'][$pid]['pdescription']);
      $row[] = array(
        'data' => drupal_render($form['gallery_items'][$pid]['cover']),
        'valign' => 'top',
      );
      $rows[] = $row;
    }
  }
  $header = array(
    t('X'),
    '',
    t('Title'),
    t('Y'),
  );
  $output .= theme('table', array(
    'header' => $header,
    'rows' => $rows,
    'attributes' => array(
      'id' => 'gallery-assist-items',
    ),
  ));
  $output .= drupal_render_children($form);
  return $output;
}