Revision 963f9de3
Added by Andreas Kohlbecker over 3 years ago
modules/cdm_dataportal/theme/cdm_dataportal.common.theme | ||
---|---|---|
170 | 170 |
$footNoteKeys = cdm_entity_annotations_as_footnotekeys($cdm_entities, $footnote_list_key); |
171 | 171 |
} |
172 | 172 |
foreach ($footNoteKeys as $a) { |
173 |
// $out .= theme('cdm_footnote_key', $a, $a->footnoteListKey, (isset($out)? |
|
174 |
// ',' : '')); |
|
175 | 173 |
$out .= theme('cdm_footnote_key', array('footnoteKey' => $a, 'separator' => ($out ? ',' : ''))); |
176 | 174 |
} |
177 | 175 |
return $out; |
... | ... | |
197 | 195 |
|
198 | 196 |
/* ============================ footnotes ============================= */ |
199 | 197 |
/** |
200 |
* @todo Please document this function. |
|
201 |
* @see http://drupal.org/node/1354 |
|
198 |
* Creates markup for a foot note key |
|
199 |
* |
|
200 |
* @param null $footnoteKey |
|
201 |
* @param string $separator |
|
202 |
* @param bool $separator_off |
|
203 |
* |
|
204 |
* @return string |
|
205 |
* The footnote key markup |
|
202 | 206 |
*/ |
203 |
function theme_cdm_footnote_key($variables) {
|
|
207 |
function cdm_footnote_key($footnoteKey = null, $separator = '', $separator_off = false) {
|
|
204 | 208 |
|
205 |
$footnoteKey = $variables['footnoteKey']; |
|
206 |
$separator = $variables['separator']; |
|
207 |
$highlightable = $variables['highlightable']; |
|
208 |
$separator_off = $variables['separator_off']; |
|
209 | 209 |
if (!is_object($footnoteKey) or !isset($footnoteKey->footnoteListKey)) { |
210 | 210 |
return ''; |
211 | 211 |
} |
... | ... | |
216 | 216 |
if ($separator_off) { |
217 | 217 |
$separator = ''; |
218 | 218 |
} |
219 |
$out = '<span class="footnote-key footnote-key-' . $footnoteKey->keyStr . ' member-of-footnotes-' . $footnoteKey->footnoteListKey . '">' . $separator . '<a href="#footnote-' . $footnoteKey->keyStr . '">' . $footnoteKey->keyStr . '</a>' . '</span>'; |
|
219 |
$out = '<span class="footnote-key footnote-key-' . $footnoteKey->keyStr . ' member-of-footnotes-' . $footnoteKey->footnoteListKey . '">' |
|
220 |
. $separator . '<a href="#footnote-' . $footnoteKey->keyStr . '">' . $footnoteKey->keyStr . '</a>' . '</span>'; |
|
220 | 221 |
return $out; |
221 | 222 |
} |
222 | 223 |
|
Also available in: Unified diff
ref #8543 replacing theme_cdm_footnote_key() by cdm_footnote_key()