function theme_entityform_add_list in Entityform 7.2
Same name and namespace in other branches
- 7 entityform.admin.inc \theme_entityform_add_list()
Displays the list of available entityform types for entityform creation.
1 theme call to theme_entityform_add_list()
- EntityformUIController::addPage in ./
entityform.admin.inc - Create the markup for the add Entityform Entities page within the class so it can easily be extended/overriden.
File
- ./
entityform.admin.inc, line 704 - Entityform editing UI.
Code
function theme_entityform_add_list($variables) {
$content = $variables['content'];
$output = '';
if ($content) {
$output = '<dl class="entityform-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 entityform types')) {
$output = '<p>' . t('Entityform Entities cannot be added because you have not created any entityform types yet. Go to the <a href="@create-entityform-type">entityform type creation page</a> to add a new entityform type.', array(
'@create-entityform-type' => url('admin/structure/entityform_types/add'),
)) . '</p>';
}
else {
$output = '<p>' . t('No entityform types have been created yet for you to use.') . '</p>';
}
}
return $output;
}