Revision fef841d4
Added by Andreas Kohlbecker over 3 years ago
modules/cdm_dataportal/includes/footnotes.inc | ||
---|---|---|
273 | 273 |
|
274 | 274 |
|
275 | 275 |
/** |
276 |
* Creates markup for the name relationship and creates a footnote in the |
|
277 |
* {@link \FootnoteManager}. The resulting foonote key is returned as markup. |
|
278 |
* |
|
276 | 279 |
* @param $name_rel |
280 |
* The cdm name relationship |
|
277 | 281 |
* @return string |
282 |
* The makrup for the footnote key |
|
278 | 283 |
*/ |
279 |
function name_relationship_footnote_markup($name_rel)
|
|
284 |
function handle_name_relationship_as_footnote($name_rel)
|
|
280 | 285 |
{ |
281 | 286 |
$footnote_markup = ''; |
282 | 287 |
$footnote_key_markup = ''; |
... | ... | |
296 | 301 |
return $footnote_key_markup; |
297 | 302 |
} |
298 | 303 |
|
304 |
/** |
|
305 |
* @param $nom_status |
|
306 |
* @return string |
|
307 |
*/ |
|
308 |
function nomenclatural_status_footnote_markup($nom_status) |
|
309 |
{ |
|
310 |
// NomenclaturalStatus is a subclass of ReferencedEntityBase |
|
311 |
// and has the same structure as TaxonNameRelationship |
|
312 |
return handle_name_relationship_as_footnote($nom_status); |
|
313 |
} |
|
314 |
|
|
315 |
/** |
|
316 |
* @param $name |
|
317 |
* @return string |
|
318 |
*/ |
|
319 |
function nomenclatural_reference_footnote_key_markup($name) |
|
320 |
{ |
|
321 |
$footnote_markup = ''; |
|
322 |
$footnote_key_markup = ''; |
|
323 |
if (isset($name->nomenclaturalReference) && $name->nomenclaturalReference) { |
|
324 |
$footnote_markup .= '<span class="reference">' . $name->nomenclaturalReference->titleCache . '</span>'; |
|
325 |
} |
|
326 |
if (isset($name->nomenclaturalMicroReference)) { |
|
327 |
$footnote_markup .= ($footnote_key_markup ? ':' : '') . '<span class="reference_detail">' . $name->nomenclaturalMicroReference . '</span>'; |
|
328 |
} |
|
329 |
if ($footnote_markup) { |
|
330 |
$fnkey = FootnoteManager::addNewFootnote(RenderHints::getFootnoteListKey(), $footnote_markup); |
|
331 |
$footnote_key_markup = render_footnote_key($fnkey, ',',TRUE); |
|
332 |
} |
|
333 |
return $footnote_key_markup; |
|
334 |
} |
|
335 |
|
|
336 |
|
Also available in: Unified diff
ref #8543 moving more *_footnote_markup() to footnotes.inc