You are here

function messaging_admin_template_overview in Messaging 5

Overview page for message templates

1 string reference to 'messaging_admin_template_overview'
messaging_menu in ./messaging.module
Implementation of hook_menu()

File

./messaging.module, line 148

Code

function messaging_admin_template_overview() {
  $output = '';

  // List message groups
  $groups = module_invoke_all('messaging', 'message groups');
  $rows = array();
  foreach ($groups as $group => $group_info) {
    $rows[] = array(
      l($group_info['name'], 'admin/messaging/template/edit/' . $group),
      !empty($group_info['description']) ? $group_info['description'] : '',
    );
  }
  $output .= theme('box', t('Message groups'), theme('table', NULL, $rows));

  // List sending methods
  $rows = array();
  messaging_method_list();
  foreach (messaging_method_info() as $method => $info) {
    $rows[] = array(
      '<strong>' . $info['name'] . '</strong>',
      !empty($info['description']) ? $info['description'] : '',
    );
  }
  $output .= theme('box', t('Sending methods'), theme('table', NULL, $rows));
  return $output;
}