Revision 9781aceb
Added by Andreas Kohlbecker over 13 years ago
modules/cdm_dataportal/cdm_dataportal.module | ||
---|---|---|
1837 | 1837 |
$annotationPager = cdm_ws_get($annotationUrl, null, null, null, true); |
1838 | 1838 |
if($annotationPager->count > 0){ |
1839 | 1839 |
foreach($annotationPager->records as $annotation){ |
1840 |
$footnoteKeyStr = FootnoteManager::addNewFootnote($footnoteListKey, $annotation->text); |
|
1841 |
$footNoteKeys[] = new FootnoteKey($footnoteKeyStr, $footnoteListKey); |
|
1840 |
$footNoteKeys[] = FootnoteManager::addNewFootnote($footnoteListKey, $annotation->text); |
|
1842 | 1841 |
} |
1843 | 1842 |
} |
1844 | 1843 |
} |
modules/cdm_dataportal/classes/footnotemanager.php | ||
---|---|---|
76 | 76 |
|
77 | 77 |
} |
78 | 78 |
|
79 |
return $fnKey;
|
|
79 |
return new FootnoteKey($fnKey, $footnoteListKey);
|
|
80 | 80 |
} |
81 | 81 |
|
82 | 82 |
/** |
modules/cdm_dataportal/theme/cdm_dataportal.common.theme | ||
---|---|---|
168 | 168 |
|
169 | 169 |
/* ============================ footnotes ============================= */ |
170 | 170 |
|
171 |
function theme_cdm_footnote_key($footnoteKey, $footnoteListKey, $separator = '', $highlightable=true){
|
|
172 |
$out = '<span class="footnote-key footnote-key-'.$footnoteKey.' member-of-footnotes-'.$footnoteListKey.'">'.$separator
|
|
173 |
.'<a href="#footnote-'.$footnoteKey.'">'.$footnoteKey.'</a>'
|
|
171 |
function theme_cdm_footnote_key(FootnoteKey $footnoteKey, $separator = '', $highlightable=true){
|
|
172 |
$out = '<span class="footnote-key footnote-key-'.$footnoteKey->keyStr.' member-of-footnotes-'.$footnoteKey->footnoteListKey.'">'.$separator
|
|
173 |
.'<a href="#footnote-'.$footnoteKey->keyStr.'">'.$footnoteKey->keyStr.'</a>'
|
|
174 | 174 |
.'</span>'; |
175 | 175 |
return $out; |
176 | 176 |
} |
modules/cdm_dataportal/theme/cdm_dataportal.descriptions.theme | ||
---|---|---|
235 | 235 |
foreach($element->sources as $source){ |
236 | 236 |
if(_is_original_source_type($source)){ |
237 | 237 |
$_fkey = FootnoteManager::addNewFootnote(UUID_COMMON_NAME, theme('cdm_DescriptionElementSource', $source, false)); |
238 |
$sourcesFootnoteKeyList .= theme('cdm_footnote_key', $_fkey, UUID_COMMON_NAME, ($sourcesFootnoteKeyList ? $separator : ''));
|
|
238 |
$sourcesFootnoteKeyList .= theme('cdm_footnote_key', $_fkey, ($sourcesFootnoteKeyList ? $separator : '')); |
|
239 | 239 |
} |
240 | 240 |
} |
241 | 241 |
$rendered_element_list .= (strlen($rendered_element_list) > 0 ? ', ': '') . $element->name . $sourcesFootnoteKeyList; |
... | ... | |
318 | 318 |
// source references as footnotes |
319 | 319 |
foreach($descriptionElement->sources as $source){ |
320 | 320 |
if(_is_original_source_type($source)){ |
321 |
$_fkey = FootnoteManager::addNewFootnote(RenderHints::getFootnoteListKey(), theme('cdm_DescriptionElementSource', $source, false)); |
|
322 |
$footNoteKeys[] = new FootnoteKey($_fkey, RenderHints::getFootnoteListKey()); |
|
321 |
$footNoteKeys[] = FootnoteManager::addNewFootnote(RenderHints::getFootnoteListKey(), theme('cdm_DescriptionElementSource', $source, false)); |
|
323 | 322 |
} |
324 | 323 |
} |
325 | 324 |
// sort and render footnote keys |
326 | 325 |
$footnoteKeyListStr = ''; |
327 | 326 |
asort($footNoteKeys); |
328 | 327 |
foreach($footNoteKeys as $footNoteKey){ |
329 |
$footnoteKeyListStr .= theme('cdm_footnote_key', $footNoteKey->keyStr, $footnoteKey->footnoteListKey, ($footnoteKeyListStr ? $separator : ''));
|
|
328 |
$footnoteKeyListStr .= theme('cdm_footnote_key', $footNoteKey, ($footnoteKeyListStr ? $separator : '')); |
|
330 | 329 |
} |
331 | 330 |
|
332 | 331 |
|
modules/cdm_dataportal/theme/cdm_dataportal.name.theme | ||
---|---|---|
75 | 75 |
$typeReference .= $shortCitation.'</span>'; |
76 | 76 |
$typeReference .= ':'. $std->citationMicroReference .')'; |
77 | 77 |
|
78 |
$_fkey2 = FootnoteManager::addNewFootnote(RenderHints::getRenderPath() . '-lectotypes', $std->citation->titleCache); |
|
79 |
$typeReference .= theme('cdm_footnote_key', $_fkey2, RenderHints::getRenderPath() . '-lectotypes');
|
|
78 |
$_fkey2 = FootnoteManager::addNewFootnote(RenderHints::getRenderPath() . '-lectotypes', $std->citation->titleCache);
|
|
79 |
$typeReference .= theme('cdm_footnote_key', $_fkey2); |
|
80 | 80 |
//$citation = cdm_ws_get(CDM_WS_NOMENCLATURAL_REFERENCE_CITATION, array($taxonName->nomenclaturalReference->uuid), "microReference=".urlencode($microreference)); |
81 | 81 |
//$citation = $citation->String; |
82 | 82 |
|
... | ... | |
91 | 91 |
|
92 | 92 |
//footnotes for synonymy acronyms |
93 | 93 |
$_fkey = FootnoteManager::addNewFootnote(RenderHints::getRenderPath() . '-acronyms', $std->typeSpecimen->collection->titleCache); |
94 |
$out .= theme('cdm_footnote_key', $_fkey, RenderHints::getRenderPath() . '-acronyms');
|
|
94 |
$out .= theme('cdm_footnote_key', $_fkey);
|
|
95 | 95 |
$out .= '</li>'; |
96 | 96 |
|
97 | 97 |
if (!empty($std->citation)){ |
... | ... | |
106 | 106 |
if ($render_footnote_lectotypes){ |
107 | 107 |
$out .= theme('cdm_footnotes', RenderHints::getRenderPath() . '-lectotypes'); |
108 | 108 |
} |
109 |
$out .= theme('cdm_footnotes', RenderHints::getRenderPath() . '-acronyms'); |
|
109 |
$out .= theme('cdm_footnotes', RenderHints::getRenderPath() . '-acronyms');
|
|
110 | 110 |
|
111 | 111 |
RenderHints::popFromRenderStack(); |
112 | 112 |
return $out; |
modules/cdm_dataportal/theme/cdm_dataportal.taxon.theme | ||
---|---|---|
103 | 103 |
ksort($joinedAuthorTeams); |
104 | 104 |
foreach($joinedAuthorTeams as $authorteam=>$sensuCitation){ |
105 | 105 |
$footnoteKey = FootnoteManager::addNewFootnote($footnoteListKey, $sensuCitation); |
106 |
$joinedAuthorTeams[$authorteam] = '<span class="sensu">sensu '.$authorteam. theme('cdm_footnote_key', $footnoteKey, $footnoteListKey).'</span>';
|
|
106 |
$joinedAuthorTeams[$authorteam] = '<span class="sensu">sensu '.$authorteam. theme('cdm_footnote_key', $footnoteKey).'</span>'; |
|
107 | 107 |
} |
108 | 108 |
|
109 | 109 |
// generate output |
themes/palmweb_2/template.php | ||
---|---|---|
104 | 104 |
// $sourcesFootnoteKeyList = ''; |
105 | 105 |
// foreach($descriptionElement->sources as $source){ |
106 | 106 |
// $_fkey = FootnoteManager::addNewFootnote(UUID_DISTRIBUTION, theme('cdm_DescriptionElementSource', $source, false)); |
107 |
// $sourcesFootnoteKeyList .= theme('cdm_footnote_key', $_fkey, UUID_DISTRIBUTION, ($sourcesFootnoteKeyList ? $separator : ''));
|
|
107 |
// $sourcesFootnoteKeyList .= theme('cdm_footnote_key', $_fkey, ($sourcesFootnoteKeyList ? $separator : '')); |
|
108 | 108 |
// } |
109 | 109 |
// if($annotationFootnoteKeys && $sourcesFootnoteKeyList){ |
110 | 110 |
// $annotationFootnoteKeys .= $separator; |
Also available in: Unified diff
refactoring footnote system