Revision 64cfdac1
Added by Andreas Kohlbecker about 3 years ago
modules/cdm_dataportal/cdm_api/cdm_api.module | ||
---|---|---|
925 | 925 |
switch ($cdm_type_simple) { |
926 | 926 |
|
927 | 927 |
case 'TaxonNode': |
928 |
case 'TaxonNodeDto': |
|
928 | 929 |
$ws_base_uri = CDM_WS_TAXONNODE; |
929 | 930 |
case 'TaxonBase': |
930 | 931 |
case 'Taxon': |
modules/cdm_dataportal/cdm_api/webservice_uris.php | ||
---|---|---|
6 | 6 |
|
7 | 7 |
define('CDM_WS_PORTAL_GENERIC', 'portal/$0'); |
8 | 8 |
|
9 |
const CDM_WS_CLASSIFICATION = 'classification'; |
|
10 |
|
|
9 | 11 |
define('CDM_WS_AGENT', 'agent'); |
10 | 12 |
define('CDM_WS_PORTAL_AGENT', 'portal/agent'); |
11 | 13 |
define('CDM_WS_REFERENCE', 'reference'); |
modules/cdm_dataportal/cdm_dataportal.module | ||
---|---|---|
2664 | 2664 |
$nameStr = trim($nameStr); |
2665 | 2665 |
|
2666 | 2666 |
if ($nameStr) { |
2667 |
if(isset($taxonNodeDTO->status_symbol)){
|
|
2668 |
$nameStr = $taxonNodeDTO->status_symbol . ' ' . $nameStr;
|
|
2667 |
if(isset($taxonNodeDTO->nodeStatus->symbol)){
|
|
2668 |
$nameStr = $taxonNodeDTO->nodeStatus->symbol . ' ' . $nameStr;
|
|
2669 | 2669 |
} |
2670 | 2670 |
// Do not return short names for these. |
2671 | 2671 |
if ($taxonNodeDTO->unplaced || $taxonNodeDTO->excluded) { |
... | ... | |
2714 | 2714 |
|
2715 | 2715 |
if ($taxon->class == "Taxon" && isset($taxonNodes)) { |
2716 | 2716 |
foreach ($taxonNodes as $node) { |
2717 |
if (isset($node->classification)){ |
|
2718 |
if(is_object($node->classification)) { |
|
2719 |
if ($node->classification->uuid == $defaultTreeUuid) { |
|
2720 |
return TRUE; |
|
2721 |
} |
|
2717 |
if (isset($node->classificationUUID)){ |
|
2718 |
if ($node->classificationUUID == $defaultTreeUuid) { |
|
2719 |
return TRUE; |
|
2722 | 2720 |
} |
2723 |
else {
|
|
2724 |
if ($node->classification == $defaultTreeUuid) {
|
|
2725 |
return TRUE;
|
|
2726 |
}
|
|
2721 |
}
|
|
2722 |
else {
|
|
2723 |
if ($node->classification == $defaultTreeUuid) {
|
|
2724 |
return TRUE;
|
|
2727 | 2725 |
} |
2728 | 2726 |
} |
2729 | 2727 |
} |
modules/cdm_dataportal/includes/taxon-node.inc | ||
---|---|---|
44 | 44 |
'', |
45 | 45 |
null); |
46 | 46 |
|
47 |
if(isset($taxon_node->status)){
|
|
48 |
$state_label = strtolower($taxon_node->status);
|
|
47 |
if(isset($taxon_node->nodeStatus)){
|
|
48 |
$state_label = strtolower($taxon_node->nodeStatus->message_L10n);
|
|
49 | 49 |
if(isset($taxon_node->statusNote_L10n->text)){ |
50 | 50 |
$state_label .= ' <span class="status-note">(' . $taxon_node->statusNote_L10n->text . ')</span>'; |
51 | 51 |
} |
52 |
$classification = cdm_ws_get(CDM_WS_CLASSIFICATION, array($taxon_node->classificationUUID)); |
|
52 | 53 |
$status_markup_tokens[] = [ |
53 | 54 |
'status' => '<span class="' . html_class_attribute_ref($taxon_node) .'">' . $state_label . $annotations_and_sources['foot_note_keys'] . '%s</span>', // %s will be replaced by the $classification_markup or by '', |
54 |
'classification' => ' <span class="' . html_class_attribute_ref($taxon_node->classification) .'">[' . $taxon_node->classification->titleCache . ']</span>'
|
|
55 |
'classification' => ' <span class="' . html_class_attribute_ref($classification) .'">[' . $classification->titleCache . ']</span>'
|
|
55 | 56 |
]; |
56 | 57 |
} |
57 | 58 |
|
modules/cdm_dataportal/theme/cdm_dataportal.common.theme | ||
---|---|---|
60 | 60 |
$taxon_in_current_tree = FALSE; |
61 | 61 |
if (is_array($taxon_nodes)) { |
62 | 62 |
foreach ($taxon_nodes as $node) { |
63 |
if (get_current_classification_uuid() == $node->classification->uuid) {
|
|
63 |
if (get_current_classification_uuid() == $node->classificationUUID) {
|
|
64 | 64 |
$taxon_in_current_tree = TRUE; |
65 | 65 |
break; |
66 | 66 |
} |
Also available in: Unified diff
switching portal to real TaxonNodeDTOs