Project

General

Profile

« Previous | Next » 

Revision 58c1a035

Added by Katja Luther over 5 years ago

revert last changes

View differences:

modules/cdm_dataportal/includes/occurrences.inc
744 744
                    if (is_object($value) || is_array($value)) {
745 745
                        drupal_set_message("Unhandled type in compose_cdm_sequence() for field " . $field, "warning");
746 746
                    } else {
747
                        if (!is_array($value) && strpos($value, 'http:') !== false ){
748
                            //make links for urls
749
                            $value = l($value, $value, array('attributes' => array('target' => '_blank')));
750
                        }
751
                       _description_list_group_add($groups, cdm_occurrence_field_name_label($field), $value, NULL, 20, null, false);
747
//                        if (!is_array($value) && strpos($value, 'http:') !== false ){
748
//                            //make links for urls
749
//                            $value = l($value, $value, array('attributes' => array('target' => '_blank')));
750
//                        }
751
                       _description_list_group_add($groups, cdm_occurrence_field_name_label($field), $value, NULL, 20);
752 752
                    }
753 753
            }
754 754
        }
......
826 826
 * @ingroup compose
827 827
 */
828 828

  
829
function compose_cdm_specimen_or_observation_tree_entry($specimenOrObservation)
829
function compose_cdm_specimen_or_observation_tree_entry($specimen_or_observation)
830 830
{
831 831
    $exclude_occurrence_fields = &drupal_static(__FUNCTION__);
832 832
    if (!isset($exclude_occurrence_fields)) {
......
852 852
    }
853 853

  
854 854

  
855
    if (is_object($specimenOrObservation)) {
855
    if (is_object($specimen_or_observation)) {
856 856

  
857
        $type_label = $specimenOrObservation->recordBase;
858
        RenderHints::setFootnoteListKey($type_label . '-' . $specimenOrObservation->uuid);
857
        $type_label = $specimen_or_observation->recordBase;
858
        RenderHints::setFootnoteListKey($type_label . '-' . $specimen_or_observation->uuid);
859 859

  
860 860
        // collect typeStatus as label
861
        if (isset($specimenOrObservation->specimenTypeDesignations)) {
861
        if (isset($specimen_or_observation->specimenTypeDesignations)) {
862 862
            $type_status = array();
863
            foreach ($specimenOrObservation->specimenTypeDesignations as $typeDesignation) {
863
            foreach ($specimen_or_observation->specimenTypeDesignations as $typeDesignation) {
864 864
                if (isset($typeDesignation->typeStatus->representation_L10n)) {
865 865
                    $type_status[] = $typeDesignation->typeStatus->representation_L10n;
866 866
                }
......
870 870
            }
871 871
        }
872 872

  
873
        $title = $type_label . ': ' . $specimenOrObservation->titleCache;
873
        $title = $type_label . ': ' . $specimen_or_observation->titleCache;
874 874
        $items['data'] = $title;
875 875

  
876 876
        $groups = array();
877 877
        $items['children'] = $groups;
878 878
        $children_items = array();
879 879
        // --- add initialized fields
880
        foreach (get_object_vars($specimenOrObservation) as $field => $value) {
880
        foreach (get_object_vars($specimen_or_observation) as $field => $value) {
881 881
            $child_item = array();
882 882

  
883 883
            if (!in_array($field, $exclude_occurrence_fields) && ($value && (!is_object($value) || isset($value->class)))) {
......
914 914
                        );
915 915
                        $gallery_html = compose_cdm_media_gallerie(array(
916 916
                            'mediaList' => $value,
917
                            'galleryName' => $specimenOrObservation->label,
917
                            'galleryName' => $specimen_or_observation->label,
918 918
                            'maxExtend' => $gallery_settings['cdm_dataportal_media_maxextend'],
919 919
                            'cols' => $gallery_settings['cdm_dataportal_media_cols'],
920 920
                            'maxRows' => isset($gallery_settings['cdm_dataportal_media_maxRows']) ? isset($gallery_settings['cdm_dataportal_media_maxRows']) : null,
......
1054 1054
           // '#title' => $title,
1055 1055
            '#theme' => 'description_list',
1056 1056
            '#groups' => $groups,
1057
            '#attributes' => array('class' => html_class_attribute_ref($specimenOrObservation)),
1057
            '#attributes' => array('class' => html_class_attribute_ref($specimen_or_observation)),
1058 1058
        );
1059 1059
        $output = drupal_render($occurrence_elements);
1060 1060
        if (isset($gallery_html)){
1061 1061
            $output .= $gallery_html;
1062 1062
        }
1063
        if (!($specimenOrObservation->type == 'FieldUnit')){
1064
            $pathToSpecimen = path_to_specimen($specimenOrObservation->uuid);
1063
        if (!($specimen_or_observation->type == 'FieldUnit')){
1064
            $pathToSpecimen = path_to_specimen($specimen_or_observation->uuid);
1065 1065
            $output .=  l("detail page", $pathToSpecimen, array('attributes' => array('target' => '_blank')));
1066 1066
        }
1067 1067

  

Also available in: Unified diff