You are here

function theme_sdl_editor_legend in Scald: Media Management made easy 7

Same name and namespace in other branches
  1. 6 scald_dnd_library/scald_dnd_library.module \theme_sdl_editor_legend()

Returns HTML for the legend of an atom.

2 theme calls to theme_sdl_editor_legend()
mee_ajax_widget_expand in modules/fields/mee/mee.module
Ajax callback: returns the expanded HTML atom widget.
scald_dnd_library_add_item in modules/library/scald_dnd_library/scald_dnd_library.module
Adds an item in the library array.

File

modules/library/scald_dnd_library/scald_dnd_library.module, line 281
Scald DnD Library

Code

function theme_sdl_editor_legend($variables) {
  $atom = $variables['atom'];
  if (!empty($atom->rendered->authors)) {
    foreach ($atom->rendered->authors as $author) {
      $links[] = $author->link;
    }
    $by = implode(', ', $links);
  }
  else {
    $by = $atom->rendered->publisher['link'];
  }
  $by = t('by !name', array(
    '!name' => $by,
  ));
  return "\n  <div class='meta'>\n    <!--copyright={$atom->sid}-->{$atom->rendered->title}, {$by}<!--END copyright={$atom->sid}-->\n  </div>\n  ";
}