Revision e90899ac
Added by Andreas Kohlbecker about 8 years ago
modules/cdm_dataportal/includes/name.inc | ||
---|---|---|
296 | 296 |
} |
297 | 297 |
} |
298 | 298 |
|
299 |
$secref_tagged_text = split_secref_from_tagged_title($taggedTitle); |
|
300 |
normalize_tagged_title($taggedTitle); |
|
299 |
$secref_tagged_text = split_secref_from_tagged_text($taggedTitle); |
|
300 |
$nom_status_tagged_text = split_nomstatus_from_tagged_text($taggedTitle); |
|
301 |
normalize_tagged_text($taggedTitle); |
|
301 | 302 |
|
302 | 303 |
$firstEntryIsValidNamePart = |
303 | 304 |
isset($taggedTitle) |
... | ... | |
337 | 338 |
} |
338 | 339 |
} |
339 | 340 |
$taggedName = $taggedNameNew; |
341 |
unset($taggedNameNew); |
|
340 | 342 |
} |
341 |
$name = '<span class="' . $taxonName->class . '">' . cdm_taggedtext2html($taggedName, 'span', ' ', $skiptags) . '</span>';
|
|
343 |
$name = '<span class="' . $taxonName->class . '">' . cdm_tagged_text_to_markup($taggedName, 'span', ' ', $skiptags) . '</span>';
|
|
342 | 344 |
} |
343 | 345 |
else { |
344 | 346 |
$name = '<span class="' . $taxonName->class . '_titleCache">' . $taxonName->titleCache . '</span>'; |
... | ... | |
414 | 416 |
} |
415 | 417 |
} |
416 | 418 |
|
419 |
// Fill with status. |
|
420 |
$statusHtml = ''; |
|
421 |
if (isset($nom_status_tagged_text[0])) { |
|
422 |
if (array_setr('status', TRUE, $renderTemplate)) { |
|
423 |
array_setr('status', '<span class="nomenclatural_status">' . cdm_tagged_text_to_markup($nom_status_tagged_text) . '</span>', $renderTemplate); |
|
424 |
} |
|
425 |
} |
|
426 |
|
|
417 | 427 |
if (isset($renderTemplate['secReferencePart'])){ |
418 | 428 |
if(isset($secref_tagged_text[1])){ |
429 |
$post_separator_markup = $is_reference_year ? '.': ''; |
|
430 |
if(isset($nom_status_tagged_text[count($nom_status_tagged_text -1 )]) && $nom_status_tagged_text[count($nom_status_tagged_text -1 )]->type == 'postSeparator'){ |
|
431 |
$post_separator_markup = cdm_tagged_text_to_markup(array($nom_status_tagged_text[count($nom_status_tagged_text -1 )])); |
|
432 |
}; |
|
419 | 433 |
array_setr('secReference', |
420 |
$is_reference_year ? '.': ''
|
|
434 |
$post_separator_markup
|
|
421 | 435 |
. ' <span class="sec_reference">' |
422 | 436 |
. $secref_tagged_text[0]->text . $secref_tagged_text[1]->text |
423 | 437 |
. '</span>', $renderTemplate); |
424 | 438 |
} |
425 | 439 |
} |
426 | 440 |
|
427 |
// Fill with status. |
|
428 |
$statusHtml = ''; |
|
429 |
if (isset($taxonName->status) && is_array($taxonName->status)) { |
|
430 |
if (array_setr('status', TRUE, $renderTemplate)) { |
|
431 |
if (isset($taxonName->status[0])) { |
|
432 |
foreach ($taxonName->status as $status) { |
|
433 |
$statusHtml .= ', ' . $status->type->representation_L10n_abbreviatedLabel; |
|
434 |
} |
|
435 |
} |
|
436 |
array_setr('status', '<span class="nomenclatural_status">' . $statusHtml . '</span>', $renderTemplate); |
|
437 |
} |
|
438 |
} |
|
439 | 441 |
|
440 | 442 |
// Fill with protologues etc... |
441 | 443 |
$descriptionHtml = ''; |
Also available in: Unified diff
implementing separator between nomstatus and sec reference