You are here

function simplenews_types_overview in Simplenews 5

Same name and namespace in other branches
  1. 6.2 includes/simplenews.admin.inc \simplenews_types_overview()
  2. 6 simplenews.admin.inc \simplenews_types_overview()
1 string reference to 'simplenews_types_overview'
simplenews_menu in ./simplenews.module
Implementation of hook_menu().

File

./simplenews.module, line 2422

Code

function simplenews_types_overview() {
  $rows = array();
  $header = array(
    t('Newsletter name'),
    t('Operations'),
  );
  foreach (taxonomy_get_tree(variable_get('simplenews_vid', '')) as $term) {
    $rows[] = array(
      check_plain($term->name),
      l(t('edit newsletter'), 'admin/content/newsletters/types/edit/' . $term->tid),
    );
  }
  if (count($rows) == 0) {
    $rows[] = array(
      array(
        'data' => t('There are currently no newsletter series.'),
        'colspan' => 2,
      ),
    );
  }
  return theme('table', $header, $rows);
}