You are here

function theme_redhen_contact_add_list in RedHen CRM 7

Returns HTML for a list of available node types for node creation.

Parameters

array $variables: An associative array containing:

  • content: An array of content types.
1 theme call to theme_redhen_contact_add_list()
redhen_contact_types_list_page in modules/redhen_contact/includes/redhen_contact.pages.inc
Page callback for adding a contact type.

File

modules/redhen_contact/redhen_contact.module, line 784
Module file for RedHen contacts.

Code

function theme_redhen_contact_add_list($variables) {
  $content = $variables['content'];
  $output = '';
  if ($content) {
    $output = '<dl class="node-type-list">';
    foreach ($content as $item) {
      $output .= '<dt>' . l($item['title'], $item['href'], $item['localized_options']) . '</dt>';
      $output .= '<dd>' . filter_xss_admin($item['description']) . '</dd>';
    }
    $output .= '</dl>';
  }
  else {
    $output = '<p>' . t('You have not created any contact types yet. Go to the <a href="@create-contact">contact type creation page</a> to add a new contact type.', array(
      '@create-contact' => url('admin/structure/redhen/contact_types'),
    )) . '</p>';
  }
  return $output;
}