You are here

function theme_video_preset_admin_settings in Video 6.5

Same name and namespace in other branches
  1. 7.2 modules/video_ui/video.admin.inc \theme_video_preset_admin_settings()

File

./video.admin.inc, line 203

Code

function theme_video_preset_admin_settings($form) {
  foreach ($form['vid_preset']['#options'] as $key => $value) {
    if (!empty($form['vid_preset']['#help'][$key])) {
      $form['vid_preset'][$key]['#suffix'] = '<small>' . $form['vid_preset']['#help'][$key] . '</small>';
    }
    $selected = $form['vid_preset'][$key]['#default_value'];
    $rows[] = array(
      'data' => array(
        drupal_render($form['vid_preset'][$key]),
        l(t('Configure'), 'admin/settings/video/presets/' . rawurlencode($key) . '/configure'),
        l(t('Edit'), 'admin/settings/video/presets/' . rawurlencode($key) . '/edit'),
        $selected ? '' : l(t('Delete'), 'admin/settings/video/presets/' . rawurlencode($key) . '/delete'),
      ),
      'class' => $selected ? 'selected' : '',
    );
  }
  $header = array(
    theme('table_select_header_cell') + array(
      'data' => ' ' . t('Preset'),
    ),
    array(
      'data' => t('Operations'),
      'colspan' => 3,
    ),
  );
  unset($form['vid_preset']['#title']);
  $output = theme('table', $header, $rows);
  $output .= drupal_render($form);
  return $output;
}