Project

General

Profile

Revision 4186a152

ID4186a152b912e74c29a5f3a3bd75e8003727287e
Parent a1ce57ce
Child e0be41dc, f01e2586

Added by Katja Luther almost 2 years ago

ref #7755: filter import sources for occurrences

View differences:

modules/cdm_dataportal/includes/occurrences.inc
529 529

  
530 530
                        break;
531 531
                    case 'sources':
532
                        $dd_elements = array();
533
                        foreach ($value as $identifiable_source) {
534
                            $dd_elements[] = theme('cdm_OriginalSource', array('source' => $identifiable_source));
532
                        $annotations_and_sources = handle_annotations_and_sources(
533
                            $specimen_or_observation,
534
                            array(
535
                                'sources_as_content' => true,
536
                                'link_to_name_used_in_source' => 1,
537
                                'link_to_reference' => 0,
538
                                'add_footnote_keys' => 0
539
                            ),
540
                            NULL,
541
                            ''
542
                        );
543
                        if(!empty($annotations_and_sources['source_references'])){
544
                            @_description_list_group_add($groups, t('Sources') . ':', join(', ', $annotations_and_sources['source_references']),'',12 );
535 545
                        }
536
                        @_description_list_group_add($groups, cdm_occurrence_field_name_label($field), $dd_elements);
537 546
                        break;
538 547

  
539 548

  
......
549 558
                                }
550 559

  
551 560
                                $originals[] = markup_to_render_array(l($description . $original->titleCache, $pathToSpecimen, array('attributes' => array('target' => '_blank'))));
552
                                @_description_list_group_add($groups, t('Originals') . ':',
561
                                if ($original->class == 'FieldUnit'){
562
                                    $label = t('Field data');
563
                                }else{
564
                                    $label = t('Derived from');
565
                                }
566
                                @_description_list_group_add($groups, $label . ':',
553 567
                                    $originals,
554
                                    '', 1);
568
                                    '', 13);
555 569
                            }
556 570
                        }
557 571
                        break;
......
667 681
                        if (is_object($value) || is_array($value)) {
668 682
                            drupal_set_message("Unhandled type in compose_cdm_specimen_or_observation() for field " . $field, "warning");
669 683
                        } else {
670
                            _description_list_group_add($groups, cdm_occurrence_field_name_label($field), $value);
684
                            _description_list_group_add($groups, cdm_occurrence_field_name_label($field), cdm_occurrence_field_name_label($value));
671 685
                        }
672 686

  
673 687
                }

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)