Revision 7965ef92
Added by Katja Luther over 5 years ago
modules/cdm_dataportal/includes/occurrences.inc | ||
---|---|---|
834 | 834 |
$children = array(); |
835 | 835 |
//we need one more item to contain the items of one level (fieldunit, derivate data etc.) |
836 | 836 |
foreach ($specimenOrObservations as &$specimenOrObservation) { |
837 |
$items['data'] = $specimenOrObservation->titleCache;
|
|
837 |
$items['data'] = $specimenOrObservation->listLabel;
|
|
838 | 838 |
$specimen = create_cdm_specimen_or_observation($specimenOrObservation); |
839 | 839 |
$children = array(); |
840 | 840 |
$child = array(); |
... | ... | |
878 | 878 |
'type', |
879 | 879 |
'derivationEvent', |
880 | 880 |
'taxonRelatedDerivedUnits', |
881 |
'label', |
|
881 | 882 |
'titleCache', |
883 |
'listLabel', |
|
882 | 884 |
'protectedTitleCache', |
883 | 885 |
'derivedUnitMedia', |
884 | 886 |
'created', |
... | ... | |
916 | 918 |
} |
917 | 919 |
|
918 | 920 |
$title = $type_label . ': ' . $specimenOrObservation->titleCache; |
919 |
$items['data'] = title; |
|
921 |
$items['data'] = $title;
|
|
920 | 922 |
|
921 | 923 |
$groups = array(); |
922 | 924 |
$items['children'] = $groups; |
... | ... | |
933 | 935 |
// } |
934 | 936 |
// break; |
935 | 937 |
/* ---- java.lang.Object --- */ |
936 |
case 'class': |
|
937 |
if ($value != '' /* FieldUnit' */) { |
|
938 |
// @_description_list_group_add($groups, cdm_occurrence_field_name_label($field), $value); |
|
939 |
} |
|
940 |
|
|
941 |
break; |
|
942 | 938 |
|
943 | 939 |
case 'markers': |
944 | 940 |
/* $dd_elements = array(); |
... | ... | |
973 | 969 |
|
974 | 970 |
case 'preferredStableUri': |
975 | 971 |
|
976 |
// @_description_list_group_add($groups, cdm_occurrence_field_name_label($field), array(array('#markup' => cdm_external_uri($value, false))));
|
|
972 |
@_description_list_group_add($groups, cdm_occurrence_field_name_label($field), array(array('#markup' => cdm_external_uri($value, false)))); |
|
977 | 973 |
break; |
978 | 974 |
|
979 | 975 |
case 'specimenTypeDesignations': |
... | ... | |
1014 | 1010 |
$dd_elements[$weight] = $taxon_html; |
1015 | 1011 |
} |
1016 | 1012 |
if (isset($determinationEvent->modifier)) { |
1017 |
$dd_elements[$weight] .= cdm_term_representation($determinationEvent->modifier); |
|
1018 | 1013 |
} |
1019 | 1014 |
if ($timeperiod_string) { |
1020 | 1015 |
$dd_elements[$weight] .= $glue . $timeperiod_string; |
... | ... | |
1031 | 1026 |
*/ |
1032 | 1027 |
break; |
1033 | 1028 |
|
1034 |
case 'descriptions': |
|
1035 |
/* |
|
1036 |
$occurrence_featureTree = cdm_get_occurrence_featureTree(); |
|
1037 |
$dd_elements = array(); |
|
1038 |
|
|
1039 |
foreach ($value as $description) { |
|
1040 |
$description = cdm_ws_get(CDM_WS_PORTAL_DESCRIPTION, $description->uuid); |
|
1041 |
// if($description->imageGallery == TRUE) { |
|
1042 |
// continue; |
|
1043 |
// } |
|
1044 |
$elements_by_feature = _mergeFeatureTreeDescriptions($occurrence_featureTree->root->childNodes, $description->elements); |
|
1045 |
$description_render_elements = _block_get_renderable_array(make_feature_block_list($elements_by_feature, null)); |
|
1046 |
$dd_elements[] = $description_render_elements; |
|
1047 |
if ($description->isImageGallery) { |
|
1048 |
$mediaList = array(); |
|
1049 |
if (is_array($description->elements)) { |
|
1050 |
$mediaList = $description->elements; |
|
1051 |
} |
|
1052 |
$gallery_html = ''; |
|
1053 |
if (count($mediaList) > 0) { |
|
1054 |
$gallery_settings = getGallerySettings(CDM_DATAPORTAL_SPECIMEN_GALLERY_NAME); |
|
1055 |
$captionElements = array( |
|
1056 |
'#uri' => t('open media'), |
|
1057 |
); |
|
1058 |
|
|
1059 |
$gallery_html = compose_cdm_media_gallerie(array( |
|
1060 |
'mediaList' => $mediaList, |
|
1061 |
'galleryName' => $gallery_name, |
|
1062 |
'maxExtend' => $gallery_settings['cdm_dataportal_media_maxextend'], |
|
1063 |
'cols' => $gallery_settings['cdm_dataportal_media_cols'], |
|
1064 |
'maxRows' => isset($gallery_settings['cdm_dataportal_media_maxRows']) ? isset($gallery_settings['cdm_dataportal_media_maxRows']) : null, |
|
1065 |
'captionElements' => $captionElements, |
|
1066 |
'mediaLinkType' => 'LIGHTBOX', |
|
1067 |
'alternativeMediaUri' => NULL, |
|
1068 |
'galleryLinkUri' => NULL, |
|
1069 |
)); |
|
1070 |
} |
|
1071 |
|
|
1072 |
} |
|
1073 |
} |
|
1074 |
|
|
1075 |
@_description_list_group_add($groups, cdm_occurrence_field_name_label($field), $dd_elements); |
|
1076 |
@_description_list_group_add($groups, cdm_occurrence_field_name_label($field), $gallery_html); |
|
1077 |
*/ |
|
1078 |
break; |
|
1029 |
case 'listOfMedia': |
|
1030 |
$gallery_settings = getGallerySettings(CDM_DATAPORTAL_SPECIMEN_GALLERY_NAME); |
|
1031 |
$captionElements = array( |
|
1032 |
'#uri' => t('open media'), |
|
1033 |
); |
|
1034 |
$gallery_html = compose_cdm_media_gallerie(array( |
|
1035 |
'mediaList' => $value, |
|
1036 |
'galleryName' => $specimenOrObservation->label, |
|
1037 |
'maxExtend' => $gallery_settings['cdm_dataportal_media_maxextend'], |
|
1038 |
'cols' => $gallery_settings['cdm_dataportal_media_cols'], |
|
1039 |
'maxRows' => isset($gallery_settings['cdm_dataportal_media_maxRows']) ? isset($gallery_settings['cdm_dataportal_media_maxRows']) : null, |
|
1040 |
'captionElements' => $captionElements, |
|
1041 |
'mediaLinkType' => 'LIGHTBOX', |
|
1042 |
'alternativeMediaUri' => NULL, |
|
1043 |
'galleryLinkUri' => NULL, |
|
1044 |
)); |
|
1045 |
|
|
1046 |
@_description_list_group_add($groups, cdm_occurrence_field_name_label($field), $gallery_html); |
|
1047 |
break; |
|
1079 | 1048 |
|
1080 | 1049 |
case 'sources': |
1081 | 1050 |
/* |
... | ... | |
1092 | 1061 |
|
1093 | 1062 |
|
1094 | 1063 |
case 'collection': |
1095 |
/* |
|
1064 |
|
|
1096 | 1065 |
$sub_dl_groups = array(); |
1097 | 1066 |
@_description_list_group_add($sub_dl_groups, cdm_occurrence_field_name_label('code'), $value->code, NULL, 1); |
1098 | 1067 |
@_description_list_group_add($sub_dl_groups, cdm_occurrence_field_name_label('codeStandard'), $value->codeStandard, NULL, 2); |
... | ... | |
1107 | 1076 |
array('#theme' => 'description_list', '#groups' => $sub_dl_groups) |
1108 | 1077 |
) |
1109 | 1078 |
); |
1110 |
*/ |
|
1079 |
|
|
1111 | 1080 |
break; |
1112 | 1081 |
|
1113 | 1082 |
case 'storedUnder': |
Also available in: Unified diff
add item list to table resolves the problem of rendering the description items