Project

General

Profile

« Previous | Next » 

Revision 9ece0f7b

Added by Andreas Kohlbecker over 3 years ago

ref #8543 refactoring cdm_footnotes to normal function

View differences:

modules/cdm_dataportal/theme/cdm_dataportal.common.theme
274 274
}
275 275

  
276 276
/**
277
 * @todo Please document this function.
278
 * @see http://drupal.org/node/1354
277
 * @param null $footnoteKey
278
 * @param null $footnoteText
279
 * @param string $enclosing_tag
280
 *   default is 'span'
281
 *
282
 * @return string
279 283
 */
280
function theme_cdm_footnote($variables) {
281
  $footnoteKey = $variables['footnoteKey'];
282
  $footnoteText = $variables['footnoteText'];
283
  $enclosing_tag = $variables['enclosing_tag'];
284
function footnote_markup($footnoteKey = null, $footnoteText = null, $enclosing_tag = 'span') {
284 285
  _add_js_footnotes();
285
  $out = '<' . $enclosing_tag . ' class="footnote footnote-' . $footnoteKey . '">'
286
  if($enclosing_tag == null){
287
    $enclosing_tag = 'span';
288
  }
289
  return '<' . $enclosing_tag . ' class="footnote footnote-' . $footnoteKey . '">'
286 290
    . '<a name="footnote-' . $footnoteKey . '"></a>'
287 291
    . '<span class="footnote-anchor">' . $footnoteKey . '.</span>&nbsp;' . $footnoteText
288 292
    . '</' . $enclosing_tag . '>';
289
  return $out;
290 293
}
291 294

  
292 295
/**

Also available in: Unified diff