Revision 276f39f6
Added by Katja Luther over 5 years ago
modules/cdm_dataportal/cdm_dataportal.css | ||
---|---|---|
706 | 706 |
padding: 0; |
707 | 707 |
} |
708 | 708 |
|
709 |
#specimens ul { |
|
710 |
list-style-type: none; |
|
711 |
list-style-image: none; |
|
712 |
|
|
713 |
} |
|
714 |
#specimens .item-list li{ |
|
715 |
|
|
716 |
padding: 0 ; |
|
717 |
} |
|
718 |
|
|
709 | 719 |
#specimens .dna-sequence div { |
710 | 720 |
font-family: monospace; |
711 | 721 |
} |
modules/cdm_dataportal/includes/media.inc | ||
---|---|---|
346 | 346 |
$out .= '<tr>'; |
347 | 347 |
for ($c = 0; $c < $cols; $c++) { |
348 | 348 |
$media = array_shift($mediaList); |
349 |
|
|
350 |
if (isset($media->representations[0]->parts[0])) { |
|
349 |
$complete_media = cdm_ws_get(CDM_WS_MEDIA, $media->uuid); |
|
350 |
if (isset($complete_media->representations[0]->parts[0])) {
|
|
351 | 351 |
|
352 | 352 |
// |
353 | 353 |
// Find preferred representation. |
354 | 354 |
// |
355 |
$thumbnail_representations = cdm_preferred_media_representations($media, array( |
|
355 |
|
|
356 |
$thumbnail_representations = cdm_preferred_media_representations($complete_media, array( |
|
356 | 357 |
'image/jpg', |
357 | 358 |
'image/jpeg', |
358 | 359 |
'image/png', |
... | ... | |
365 | 366 |
// which only contains the thumbnail representation even if the height and width filters are not set. |
366 | 367 |
// --> #6970 |
367 | 368 |
// to get hold of the full resolution images we send a separate request : |
368 |
$complete_media = cdm_ws_get(CDM_WS_MEDIA, $media->uuid); |
|
369 |
// $complete_media = cdm_ws_get(CDM_WS_MEDIA, $media->uuid);
|
|
369 | 370 |
$full_size_representations = cdm_preferred_media_representations($complete_media, array( |
370 | 371 |
'image/jpg', |
371 | 372 |
'image/jpeg', |
modules/cdm_dataportal/includes/occurrences.inc | ||
---|---|---|
773 | 773 |
function create_specimen_array(array $specimenOrObservations){ |
774 | 774 |
$items_specimen = array(); |
775 | 775 |
$items = array(); |
776 |
$children = array(); |
|
776 |
|
|
777 | 777 |
//we need one more item to contain the items of one level (fieldunit, derivate data etc.) |
778 | 778 |
foreach ($specimenOrObservations as &$specimenOrObservation) { |
779 | 779 |
$items['data'] = $specimenOrObservation->listLabel; |
... | ... | |
824 | 824 |
'titleCache', |
825 | 825 |
'listLabel', |
826 | 826 |
'protectedTitleCache', |
827 |
'derivedUnitMedia', |
|
828 |
'created', |
|
829 |
'publish', |
|
830 |
'updated', |
|
831 | 827 |
'class', |
832 | 828 |
'uuid', |
833 | 829 |
'collectionDTO' |
... | ... | |
985 | 981 |
'galleryLinkUri' => NULL, |
986 | 982 |
)); |
987 | 983 |
|
988 |
@_description_list_group_add($groups, cdm_occurrence_field_name_label($field), $gallery_html); |
|
984 |
//@_description_list_group_add($groups, cdm_occurrence_field_name_label($field), $gallery_html);
|
|
989 | 985 |
break; |
990 | 986 |
|
991 | 987 |
case 'sources': |
... | ... | |
1055 | 1051 |
$min_max_markup = min_max_measure($value, 'absoluteElevation'); |
1056 | 1052 |
@_description_list_group_add($groups, cdm_occurrence_field_name_label('absoluteElevation'), $min_max_markup); |
1057 | 1053 |
} |
1058 |
if (isset($value->distanceToGround)) { |
|
1054 |
if (isset($value->distanceToGround) && $value->distanceToGround >0) {
|
|
1059 | 1055 |
$min_max_markup = min_max_measure($value, 'distanceToGround'); |
1060 | 1056 |
@_description_list_group_add($groups, cdm_occurrence_field_name_label('distanceToGround'), $min_max_markup); |
1061 | 1057 |
} |
1062 |
if (isset($value->distanceToWaterSurface)) { |
|
1058 |
if (isset($value->distanceToWaterSurface) && $value->distanceToWaterSurface > 0) {
|
|
1063 | 1059 |
$min_max_markup = min_max_measure($value, 'distanceToWaterSurface'); |
1064 | 1060 |
@_description_list_group_add($groups, cdm_occurrence_field_name_label('distanceToWaterSurface'), $min_max_markup); |
1065 | 1061 |
} |
... | ... | |
1138 | 1134 |
'#attributes' => array('class' => html_class_attribute_ref($specimenOrObservation)), |
1139 | 1135 |
); |
1140 | 1136 |
$output = drupal_render($occurrence_elements); |
1137 |
$output .= $gallery_html; |
|
1141 | 1138 |
|
1142 | 1139 |
|
1143 | 1140 |
|
modules/cdm_dataportal/includes/pages.inc | ||
---|---|---|
49 | 49 |
} |
50 | 50 |
|
51 | 51 |
$by_associatedtaxon_query = http_build_query($by_associatedtaxon_query_parameters); |
52 |
$cdm_dataportal_list_view = false; |
|
52 |
|
|
53 | 53 |
$ws_string = 'specimensOrObservation'; |
54 |
if ($cdm_dataportal_list_view){
|
|
54 |
if (variable_get('cdm_dataportal_specimen_derivate_tree')){
|
|
55 | 55 |
$ws_string .= "DTOs"; |
56 | 56 |
}else{ |
57 | 57 |
$ws_string .= "s"; |
... | ... | |
98 | 98 |
// --- get map service HTTP query parameters |
99 | 99 |
|
100 | 100 |
if (count($specimensOrObservations) > 0) { |
101 |
$occurrence_queryDto = cdm_ws_get(CDM_WS_GEOSERVICE_OCCURRENCEMAP, $taxon->uuid, $by_associatedtaxon_query); |
|
102 |
//the information about the points are already available |
|
103 |
$points = array(); |
|
104 |
foreach ($specimensOrObservations as &$occurrence) { |
|
105 |
if ($occurrence != null) { |
|
106 |
$points[] = $occurrence->uuid; |
|
101 |
if (count($specimensOrObservations) > 0) { |
|
102 |
$occurrence_queryDto = cdm_ws_get(CDM_WS_GEOSERVICE_OCCURRENCEMAP, $taxon->uuid, $by_associatedtaxon_query); |
|
103 |
|
|
104 |
$map_visibility = variable_get(SPECIMEN_MAP_VISIBILITY, SPECIMEN_MAP_VISIBILITY_DEFAULT); |
|
105 |
if($map_visibility == 'always' || |
|
106 |
variable_get(SPECIMEN_MAP_VISIBILITY, SPECIMEN_MAP_VISIBILITY_DEFAULT) == 'automatic' && |
|
107 |
(isset($occurrence_queryDto->fieldUnitPoints[0]) || isset($occurrence_queryDto->derivedUnitPoints[0])) |
|
108 |
) |
|
109 |
{ |
|
110 |
$occurrence_query = $occurrence_queryDto->occurrenceQuery; |
|
111 |
$legend_format_query = null; |
|
112 |
$distribution_query = NULL; |
|
113 |
$map_render_array = compose_map('specimens', $occurrence_query, $distribution_query, $legend_format_query, array()); |
|
107 | 114 |
} |
108 | 115 |
} |
109 |
|
|
110 |
$parameterFieldUnitUuids = 'fieldUnitUuidList=' . urlencode(implode(',', $points)); |
|
111 |
// $occurrence_queryDto = cdm_ws_get(CDM_WS_GEOSERVICE_OCCURRENCEMAP, $taxon->uuid, $by_associatedtaxon_query); |
|
112 |
|
|
113 |
$occurrence_queryDto = cdm_ws_get(CDM_WS_GEOSERVICE_OCCURRENCEMAP_FOR_FIELDUNITS, null, $parameterFieldUnitUuids); |
|
114 |
|
|
115 |
$map_visibility = variable_get(SPECIMEN_MAP_VISIBILITY, SPECIMEN_MAP_VISIBILITY_DEFAULT); |
|
116 |
if($map_visibility == 'always' || |
|
117 |
variable_get(SPECIMEN_MAP_VISIBILITY, SPECIMEN_MAP_VISIBILITY_DEFAULT) == 'automatic' && |
|
118 |
(isset($occurrence_queryDto->fieldUnitPoints[0]) || isset($occurrence_queryDto->derivedUnitPoints[0])) |
|
119 |
) |
|
120 |
{ |
|
121 |
$occurrence_query = $occurrence_queryDto->occurrenceQuery; |
|
122 |
$legend_format_query = null; |
|
123 |
$distribution_query = NULL; |
|
124 |
$map_render_array = compose_map('specimens', $occurrence_query, $distribution_query, $legend_format_query, array()); |
|
125 |
} |
|
126 | 116 |
} |
127 | 117 |
|
128 | 118 |
// ------------------------------------------------------- |
... | ... | |
160 | 150 |
10 // weight |
161 | 151 |
); |
162 | 152 |
} |
163 |
else if($cdm_dataportal_list_view){
|
|
153 |
else if(variable_get('cdm_dataportal_specimen_derivate_tree')){
|
|
164 | 154 |
$specimen_table = array( |
165 | 155 |
'#theme' => 'table', |
166 | 156 |
'#weight' => 2, |
modules/cdm_dataportal/settings.php | ||
---|---|---|
28 | 28 |
define('CDM_DATAPORTAL_ALL_FOOTNOTES', 0); |
29 | 29 |
define('CDM_DATAPORTAL_ANNOTATIONS_FOOTNOTES', 0); |
30 | 30 |
define('CDM_DATAPORTAL_LAST_VISITED_TAB_ARRAY_INDEX', 999); |
31 |
define('CDM_DATAPORTAL_SPECIMEN_DERIVATE_TREE', 0); |
|
31 | 32 |
|
32 | 33 |
/* annotationTypeKeys */ |
33 | 34 |
$annotationTypeKeys = array_keys(cdm_vocabulary_as_option(UUID_ANNOTATION_TYPE)); |
... | ... | |
2546 | 2547 |
'#default_value' => variable_get('cdm_dataportal_compressed_specimen_derivate_table_page_size', CDM_DATAPORTAL_COMPRESSED_SPECIMEN_DERIVATE_TABLE_PAGE_SIZE), |
2547 | 2548 |
); |
2548 | 2549 |
|
2549 |
$featureTrees = cdm_get_featureTrees_as_options(TRUE); |
|
2550 |
$form['taxon_specimens']['cdm_dataportal_specimen_derivate_tree'] = array( |
|
2551 |
'#type' => 'checkbox', |
|
2552 |
'#title' => t('Show specimen derivatives in a tree view'), |
|
2553 |
'#default_value' => variable_get('cdm_dataportal_specimen_derivate_tree', CDM_DATAPORTAL_SPECIMEN_DERIVATE_TREE), |
|
2554 |
'#description' => t('If checked, the specimen will be listed in a tree view.'), |
|
2555 |
); |
|
2556 |
|
|
2557 |
|
|
2558 |
$featureTrees = cdm_get_featureTrees_as_options(TRUE); |
|
2550 | 2559 |
$profile_feature_tree_uuid = variable_get(CDM_OCCURRENCE_FEATURETREE_UUID, UUID_DEFAULT_FEATURETREE); |
2551 | 2560 |
if(!isset($featureTrees['options'][$profile_feature_tree_uuid])) { |
2552 | 2561 |
$profile_feature_tree_uuid = UUID_DEFAULT_FEATURETREE; |
... | ... | |
2664 | 2673 |
'#default_value' => variable_get('cdm_dataportal_search_items_on_page', CDM_DATAPORTAL_SEARCH_ITEMS_ON_PAGE), |
2665 | 2674 |
'#description' => t('Number of results to display per page.'), |
2666 | 2675 |
); |
2667 |
|
|
2676 |
|
|
2668 | 2677 |
$form['search_settings'][SEARCH_RESULTS_SHOW_THUMBNAIL_CHECKBOX] = array( |
2669 | 2678 |
'#type' => 'checkbox', |
2670 | 2679 |
'#title' => t('Show the') . ' <i>' . t('Display image thumbnails') . '</i>' . t('button') . ':', |
Also available in: Unified diff
add the treeview as third variant for the specimen page