You are here

function theme_pollim_add_list in Poll Improved 7

Displays the list of available pollim types for pollim creation.

1 theme call to theme_pollim_add_list()
PollimUIController::addPage in ./pollim.admin.inc
Create the markup for the add Pollim Entities page within the class so it can easily be extended/overriden.

File

./pollim.admin.inc, line 319
Pollim editing UI.

Code

function theme_pollim_add_list($variables) {
  $content = $variables['content'];
  $output = '';
  if ($content) {
    $output = '<dl class="pollim-type-list">';
    foreach ($content as $item) {
      $output .= '<dt>' . l($item['title'], $item['href']) . '</dt>';
      $output .= '<dd>' . filter_xss_admin($item['description']) . '</dd>';
    }
    $output .= '</dl>';
  }
  else {
    if (user_access('administer pollim types')) {
      $output = '<p>' . t('Pollim Entities cannot be added because you have not created any pollim types yet. Go to the <a href="@create-pollim-type">pollim type creation page</a> to add a new pollim type.', array(
        '@create-pollim-type' => url('admin/structure/pollim_types/add'),
      )) . '</p>';
    }
    else {
      $output = '<p>' . t('No pollim types have been created yet for you to use.') . '</p>';
    }
  }
  return $output;
}