You are here

function theme_biblio_export_links in Bibliography Module 6.2

Same name and namespace in other branches
  1. 5 biblio.module \theme_biblio_export_links()
  2. 6 biblio_theme.inc \theme_biblio_export_links()
  3. 7 includes/biblio_theme.inc \theme_biblio_export_links()
  4. 7.2 includes/biblio.theme.inc \theme_biblio_export_links()

Creates a group of links for the various export functions.

Parameters

$nid: the node id to export (if omitted, all nodes in the current view will be exported

4 theme calls to theme_biblio_export_links()
biblio_handler_citation::render in views/biblio_handler_citation.inc
biblio_show_results in includes/biblio.pages.inc
biblio_show_results takes the query results from biblio_db_search and adds some controls to the page then loops through the results applying the selected style to each entry
theme_biblio_entry in includes/biblio_theme.inc
theme_biblio_long in includes/biblio_theme.inc
DEPRECIATED! this was the original output format which is not to flexable it will be removed TODO: remove this function

File

includes/biblio_theme.inc, line 1079

Code

function theme_biblio_export_links($node = NULL) {
  global $pager_total_items;
  $output = '';
  $links = array();
  $base = variable_get('biblio_base', 'biblio');
  if (biblio_access('export', $node)) {
    $show_link = variable_get('biblio_lookup_links', array(
      'google' => TRUE,
    ));
    $lookup_links = module_invoke_all('biblio_lookup_link', $node);
    if ($show_link['google'] && !empty($node)) {
      $lookup_links['biblio_google_scholar'] = theme('google_scholar_link', $node);
    }
    $nid = isset($node->nid) ? $node->nid : NULL;
    $export_links = module_invoke_all('biblio_export_link', $nid);
    $links = array_merge($lookup_links, $export_links);
  }
  if (empty($node) && !empty($links)) {
    $output = t('Export @count results', array(
      '@count' => $pager_total_items[0],
    )) . ': ';
  }
  return $output . theme('links', $links, array(
    'class' => "biblio-export-buttons",
  ));
}