You are here

function biblio_crossref_node_view in Bibliography Module 7

Same name and namespace in other branches
  1. 7.2 modules/crossref/biblio_crossref.module \biblio_crossref_node_view()

File

modules/crossref/biblio_crossref.module, line 154

Code

function biblio_crossref_node_view($node, $view_mode, $langcode) {
  if ($node->type == 'biblio' && (isset($node->biblio_crossref_id) || !empty($node->biblio_doi))) {
    switch ($view_mode) {
      case 'full':
      case 'teaser':
        $node->content['links']['biblio_crossref'] = array(
          '#links' => biblio_crossref_biblio_lookup_link($node),
          '#attributes' => array(
            'class' => array(
              'links',
              'inline',
            ),
          ),
        );
    }
  }
}