Project

General

Profile

« Previous | Next » 

Revision 6f5c7f2a

Added by Andreas Kohlbecker over 9 years ago

fixing #1933 (DescriptionElementBases do not show annotation footnotes in flora malesiana portal)

View differences:

7.x/modules/cdm_dataportal/cdm_dataportal.module
1015 1015
}
1016 1016

  
1017 1017
/**
1018
 * Wrapps the given $html string into a reder array suitable for drupal_render()
1018
 * Wraps the given $html string into a render array suitable for drupal_render()
1019 1019
 *
1020 1020
 * @param string $html
1021 1021
 *   the html string, see
......
1028 1028
 *   A render array
1029 1029
 *
1030 1030
 */
1031
function markup_to_render_array($html, $weight = 0) {
1032
  return array(
1033
          '#markup' => $html,
1034
          '#weight' => $weight,
1035
      );
1031
function markup_to_render_array($html, $weight = FALSE) {
1032
  $render_array = array(
1033
    '#markup' => $html
1034
  );
1035
  if (is_numeric($weight)) {
1036
    $render_array['#weight'] = $weight;
1037
  }
1038
  return $render_array;
1036 1039
}
1037 1040

  
1038 1041
/**
7.x/modules/cdm_dataportal/includes/descriptions.inc
197 197
 *     A CDM DescriptionElement instance
198 198
 * @param $separator
199 199
 *     Optional parameter. The separator string to concatenate the footnote ids, default is ','
200
 * @param $footnote_list_key_suggestion
200 201
 * @return String
201 202
 *    The foot note keys
202 203
 */
......
228 229
  $footnoteKeyListStr = '';
229 230
  asort($footNoteKeys);
230 231
  foreach ($footNoteKeys as $footNoteKey) {
231
    $footnoteKeyListStr .= theme('cdm_footnote_key', array('footnoteKey' => $footNoteKey, 'separator' => ($footnoteKeyListStr ? $separator : '')));
232
    $footnoteKeyListStr .= theme('cdm_footnote_key',
233
      array(
234
        'footnoteKey' => $footNoteKey,
235
        'separator' => ($footnoteKeyListStr ? $separator : '')));
232 236
  }
233 237
  return $footnoteKeyListStr;
234 238
}
7.x/modules/cdm_dataportal/settings.php
399 399
/**
400 400
 * preliminary mock implementation
401 401
 *
402
 * these settings only apply to feature blocks which do not have a special rendering
403
 * the specially handled features (e.g.: Distribution,CommonNames) may make use of the
404
 * 'special' element of the settings
405
 *
402 406
 *  "$feature uuid": {
403 407
 *    "as_list": div|ul|ol|dl,                       // div: not as list, ul: as bullet list, ol: as numbered list, dl:as definition list; will be used in compose_cdm_feature_block_elements() as $enclosing_tag
404 408
 *    "link_to_reference": boolean,                 // render the reference as link, ignored if the element is NOT a DescriptionElementSource
......
412 416
 *    "references_inline": boolean
413 417
 *    "sort_elements": SORT_ASC, SORT_DESC, NULL    // whether and how to sort the elements
414 418
 *    "element_tag": span | div                     // only applies if "as_list" == 'div'
419
 *    'special' => array()                          // can be used to extend with special settings for specialized rendering like for distributions
415 420
 *  }
416 421
 */
417 422
function get_feature_block_settings($feature_uuid = 'DEFAULT'){
7.x/modules/cdm_dataportal/theme/cdm_dataportal.descriptions.theme
74 74
      $feature_name = cdm_term_representation($node->feature, 'Unnamed Feature');
75 75

  
76 76
      $block = feature_block($feature_name, $node->feature);
77
      $block->content = array();
78
      $block_content_weight = 0;
77 79

  
78 80
      /*
79 81
       * Content/DISTRIBUTION.
......
81 83

  
82 84
      if ($node->feature->uuid == UUID_DISTRIBUTION) {
83 85
        $block = compose_feature_block_distribution($taxon, $node->descriptionElements, $node->feature);
84

  
85 86
      }
86 87
      /*
87 88
       * Content/COMMON_NAME.
88 89
       */
89
      elseif ($node->feature->uuid == UUID_COMMON_NAME) {
90
      else if ($node->feature->uuid == UUID_COMMON_NAME) {
90 91
        $common_names_render_array = compose_cdm_common_names($node->descriptionElements, $node->feature);
91
        $block->content .= drupal_render($common_names_render_array);
92
        $block->content[] = $common_names_render_array;
92 93
      }
93 94

  
94 95
      /*
......
104 105
          if(isset($taxon) ) {
105 106
            $taxon_uuid = $taxon->uuid;
106 107
          }
107
          $block->content .= theme('cdm_descriptionElements', array(
108
            'descriptionElements' => $node->descriptionElements,
109
            'feature' => $node->feature,
110
            'taxon_uuid' => $taxon_uuid,
111
          ));
108
          $block->content[] = compose_cdm_descriptionElements($node->descriptionElements, $node->feature, $taxon_uuid);
112 109
        }
113 110

  
114 111
          // Content/ALL OTHER FEATURES/Subordinate Features
115 112
          // subordinate features are printed inline in one floating text,
116
          // it is expected hat supordinate features can "contain" TextData,
113
          // it is expected hat subordinate features can "contain" TextData,
117 114
          // Qualitative- and Qualitative- DescriptioneElements
118 115
          if (isset($node->childNodes[0])) {
119 116

  
120 117
          // TODO support more than one level of children.
121
          // can this be solved by resursively calling this very function?
118
          // can this be solved by recursively calling this function?
122 119
          // @see http://dev.e-taxonomy.eu/trac/ticket/2393
123 120
          $text = '';
124 121
          foreach ($node->childNodes as $child) {
......
126 123
            if (isset($child->descriptionElements) && is_array($child->descriptionElements)) {
127 124
              foreach ($child->descriptionElements as $element) {
128 125

  
126
                //TODO it woud be better if we could use compose_cdm_descriptionElements() directly instead of the below stuff
127

  
129 128
                if (is_array($element->media)) {
130 129
                  // Append media of supordinate elements to list of main
131 130
                  // feature.
......
134 133

  
135 134
                switch ($element->class) {
136 135
                  case 'TextData':
137
                    // TODO use theme_cdm_descriptionElementTextData()
136
                    // FIXME use theme_cdm_descriptionElementTextData()
138 137
                    $out_child_elements = str_replace("\n", "<br/>", $element->multilanguageText_L10n->text);
139 138
                    $out_child_elements = str_replace($child->feature->titleCache, '<em>' . $child->feature->representation_L10n . '</em>', $out_child_elements);
140 139
                    break;
......
153 152
              $out_child_elements = '';
154 153
            }
155 154
          }
156
          $block->content .= $text;
157
          $block->content .=  compose_feature_media_gallery($node, $media_list, $gallery_settings);
155
          $block->content[] = markup_to_render_array($text);
156
          $block->content[] = compose_feature_media_gallery($node, $media_list, $gallery_settings);
158 157

  
159 158

  
160
          /*
161
           * Footnotes for the feature block
162
           */
163
          $block->content .= theme('cdm_footnotes', array('footnoteListKey' => $node->feature->uuid));
164
          $block->content .= theme('cdm_annotation_footnotes', array('footnoteListKey' => $node->feature->uuid));
165
        }
159
          }
160
        /*
161
         * Footnotes for the feature block
162
         */
163
        $block->content[] = markup_to_render_array(theme('cdm_footnotes', array('footnoteListKey' => $node->feature->uuid)));
164
        $block->content[] = markup_to_render_array(theme('cdm_annotation_footnotes', array('footnoteListKey' => $node->feature->uuid)));
166 165
      }
167 166

  
168 167

  
......
170 169
        array(
171 170
          'elements' => array(
172 171
            '#block' => $block,
173
            '#children' => $block->content,
172
            '#children' => drupal_render($block->content),
174 173
          ),
175 174
        )
176 175
      );
......
269 268

  
270 269

  
271 270
    if ($text_data_out_array && variable_get(DISTRIBUTION_TEXTDATA_DISPLAY_ON_TOP, 0)) {
272
      $block->content .= compose_cdm_feature_block_elements(
271
      $block->content[] = compose_cdm_feature_block_elements(
273 272
        $text_data_out_array,
274 273
        $feature,
275 274
        $text_data_glue,
......
284 283
      $distribution_map_query_parameters = $descriptionElements['DistributionInfoDTO']->mapUriParams;
285 284
    }
286 285
    $map_render_element = compose_distribution_map($taxon, $distribution_map_query_parameters);
287
    $block->content .= $map_render_element['#markup'];
286
    $block->content[] = $map_render_element;
288 287

  
289 288
    // --- tree or list
290 289
    $dto_out_array = array();
......
311 310

  
312 311
      }
313 312
      //
314
      $block->content .= compose_cdm_feature_block_elements(
313
      $block->content[] = compose_cdm_feature_block_elements(
315 314
        $dto_out_array,
316 315
        $feature,
317 316
        $distribution_glue,
......
322 321

  
323 322
    // --- TextData at the bottom
324 323
    if ($text_data_out_array && !variable_get(DISTRIBUTION_TEXTDATA_DISPLAY_ON_TOP, 0)) {
325
      $block->content .= compose_cdm_feature_block_elements(
324
      $block->content[] = compose_cdm_feature_block_elements(
326 325
        $text_data_out_array,
327 326
        $feature,
328 327
        $text_data_glue,
......
331 330
      );
332 331
    }
333 332

  
334
    $block->content .= theme('cdm_footnotes', array('footnoteListKey' => UUID_DISTRIBUTION));
335
    $block->content .= theme('cdm_annotation_footnotes', array('footnoteListKey' => UUID_DISTRIBUTION));
333
    $block->content[] = markup_to_render_array(theme('cdm_footnotes', array('footnoteListKey' => UUID_DISTRIBUTION)));
334
    $block->content[] = markup_to_render_array(theme('cdm_annotation_footnotes', array('footnoteListKey' => UUID_DISTRIBUTION)));
336 335

  
337 336
    return $block;
338 337
  }
......
417 416
  $out .= join($elements, $glue) ;
418 417

  
419 418
  $out .= '</' . $enclosing_tag . '>';
420
  return $out;
419
  return markup_to_render_array($out);
421 420
}
422 421

  
423 422

  
......
604 603
  $element = $variables['element'];
605 604
  $feature_uuid = $variables['feature_uuid'];
606 605
  $asListElement = $variables['asListElement']; // TODo remove and replace by $feature_block_settings['as_list']
606
  $footnote_list_key_suggestion = $feature_uuid;
607 607

  
608 608
  $sourceRefs = '';
609 609
  $out = '';
610
  $name_used_in_source = '';
610 611

  
611 612
  // FIXME $feature_block_settings should be passed as parameter!!!!!
612 613
  $feature_block_settings = get_feature_block_settings($feature_uuid);
614
  $bibliography_settings = get_bibliography_settings();
615
  $do_references_inline = $feature_block_settings['references_inline'] && $bibliography_settings['enabled'] !== 1;
613 616

  
614 617
  // FIXME remove this hack ---------------------------
615 618
  $default_theme = variable_get('theme_default', NULL);
......
617 620
    || $default_theme == 'flore_afrique_centrale' || $default_theme == 'flora_malesiana' || $default_theme == 'flore_gabon' ){
618 621
    $asListElement = $feature_block_settings['as_list'] == 'ul';
619 622
  }
620

  
621 623
  // --------------------------------------------------
622 624

  
623 625
  $description = '';
......
625 627
    $description = str_replace("\n", "<br/>", $element->multilanguageText_L10n->text);
626 628
  }
627 629

  
628
  // annotations footnotes.
629
  $annotation_fkeys = theme('cdm_annotations_as_footnotekeys',
630
    array(
631
      'cdmBase_list' => $element,
632
      'footnote_list_key' => $feature_uuid,
633
    )
634
  );
635

  
636 630
  // original sources
637
  if (isset($element->sources) && is_array($element->sources) && count($element->sources) > 0) {
631
  if($do_references_inline) {
638 632
    foreach ($element->sources as $source) {
639

  
640 633
      // ---------------------------------------------------------------------------
641 634
      // CUSTOM CODE (2) from cichorieae theme,
642 635
      // use nomref web service to combine reference with microreference, other way to combine these?
......
649 642
          ));
650 643
        $referenceCitation = $referenceCitation->String;
651 644

  
652
      // END CUSTOM CODE (2)
653
      // ---------------------------------------------------------------------------
645
        // END CUSTOM CODE (2)
646
        // ---------------------------------------------------------------------------
654 647
      } else {
655 648
        $referenceCitation = theme('cdm_OriginalSource', array('source' => $source));
656 649
      }
......
667 660
      }
668 661

  
669 662
      // link the nameUsedInSource to the according name page
670
      $name_used_in_source_link_to_show = '';
671 663
      // Do a link to name page.
672 664
      if (isset($source->nameUsedInSource->uuid) && isset($source->nameUsedInSource->titleCache)) {
673 665
        // it is a DescriptionElementSource
674 666
        if($feature_block_settings['link_to_name_used_in_source']){
675
          $name_used_in_source_link_to_show = l(
667
          $name_used_in_source = l(
676 668
            $source->nameUsedInSource->titleCache,
677 669
            path_to_name($source->nameUsedInSource->uuid),
678 670
            array(
679
            'attributes' => array(),
680
            'absolute' => TRUE,
681
            'html' => TRUE,
682
          ));
671
              'attributes' => array(),
672
              'absolute' => TRUE,
673
              'html' => TRUE,
674
            ));
683 675

  
684 676
        } else {
685
          $name_used_in_source_link_to_show = $source->nameUsedInSource->titleCache;
677
          $name_used_in_source = $source->nameUsedInSource->titleCache;
686 678
        }
687 679
      }
688 680
      else if (isset($source->nameUsedInSource->originalNameString) && strlen($source->nameUsedInSource->originalNameString) > 0) {
689 681
        // TODO does this make sense? is $source->nameUsedInSource->originalNameString different from $source->nameUsedInSource->titleCache ?
690 682
        // it is NOT a DescriptionElementSource
691 683
        // Show a text without link.
692
        $name_used_in_source_link_to_show = $source->nameUsedInSource->originalNameString;
684
        $name_used_in_source = $source->nameUsedInSource->originalNameString;
693 685
      }
686
    } // END of loop over sources
687

  
688
    // annotations footnotes separate.
689
    $foot_note_keys = theme('cdm_annotations_as_footnotekeys',
690
      array(
691
        'cdmBase_list' => $element,
692
        'footnote_list_key' => $footnote_list_key_suggestion,
693
      )
694
    );
694 695

  
695
      // final composition of the TextData element
696
      // FIXME this should move below after the end if (isset($element->sources) {...} and will replace the else
697
      if ($asListElement) {
698

  
699
       $out = '<li class="descriptionText DescriptionElement">';
700
        // Adding ":" if necessary.
701
        if (!empty($name_used_in_source_link_to_show)) {
702
          if ( (!empty($description)|| !empty($sourceRefs)) && $feature_uuid != UUID_CHROMOSOMES_NUMBERS) {
703
            $out .= $name_used_in_source_link_to_show . ': ';
704
          } else {
705
            $out .= $name_used_in_source_link_to_show . ' ';
706
          }
707
        }
708
        $out .= $description . $sourceRefs . $annotation_fkeys . '</li>';
709
      }
710
      else {
711
        if ($name_used_in_source_link_to_show) {
712
          $name_used_in_source_link_to_show = ' (name in source: ' . $name_used_in_source_link_to_show . ')';
713
        }
696
  } // END of references inline
697
  else {
698
    $foot_note_keys = cdm_create_description_element_footnotes($element, ',', $footnote_list_key_suggestion);
699
  }
714 700

  
715
        $out = '<span class="DescriptionElement DescriptionElement-'. $element->class . '
716
        ' .  html_class_attribute_ref($element)  . '">'
717
          . $description . $sourceRefs . $name_used_in_source_link_to_show . $annotation_fkeys . '</span>';
701
  if ($asListElement) {
702

  
703
    $out = '<li class="DescriptionElement DescriptionElement-' . $element->class . '
704
        ' .  html_class_attribute_ref($element)  . '">';
705
    // Adding ":" if necessary.
706
    if (!empty($name_used_in_source)) {
707
      if ( (!empty($description)|| !empty($sourceRefs)) && $feature_uuid != UUID_CHROMOSOMES_NUMBERS) {
708
        $out .= $name_used_in_source . ': ';
709
      } else {
710
        $out .= $name_used_in_source . ' ';
718 711
      }
719 712
    }
720
  } // END of if (isset($element->sources)
721

  
713
    $out .= $description . $sourceRefs . $foot_note_keys . '</li>';
714
  }
722 715
  else {
723
    // If no sources, print the description.
724
    $out = '<span class="' . html_class_attribute_ref($element) . '"> '
725
      . $description . $annotation_fkeys . '</span>';
716
    if ($name_used_in_source) {
717
      $name_used_in_source = ' (name in source: ' . $name_used_in_source . ')';
718
    }
719

  
720
    $out = '<span class="DescriptionElement DescriptionElement-' . $element->class . '
721
        ' .  html_class_attribute_ref($element)  . '">'
722
      . $description . $sourceRefs . $name_used_in_source . $foot_note_keys . '</span>';
726 723
  }
727 724

  
728 725
  return $out;
......
741 738
 *
742 739
 * @ingroup compose
743 740
 */
744
function compose_cdm_common_names($elements, $feature) {
741
function compose_cdm_common_names($elements, $feature, $weight = FALSE) {
745 742

  
746 743
  $common_name_out = '';
747 744
  $common_name_feature_elements = array();
......
799 796
    } // End of loop over set of elements per language area
800 797

  
801 798

  
802
    $common_name_out .= compose_cdm_feature_block_elements(
803
        $common_name_feature_elements,
804
        $feature,
805
        '; ',
806
        FALSE,
807
        'div'
799
    $common_name_feature_elements_render_array = compose_cdm_feature_block_elements(
800
      $common_name_feature_elements,
801
      $feature,
802
      '; ',
803
      FALSE,
804
      'div'
808 805
      );
809

  
806
    $common_name_out .= $common_name_feature_elements_render_array['#markup'];
810 807

  
811 808
  }
812 809

  
......
835 832

  
836 833
  return  markup_to_render_array(
837 834
    '<div class="common_names_as_common_names">' . $common_name_out . '</div>'
838
    .'<div class="common_names_as_text_data">' . $common_name_out_text_data . '</div>'
839
    .$footnotes
835
    .'<div class="common_names_as_text_data">' . $common_name_out_text_data['#markup'] . '</div>'
836
    .$footnotes,
837
    $weight
840 838
  );
841 839
}
842 840

  
......
845 843
 *
846 844
 * Usually these are of a specific feature type.
847 845
 *
848
 * @param array $variables
849
 *   An associative array containing:
850
 *   - array of descriptionElements which belong to the same feature.
851
 *     These descriptions elements of a Description must be ordered by the chosen feature tree by
852
 *     calling the function _mergeFeatureTreeDescriptions().
853
 *     @see _mergeFeatureTreeDescriptions()
854
 *   - featureUuid: currently unused, according code disabled
855
 *   - taxon_uuid: only used for ordered distributions (will be removed!)
846
 * @param $descriptionElements
847
 *   array of descriptionElements which belong to the same feature.
848
 *   These descriptions elements of a Description must be ordered by the chosen feature tree by
849
 *   calling the function _mergeFeatureTreeDescriptions().
850
 *   @see _mergeFeatureTreeDescriptions()
851
 *  @param  $feature_uuid
856 852
 *
857
 * @ingroup themeable
853
 * @ingroup compose
858 854
 */
859
function theme_cdm_descriptionElements($variables) {
855
function compose_cdm_descriptionElements($descriptionElements, $feature, $weight = FALSE) {
856

  
860 857

  
861
  $descriptionElements = $variables['descriptionElements'];
862
  $feature = $variables['feature'];
863
  $taxon_uuid = $variables['taxon_uuid'];
864 858
  $outArray = array();
859
  $sortOutArray = FALSE;
860
  $distributionElements = array();
861
  $distribution_tree = null;
865 862

  
866 863
  /*
867 864
  $userDefined = mixed_variable_get(LAYOUT_SETTING_PREFIX . $feature_uuid, FEATURE_TREE_LAYOUT_DEFAULTS);
......
881 878
  }
882 879
  */
883 880

  
884
  $sortOutArray = FALSE;
885
  $distributionElements = array();
886
  $distribution_tree = null;
881

  
887 882

  
888 883
  RenderHints::pushToRenderStack('cdm_descriptionElements');
889 884

  
......
948 943
    }
949 944
  } // END normal description element arrays
950 945

  
951
  $out = compose_cdm_feature_block_elements(
946
  $render_array = compose_cdm_feature_block_elements(
952 947
    $outArray,
953 948
    $feature
954 949
  );
955 950

  
956 951
  RenderHints::popFromRenderStack();
957
  return $out;
952
  return $render_array;
958 953
}
959 954

  
960 955
/**
7.x/modules/cdm_dataportal/theme/theme_registry.inc
25 25
 */
26 26
function cdm_dataportal_theme() {
27 27
  return array(
28
      // Themes in help.php.
29
      'cdm_dataportal_admin_config_cdm_dataportal_general' => array('variables' => array()),
30
      'cdm_dataportal_admin_config_cdm_dataportal_geo' => array('variables' => array()),
31
      'cdm_dataportal_admin_config_cdm_dataportal_layout' => array('variables' => array()),
32
      'cdm_dataportal_admin_config_cdm_dataportal_cachesite' => array('variables' => array()),
33
      'cdm_dataportal_admin_config_more_help_link' => array('variables' => array()),
28
    // Themes in help.php.
29
    'cdm_dataportal_admin_config_cdm_dataportal_general' => array('variables' => array()),
30
    'cdm_dataportal_admin_config_cdm_dataportal_geo' => array('variables' => array()),
31
    'cdm_dataportal_admin_config_cdm_dataportal_layout' => array('variables' => array()),
32
    'cdm_dataportal_admin_config_cdm_dataportal_cachesite' => array('variables' => array()),
33
    'cdm_dataportal_admin_config_more_help_link' => array('variables' => array()),
34 34

  
35
      // Themes in settings.php.
36
      'checkboxes_preferred' => array('render element' => 'element'),
37
      'radio_options_suffix' => array('render element' => 'element'),
35
    // Themes in settings.php.
36
    'checkboxes_preferred' => array('render element' => 'element'),
37
    'radio_options_suffix' => array('render element' => 'element'),
38 38

  
39
      // Themes in cdm_dataportal.common.theme.
40
      'cdm_taggedtext2html' => array('variables' => array(
41
          'taggedtxt' => array(),
42
          'tag' => 'span',
43
          'glue' => ' ',
44
          'skiptags' => array(),
45
      )),
46
      'cdm_annotations_as_footnotekeys' => array('variables' => array('cdmBase_list' => NULL, 'footnote_list_key' => NULL)),
47
      'cdm_annotation_footnotes' => array('variables' => array('footnoteListKey' => NULL, 'enclosingTag' => 'span')),
48
      'cdm_annotation_content' => array('variables' => array('AnnotationTO' => NULL)),
49
      'cdm_list_of_annotations' => array('variables' => array('annotationElements' => NULL)),
50
      'cdm_footnote_key' => array('variables' => array(
51
          'footnoteKey' => NULL,
52
          'separator' => '',
53
          'highlightable' => TRUE,
54
          'separator_off' => FALSE,
55
      )),
56
      'cdm_footnote' => array('variables' => array('footnoteKey' => NULL, 'footnoteText' => NULL, 'enclosing_tag' => 'span')),
57
      'cdm_footnotes' => array('variables' => array(
58
          'footnoteListKey' => NULL,
59
          'enclosingTag' => 'span',
60
      )),
61
      'cdm_annotations' => array('variables' => array('annotations' => NULL, 'enclosingTag' => 'span')),
62
      'cdm_marker' => array('variables' => array('label' => NULL, 'attributes' => NULL)),
63
      'cdm_pager' => array('variables' => array('pager' => NULL, 'path' => NULL, 'parameters' => NULL)),
64
      'cdm_pager_link' => array('variables' => array(
65
          'text' => NULL,
66
          'linkIndex' => NULL,
67
          'pager' => NULL,
68
          'path' => NULL,
69
          'parameters' => array(),
70
          'attributes' => NULL,
71
      )),
72
      'cdm_back_to_search_result_button' => array('variables' => array()),
73
      'cdm_back_to_image_gallery_button' => array('variables' => array()),
74
      'cdm_print_button' => array('variables' => array()),
39
    // Themes in cdm_dataportal.common.theme.
40
    'cdm_taggedtext2html' => array('variables' => array(
41
        'taggedtxt' => array(),
42
        'tag' => 'span',
43
        'glue' => ' ',
44
        'skiptags' => array(),
45
    )),
46
    'cdm_annotations_as_footnotekeys' => array('variables' => array('cdmBase_list' => NULL, 'footnote_list_key' => NULL)),
47
    'cdm_annotation_footnotes' => array('variables' => array('footnoteListKey' => NULL, 'enclosingTag' => 'span')),
48
    'cdm_annotation_content' => array('variables' => array('AnnotationTO' => NULL)),
49
    'cdm_list_of_annotations' => array('variables' => array('annotationElements' => NULL)),
50
    'cdm_footnote_key' => array('variables' => array(
51
        'footnoteKey' => NULL,
52
        'separator' => '',
53
        'highlightable' => TRUE,
54
        'separator_off' => FALSE,
55
    )),
56
    'cdm_footnote' => array('variables' => array('footnoteKey' => NULL, 'footnoteText' => NULL, 'enclosing_tag' => 'span')),
57
    'cdm_footnotes' => array('variables' => array(
58
        'footnoteListKey' => NULL,
59
        'enclosingTag' => 'span',
60
    )),
61
    'cdm_annotations' => array('variables' => array('annotations' => NULL, 'enclosingTag' => 'span')),
62
    'cdm_marker' => array('variables' => array('label' => NULL, 'attributes' => NULL)),
63
    'cdm_pager' => array('variables' => array('pager' => NULL, 'path' => NULL, 'parameters' => NULL)),
64
    'cdm_pager_link' => array('variables' => array(
65
        'text' => NULL,
66
        'linkIndex' => NULL,
67
        'pager' => NULL,
68
        'path' => NULL,
69
        'parameters' => array(),
70
        'attributes' => NULL,
71
    )),
72
    'cdm_back_to_search_result_button' => array('variables' => array()),
73
    'cdm_back_to_image_gallery_button' => array('variables' => array()),
74
    'cdm_print_button' => array('variables' => array()),
75 75

  
76
      // Themes in cdm_dataportal.descriptions.theme.
77
      'cdm_feature_name' => array('variables' => array('feature_name' => NULL)),
78
      'FeatureTree_hierarchy' => array('variables' => array('FeatureTreeUuid' => NULL)),
79
      'FeatureTree_hierarchy_children' => array('variables' => array('node' => NULL)),
80
      'cdm_descriptionElement_CategoricalData' => array('render element' => 'element'),
81
      'cdm_descriptionElement_IndividualsAssociation' => array('render element' => 'element'),
82
      'cdm_descriptionElement_TaxonInteraction' => array('render element' => 'element'),
83
      'cdm_descriptionElement_QuantitativeData' => array('render element' => 'element'),
84
      'cdm_descriptionElementTextData' => array('variables' => array(
85
          'element' => NULL,
86
          'asListElement' => NULL,
87
          'feature_uuid' => NULL,
88
      )),
89
      'cdm_common_names' => array('render element' => 'elements', 'variables' => array('feature' => null) ),
90
      'cdm_descriptionElements' => array('variables' => array(
91
          'descriptionElements' => NULL,
92
          'feature' => NULL,
93
          'taxon_uuid' => NULL,
94
      )),
95
      'cdm_description_element_image_source' => array('variables' => array(
96
          'image_sources' => NULL,
97
          'asListElement' => NULL,
98
      )),
99
      'cdm_descriptionElement_Distribution' => array('variables' => array(
100
          'descriptionElements' => NULL,
101
          'enclosingTag' => 'span',
102
      )),
103
      'cdm_description_ordered_distributions' => array('variables' => array(
104
          'distribution_tree' => NULL,
105
      )),
106
      'cdm_IdentificationKey' => array('variables' => array(
107
          'identificationKey' => NULL,
108
          'doLinkToKeyPage' => TRUE,
109
          'showIdentificationKeyTitle' => TRUE,
110
      )),
111
      'cdm_polytomousKey' => array('variables' => array('polytomousKey' => NULL)),
112
      'cdm_polytomousKey_linkedStyle_subgraph' => array('variables' => array('polytomousKeyNode' => NULL)),
113
      'cdm_poytomousKeyNode_modifyingText' => array('variables' => array('modifyingText' => NULL)),
114
      'cdm_list_IdentificationKeys' => array('variables' => array('type' => NULL, 'taxonUuid' => NULL)),
115
      'cdm_block_IdentificationKeys' => array('variables' => array('taxonUuid' => NULL)),
116
      'cdm_UseDescription' => array('variables' => array('description' => NULL, 'taxonUuid' => NULL)),
117
      'cdm_block_Uses' => array('variables' => array('taxonUuid' => NULL)),
76
    // Themes in cdm_dataportal.descriptions.theme.
77
    'cdm_feature_name' => array('variables' => array('feature_name' => NULL)),
78
    'FeatureTree_hierarchy' => array('variables' => array('FeatureTreeUuid' => NULL)),
79
    'FeatureTree_hierarchy_children' => array('variables' => array('node' => NULL)),
80
    'cdm_descriptionElement_CategoricalData' => array('render element' => 'element'),
81
    'cdm_descriptionElement_IndividualsAssociation' => array('render element' => 'element'),
82
    'cdm_descriptionElement_TaxonInteraction' => array('render element' => 'element'),
83
    'cdm_descriptionElement_QuantitativeData' => array('render element' => 'element'),
84
    'cdm_descriptionElementTextData' => array('variables' => array(
85
        'element' => NULL,
86
        'asListElement' => NULL,
87
        'feature_uuid' => NULL,
88
    )),
89
    'cdm_common_names' => array('render element' => 'elements', 'variables' => array('feature' => null) ),
90
    'cdm_description_element_image_source' => array('variables' => array(
91
        'image_sources' => NULL,
92
        'asListElement' => NULL,
93
    )),
94
    'cdm_descriptionElement_Distribution' => array('variables' => array(
95
        'descriptionElements' => NULL,
96
        'enclosingTag' => 'span',
97
    )),
98
    'cdm_description_ordered_distributions' => array('variables' => array(
99
        'distribution_tree' => NULL,
100
    )),
101
    'cdm_IdentificationKey' => array('variables' => array(
102
        'identificationKey' => NULL,
103
        'doLinkToKeyPage' => TRUE,
104
        'showIdentificationKeyTitle' => TRUE,
105
    )),
106
    'cdm_polytomousKey' => array('variables' => array('polytomousKey' => NULL)),
107
    'cdm_polytomousKey_linkedStyle_subgraph' => array('variables' => array('polytomousKeyNode' => NULL)),
108
    'cdm_poytomousKeyNode_modifyingText' => array('variables' => array('modifyingText' => NULL)),
109
    'cdm_list_IdentificationKeys' => array('variables' => array('type' => NULL, 'taxonUuid' => NULL)),
110
    'cdm_block_IdentificationKeys' => array('variables' => array('taxonUuid' => NULL)),
111
    'cdm_UseDescription' => array('variables' => array('description' => NULL, 'taxonUuid' => NULL)),
112
    'cdm_block_Uses' => array('variables' => array('taxonUuid' => NULL)),
118 113

  
119
      // Themes in cdm_dataportal.media.theme.
120
      'cdm_media' => array('variables' => array('descriptionElement' => NULL, 'mimeTypePreference' => NULL)),
121
      'cdm_mediaTypeTerm' => array('variables' => array('feature' => NULL, 'mediaUrl' => FALSE)),
122
      'cdm_media_mime_application' => array('variables' => array('mediaRepresentation' => NULL, 'feature' => NULL)),
123
      'cdm_media_mime_image' => array('variables' => array('mediaRepresentation' => NULL, 'feature' => NULL)),
124
      'cdm_media_mime_text' => array('variables' => array('representation' => NULL, 'feature' => NULL)),
125
      'cdm_media_caption' => array('variables' => array(
126
          'media' => NULL,
127
          'elements' => array('title', 'description', 'artist', 'location', 'rights'),
128
      )),
129
      'cdm_media_gallerie' => array('variables' => array(
130
          'mediaList' => NULL,
131
          'galleryName' => NULL,
132
          'maxExtend' => 150,
133
          'cols' => 4,
134
          'maxRows' => FALSE,
135
          'captionElements' => array('title'),
136
          'mediaLinkType' => 'LIGHTBOX',
137
          'alternativeMediaUri' => NULL,
138
          'galleryLinkUri' => NULL,
139
          'showCaption' => TRUE,
140
      )),
141
      'cdm_media_gallerie_image' => array('variables' => array(
142
          'mediaRepresentationPart' => NULL,
143
          'maxExtend' => NULL,
144
          'addPassePartout' => FALSE,
145
          'attributes' => NULL,
146
      )),
147
      'cdm_media_gallerie_application' => array('variables' => array(
148
          'mediaRepresentationPart' => NULL,
149
          'maxExtend' => NULL,
150
          'addPassePartout' => FALSE,
151
          'attributes' => NULL,
152
      )),
153
      'cdm_media_gallerie_text' => array('variables' => array(
154
          'mediaRepresentationPart' => NULL,
155
          'maxExtend' => NULL,
156
          'addPassePartout' => FALSE,
157
          'attributes' => NULL,
158
      )),
159
      'cdm_openlayers_image' => array('variables' => array('mediaRepresentationPart' => NULL, 'maxExtend' => NULL)),
160
      // Themes in cdm_dataportal.name.theme.
161
      'cdm_taxonName' => array('variables' => array(
162
          'taxonName' => NULL,
163
          'nameLink' => NULL,
164
          'refenceLink' => NULL,
165
          'show_annotations' => TRUE,
166
          'is_type_designation' => FALSE,
167
          'skiptags' => array(),
168
      )),
169
      'cdm_typedesignations' => array('variables' => array('typeDesignations' => array())),
170
      'cdm_nameRelationships' => array('variables' => array('nameRelationships' => NULL, 'skipTypes' => FALSE)),
171
      'cdm_homotypicSynonymLine' => array('variables' => array('taxon' => NULL)),
172
      'cdm_heterotypicSynonymyGroup' => array('variables' => array('homotypicalGroup' => NULL)),
173
      'cdm_homotypicSynonymyGroup' => array('variables' => array(
174
          'synonymList' => NULL,
175
          'accepted_taxon_name_uuid' => NULL,
176
          'prependedSynonyms' => array(),
177
      )),
178
      'get_nameRenderTemplate' => array('variables' => array()),
179
      'get_partDefinition' => array('variables' => array()),
114
    // Themes in cdm_dataportal.media.theme.
115
    'cdm_media' => array('variables' => array('descriptionElement' => NULL, 'mimeTypePreference' => NULL)),
116
    'cdm_mediaTypeTerm' => array('variables' => array('feature' => NULL, 'mediaUrl' => FALSE)),
117
    'cdm_media_mime_application' => array('variables' => array('mediaRepresentation' => NULL, 'feature' => NULL)),
118
    'cdm_media_mime_image' => array('variables' => array('mediaRepresentation' => NULL, 'feature' => NULL)),
119
    'cdm_media_mime_text' => array('variables' => array('representation' => NULL, 'feature' => NULL)),
120
    'cdm_media_caption' => array('variables' => array(
121
        'media' => NULL,
122
        'elements' => array('title', 'description', 'artist', 'location', 'rights'),
123
    )),
124
    'cdm_media_gallerie' => array('variables' => array(
125
        'mediaList' => NULL,
126
        'galleryName' => NULL,
127
        'maxExtend' => 150,
128
        'cols' => 4,
129
        'maxRows' => FALSE,
130
        'captionElements' => array('title'),
131
        'mediaLinkType' => 'LIGHTBOX',
132
        'alternativeMediaUri' => NULL,
133
        'galleryLinkUri' => NULL,
134
        'showCaption' => TRUE,
135
    )),
136
    'cdm_media_gallerie_image' => array('variables' => array(
137
        'mediaRepresentationPart' => NULL,
138
        'maxExtend' => NULL,
139
        'addPassePartout' => FALSE,
140
        'attributes' => NULL,
141
    )),
142
    'cdm_media_gallerie_application' => array('variables' => array(
143
        'mediaRepresentationPart' => NULL,
144
        'maxExtend' => NULL,
145
        'addPassePartout' => FALSE,
146
        'attributes' => NULL,
147
    )),
148
    'cdm_media_gallerie_text' => array('variables' => array(
149
        'mediaRepresentationPart' => NULL,
150
        'maxExtend' => NULL,
151
        'addPassePartout' => FALSE,
152
        'attributes' => NULL,
153
    )),
154
    'cdm_openlayers_image' => array('variables' => array('mediaRepresentationPart' => NULL, 'maxExtend' => NULL)),
155
    // Themes in cdm_dataportal.name.theme.
156
    'cdm_taxonName' => array('variables' => array(
157
        'taxonName' => NULL,
158
        'nameLink' => NULL,
159
        'refenceLink' => NULL,
160
        'show_annotations' => TRUE,
161
        'is_type_designation' => FALSE,
162
        'skiptags' => array(),
163
    )),
164
    'cdm_typedesignations' => array('variables' => array('typeDesignations' => array())),
165
    'cdm_nameRelationships' => array('variables' => array('nameRelationships' => NULL, 'skipTypes' => FALSE)),
166
    'cdm_homotypicSynonymLine' => array('variables' => array('taxon' => NULL)),
167
    'cdm_heterotypicSynonymyGroup' => array('variables' => array('homotypicalGroup' => NULL)),
168
    'cdm_homotypicSynonymyGroup' => array('variables' => array(
169
        'synonymList' => NULL,
170
        'accepted_taxon_name_uuid' => NULL,
171
        'prependedSynonyms' => array(),
172
    )),
173
    'get_nameRenderTemplate' => array('variables' => array()),
174
    'get_partDefinition' => array('variables' => array()),
180 175

  
181
      // Themes in cdm_dataportal.occurrence.theme.
182
      'cdm_specimen' => array('variables' => array('specimenTypeDesignation' => NULL)),
176
    // Themes in cdm_dataportal.occurrence.theme.
177
    'cdm_specimen' => array('variables' => array('specimenTypeDesignation' => NULL)),
183 178

  
184
      // Themes in cdm_dataportal.page.theme.
185
      'cdm_taxon_page_title' => array('variables' => array('taxon' => NULL)),
186
      'cdm_name_page_title' => array('variables' => array('taxon_name' => NULL)),
187
      'cdm_taxon_page_synonymy' => array('variables' => array('taxon' => NULL, 'addAcceptedTaxon' => NULL)),
188
      'cdm_reference_page' => array('variables' => array('reference' => NULL)),
189
      'cdm_media_page' => array('variables' => array(
190
          'media' => NULL,
191
          'mediarepresentation_uuid' => FALSE,
192
          'partId' => FALSE,
193
      )),
194
      'cdm_polytomousKey_page' => array('variables' => array('polytomousKey' => NULL)),
195
      'cdm_taxonpage_tab' => array('variables' => array('tabname' => NULL)),
179
    // Themes in cdm_dataportal.page.theme.
180
    'cdm_taxon_page_title' => array('variables' => array('taxon' => NULL)),
181
    'cdm_name_page_title' => array('variables' => array('taxon_name' => NULL)),
182
    'cdm_taxon_page_synonymy' => array('variables' => array('taxon' => NULL, 'addAcceptedTaxon' => NULL)),
183
    'cdm_reference_page' => array('variables' => array('reference' => NULL)),
184
    'cdm_media_page' => array('variables' => array(
185
        'media' => NULL,
186
        'mediarepresentation_uuid' => FALSE,
187
        'partId' => FALSE,
188
    )),
189
    'cdm_polytomousKey_page' => array('variables' => array('polytomousKey' => NULL)),
190
    'cdm_taxonpage_tab' => array('variables' => array('tabname' => NULL)),
196 191

  
197
      // Themes in cdm_dataportal.references.theme.
198
      'cdm_reference_pager' => array('variables' => array(
199
          'referencePager' => NULL,
200
          'path' => NULL,
201
          'parameters' => array(),
202
      )),
203
      'cdm_reference' => array('variables' => array(
204
          'reference' => NULL,
205
          'microReference' => NULL,
206
          'doLink' => FALSE,
207
          'referenceStyle' => NULL,
208
      )),
209
      'cdm_OriginalSource' => array('variables' => array('source' => NULL, 'doLink' => TRUE)),
192
    // Themes in cdm_dataportal.references.theme.
193
    'cdm_reference_pager' => array('variables' => array(
194
        'referencePager' => NULL,
195
        'path' => NULL,
196
        'parameters' => array(),
197
    )),
198
    'cdm_reference' => array('variables' => array(
199
        'reference' => NULL,
200
        'microReference' => NULL,
201
        'doLink' => FALSE,
202
        'referenceStyle' => NULL,
203
    )),
204
    'cdm_OriginalSource' => array('variables' => array('source' => NULL, 'doLink' => TRUE)),
210 205

  
211
      // Themes in cdm_dataportal.taxon.theme.
212
      'cdm_search_results' => array('variables' => array(
213
          'pager' => NULL,
214
          'path' => NULL
215
      )),
216
      'cdm_taxonRelationships' => array('variables' => array('taxonRelationships' => NULL, 'focusedTaxon' => NULL)),
217
      'cdm_acceptedFor' => array('variables' => array('acceptedFor' => NULL)),
218
      'cdm_list_of_taxa' => array('variables' => array('records' => NULL, 'freetextSearchResults' => array(), 'show_classification' => FALSE)),
219
      'cdm_taxon_list_thumbnails' => array('variables' => array('taxon' => NULL)),
206
    // Themes in cdm_dataportal.taxon.theme.
207
    'cdm_search_results' => array('variables' => array(
208
        'pager' => NULL,
209
        'path' => NULL
210
    )),
211
    'cdm_taxonRelationships' => array('variables' => array('taxonRelationships' => NULL, 'focusedTaxon' => NULL)),
212
    'cdm_acceptedFor' => array('variables' => array('acceptedFor' => NULL)),
213
    'cdm_list_of_taxa' => array('variables' => array('records' => NULL, 'freetextSearchResults' => array(), 'show_classification' => FALSE)),
214
    'cdm_taxon_list_thumbnails' => array('variables' => array('taxon' => NULL)),
220 215

  
221
      // Themes in cdm_dataportal.bibliography.theme.
222
      'cdm_descriptionElementBibliography' => array('variables' => array('descriptionElementsBibliography' => array())),
216
    // Themes in cdm_dataportal.bibliography.theme.
217
    'cdm_descriptionElementBibliography' => array('variables' => array('descriptionElementsBibliography' => array())),
223 218

  
224
      // Themes in includes/pre-drupal8.inc
225
      'description_list' => array('variables' => array('items' => array(), 'groups' => array(), 'title' => NULL, 'attributes' => array())),
219
    // Themes in includes/pre-drupal8.inc
220
    'description_list' => array('variables' => array('items' => array(), 'groups' => array(), 'title' => NULL, 'attributes' => array())),
226 221
  );
227 222
}
7.x/themes/palmweb_2/template.php
183 183

  
184 184

  
185 185
          if ($text_data_out_array && variable_get(DISTRIBUTION_TEXTDATA_DISPLAY_ON_TOP, 0)) {
186
            $block->content .= compose_cdm_feature_block_elements(
186
            $tmp_render_array = compose_cdm_feature_block_elements(
187 187
              $text_data_out_array,
188 188
              $node->feature,
189 189
              $text_data_glue,
190 190
              $text_data_sort,
191 191
              $text_data_enclosingTag
192 192
            );
193

  
194
            $block->content .= $tmp_render_array['#markup'];
193 195
          }
194 196

  
195 197
          // --- Distribution map
......
225 227

  
226 228
            }
227 229
            //
228
            $block->content .= compose_cdm_feature_block_elements(
230

  
231
            $tmp_render_array = compose_cdm_feature_block_elements(
229 232
                $dto_out_array,
230 233
                $node->feature,
231 234
                $distribution_glue,
232 235
                $distribution_sortOutArray,
233 236
                $distribution_enclosingTag
234 237
            );
238
            $block->content .= $tmp_render_array['#markup'];
235 239
          }
236 240

  
237 241
          // --- TextData at the bottom
238 242
          if ($text_data_out_array && !variable_get(DISTRIBUTION_TEXTDATA_DISPLAY_ON_TOP, 0)) {
239
            $block->content .= compose_cdm_feature_block_elements(
243
            $tmp_render_array = compose_cdm_feature_block_elements(
240 244
                $text_data_out_array,
241 245
                $node->feature,
242 246
                $text_data_glue,
243 247
                $text_data_sort,
244 248
                $text_data_enclosingTag
245 249
            );
250
            $block->content .= $tmp_render_array['#markup'];
246 251
          }
247 252

  
248 253
        }
......
262 267
          // $block->content .= theme('cdm_descriptionElements', $node->descriptionElements, $node->feature->uuid, $taxon->uuid),
263 268
        }
264 269
        else {
265
          $block->content .= theme('cdm_descriptionElements', array(
266
            'descriptionElements' => $node->descriptionElements,
267
            'featureUuid' => $node->feature->uuid,
268
            'taxon_uuid' => $taxon->uuid,
269
          ));
270
          $block->content .= compose_cdm_descriptionElements($node->descriptionElements, $node->feature->uuid, $taxon->uuid);
270 271

  
271 272
          /*
272 273
          Content/ALL OTHER FEATURES/Subordinate Features

Also available in: Unified diff