Revision fbde64c6
Added by Andreas Kohlbecker over 13 years ago
themes/palmweb_2/template.php | ||
---|---|---|
90 | 90 |
|
91 | 91 |
} |
92 | 92 |
|
93 |
function palmweb_2_cdm_descriptionElementDistribution($descriptionElements) { |
|
94 |
|
|
95 |
$descriptions = ''; |
|
96 |
$separator = ', '; |
|
97 |
|
|
98 |
foreach($descriptionElements as $descriptionElement){ |
|
99 |
$descriptions .= $descriptionElement->area->representation_L10n . $separator; |
|
100 |
} |
|
101 |
$descriptions = substr($descriptions, 0, strlen($descriptions)-2); |
|
102 |
$taxonTrees = cdm_ws_get(CDM_WS_TAXONOMY); |
|
103 |
foreach($taxonTrees as $taxonTree){ |
|
104 |
if ($taxonTree -> uuid == variable_get('cdm_taxonomictree_uuid', FALSE)){ |
|
105 |
$reference = $taxonTree-> reference; |
|
106 |
break; |
|
107 |
} |
|
108 |
} |
|
109 |
$out = substr($out, 0, strlen($out)-strlen($separator) ); |
|
110 |
|
|
111 |
$referenceCitation = '('.l('<span class="reference">World Checklist of Monocotyledons</span>', path_to_reference($reference->uuid), array("class"=>"reference"), NULL, NULL, FALSE ,TRUE).')'; |
|
112 |
|
|
113 |
if($descriptions && strlen($descriptions) > 0 ){ |
|
114 |
$sourceRefs .= ' '.$referenceCitation; |
|
115 |
} |
|
116 |
|
|
117 |
if(strlen($sourceRefs) > 0){ |
|
118 |
$sourceRefs = '<span class="sources">' . $sourceRefs . '</span>'; |
|
119 |
} |
|
120 |
return $descriptions. $sourceRefs ; |
|
121 |
|
|
122 |
} |
|
123 |
|
|
93 | 124 |
|
94 | 125 |
/** |
95 | 126 |
* Sets the body-tag class attribute. |
Also available in: Unified diff
#1484 & #1483 : implement footnote framework into data portal & display multiple references for distributions as footnotes in portal