You are here

function ocupload_config_page in One Click Upload 7

Same name and namespace in other branches
  1. 7.2 ocupload.inc \ocupload_config_page()

Admin page with templates list

1 string reference to 'ocupload_config_page'
ocupload_menu in ./ocupload.module
Implements hook_menu().

File

./ocupload.inc, line 10
Service functions

Code

function ocupload_config_page() {
  $table_data = array();
  foreach (ocupload_templates() as $template) {
    $actions = array(
      l(t('edit'), 'admin/config/content/ocupload/edit/' . $template->tid),
      l(t('delete'), 'admin/config/content/ocupload/delete/' . $template->tid),
    );
    $table_data[] = array(
      $template->mask,
      implode(' | ', $actions),
    );
  }
  $build = array();
  $build['templates'] = array(
    '#theme' => 'table',
    '#header' => array(
      t('Mask'),
      t('Operations'),
    ),
    '#rows' => $table_data,
    '#prefix' => '<h3>' . t('Templates') . '</h3>',
    '#suffix' => '<br />',
  );
  $build['form'] = drupal_get_form('ocupload_form_settings');
  $build['form']['#prefix'] = '<h3>' . t('Options') . '</h3>';
  return $build;
}