You are here

function activity_admin_overview in Activity 7

Menu callback to display all the currently setup Activities.

1 string reference to 'activity_admin_overview'
activity_menu in ./activity.module
Implements hook_menu().

File

./activity.admin.inc, line 12
activity.admin.inc Contains administrative forms for activity.module

Code

function activity_admin_overview() {
  $results = array();
  $sql = "SELECT ta.hook, ta.aid, a.label\n          FROM {trigger_assignments} ta\n          INNER JOIN {actions} a\n            ON a.aid = ta.aid\n          WHERE a.type = 'activity'";
  $results = db_query($sql)
    ->fetchAll();
  if (!empty($results)) {
    return theme('activity_settings_actions_list', array(
      'results' => $results,
    ));
  }
  return t('There are no Activity Templates created yet. !link', array(
    '!link' => l(t('Create one now.'), 'admin/structure/activity/create'),
  ));
}