You are here

function biblio_entry in Bibliography Module 7

Same name and namespace in other branches
  1. 7.2 includes/biblio.pages.inc \biblio_entry()
1 call to biblio_entry()
biblio_page_content in includes/biblio.pages.inc

File

includes/biblio.pages.inc, line 259
Copyright (C) 2006-2011 Ron Jerome.

Code

function biblio_entry($node) {
  $entry = array();
  $style = biblio_get_style();

  /*
    $select_box = array(
    '#type' => 'checkbox',
    '#return_value'  => $node->nid,
    '#default_value' => 0,
    '#attributes' => array('class' => array('biblio-export-selector'),)

    );
  */
  $prefix = '<div class="biblio-entry">';
  $suffix = '</div>';
  if (!$node->status) {
    $prefix .= '<div id="node-' . $node->nid . '" class="node node-unpublished">';
    $suffix .= '</div>';
  }

  // $prefix .= theme('checkbox', array('element' => $select_box));.
  $entry = array(
    '#prefix' => $prefix,
    '#suffix' => $suffix,
  );
  $entry['entry']['#markup'] = theme('biblio_style', array(
    'node' => $node,
    'style_name' => $style,
  ));
  $annotation_field = variable_get('biblio_annotations', 'none');
  if ($annotation_field != 'none' && $node->{$annotation_field}) {
    $entry['annotation'] = array(
      '#prefix' => '<div class="biblio-annotation">',
      '#markup' => filter_xss($node->{$annotation_field}, biblio_get_allowed_tags()),
      '#suffix' => '</div>',
    );
  }
  $openurl_base = variable_get('biblio_baseopenurl', '');
  if ($openurl_base) {
    $entry['openurl'] = array(
      '#markup' => theme('biblio_openurl', array(
        'openURL' => biblio_openurl($node),
      )),
    );
  }
  if (biblio_access('export')) {
    $base = variable_get('biblio_base', 'biblio');
    $entry['export_links'] = array(
      '#markup' => theme('biblio_export_links', array(
        'node' => $node,
      )),
    );
  }
  if (biblio_access('download', $node)) {

    // Add links to attached files (if any)
    $entry['download_links'] = array(
      '#markup' => theme('biblio_download_links', array(
        'node' => $node,
      )),
    );
  }
  return $entry;
}