You are here

function theme_biblio_entry in Bibliography Module 7.2

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 includes/biblio_theme.inc \theme_biblio_entry()

Parameters

$node:

$base:

$style:

Return value

unknown_type

File

includes/biblio.theme.inc, line 733

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
  //  if ($node->biblio_abst_e) {
  //    $output .= '<span class="biblio-abstract-link">';
  //    $output .= l(" Abstract", "node/$node->nid") . "\n";
  //    $output .= '</span>';
  //  }
  $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;
}