You are here

function theme_biblio_export_links in Bibliography Module 7.2

Same name and namespace in other branches
  1. 5 biblio.module \theme_biblio_export_links()
  2. 6.2 includes/biblio_theme.inc \theme_biblio_export_links()
  3. 6 biblio_theme.inc \theme_biblio_export_links()
  4. 7 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:

Return value

an un-ordered list of class "biblio-export-buttons"

6 theme calls to theme_biblio_export_links()
biblio_entry in includes/biblio.pages.inc
biblio_handler_citation::render in views/biblio_handler_citation.inc
Render the field.
biblio_page_header in includes/biblio.pages.inc
biblio_plugin_row_citation::render in views/biblio_plugin_row_citation.inc
Render a row object. This usually passes through to a theme template of some form, but not always.
theme_biblio_entry in includes/biblio.theme.inc

... See full list

File

includes/biblio.theme.inc, line 922

Code

function theme_biblio_export_links($variables) {
  global $pager_total_items;
  $node = $variables['node'];
  $filter = $variables['node'] == NULL && isset($variables['filter']) ? $variables['filter'] : array();
  $links = array();
  $output = '';
  if (biblio_access('export')) {
    $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', array(
        'node' => $node,
      ));
    }
    $nid = isset($node->nid) ? $node->nid : NULL;
    $export_links = module_invoke_all('biblio_export_link', $nid, $filter);
    $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', array(
    'links' => $links,
    'attributes' => array(
      'class' => array(
        'biblio-export-buttons',
      ),
    ),
  ));
}