Project

General

Profile

« Previous | Next » 

Revision dd1c109a

Added by Andreas Kohlbecker over 9 years ago

more flexible table of content creation, hook_cdm_feature_node_toc_items_alter() no longer needed

View differences:

7.x/modules/cdm_dataportal/cdm_dataportal.api.php
10 10
 * @{
11 11
 */
12 12

  
13
/**
14
 * Alter the feature toc items.
15
 *
16
 * Modules implementing this hook can add, remove or modify
17
 * the items in the table of contents of features.
18
 *
19
 * the items array is an array suitable for theme_item_list().
20
 *
21
 */
22
function hook_cdm_feature_node_toc_items_alter($items) {
23

  
24
  // NOTE: drupal_get_query_parameters has no internal static cache variable
25
  $http_request_params = drupal_get_query_parameters();
26

  
27
  $items[] = array(
28
              // a html link element as item:
29
              l(
30
                theme('cdm_feature_name', array('feature_name' => 'My new feature item')),
31
                $_GET['q'],
32
                array(
33
                    'attributes' => array('class' => array('toc')),
34
                    'fragment' => generalizeString('My new feature item'),
35
                    'query' => $http_request_params
36
                )
37
              )
38
            );
39

  
40
  return $items;
41
}
42 13

  
43 14
/**
44 15
 * @} End of "addtogroup hooks".
7.x/modules/cdm_dataportal/includes/descriptions.inc
1 1
<?php
2 2

  
3
/**
4
 * Returns the localized representations of the modifiers hold by the supplied cdm instance concatenated into one string.
5
 *
6
 * @param object $iModifieable
7
 *   cdm instance of an class implementing the interface IModifieable: DescriptionElementBase, StateDate, State
8
 */
9
function cdm_modifers_representations($iModifieable, $glue = ', ') {
10
  $modifiers_strings = array();
11
  if (isset($iModifieable->modifiers)) {
12
    foreach ($iModifieable->modifiers as $modifier) {
13
      $modifiers_strings[] = cdm_term_representation($modifier);
3
  /**
4
   * Returns the localized representations of the modifiers hold by the
5
   * supplied cdm instance concatenated into one string.
6
   *
7
   * @param object $iModifieable
8
   *   cdm instance of an class implementing the interface IModifieable:
9
   *   DescriptionElementBase, StateDate, State
10
   *
11
   * @return String
12
   *    localized representations of the modifiers hold by the
13
   *    supplied cdm instance concatenated into one string
14
   */
15
  function cdm_modifers_representations($iModifieable, $glue = ', ') {
16
    $modifiers_strings = array();
17
    if (isset($iModifieable->modifiers)) {
18
      foreach ($iModifieable->modifiers as $modifier) {
19
        $modifiers_strings[] = cdm_term_representation($modifier);
20
      }
14 21
    }
22
    return implode(', ', $modifiers_strings);
15 23
  }
16
  return implode(', ', $modifiers_strings);
17
}
18 24

  
19
/**
20
 * Filters the given set of description elements and prefers computed elements over
21
 * others. Computed description elements are identified by the MarkerType.COMPUTED()
22
 *
23
 * If the given set contains at least one computed element only the computed elements
24
 * returned.
25
 *
26
 * @param $description_elements
27
 *   An array of CDM DescriptionElementBase instances
28
 * @return only the computed description elements otherwise all others.
29
 * @deprecated this is replaced by the cdmlib DistributionUtil class!!!
30
 */
31
function cdm_description_elements_prefer_computed($description_elements){
25
  /**
26
   * Filters the given set of description elements and prefers
27
   * computed elements over others. Computed description elements
28
   * are identified by the MarkerType.COMPUTED()
29
   *
30
   * If the given set contains at least one computed element only
31
   * the computed elements are returned.
32
   *
33
   * @param $description_elements
34
   *   An array of CDM DescriptionElementBase instances
35
   *
36
   * @return
37
   *  only the computed description elements otherwise all others.
38
   *
39
   * @deprecated this is replaced by the cdmlib DistributionUtil class!!!
40
   */
41
  function cdm_description_elements_prefer_computed($description_elements){
32 42

  
33
  $computed_elements = array();
34
  $other_elements = array();
43
    $computed_elements = array();
44
    $other_elements = array();
35 45

  
36
  if(!empty($description_elements)){
37
    foreach ($description_elements as $element) {
38
      if(cdm_entity_has_marker($element, UUID_MARKERTYPE_COMPUTED)){
39
        $computed_elements[] = $element;
40
      } else {
41
        $other_elements[] = $element;
46
    if(!empty($description_elements)){
47
      foreach ($description_elements as $element) {
48
        if(cdm_entity_has_marker($element, UUID_MARKERTYPE_COMPUTED)){
49
          $computed_elements[] = $element;
50
        } else {
51
          $other_elements[] = $element;
52
        }
42 53
      }
43 54
    }
44
  }
45 55

  
46
  if(count($computed_elements) > 0) {
47
    return $computed_elements;
48
  } else {
49
    return $other_elements;
56
    if(count($computed_elements) > 0) {
57
      return $computed_elements;
58
    } else {
59
      return $other_elements;
60
    }
50 61
  }
51
}
52 62

  
53
function cdm_distribution_filter_query(){
54
  $cdm_distribution_filter = get_array_variable_merged(CDM_DISTRIBUTION_FILTER, CDM_DISTRIBUTION_FILTER_DEFAULT);
55
  $query = array();
63
  /**
64
   * @return array
65
   */
66
  function cdm_distribution_filter_query(){
67
    $cdm_distribution_filter = get_array_variable_merged(CDM_DISTRIBUTION_FILTER, CDM_DISTRIBUTION_FILTER_DEFAULT);
68
    $query = array();
56 69

  
57
  if($cdm_distribution_filter['filter_rules']['statusOrderPreference']){
58
    $query['statusOrderPreference'] = 1;
59
  }
60
  if($cdm_distribution_filter['filter_rules']['subAreaPreference']){
61
    $query['subAreaPreference'] = 1;
62
  }
63
  if(is_array($cdm_distribution_filter['hideMarkedAreas']) && count($cdm_distribution_filter['hideMarkedAreas']) > 0){
64
    $query['hideMarkedAreas'] = '';
65
    foreach ($cdm_distribution_filter['hideMarkedAreas'] as $marker_type => $enabled)
66
      if($enabled){
67
        $query['hideMarkedAreas'] .= ($query['hideMarkedAreas'] ? ',' : '') . $marker_type;
68
      }
70
    if($cdm_distribution_filter['filter_rules']['statusOrderPreference']){
71
      $query['statusOrderPreference'] = 1;
72
    }
73
    if($cdm_distribution_filter['filter_rules']['subAreaPreference']){
74
      $query['subAreaPreference'] = 1;
75
    }
76
    if(is_array($cdm_distribution_filter['hideMarkedAreas']) && count($cdm_distribution_filter['hideMarkedAreas']) > 0){
77
      $query['hideMarkedAreas'] = '';
78
      foreach ($cdm_distribution_filter['hideMarkedAreas'] as $marker_type => $enabled)
79
        if($enabled){
80
          $query['hideMarkedAreas'] .= ($query['hideMarkedAreas'] ? ',' : '') . $marker_type;
81
        }
82
    }
83

  
84
    return $query;
69 85
  }
70 86

  
71
  return $query;
72
}
87
  /**
88
   * Merge the fields 'annotations', 'markers', 'sources', 'media' from the source CDM DescriptionElement into  the target.
89
   *
90
   * @param $target
91
   *     The source CDM DescriptionElement
92
   * @param $source
93
   *     The target CDM DescriptionElement
94
   */
95
  function cdm_merge_description_elements(&$target, &$source){
96
    static $fields_to_merge = array('annotations', 'markers', 'sources', 'media');
73 97

  
74
/**
75
 * Merge the fields 'annotations', 'markers', 'sources', 'media' from the source CDM DescriptionElement into  the target.
76
 *
77
 * @param $target
78
 *     The source CDM DescriptionElement
79
 * @param $source
80
 *     The target CDM DescriptionElement
81
 */
82
function cdm_merge_description_elements(&$target, &$source){
83
  static $fields_to_merge = array('annotations', 'markers', 'sources', 'media');
84

  
85
  foreach ($fields_to_merge as $field){
86
    if(is_array($source->$field)) {
87
      if(!is_array($target->$field)){
88
        $target->$field = $source->$field;
89
      } else {
90
        $target->$field = array_merge($target->$field, $source->$field);
98
    foreach ($fields_to_merge as $field){
99
      if(is_array($source->$field)) {
100
        if(!is_array($target->$field)){
101
          $target->$field = $source->$field;
102
        } else {
103
          $target->$field = array_merge($target->$field, $source->$field);
104
        }
91 105
      }
92 106
    }
93 107
  }
94
}
95 108

  
96
/**
97
 * Prepares the items for a table of content list.
98
 *
99
 * see also hook_cdm_feature_node_toc_items_alter()
100
 *
101
 * @param $feature_nodes
102
 *   An array of CDM FeatureNode instances
103
 *
104
 * @return array
105
 *   The items array is an array suitable for theme_item_list().
106
 */
107
function cdm_feature_node_toc_items($feature_nodes) {
108
  $items = array();
109

  
110
  foreach ($feature_nodes as $node) {
111

  
112
    if (isset($node->descriptionElements['#type']) || has_feature_node_description_elements($node)) {
113

  
114
      $feature_name = isset($node->feature->representation_L10n) ? $node->feature->representation_L10n : 'Feature';
115
      $class_attributes = 'feature-toc-item-' . $node->feature->uuid;
116
      //TODO HACK to implement images for taxa, should be removed.
117
      if ($node->feature->uuid != UUID_IMAGE) {
118
        $items[] = toc_list_item(
119
          theme(
120
            'cdm_feature_name',
121
            array('feature_name' => $feature_name))
122
          ,
123
          array('class' => $class_attributes)
124
        );
125
      }
109
  /**
110
   * Creates a  entry for the table of content items list
111
   *
112
   * The  table of content items are crated internally by calling
113
   * toc_list_item() the resulting item is added to the statically cached
114
   * list of toc elements
115
   *
116
   * @param $label
117
   *  The label of toc entry
118
   * @param $class_attribute_suffix
119
   *  The suffix to be appended to the class attribute prefix: "feature-toc-item-"
120
   * @param $fragment
121
   *  Optional parameter to define a url fragment different from the $label,
122
   *  if the $fragment is not defined the $label will be used
123
   */
124
  function cdm_toc_list_add_item($label, $class_attribute_suffix, $fragment = NULL){
125
    $toc_list_items = &cdm_toc_list();
126

  
127
    // TODO normalize $fragment if necesarry, check uri()
128
    if(!$fragment){
129
      $fragment = $label;
126 130
    }
131

  
132
    $class_attributes = 'feature-toc-item-' . $class_attribute_suffix;
133

  
134
    $toc_list_items[] = toc_list_item(
135
      theme(
136
        'cdm_feature_name',
137
        array('feature_name' => $label))
138
      ,
139
      array('class' => $class_attributes),
140
      $fragment
141
    );
142

  
127 143
  }
128 144

  
129
  drupal_alter('cdm_feature_node_toc_items', $items);
145
  /**
146
   * Returns the statically cached table of content items as render array
147
   *
148
   * @see see also cdm_toc_list_add_item()
149
   *
150
   * @return array
151
   *   a render array of table of content items suitable for theme_item_list()
152
   */
153
  function &cdm_toc_list(){
154
    $toc_list_items = &drupal_static('toc_list_items', array());
130 155

  
131
  return $items;
132
}
156
    return $toc_list_items;
157
  }
133 158

  
134 159
/**
135 160
 * Prepares an empty Drupal block for displaying description elements of a specific CDM Feature.
......
158 183
  return $block;
159 184
}
160 185

  
161
/**
162
 * Creates a list item for a table of content, suitable as data element for a themed list
163
 *
164
 * @see theme_list()
165
 *
166
 * @param $label
167
 * @param $http_request_params
168
 * @param $attributes
169
 * @return array
170
 */
171
function toc_list_item($label, $attributes = array()) {
172

  
173
  // we better cache here since drupal_get_query_parameters has no internal static cache variable
174
  $http_request_params = drupal_static('http_request_params', drupal_get_query_parameters());
175

  
176
  $item =  array(
177
    'data' => l(
178
      $label,
179
      $_GET['q'],
180
      array(
181
        'attributes' => array('class' => array('toc')),
182
        'fragment' => generalizeString($label),
183
        'query' => $http_request_params
186
  /**
187
   * Creates a list item for a table of content, suitable as data element for a themed list
188
   *
189
   * @see theme_list()
190
   *
191
   * @param $label
192
   * @param $http_request_params
193
   * @param $attributes
194
   * @return array
195
   */
196
  function toc_list_item($label, $attributes = array(), $fragment = null) {
197

  
198
    // we better cache here since drupal_get_query_parameters has no internal static cache variable
199
    $http_request_params = drupal_static('http_request_params', drupal_get_query_parameters());
200

  
201
    $item =  array(
202
      'data' => l(
203
        $label,
204
        $_GET['q'],
205
        array(
206
          'attributes' => array('class' => array('toc')),
207
          'fragment' => generalizeString($label),
208
          'query' => $http_request_params
209
        )
184 210
      )
185
    )
186
  );
187
  $item['attributes'] = $attributes;
188
  return $item;
189
}
211
    );
212
    $item['attributes'] = $attributes;
213
    return $item;
214
  }
190 215

  
191
/**
192
 * Creates the footnotes for the given CDM DescriptionElement instance.
193
 *
194
 * Footnotes are created for annotatins and original sources.
195
 *
196
 * @param $descriptionElement
197
 *     A CDM DescriptionElement instance
198
 * @param $separator
199
 *     Optional parameter. The separator string to concatenate the footnote ids, default is ','
200
 * @param $footnote_list_key_suggestion
201
 * @return String
202
 *    The foot note keys
203
 */
204
function cdm_create_description_element_footnotes($description_element, $separator = ',', $footnote_list_key_suggestion = null){
205

  
206

  
207
  // Annotations as footnotes.
208
  $footNoteKeys = cdm_annotations_as_footnotekeys($description_element, $footnote_list_key_suggestion);
209

  
210
  // Source references as footnotes.
211
  $bibliography_settings = get_bibliography_settings();
212
  $original_source_footnote_tag = $bibliography_settings['enabled'] == 1 ? 'div' : null; // otherwise the default
213

  
214
  foreach ($description_element->sources as $source) {
215
    if (_is_original_source_type($source)) {
216
      $fn_key = FootnoteManager::addNewFootnote(
217
        original_source_footnote_list_key($footnote_list_key_suggestion),
218
        theme('cdm_OriginalSource', array(
219
          'source' => $source,
220
          'doLink' => FALSE,
221
        )),
222
        $original_source_footnote_tag
223
      );
224
      // Ensure uniqueness of the footnote keys.
225
      cdm_add_footnote_to_array($footNoteKeys, $fn_key);
216
  /**
217
   * Creates the footnotes for the given CDM DescriptionElement instance.
218
   *
219
   * Footnotes are created for annotatins and original sources.
220
   *
221
   * @param $descriptionElement
222
   *     A CDM DescriptionElement instance
223
   * @param $separator
224
   *     Optional parameter. The separator string to concatenate the footnote ids, default is ','
225
   * @param $footnote_list_key_suggestion
226
   * @return String
227
   *    The foot note keys
228
   */
229
  function cdm_create_description_element_footnotes($description_element, $separator = ',', $footnote_list_key_suggestion = null){
230

  
231

  
232
    // Annotations as footnotes.
233
    $footNoteKeys = cdm_annotations_as_footnotekeys($description_element, $footnote_list_key_suggestion);
234

  
235
    // Source references as footnotes.
236
    $bibliography_settings = get_bibliography_settings();
237
    $original_source_footnote_tag = $bibliography_settings['enabled'] == 1 ? 'div' : null; // otherwise the default
238

  
239
    foreach ($description_element->sources as $source) {
240
      if (_is_original_source_type($source)) {
241
        $fn_key = FootnoteManager::addNewFootnote(
242
          original_source_footnote_list_key($footnote_list_key_suggestion),
243
          theme('cdm_OriginalSource', array(
244
            'source' => $source,
245
            'doLink' => FALSE,
246
          )),
247
          $original_source_footnote_tag
248
        );
249
        // Ensure uniqueness of the footnote keys.
250
        cdm_add_footnote_to_array($footNoteKeys, $fn_key);
251
      }
226 252
    }
253
    // Sort and render footnote keys.
254
    $footnoteKeyListStr = '';
255
    asort($footNoteKeys);
256
    foreach ($footNoteKeys as $footNoteKey) {
257
      $footnoteKeyListStr .= theme('cdm_footnote_key',
258
        array(
259
          'footnoteKey' => $footNoteKey,
260
          'separator' => ($footnoteKeyListStr ? $separator : '')));
261
    }
262
    return $footnoteKeyListStr;
227 263
  }
228
  // Sort and render footnote keys.
229
  $footnoteKeyListStr = '';
230
  asort($footNoteKeys);
231
  foreach ($footNoteKeys as $footNoteKey) {
232
    $footnoteKeyListStr .= theme('cdm_footnote_key',
233
      array(
234
        'footnoteKey' => $footNoteKey,
235
        'separator' => ($footnoteKeyListStr ? $separator : '')));
236
  }
237
  return $footnoteKeyListStr;
238
}
239 264

  
240
/**
241
 *
242
 * @return string the footnote_list_key
243
 */
244
function original_source_footnote_list_key($key_suggestion = null) {
245
  if(!$key_suggestion){
246
    $key_suggestion = RenderHints::getFootnoteListKey();
265
  /**
266
   *
267
   * @return string the footnote_list_key
268
   */
269
  function original_source_footnote_list_key($key_suggestion = null) {
270
    if(!$key_suggestion){
271
      $key_suggestion = RenderHints::getFootnoteListKey();
272
    }
273
    $bibliography_settings = get_bibliography_settings();
274
    $footnote_list_key = $bibliography_settings['enabled'] == 1 ? 'BIBLIOGRAPHY' : $key_suggestion;
275
    return $footnote_list_key;
247 276
  }
248
  $bibliography_settings = get_bibliography_settings();
249
  $footnote_list_key = $bibliography_settings['enabled'] == 1 ? 'BIBLIOGRAPHY' : $key_suggestion;
250
  return $footnote_list_key;
251
}
252 277

  
7.x/modules/cdm_dataportal/includes/pages.inc
550 550
  // Render the sections for each feature
551 551
  $render_array['taxon_description_features'] = compose_cdm_feature_nodes($merged_tree->root->childNodes, $taxon);
552 552

  
553
  $toc = array(
554
    '#theme' => 'item_list',
555
    '#items' => cdm_feature_node_toc_items($merged_tree->root->childNodes),
556
    '#title' => t('Content'),
557
    '#weight' => -100,                  // move to the top
558
    '#suffix' => '</div>',
559
    '#prefix'=> '<div id="page-toc">'
560
  );
561
  $render_array['taxon_description_feature_toc'] = $toc; //markup_to_render_array($toc_html);
562

  
563 553
  $bibliography_settings = get_bibliography_settings();
564 554
  if($bibliography_settings['enabled'] == 1){
565 555
    $bibliography_block = feature_block(t('Bibliography'));
......
575 565
      ),
576 566
      100 // weight
577 567
    );
578
    $render_array['taxon_description_feature_toc']['#items'][] = toc_list_item('Bibliography', array('class' => 'bibliography'));
568

  
569
    cdm_toc_list_add_item('Bibliography', 'bibliography');
579 570
  }
580 571

  
572
  // create the table of content
573
  $toc = array(
574
    '#theme' => 'item_list',
575
    '#items' => cdm_toc_list(),
576
    '#title' => t('Content'),
577
    '#weight' => -100,                  // move to the top
578
    '#suffix' => '</div>',
579
    '#prefix'=> '<div id="page-toc">'
580
  );
581
  $render_array['taxon_description_feature_toc'] = $toc;
581 582

  
582 583
  return $render_array;
583 584
}
7.x/modules/cdm_dataportal/theme/cdm_dataportal.descriptions.theme
32 32
 */
33 33
function theme_cdm_feature_name($variables) {
34 34
  $feature_name = $variables['feature_name'];
35
  // TODO replace by using translations ?
36 35
  return t($feature_name);
37 36
}
38 37

  
......
179 178
            ),
180 179
          )
181 180
        );
181
        cdm_toc_list_add_item(cdm_term_representation($node->feature), $node->feature->uuid);
182 182
      } // END: skip empty block content
183 183
    } // END: skip empty or supressed features
184 184
  } // END: creating a block per feature
7.x/modules/palmweb/palmweb.module
18 18
 */
19 19

  
20 20

  
21
/**
22
 * Implements hook_cdm_feature_node_toc_items_alter()
23
 */
24
function palmweb_cdm_feature_node_toc_items_alter($items){
25

  
26
  $http_request_params = drupal_get_query_parameters();
27
  $countFeatures = count($items);
28

  
29
  // number of taxa
30
  $numberOfChildren = count(cdm_ws_get(CDM_WS_PORTAL_TAXONOMY_CHILDNODES_OF_TAXON, array (
31
      get_taxonomictree_uuid_selected(),
32
      substr(strrchr($_GET["q"],'/'), 1),
33
  )));
34
  if ($numberOfChildren != 0) {
35
    array_unshift($items,
36
      l(
37
        t(theme('cdm_feature_name', array('feature_name' => 'Number of Taxa'))),
38
        $_GET['q'],
39
        array(
40
          'query' => $http_request_params,
41
          'attributes' => array('class' => array('toc')),
42
          'fragment' => generalizeString('Number Of Taxa'),
43
        )
44
      )
45
    );
46
  }
21
  /**
22
   * Implements hook_cdm_feature_node_toc_items_alter()
23
   *
24
   * FIXME hook_cdm_feature_node_toc_items_alter() no longer exists, use cdm_toc_list_add_item() instead
25
   */
26
  function palmweb_cdm_feature_node_toc_items_alter($items){
47 27

  
48
  // Setting the Anchor to the Bibliography section if the option is enabled.
49
  $show_bibliography = variable_get('cdm_show_bibliography', 1);
28
    $http_request_params = drupal_get_query_parameters();
29
    $countFeatures = count($items);
50 30

  
51
  $markerTypes['markerTypes'] = UUID_MARKERTYPE_USE;
52
  $useDescriptions = cdm_ws_get(CDM_WS_PORTAL_TAXON_DESCRIPTIONS, substr(strrchr($_GET["q"], '/'), 1), queryString($markerTypes));
53
  if (!empty($useDescriptions)) {
54
    $items[] = l(
55
          t(theme('cdm_feature_name', array('feature_name' => 'Uses'))),
31
    // number of taxa
32
    $numberOfChildren = count(cdm_ws_get(CDM_WS_PORTAL_TAXONOMY_CHILDNODES_OF_TAXON, array (
33
        get_taxonomictree_uuid_selected(),
34
        substr(strrchr($_GET["q"],'/'), 1),
35
    )));
36
    if ($numberOfChildren != 0) {
37
      array_unshift($items,
38
        l(
39
          t(theme('cdm_feature_name', array('feature_name' => 'Number of Taxa'))),
56 40
          $_GET['q'],
57 41
          array(
58
              'query' => $http_request_params,
59
              'attributes' => array('class' => array('toc')),
60
              'fragment' => 'userecords'
42
            'query' => $http_request_params,
43
            'attributes' => array('class' => array('toc')),
44
            'fragment' => generalizeString('Number Of Taxa'),
61 45
          )
62
        );
63
  }
46
        )
47
      );
48
    }
64 49

  
65
  if ($show_bibliography && $countFeatures != 0) {
66
    $items[] = l(
67
          t(theme('cdm_feature_name', array('feature_name' => 'Bibliography'))),
68
          $_GET['q'],
69
          array(
70
              'query' => $http_request_params,
71
              'attributes' => array('class' => array('toc')),
72
              'fragment' => 'bibliography'
50
    // Setting the Anchor to the Bibliography section if the option is enabled.
51
    $show_bibliography = variable_get('cdm_show_bibliography', 1);
52

  
53
    $markerTypes['markerTypes'] = UUID_MARKERTYPE_USE;
54
    $useDescriptions = cdm_ws_get(CDM_WS_PORTAL_TAXON_DESCRIPTIONS, substr(strrchr($_GET["q"], '/'), 1), queryString($markerTypes));
55
    if (!empty($useDescriptions)) {
56
      $items[] = l(
57
            t(theme('cdm_feature_name', array('feature_name' => 'Uses'))),
58
            $_GET['q'],
59
            array(
60
                'query' => $http_request_params,
61
                'attributes' => array('class' => array('toc')),
62
                'fragment' => 'userecords'
73 63
            )
74 64
          );
75
  }
76
  return $items;
77
}
65
    }
66

  
67
    if ($show_bibliography && $countFeatures != 0) {
68
      $items[] = l(
69
            t(theme('cdm_feature_name', array('feature_name' => 'Bibliography'))),
70
            $_GET['q'],
71
            array(
72
                'query' => $http_request_params,
73
                'attributes' => array('class' => array('toc')),
74
                'fragment' => 'bibliography'
75
              )
76
            );
77
    }
78
    return $items;
79
  }
7.x/themes/palmweb_2/template.php
107 107

  
108 108
  foreach ($mergedFeatureNodes as $node) {
109 109

  
110

  
111

  
112 110
    if (isset($node->descriptionElements['#type']) || has_feature_node_description_elements($node)) {
113 111

  
114 112
      $featureRepresentation = isset($node->feature->representation_L10n) ? $node->feature->representation_L10n : 'Feature';

Also available in: Unified diff