Revision b5e773ef
#392 CICHORIEAE display notes & #1483 references for distributions as footnotes
modules/cdm_dataportal/theme/cdm_dataportal.common.theme | ||
---|---|---|
109 | 109 |
* TODO it should be configurable which objects can be annotated as this might differ in dataportals |
110 | 110 |
* |
111 | 111 |
*/ |
112 |
function theme_cdm_annotations($cdmBase){ |
|
113 |
|
|
112 |
function theme_cdm_annotations_as_footnotekeys($cdmBase){ |
|
114 | 113 |
|
115 | 114 |
$annotationUrl = cdm_compose_annotations_url($cdmBase); |
116 | 115 |
if($annotationUrl){ |
117 | 116 |
$annotationPager = cdm_ws_get($annotationUrl, null, null, null, true); |
118 | 117 |
if($annotationPager->count > 0){ |
119 | 118 |
foreach($annotationPager->records as $annotation){ |
120 |
$footnoteKey = FootnoteManager::addNewFootnote(RenderHints::getFootnoteListKey(), $annotation->text); |
|
121 |
$out .= (isset($out)? ',' : '') . theme('cdm_footnote_key', $footnoteKey);
|
|
119 |
$footnoteKey = FootnoteManager::addNewFootnote(RenderHints::getFootnoteListKey() . '-annotations', $annotation->text);
|
|
120 |
$out .= theme('cdm_footnote_key', $footnoteKey, RenderHints::getFootnoteListKey() . '-annotations', (isset($out)? ',' : ''));
|
|
122 | 121 |
} |
123 | 122 |
} |
124 | 123 |
} |
125 |
|
|
126 | 124 |
return $out; |
125 |
} |
|
127 | 126 |
|
128 | 127 |
|
128 |
function theme_cdm_annotation_footnotes($footnoteListKey, $enclosingTag = 'span'){ |
|
129 |
return theme('cdm_footnotes', $footnoteListKey . '-annotations', $enclosingTag); |
|
129 | 130 |
} |
130 | 131 |
|
131 | 132 |
function theme_cdm_annotation_content($AnnotationTO){ |
... | ... | |
173 | 174 |
|
174 | 175 |
/* ============================ footnotes ============================= */ |
175 | 176 |
|
176 |
function theme_cdm_footnote_key($footnoteKey, $highlightable=true){ |
|
177 |
$out = '<a href="#footnote-'.$footnoteKey.'" class="footnote-key footnote-key-'.$footnoteKey.'">'.$footnoteKey.'</a>'; |
|
177 |
function theme_cdm_footnote_key($footnoteKey, $footnoteListKey, $separator = '', $highlightable=true){ |
|
178 |
$out = '<span class="footnote-key footnote-key-'.$footnoteKey.' member-of-footnotes-'.$footnoteListKey.'">'.$separator |
|
179 |
.'<a href="#footnote-'.$footnoteKey.'">'.$footnoteKey.'</a>' |
|
180 |
.'</span>'; |
|
178 | 181 |
return $out; |
179 | 182 |
} |
180 | 183 |
|
... | ... | |
184 | 187 |
return $out; |
185 | 188 |
} |
186 | 189 |
|
190 |
|
|
187 | 191 |
function theme_cdm_footnotes($footnoteListKey, $enclosingTag = 'span'){ |
188 | 192 |
|
189 |
$out = '<'.$enclosingTag.' class="footnotes footnotes-'.$footnoteListKey.'">' . FootnoteManager::renderFootnoteList($footnoteListKey) . '</'.$enclosingTag.'>'; |
|
193 |
$out = '<'.$enclosingTag.' class="footnotes footnotes-'.$footnoteListKey.' ">' . FootnoteManager::renderFootnoteList($footnoteListKey) . '</'.$enclosingTag.'>';
|
|
190 | 194 |
return $out; |
191 | 195 |
} |
192 | 196 |
|
Also available in: Unified diff