You are here

function mail_edit_list in Mail Editor 6

Same name and namespace in other branches
  1. 7 mail_edit.admin.inc \mail_edit_list()

Page callback: List mail templates.

Return value

array

1 call to mail_edit_list()
mail_edit_list_form in ./mail_edit.admin.inc
Form builder for the template list.

File

./mail_edit.admin.inc, line 23
Administrative interface for the Mail Editor module.

Code

function mail_edit_list() {
  _mail_edit_include();
  if (module_exists('locale')) {
    $language_list = locale_language_list('name', TRUE);
  }
  else {
    foreach (array_keys(language_list()) as $key) {
      $language_list[$key] = $key;
    }
  }
  $languages_selected = !empty($_SESSION['mail_edit']['languages_selected']) ? $_SESSION['mail_edit']['languages_selected'] : $language_list;
  $module = isset($_SESSION['mail_edit']['module']) ? $_SESSION['mail_edit']['module'] : '-enabled';
  $form['filter'] = mail_edit_list_filter($languages_selected, $module, $language_list);
  $form['filtered_form'] = mail_edit_list_filtered_form($languages_selected, $module, count($language_list) > 1);
  drupal_add_css(drupal_get_path('module', 'mail_edit') . '/mail_edit.admin.css');
  $form['#submit'][] = 'mail_edit_list_submit';
  return $form;
}