Revision 6d3d2b4a
Added by Francisco Revilla almost 14 years ago
modules/cdm_dataportal/theme/cdm_dataportal.common.theme | ||
---|---|---|
169 | 169 |
/* ============================ footnotes ============================= */ |
170 | 170 |
|
171 | 171 |
function theme_cdm_footnote_key($footnoteKey, $separator = '', $highlightable=true){ |
172 |
if (!$footnoteKey->footnoteListKey){ |
|
173 |
//var_dump('#####' . $footnoteKey); |
|
174 |
return ''; |
|
175 |
} |
|
172 | 176 |
$out = '<span class="footnote-key footnote-key-'.$footnoteKey->keyStr.' member-of-footnotes-'.$footnoteKey->footnoteListKey.'">'.$separator |
173 | 177 |
.'<a href="#footnote-'.$footnoteKey->keyStr.'">'.$footnoteKey->keyStr.'</a>' |
174 | 178 |
.'</span>'; |
... | ... | |
188 | 192 |
return $out; |
189 | 193 |
} |
190 | 194 |
|
195 |
function cdm_exist_footnote($footnote_list, $footnote){ |
|
196 |
$result = false; |
|
197 |
foreach ($footnote_list as $element){ |
|
198 |
if ($element == $footnote){ |
|
199 |
$result = true; |
|
200 |
} |
|
201 |
} |
|
202 |
return $result; |
|
203 |
} |
|
204 |
|
|
205 |
function cdm_add_footnote_to_array(&$footnote_list, $footnote){ |
|
206 |
if(!cdm_exist_footnote($footnote_list, $footnote)){ |
|
207 |
$footnote_list[] = $footnote; |
|
208 |
} |
|
209 |
} |
|
191 | 210 |
|
192 | 211 |
/* ============================ pager ============================= */ |
193 | 212 |
|
Also available in: Unified diff
fixing showing repeated sources(citations) on FOOTNOTES