Project

General

Profile

« Previous | Next » 

Revision ae177dac

Added by Andreas Kohlbecker over 4 years ago

ref #8403 types specimens as expandable derivate tree in name page finally working

View differences:

modules/cdm_dataportal/cdm_dataportal.module
1976 1976

  
1977 1977
    // type designations
1978 1978
    $type_designations_render_array = compose_type_designations($taxon_name->uuid, true);
1979

  
1980
    $content['type_designations'] = $type_designations_render_array['type_designations'];
1981
    $content['map'] = $type_designations_render_array['map'];
1979
    $content = array_merge($content, $type_designations_render_array);
1982 1980
    // registrations
1983 1981
    $registrationDTOs= cdm_ws_fetch_all(CDM_WS_REGISTRATION_DTO,  array('nameUuid' => $taxon_name_uuid));
1984 1982
    if(isset($registrationDTOs) && count($registrationDTOs ) > 0 ){
modules/cdm_dataportal/includes/maps.inc
266 266

  
267 267
  _add_js_openlayers_map($map_id, $map_settings, $event_listeners, $resizable);
268 268

  
269
  $out = '<div id=""openlayers-container-' . $map_id . '" class="openlayers-container openlayers_width ui-widget-content" style="width: 100%;">';
269
  $out = '<div id="openlayers-container-' . $map_id . '" class="openlayers-container openlayers_width ui-widget-content" style="width: 100%;">';
270 270
  $out .= '<div id="openlayers-map-' . $map_id . '" class="smallmap" style="width:100%; height:100%; margin: 10px;"';
271 271

  
272 272
  // Additional query parameters as set in the data portal admin section.
modules/cdm_dataportal/includes/name.inc
841 841
 * @param $taxon_name_uuid
842 842
 * @param $show_specimen_details
843 843
 * @return array
844
 *    A drupal render array wtit the following elements:
844
 *    A drupal render array with the following elements:
845 845
 *    - 'type_designations'
846 846
 *    - 'map'
847
 *    - 'specimens'
847 848
 *
848
 * @throws Exception
849 849
 * @ingroup compose
850 850
 */
851 851
function compose_type_designations($taxon_name_uuid, $show_specimen_details = false)
......
867 867
    $fileunit_dtos = array();
868 868
    foreach($type_designations as $type_designation){
869 869
      if(isset($type_designation->typeSpecimen)) {
870
        $fileunit_dtos[] = cdm_ws_get(CDM_WS_PORTAL_OCCURRENCE, array($type_designation->typeSpecimen->uuid));
870
        $fileunit_dtos[] = cdm_ws_get(CDM_WS_OCCURRENCE_FILEUNIT_DTO, array($type_designation->typeSpecimen->uuid));
871 871
      }
872 872
    }
873 873
    if(count($fileunit_dtos) > 0) {
modules/cdm_dataportal/includes/occurrences.inc
1189 1189
  $tableId = "specimen_tree_table";
1190 1190
  $specimen_table = array(
1191 1191
    '#theme' => 'table',
1192
    '#weight' => 2,
1193 1192
    // prefix attributes and rows with '#' to let it pass toF the theme function,
1194 1193
    // otherwise it is handled as child render array
1195 1194
    '#attributes' => array(
modules/cdm_dataportal/includes/pages.inc
122 122
    }
123 123
    else if(variable_get('cdm_dataportal_specimen_derivate_tree')){
124 124
      $render_array['specimen_list'] = compose_specimen_table_top_down($fieldUnitDTOs);
125
      $render_array['specimen_list']['#weight'] = 2;
125 126
    } else {
126 127
      $specimen_table = compose_specimens_table_bottom_up($specimensOrObservations);
127 128

  

Also available in: Unified diff