You are here

function theme_sdl_preview_item in Scald: Media Management made easy 6

Same name and namespace in other branches
  1. 7 modules/library/scald_dnd_library/scald_dnd_library.module \theme_sdl_preview_item()

Returns HTML for an atom rendered in the "Preview" context.

1 theme call to theme_sdl_preview_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 233
Scald DnD Library

Code

function theme_sdl_preview_item($atom, $image) {
  $resource_label = t('Resource');
  $informations_label = t('Informations');
  $resource = theme('sdl_editor_item', $atom->rendered, $image);
  $title_label = t('Title');
  $title_value = $atom->rendered->title;
  $author_label = t('Author');
  $author_name = $atom->rendered->authors[0]['link'];
  return "\n<div class='sdl-preview-item'>\n  <h3>{$resource_label}</h3>\n    {$resource}\n  <h3>{$informations_label}</h3>\n  <dl>\n    <dt>{$title_label}</dt>\n    <dd>{$title_value}</dd>\n    <dt>{$author_label}</dt>\n    <dd>{$author_name}</dt>\n  </dl>\n</div>\n  ";
}