You are here

function theme_customer_profile_add_list in Commerce Core 7

Displays the list of available customer profile types for profile creation.

1 theme call to theme_customer_profile_add_list()
commerce_customer_ui_customer_profile_add_page in modules/customer/includes/commerce_customer_ui.profiles.inc
Menu callback: display a list of customer profile types that the user can create.

File

modules/customer/includes/commerce_customer_ui.profiles.inc, line 31
Page callbacks and form builder functions for administering customer profiles.

Code

function theme_customer_profile_add_list($variables) {
  $content = $variables['content'];
  $output = '';
  if ($content) {
    $output = '<dl class="commerce-customer-profile-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 {
    if (user_access('administer customer profile types')) {
      $output = '<p>' . t('You have not enabled modules defining any customer profile types yet.') . '</p>';
    }
    else {
      $output = '<p>' . t('No customer profile types have been enabled yet for you to use.') . '</p>';
    }
  }
  return $output;
}