function _biblio_format_author_page in Bibliography Module 7
Same name and namespace in other branches
- 6.2 includes/biblio.pages.inc \_biblio_format_author_page()
- 6 biblio.pages.inc \_biblio_format_author_page()
- 7.2 includes/biblio.pages.inc \_biblio_format_author_page()
1 call to _biblio_format_author_page()
- biblio_author_page in includes/
biblio.pages.inc
File
- includes/
biblio.pages.inc, line 1312 - Copyright (C) 2006-2011 Ron Jerome.
Code
function _biblio_format_author_page($path, $filter, $authors) {
$header_ext = $checkbox = '';
$header = array();
if (biblio_access('edit_author')) {
if (!empty($filter)) {
$header_ext = ' ' . t('whose last name begins with the letter') . ': ' . $filter;
}
$checkbox = array(
'#title' => t('Highlight possible duplicates'),
'#type' => 'checkbox',
'#id' => 'biblio-highlight',
);
$checkbox = '<div class="biblio-alpha-line">' . drupal_render($checkbox) . '</div>';
$header = array(
array(
'data' => t('There are a total of @count authors in the database!header_ext.', array(
'@count' => count($authors),
'!header_ext' => $header_ext,
)),
'align' => 'center',
'colspan' => 3,
),
);
}
$rows[] = array(
array(
'data' => theme('biblio_alpha_line', array(
'type' => 'authors',
'current' => $filter,
'path' => $path,
)) . $checkbox,
'colspan' => 3,
),
);
if (count($authors)) {
for ($i = 0; $i < count($authors); $i += 3) {
$rows[] = array(
array(
'data' => _biblio_format_author($authors[$i]),
),
array(
'data' => isset($authors[$i + 1]) ? _biblio_format_author($authors[$i + 1]) : '',
),
array(
'data' => isset($authors[$i + 2]) ? _biblio_format_author($authors[$i + 2]) : '',
),
);
}
}
return array(
'#theme' => 'table',
'#header' => $header,
'#rows' => $rows,
);
}