31 |
31 |
}
|
32 |
32 |
|
33 |
33 |
|
34 |
|
function palmweb_2_cdm_descriptionElementDistribution($descriptionElements) {
|
|
34 |
function palmweb_2_cdm_descriptionElementDistribution($descriptionElements, $enclosingTag = "span") {
|
35 |
35 |
|
36 |
36 |
$out = '';
|
37 |
37 |
$separator = ', ';
|
38 |
38 |
|
39 |
|
RenderHints::pushToRenderStack('descriptionElementDistribution');
|
40 |
|
RenderHints::setFootnoteListKey(UUID_DISTRIBUTION);
|
41 |
|
foreach($descriptionElements as $descriptionElement){
|
|
39 |
RenderHints::pushToRenderStack('descriptionElementDistribution');
|
|
40 |
RenderHints::setFootnoteListKey(UUID_DISTRIBUTION);
|
|
41 |
|
|
42 |
$itemCnt = 0;
|
|
43 |
foreach($descriptionElements as $descriptionElement){
|
42 |
44 |
// annotations as footnotes
|
43 |
45 |
// $annotationFootnoteKeys = theme('cdm_annotations_as_footnotekeys', $descriptionElement);
|
44 |
46 |
// // source references as footnotes
|
... | ... | |
50 |
52 |
// if($annotationFootnoteKeys && $sourcesFootnoteKeyList){
|
51 |
53 |
// $annotationFootnoteKeys .= $separator;
|
52 |
54 |
// }
|
53 |
|
$out .= $descriptionElement->area->representation_L10n . $annotationFootnoteKeys . $sourcesFootnoteKeyList . $separator;
|
54 |
|
}
|
55 |
|
|
|
55 |
$out .= '<' . $enclosingTag . ' class="DescriptionElement DescriptionElement-' . $descriptionElement->class .'">';
|
|
56 |
$out .= $descriptionElement->area->representation_L10n . $annotationFootnoteKeys . $sourcesFootnoteKeyList;
|
|
57 |
if(++$itemCnt < count($descriptionElements)){
|
|
58 |
$out .= $separator;
|
|
59 |
}
|
|
60 |
$out .= "</" . $enclosingTag . ">";
|
|
61 |
}
|
56 |
62 |
$taxonTrees = cdm_ws_get(CDM_WS_PORTAL_TAXONOMY);
|
57 |
63 |
foreach($taxonTrees as $taxonTree){
|
58 |
64 |
if ($taxonTree->uuid == variable_get('cdm_taxonomictree_uuid', FALSE)){
|
... | ... | |
60 |
66 |
break;
|
61 |
67 |
}
|
62 |
68 |
}
|
63 |
|
$out = substr($out, 0, strlen($out)-strlen($separator) );
|
64 |
69 |
|
65 |
70 |
$referenceCitation = '('.l('<span class="reference">World Checklist of Monocotyledons</span>', path_to_reference($reference->uuid), array("class"=>"reference"), NULL, NULL, FALSE ,TRUE).')';
|
66 |
71 |
|
... | ... | |
72 |
77 |
$sourceRefs = '<span class="sources">' . $sourceRefs . '</span>';
|
73 |
78 |
}
|
74 |
79 |
|
75 |
|
RenderHints::popFromRenderStack();
|
|
80 |
RenderHints::popFromRenderStack();
|
76 |
81 |
return $out. $sourceRefs ;
|
77 |
82 |
|
78 |
83 |
}
|
themechanges for complete test of palmweb taxon profile