You are here

function theme_pet_admin_page in Previewable email templates 6

Theme the output for the main PET administration page.

1 theme call to theme_pet_admin_page()
pet_admin_page in ./pet.admin.inc
PET administration page. Display a list of existing PETs.

File

./pet.admin.inc, line 19
Contains administrative pages for creating, editing, and deleting previewable email templates (PETs).

Code

function theme_pet_admin_page($pets) {
  $output = '<p>' . t('This page lists all the <em>previewable email templates</em> that are currently defined on this system. You may <a href="@add-url">add new templates</a>.', array(
    '@add-url' => url('admin/build/pets/add'),
  )) . '</p>';
  $destination = drupal_get_destination();
  foreach ($pets as $pet) {
    $ops = theme('links', array(
      'pets_edit' => array(
        'title' => t('edit'),
        'href' => "admin/build/pets/edit/" . $pet->name,
      ),
      'pets_delete' => array(
        'title' => t('delete'),
        'href' => "admin/build/pets/delete/" . $pet->name,
      ),
    ));
    $rows[] = array(
      l($pet->name, 'pet/' . $pet->name),
      $pet->title,
      $ops,
    );
  }
  if (empty($pets)) {
    $rows[] = array(
      array(
        'data' => t('No templates are currently defined.'),
        'colspan' => 4,
      ),
    );
  }
  $header = array(
    t('Name'),
    t('Title'),
    t('Operations'),
  );
  $output .= theme('table', $header, $rows);
  return $output;
}