function biblio_handler_citation::render in Bibliography Module 6.2
Same name and namespace in other branches
- 6 views/biblio_handler_citation.inc \biblio_handler_citation::render()
- 7 views/biblio_handler_citation.inc \biblio_handler_citation::render()
- 7.2 views/biblio_handler_citation.inc \biblio_handler_citation::render()
File
- views/
biblio_handler_citation.inc, line 58 - Views citation handler for Drupal biblio module.
Class
- biblio_handler_citation
- @file Views citation handler for Drupal biblio module.
Code
function render($values) {
if (empty($this->biblio_base)) {
$this->biblio_base = variable_get('biblio_base', 'biblio');
}
$item = node_load($values->{$this->aliases['nid']});
if ($item->type != 'biblio') {
return;
}
if (isset($item->biblio_year)) {
$item->biblio_year = _biblio_text_year($item->biblio_year);
}
if (variable_get('biblio_hide_bibtex_braces', 0)) {
$item->title = biblio_remove_brace($item->title);
}
$output = "\n" . '<div class="biblio-entry">' . "\n";
$output .= '<div class="biblio-style-' . $style . '">' . "\n";
if (!$item->status) {
$output .= '<div id="node-' . $item->nid . '" class="node node-unpublished">';
}
// first add the styled entry...
$output .= theme('biblio_style', $item, $this->biblio_base, $this->options['style_name']);
$annotation_field = variable_get('biblio_annotations', 'none');
if ($annotation_field != 'none' && $item->{$annotation_field}) {
$output .= '<div class="biblio-annotation">';
$output .= check_markup($item->{$annotation_field}, $item->format, FALSE);
$output .= '</div>';
}
$openurl_base = variable_get('biblio_baseopenurl', '');
if (!empty($openurl_base) && $this->options['open_url_link']) {
$output .= theme('biblio_openurl', biblio_openurl($item));
}
if (biblio_access('export', $item) && $this->options['export_links']) {
$output .= theme('biblio_export_links', $item);
}
if (biblio_access('download', $item) && $this->options['file_attachments']) {
// add links to attached files (if any)
$output .= theme('biblio_download_links', $item);
}
if (!$item->status) {
$output .= '</div>';
}
$output .= "\n</div></div>";
return $output;
}