function theme_sdl_library_item in Scald: Media Management made easy 6
Same name and namespace in other branches
- 7 modules/library/scald_dnd_library/scald_dnd_library.module \theme_sdl_library_item()
Returns HTML for an atom rendered in the "Library Item" context.
1 theme call to theme_sdl_library_item()
- scald_dnd_library_scald_render in scald_dnd_library/
scald_dnd_library.module - Implements hook_scald_render.
File
- scald_dnd_library/
scald_dnd_library.module, line 171 - Scald DnD Library
Code
function theme_sdl_library_item($atom, $image) {
$informations = $atom->rendered;
if (is_object($atom->base_entity) && is_numeric($atom->base_entity->nid)) {
$view = l(t('View'), 'node/' . $atom->base_entity->nid, array(
'attributes' => array(
'target' => '_blank',
),
));
$edit = l(t('Edit'), 'node/' . $atom->base_entity->nid . '/edit', array(
'attributes' => array(
'target' => '_blank',
),
));
$links = "<div class='links'>{$view} / {$edit}</div>";
}
else {
$links = '';
}
$return = "\n <div class='image'>\n {$image}\n </div>";
if (!empty($informations->player)) {
$return .= "\n <div class='player'>\n {$informations->player}\n </div>";
}
$return .= "\n <div class='meta'>\n <div class='type type-" . strtolower($informations->type) . "'></div>\n <div class='title'>{$informations->title}</div>\n <div class='author'>{$informations->authors[0]['link']}</div>\n {$links}\n </div>\n <span class='clear' />\n ";
return $return;
}