You are here

function video_presets_overview in Video 7

Menu callback: video Module administration.

1 string reference to 'video_presets_overview'
video_ui_menu in modules/video_ui/video_ui.module
Implementation of hook_menu().

File

modules/video_ui/video.preset.inc, line 350

Code

function video_presets_overview() {
  $presets = video_preset_get_presets();
  if (count($presets) > 0) {
    $header = array(
      t('Preset Name'),
      t('Description'),
      array(
        'data' => t('Operations'),
        'colspan' => '3',
      ),
    );
    $rows = array();
    foreach ($presets as $pid => $preset) {
      $row = array();
      $row[] = check_plain($preset['name']);
      $row[] = array(
        'data' => filter_xss_admin($preset['description']),
        'class' => 'description',
      );
      $row[] = array(
        'data' => l(t('edit'), 'admin/config/media/video/presets/preset/' . $preset['name']),
      );
      if (!isset($preset['default'])) {
        $row[] = array(
          'data' => l(t('delete'), 'admin/config/media/video/presets/preset/' . $preset['name'] . '/delete'),
        );
      }
      $row[] = array(
        'data' => l(t('export'), 'admin/config/media/video/presets/preset/' . $preset['name'] . '/export'),
      );
      $rows[] = $row;
    }
    return theme('table', array(
      'header' => $header,
      'rows' => $rows,
    ));
  }
  else {
    return t('No Preset were found. Please use the !create_link link to create
      a new video preset, or upload an existing Feature to your modules directory.', array(
      '!create_link' => l(t('Create Video Preset'), 'admin/config/media/video/presets/add'),
    ));
  }
}