Revision d5577d1e
Added by Andreas Kohlbecker almost 8 years ago
modules/cdm_dataportal/theme/cdm_dataportal.references.theme | ||
---|---|---|
13 | 13 |
* @see http://www.mozilla.org/MPL/MPL-1.1.html |
14 | 14 |
*/ |
15 | 15 |
|
16 |
/** |
|
17 |
* Creates a pager widget for the given CDM Pager containing CDM Reference entities. |
|
18 |
* |
|
19 |
* @param $referencePager object |
|
20 |
* A CDM Pager containing CDM Reference entities |
|
21 |
* @param $path |
|
22 |
* The base path to be used when generating the pager item links |
|
23 |
* @$parameters |
|
24 |
* |
|
25 |
* @return string |
|
26 |
* Markup |
|
27 |
*/ |
|
28 |
function cdm_reference_pager($referencePager, $path, $parameters) { |
|
29 |
|
|
30 |
drupal_set_title(t('Bibliographic index'), PASS_THROUGH); |
|
31 |
$out = ''; |
|
32 |
if (count($referencePager->records) > 0) { |
|
33 |
$out .= '<ul>'; |
|
34 |
foreach ($referencePager->records as $reference) { |
|
35 |
// FIXME remove hack. |
|
36 |
$reference->fullCitation = $reference->titleCache; |
|
37 |
// For matching cdm entity to STO. |
|
38 |
$out .= '<li>' . theme('cdm_reference', array( |
|
39 |
'reference' => $reference, |
|
40 |
'microReference' => NULL, |
|
41 |
'doLink' => TRUE, |
|
42 |
)) . '</li>'; |
|
43 |
} |
|
44 |
$out .= '</ul>'; |
|
45 |
$out .= theme('cdm_pager', array( |
|
46 |
'pager' => $referencePager, |
|
47 |
'path' => $path, |
|
48 |
'parameters' => $parameters, |
|
49 |
)); |
|
50 |
} |
|
51 |
else { |
|
52 |
$out = '<h4 class="error">Sorry, this page contains not entries.</h4>'; |
|
53 |
} |
|
54 |
return $out; |
|
55 |
} |
|
56 | 16 |
|
57 | 17 |
/** |
58 | 18 |
* Creates a HTML representations for a CDM Reference instance.. |
Also available in: Unified diff
moving method to includes/