Revision 17cab8f4
Added by Patric Plitzner almost 10 years ago
- fixed "later homonym for" being displayed at the synonym itself (#4211)
7.x/modules/cdm_dataportal/theme/cdm_dataportal.taxon.theme | ||
---|---|---|
258 | 258 |
if (!$is_synonym) { |
259 | 259 |
$out .= '<span class="sensu"> sensu ' . theme('cdm_reference', array('reference' => $taxon->sec)) . '</span>'; |
260 | 260 |
} |
261 |
if ($show_classification) {
|
|
261 |
if ($show_classification) { |
|
262 | 262 |
$classifications = get_classifications_for_taxon($taxon); |
263 | 263 |
$classification_titles = array(); |
264 |
foreach ($classifications as $classification) {
|
|
265 |
if (isset($classification->titleCache)) {
|
|
266 |
$classification_titles[] = $classification->titleCache;
|
|
267 |
}
|
|
264 |
foreach ($classifications as $classification) { |
|
265 |
if (isset($classification->titleCache)) { |
|
266 |
$classification_titles[] = $classification->titleCache; |
|
267 |
} |
|
268 | 268 |
} |
269 | 269 |
if(count($classification_titles) == 0){ |
270 | 270 |
$classification_titles[] = $unclassified_snippet; |
... | ... | |
315 | 315 |
'nameLink' => $taxonUri, |
316 | 316 |
'refenceLink' => $referenceUri, |
317 | 317 |
)); |
318 |
if ($show_classification) {
|
|
319 |
$classifications = get_classifications_for_taxon($taxon);
|
|
320 |
$classification_titles = array();
|
|
321 |
foreach ($classifications as $classification) {
|
|
322 |
if (isset($classification->titleCache)) {
|
|
323 |
$classification_titles[] = $classification->titleCache;
|
|
324 |
}
|
|
318 |
if ($show_classification) { |
|
319 |
$classifications = get_classifications_for_taxon($taxon); |
|
320 |
$classification_titles = array(); |
|
321 |
foreach ($classifications as $classification) { |
|
322 |
if (isset($classification->titleCache)) { |
|
323 |
$classification_titles[] = $classification->titleCache; |
|
324 |
} |
|
325 | 325 |
} |
326 | 326 |
if(count($classification_titles) == 0){ |
327 | 327 |
$classification_titles[] = $unclassified_snippet; |
328 |
}
|
|
329 |
$out .= ' : <span class="classifications">' . implode(', ', $classification_titles) . '</span>';
|
|
328 |
} |
|
329 |
$out .= ' : <span class="classifications">' . implode(', ', $classification_titles) . '</span>'; |
|
330 | 330 |
} |
331 | 331 |
$out .= theme('cdm_annotations_as_footnotekeys', array('cdmBase_list' => $taxon)); |
332 | 332 |
|
... | ... | |
514 | 514 |
|
515 | 515 |
$homonyms_array = array(); |
516 | 516 |
|
517 |
// First the FROM RELS. |
|
518 | 517 |
if ($name_relations) { |
519 | 518 |
foreach ( $name_relations as $element ) { |
520 | 519 |
switch ($element->type->uuid) { |
521 |
case UUID_LATER_HOMONYM : |
|
522 |
|
|
523 |
$elementTaxonBasesUuid = isset ( $element->toName->taxonBases [0]->uuid ) ? $element->toName->taxonBases [0]->uuid : ''; |
|
524 |
$taxon_html = theme ( 'cdm_taxonName', array ( |
|
525 |
'taxonName' => $element->toName, |
|
526 |
'nameLink' => path_to_name ( $element->toName->uuid, $taxon->uuid, $elementTaxonBasesUuid ) |
|
527 |
) ); |
|
528 |
break; |
|
529 |
case UUID_TREATED_AS_LATER_HOMONYM : |
|
530 |
$elementTaxonBasesUuid = isset ( $element->toName->taxonBases [0]->uuid ) ? $element->toName->taxonBases [0]->uuid : ''; |
|
531 |
$taxon_html = theme ( 'cdm_taxonName', array ( |
|
532 |
'taxonName' => $element->toName, |
|
533 |
'nameLink' => path_to_name ( $element->toName->uuid ) |
|
534 |
) ); |
|
535 |
break; |
|
536 |
case UUID_BLOCKING_NAME_FOR : |
|
537 |
$elementTaxonBasesUuid = isset ( $element->fromName->taxonBases [0]->uuid ) ? $element->fromName->taxonBases [0]->uuid : ''; |
|
538 |
$taxon_html = theme ( 'cdm_taxonName', array ( |
|
539 |
'taxonName' => $element->fromName, |
|
540 |
'nameLink' => path_to_name ( $element->fromName->uuid, $taxon->uuid, $elementTaxonBasesUuid ) |
|
541 |
) ); |
|
542 |
break; |
|
543 |
default:$taxon_html = null; |
|
520 |
case UUID_LATER_HOMONYM : |
|
521 |
$elementTaxonBasesUuid = isset ($element->toName->taxonBases [0]->uuid) ? $element->toName->taxonBases [0]->uuid : ''; |
|
522 |
|
|
523 |
//from relation ships -> only shown at after fromName-synonym |
|
524 |
if ($taxon->name->uuid == $element->fromName->uuid) { |
|
525 |
$taxon_html = theme('cdm_taxonName', array( |
|
526 |
'taxonName' => $element->toName, |
|
527 |
'nameLink' => path_to_name($element->toName->uuid, $taxon->uuid, $elementTaxonBasesUuid) |
|
528 |
)); |
|
529 |
} |
|
530 |
break; |
|
531 |
case UUID_TREATED_AS_LATER_HOMONYM : |
|
532 |
$elementTaxonBasesUuid = isset ($element->toName->taxonBases [0]->uuid) ? $element->toName->taxonBases [0]->uuid : ''; |
|
533 |
|
|
534 |
//from relation ships -> only shown at after fromName-synonym |
|
535 |
if ($taxon->name->uuid == $element->fromName->uuid) { |
|
536 |
$taxon_html = theme('cdm_taxonName', array( |
|
537 |
'taxonName' => $element->toName, |
|
538 |
'nameLink' => path_to_name($element->toName->uuid) |
|
539 |
)); |
|
540 |
} |
|
541 |
break; |
|
542 |
case UUID_BLOCKING_NAME_FOR : |
|
543 |
$elementTaxonBasesUuid = isset ($element->fromName->taxonBases [0]->uuid) ? $element->fromName->taxonBases [0]->uuid : ''; |
|
544 |
|
|
545 |
//to relation ships -> only shown at after toName-synonym |
|
546 |
if ($taxon->name->uuid == $element->toName->uuid) { |
|
547 |
$taxon_html = theme('cdm_taxonName', array( |
|
548 |
'taxonName' => $element->fromName, |
|
549 |
'nameLink' => path_to_name($element->fromName->uuid, $taxon->uuid, $elementTaxonBasesUuid) |
|
550 |
)); |
|
551 |
} |
|
552 |
break; |
|
553 |
default: |
|
554 |
$taxon_html = null; |
|
544 | 555 |
} |
545 | 556 |
if ($taxon_html) { |
546 | 557 |
if (count ( $homonyms_array )) { |
Also available in: Unified diff