You are here

function bueditor_admin in BUEditor 5

Same name and namespace in other branches
  1. 6.2 admin/bueditor.admin.inc \bueditor_admin()
  2. 6 bueditor.admin.inc \bueditor_admin()
  3. 7 admin/bueditor.admin.inc \bueditor_admin()

Admin main page.

1 string reference to 'bueditor_admin'
bueditor_menu in ./bueditor.module
Implementation of hook_menu().

File

./bueditor.module, line 40

Code

function bueditor_admin() {
  $editors = bueditor_editors('all');
  $header = array(
    t('Editor name'),
    array(
      'data' => t('Operations'),
      'colspan' => 2,
    ),
  );
  $rows = array();
  foreach ($editors as $eid => $editor) {
    $rows[] = array(
      $editor->name,
      l(t('Edit'), 'admin/settings/bueditor/' . $eid),
      l(t('Delete'), 'admin/settings/bueditor/' . $eid . '/delete'),
    );
  }
  $rows[] = array(
    array(
      'data' => l(t('Add new editor'), 'admin/settings/bueditor/new'),
      'colspan' => 3,
    ),
  );
  $output = '<h2 class="title">' . t('Available editors') . '</h2>';
  $output .= theme('table', $header, $rows);
  $output .= drupal_get_form('bueditor_form_admin');
  return $output;
}