You are here

function casetracker_case_state_overview in Case Tracker 6

Same name and namespace in other branches
  1. 5 casetracker.module \casetracker_case_state_overview()
  2. 7 casetracker_admin.inc \casetracker_case_state_overview()

Displays an administrative overview of all case states available.

1 string reference to 'casetracker_case_state_overview'
casetracker_menu in ./casetracker.module
Implementation of hook_menu().

File

./casetracker_admin.inc, line 175

Code

function casetracker_case_state_overview() {
  $rows = array();
  $headers = array(
    t('Name'),
    t('Realm'),
    array(
      'data' => t('Operations'),
      'colspan' => 2,
    ),
  );
  foreach (array(
    'priority',
    'status',
    'type',
  ) as $realm) {
    foreach (casetracker_realm_load($realm, FALSE) as $csid => $name) {
      $rows[] = array(
        check_plain($name),
        $realm,
        l(t('edit'), 'admin/settings/casetracker/states/edit/' . $csid),
        l(t('delete'), 'admin/settings/casetracker/states/delete/' . $csid),
      );
    }
  }
  return theme('table', $headers, $rows);
}