Project

General

Profile

« Previous | Next » 

Revision e89c1115

Added by Katja Luther about 5 years ago

details page for specimen with item list

View differences:

modules/cdm_dataportal/includes/occurrences.inc
337 337

  
338 338

  
339 339
    // only show uuid it the user is logged in
340
    if(user_is_logged_in() && ($a_idx = array_search('uuid', $exclude_occurrence_fields)) !== FALSE ) {
341
        unset($exclude_occurrence_fields[$a_idx]);
342
    }
340
 //   if(user_is_logged_in() && ($a_idx = array_search('uuid', $exclude_occurrence_fields)) !== FALSE ) {
341
  //      unset($exclude_occurrence_fields[$a_idx]);
342
  //  }
343 343

  
344 344
    if (!isset($derivatives)) {
345 345
        $derivatives = array();
......
692 692
        uasort($groups, 'element_sort');
693 693

  
694 694
        $occurrence_elements = array(
695
            '#title' => $title,
695
           // '#title' => $title,
696 696
            '#theme' => 'description_list',
697 697
            '#groups' => $groups,
698 698
            '#attributes' => array('class' => html_class_attribute_ref($specimen_or_observation)),
699 699
        );
700 700

  
701
        $derivatives[] = $occurrence_elements;
701
        $derivatives[] = drupal_render($occurrence_elements);
702 702
        // all footnotes which has been assembled so far (e.g. from typeDesignations) to here
703 703
        $foonote_li_elements = theme('cdm_footnotes', array('footnoteListKey' => RenderHints::getFootnoteListKey(), 'enclosingTag' => 'span'));
704 704
        if (!empty($foonote_li_elements)) {
modules/cdm_dataportal/includes/pages.inc
1244 1244
 *
1245 1245
 * @ingroup compose
1246 1246
 */
1247
function compose_cdm_specimen_page($specimen)
1247
function compose_cdm_specimen_page($specimen_uuid)
1248 1248
{
1249 1249
  drupal_set_title("Specimen Details");
1250 1250
  $render_array = array();
......
1257 1257
          '#markup' => $detail_html
1258 1258
      );
1259 1259
  }else{
1260
      $detail_html = compose_cdm_specimen_or_observation($specimen, true);
1261
      $render_array['markup'] =  $detail_html;
1260
      $specimen_table = array(
1261
          '#theme' => 'table',
1262
          '#weight' => 2,
1263
          // prefix attributes and rows with '#' to let it pass toF the theme function,
1264
          // otherwise it is handled as child render array
1265
          '#attributes' => array('class' => 'specimens'),
1266
          '#rows' => array(),
1267
      );
1268
      $specimen = compose_cdm_specimen_or_observation($specimen_uuid, true);
1269
      $renderArray = array(
1270
              '#theme' => 'item_list',
1271
              '#items' => array($specimen),
1272
              '#type' => 'ul');
1273
      $output = drupal_render($renderArray);
1274

  
1275
      $specimen_table['#rows'][] = array(
1276
              // An array of table rows. Every row is an array of cells, or an associative array
1277
              'data' => array($output),
1278
              'class' =>  array(
1279
                  'descriptionElement',
1280
                  'descriptionElement_IndividualsAssociation'
1281
              ),
1282
      );
1283

  
1284

  
1285
     // $detail_html = compose_cdm_specimen_or_observation($specimen_uuid, true);
1286
      $render_array['markup'] =  $specimen_table;
1287

  
1262 1288
  }
1263 1289
  RenderHints::popFromRenderStack();
1264 1290
  return $render_array;

Also available in: Unified diff