Revision b810c46f
Added by Andreas Kohlbecker over 3 years ago
modules/cdm_dataportal/includes/descriptions.inc | ||
---|---|---|
849 | 849 |
/* |
850 | 850 |
* Footnotes for the feature block |
851 | 851 |
*/ |
852 |
$block->content[] = markup_to_render_array(theme('cdm_footnotes', array('footnoteListKey' => PSEUDO_FEATURE_BIBLIOGRAPHY . '-' . $feature_node->term->uuid)));
|
|
853 |
$block->content[] = markup_to_render_array(theme('cdm_footnotes', array('footnoteListKey' => $feature_node->term->uuid)));
|
|
852 |
$block->content[] = markup_to_render_array(cdm_footnotes(PSEUDO_FEATURE_BIBLIOGRAPHY . '-' . $feature_node->term->uuid));
|
|
853 |
$block->content[] = markup_to_render_array(cdm_footnotes($feature_node->term->uuid));
|
|
854 | 854 |
$block->content[] = markup_to_render_array(cdm_annotation_footnotes($feature_node->term->uuid)); |
855 | 855 |
} |
856 | 856 |
} // END all other features |
... | ... | |
1148 | 1148 |
); |
1149 | 1149 |
} |
1150 | 1150 |
|
1151 |
$block->content[] = markup_to_render_array(theme('cdm_footnotes', array('footnoteListKey' => 'BIBLIOGRAPHY-' . UUID_DISTRIBUTION)));
|
|
1152 |
$block->content[] = markup_to_render_array(theme('cdm_footnotes', array('footnoteListKey' => UUID_DISTRIBUTION)));
|
|
1151 |
$block->content[] = markup_to_render_array(cdm_footnotes('BIBLIOGRAPHY-' . UUID_DISTRIBUTION));
|
|
1152 |
$block->content[] = markup_to_render_array(cdm_footnotes(UUID_DISTRIBUTION));
|
|
1153 | 1153 |
$block->content[] = markup_to_render_array(cdm_annotation_footnotes(UUID_DISTRIBUTION)); |
1154 | 1154 |
|
1155 | 1155 |
return $block; |
... | ... | |
1772 | 1772 |
$text_data_out, $feature |
1773 | 1773 |
); |
1774 | 1774 |
|
1775 |
$footnotes = theme('cdm_footnotes', array('footnoteListKey' => 'BIBLIOGRAPHY-' . $footnote_key_suggestion));
|
|
1776 |
$footnotes .= theme('cdm_footnotes', array('footnoteListKey' => $footnote_key_suggestion)); // FIXME is this needed at all?
|
|
1775 |
$footnotes = cdm_footnotes('BIBLIOGRAPHY-' . $footnote_key_suggestion);
|
|
1776 |
$footnotes .= cdm_footnotes($footnote_key_suggestion); // FIXME is this needed at all?
|
|
1777 | 1777 |
$footnotes .= cdm_annotation_footnotes($footnote_key_suggestion); |
1778 | 1778 |
|
1779 | 1779 |
return markup_to_render_array( // FIXME markup_to_render_array should no longer be needed |
modules/cdm_dataportal/includes/name.inc | ||
---|---|---|
1441 | 1441 |
|
1442 | 1442 |
RenderHints::popFromRenderStack(); |
1443 | 1443 |
if(RenderHints::getFootnoteListKey() == $key) { |
1444 |
$render_array['footnotes'] = markup_to_render_array(theme('cdm_footnotes', array('footnoteListKey' => RenderHints::getFootnoteListKey())));
|
|
1444 |
$render_array['footnotes'] = markup_to_render_array(cdm_footnotes(RenderHints::getFootnoteListKey()));
|
|
1445 | 1445 |
RenderHints::clearFootnoteListKey(); |
1446 | 1446 |
} |
1447 | 1447 |
return $render_array; |
modules/cdm_dataportal/includes/occurrences.inc | ||
---|---|---|
761 | 761 |
|
762 | 762 |
$derivatives[] = $occurrence_elements; |
763 | 763 |
// all footnotes which has been assembled so far (e.g. from typeDesignations) to here |
764 |
// $foonote_li_elements = theme('cdm_footnotes', array('footnoteListKey' => RenderHints::getFootnoteListKey(), 'enclosingTag' => 'span'));
|
|
764 |
// $foonote_li_elements = cdm_footnotes(RenderHints::getFootnoteListKey(), 'span');
|
|
765 | 765 |
// if (!empty($foonote_li_elements)) { |
766 | 766 |
// $derivatives[] = array( |
767 | 767 |
// '#markup' => '<div class="footnotes">' . $foonote_li_elements . '</div>', |
modules/cdm_dataportal/includes/taxon-node.inc | ||
---|---|---|
72 | 72 |
$status_markup[] = sprintf($tokes['status'], ''); |
73 | 73 |
} |
74 | 74 |
} |
75 |
$render_array['taxon-node-status'] = markup_to_render_array($label . ': ' . join('; ', $status_markup) . theme('cdm_footnotes', array('footnoteListKey' => RenderHints::getFootnoteListKey())));
|
|
75 |
$render_array['taxon-node-status'] = markup_to_render_array($label . ': ' . join('; ', $status_markup) . cdm_footnotes(RenderHints::getFootnoteListKey()));
|
|
76 | 76 |
$render_array['taxon-node-status']['#prefix'] = '<div class="taxon-node-status">'; |
77 | 77 |
$render_array['taxon-node-status']['#suffix'] = '</div>'; |
78 | 78 |
} |
modules/cdm_dataportal/includes/taxon.inc | ||
---|---|---|
209 | 209 |
$out .= '</ul>'; |
210 | 210 |
} |
211 | 211 |
|
212 |
$footnotes = theme('cdm_footnotes', array('footnoteListKey' => $footnote_list_key, 'enclosingTag' => 'li'));
|
|
212 |
$footnotes = cdm_footnotes($footnote_list_key, 'li');
|
|
213 | 213 |
$footnotes .= cdm_annotation_footnotes($footnote_list_key,'li'); |
214 | 214 |
|
215 | 215 |
$out .= '<ul class="footnotes">' . $footnotes . '</ul>'; |
modules/cdm_dataportal/theme/cdm_dataportal.common.theme | ||
---|---|---|
178 | 178 |
} |
179 | 179 |
|
180 | 180 |
/** |
181 |
* @todo Please document this function. |
|
182 |
* @see http://drupal.org/node/1354 |
|
181 |
* Create markup for the footnotes mapped to the $footnoteListKey. |
|
182 |
* |
|
183 |
* @param null $footnote_list_key |
|
184 |
* The footnote list key, see RenderHints::getFootnoteListKey() |
|
185 |
* @param $element_tag |
|
186 |
* The tag for the footnote element |
|
187 |
* |
|
188 |
* @return string |
|
189 |
* @throws \Exception |
|
183 | 190 |
*/ |
184 |
function cdm_annotation_footnotes($footnoteListKey = null, $enclosingTag = span) {
|
|
191 |
function cdm_annotation_footnotes($footnote_list_key = null, $element_tag = 'span') {
|
|
185 | 192 |
if (variable_get('cdm_dataportal_annotations_footnotes', CDM_DATAPORTAL_ALL_FOOTNOTES)) { |
186 | 193 |
return ''; |
187 | 194 |
} |
188 |
return theme('cdm_footnotes', array('footnoteListKey' => $footnoteListKey . '-annotations', 'enclosingTag' => $enclosingTag));
|
|
195 |
return cdm_footnotes($footnote_list_key . '-annotations', $element_tag);
|
|
189 | 196 |
} |
190 | 197 |
|
191 | 198 |
/** |
... | ... | |
283 | 290 |
} |
284 | 291 |
|
285 | 292 |
/** |
286 |
* @todo Please document this function. |
|
287 |
* @see http://drupal.org/node/1354 |
|
293 |
* Create markup for the footnotes mapped to the $footnoteListKey. |
|
294 |
* |
|
295 |
* @param null $footnote_list_key |
|
296 |
* The footnote list key, see RenderHints::getFootnoteListKey() |
|
297 |
* @param $element_tag |
|
298 |
* The tag for the footnote element |
|
299 |
* |
|
300 |
* @return string |
|
288 | 301 |
*/ |
289 |
function theme_cdm_footnotes($variables) { |
|
290 |
$footnoteListKey = $variables['footnoteListKey']; |
|
291 |
$enclosingTag = $variables['enclosingTag']; |
|
302 |
function cdm_footnotes($footnote_list_key = null, $element_tag = 'span') { |
|
303 |
|
|
292 | 304 |
if (variable_get('cdm_dataportal_all_footnotes', CDM_DATAPORTAL_ALL_FOOTNOTES)) { |
293 | 305 |
return ''; |
294 | 306 |
} |
295 | 307 |
|
296 |
$out = '<' . $enclosingTag . ' class="footnotes footnotes-' . $footnoteListKey . ' ">'
|
|
297 |
. FootnoteManager::renderFootnoteList($footnoteListKey)
|
|
298 |
. '</' . $enclosingTag . '>';
|
|
308 |
$out = '<' . $element_tag . ' class="footnotes footnotes-' . $footnote_list_key . ' ">'
|
|
309 |
. FootnoteManager::renderFootnoteList($footnote_list_key)
|
|
310 |
. '</' . $element_tag . '>';
|
|
299 | 311 |
|
300 |
FootnoteManager::removeFootnoteList($footnoteListKey);
|
|
312 |
FootnoteManager::removeFootnoteList($footnote_list_key);
|
|
301 | 313 |
return $out; |
302 | 314 |
} |
303 | 315 |
|
modules/cdm_dataportal/theme/cdm_dataportal.media.theme | ||
---|---|---|
308 | 308 |
); |
309 | 309 |
$out .= drupal_render($description_list_item); |
310 | 310 |
|
311 |
$out .= theme('cdm_footnotes', array('footnoteListKey' => $footnote_list_key));
|
|
311 |
$out .= cdm_footnotes($footnote_list_key);
|
|
312 | 312 |
|
313 | 313 |
return $out; |
314 | 314 |
} |
modules/cdm_dataportal/theme/cdm_dataportal.name.theme | ||
---|---|---|
60 | 60 |
// ------- footnotes ------- // |
61 | 61 |
$out .= '<ul class="footnotes">'; |
62 | 62 |
$out .= cdm_annotation_footnotes(RenderHints::getFootnoteListKey(), 'li'); |
63 |
$out .= theme('cdm_footnotes', array('footnoteListKey' => RenderHints::getFootnoteListKey(), 'enclosingTag' => 'li'));
|
|
63 |
$out .= cdm_footnotes(RenderHints::getFootnoteListKey(), 'li');
|
|
64 | 64 |
$out .= '</ul>'; |
65 | 65 |
|
66 | 66 |
$out .= '</div>'; |
... | ... | |
125 | 125 |
// rendered here, both should have the same footnote key |
126 | 126 |
$out .= '<ul class="footnotes">'; |
127 | 127 |
$out .= cdm_annotation_footnotes(RenderHints::getFootnoteListKey(), 'li'); |
128 |
$out .= theme('cdm_footnotes', array('footnoteListKey' => RenderHints::getFootnoteListKey(), 'enclosingTag' => 'li'));
|
|
128 |
$out .= cdm_footnotes(RenderHints::getFootnoteListKey(), 'li');
|
|
129 | 129 |
$out .= '</ul>'; |
130 | 130 |
|
131 | 131 |
$out .= '</div>'; |
modules/cdm_dataportal/theme/theme_registry.inc | ||
---|---|---|
47 | 47 |
'separator_off' => FALSE, |
48 | 48 |
)), |
49 | 49 |
'cdm_footnote' => array('variables' => array('footnoteKey' => NULL, 'footnoteText' => NULL, 'enclosing_tag' => 'span')), |
50 |
'cdm_footnotes' => array('variables' => array( |
|
51 |
'footnoteListKey' => NULL, |
|
52 |
'enclosingTag' => 'span', |
|
53 |
)), |
|
54 | 50 |
'cdm_annotations' => array('variables' => array('annotations' => NULL, 'enclosingTag' => 'span')), |
55 | 51 |
'cdm_marker' => array('variables' => array('label' => NULL, 'attributes' => NULL)), |
56 | 52 |
'cdm_pager' => array('variables' => array('pager' => NULL, 'path' => NULL, 'parameters' => NULL)), |
Also available in: Unified diff
ref #8543 refactoring theme_cdm_footnotes to normal function