Revision 5350b243
Added by Andreas Kohlbecker over 11 years ago
5.x/modules/cdm_dataportal/theme/cdm_dataportal.taxon.theme | ||
---|---|---|
108 | 108 |
|
109 | 109 |
} else { |
110 | 110 |
// all relationsship types but misapplied_name_for invalid_designation_for |
111 |
$taxonRelationshipsLines[] = theme('cdm_related_taxon',$taxonRelation->fromTaxon, $taxonRelation->type->uuid, $taxonRelation->type->representation_L10n_abbreviatedLabel, true);
|
|
111 |
$taxonRelationshipsLines[] = theme('cdm_related_taxon',$taxonRelation->fromTaxon, $taxonRelation->type->uuid, $taxonRelation->type, true); |
|
112 | 112 |
} |
113 | 113 |
} |
114 | 114 |
} |
... | ... | |
273 | 273 |
} |
274 | 274 |
|
275 | 275 |
|
276 |
function theme_cdm_related_taxon($taxon, $reltype_uuid = false, $relsign = null, $doLinkTaxon = false){
|
|
276 |
function theme_cdm_related_taxon($taxon, $reltype_uuid = false, $taxonRelationType = null, $doLinkTaxon = false){
|
|
277 | 277 |
|
278 | 278 |
static $relsign_homo = '≡'; |
279 | 279 |
static $relsign_hetero = '='; |
280 | 280 |
static $relsign_invalid = '–'; |
281 | 281 |
|
282 |
$relsign = ''; |
|
283 | 282 |
$name_prefix = ''; |
284 | 283 |
$name_postfix = ''; |
285 | 284 |
|
286 | 285 |
$skiptags = array(); |
287 | 286 |
|
287 |
if(isset($taxonRelationType->representation_L10n_abbreviatedLabel)){ |
|
288 |
$relsign = $taxonRelationType->representation_L10n_abbreviatedLabel; |
|
289 |
} |
|
290 |
|
|
291 |
$reltype_representation = ''; |
|
292 |
if(isset($taxonRelationType->representation_L10n)){ |
|
293 |
$reltype_representation = $taxonRelationType->representation_L10n; |
|
294 |
} |
|
295 |
|
|
288 | 296 |
if(!$relsign) { |
289 | 297 |
|
298 |
$relsign = ''; |
|
290 | 299 |
switch ($reltype_uuid){ |
291 | 300 |
case UUID_HETEROTYPIC_SYNONYM_OF: |
292 | 301 |
case UUID_SYNONYM_OF: |
... | ... | |
387 | 396 |
} |
388 | 397 |
} |
389 | 398 |
//geneal output |
390 |
$out = '<span class="relation_sign">'.$relsign.'</span>'.$name_prefix . $nameHtml . $name_postfix . $name_relations_html; |
|
399 |
$out = '<span class="relation_sign" title="' . $reltype_representation . '">'.$relsign.'</span>'.$name_prefix . $nameHtml . $name_postfix . $name_relations_html;
|
|
391 | 400 |
$out = uuid_anchor($taxon->uuid, $out); |
392 | 401 |
|
393 | 402 |
RenderHints::popFromRenderStack(); |
Also available in: Unified diff
using abbreviated label for taxon relationships (fixes one problem in #2609)