You are here

function theme_biblio_entry in Bibliography Module 7

Same name and namespace in other branches
  1. 6.2 includes/biblio_theme.inc \theme_biblio_entry()
  2. 6 biblio_theme.inc \theme_biblio_entry()
  3. 7.2 includes/biblio.theme.inc \theme_biblio_entry()

Parameters

$node:

$base:

$style:

File

includes/biblio_theme.inc, line 828

Code

function theme_biblio_entry($variables) {
  $node = $variables['node'];
  $style_name = $variables['style_name'];
  $output = "\n" . '<div class="biblio-entry">' . "\n";
  $output .= '<div class="biblio-style-' . $style_name . '">' . "\n";
  if (!$node->status) {
    $output .= '<div id="node-' . $node->nid . '" class="node node-unpublished">';
  }

  // First add the styled entry...
  $output .= theme('biblio_style', array(
    'node' => $node,
    'style_name' => $style_name,
  ));

  // Now add the various links.
  // @code
  // if ($node->biblio_abst_e) {
  //   $output .= '<span class="biblio-abstract-link">';
  //   $output .= l(" Abstract", "node/$node->nid") . "\n";
  //   $output .= '</span>';
  // }
  // @endcode
  $annotation_field = variable_get('biblio_annotations', 'none');
  if ($annotation_field != 'none' && $node->{$annotation_field}) {
    $output .= '<div class="biblio-annotation">';
    $output .= filter_xss($node->{$annotation_field}, biblio_get_allowed_tags());
    $output .= '</div>';
  }
  $openurl_base = variable_get('biblio_baseopenurl', '');
  if ($openurl_base) {
    $output .= theme('biblio_openurl', array(
      'openURL' => biblio_openurl($node),
    ));
  }
  if (biblio_access('export')) {
    $base = variable_get('biblio_base', 'biblio');
    $output .= theme('biblio_export_links', array(
      'node' => $node,
    ));
  }
  if (biblio_access('download', $node)) {

    // Add links to attached files (if any)
    $output .= theme('biblio_download_links', array(
      'node' => $node,
    ));
  }
  if (!$node->status) {
    $output .= '</div>';
  }
  $output .= "\n</div></div>";
  return $output;
}