Project

General

Profile

« Previous | Next » 

Revision 991ae630

Added by Andreas Kohlbecker over 2 years ago

ref #8850 annotations for FieldUnits and nameTypeDesignations in registration and name page

View differences:

modules/cdm_dataportal/theme/cdm_dataportal.common.theme
303 303
  return $out;
304 304
}
305 305

  
306
/**
307
 * Renders the footnotes for annotations and sources, etc.
308
 *
309
 * @param string $footnote_list_key
310
 *    RenderHints::getFootnoteListKey() will be used if this parameter is undefined.
311
 * @param string $enclosingTag
312
 *    Default tag is 'span'
313
 *
314
 * @return string
315
 *    The markup string
316
 *
317
 */
318
function render_cdm_footnotes(string $footnote_list_key = NULL, string $enclosingTag = 'span'){
319

  
320
  if (variable_get('cdm_dataportal_all_footnotes', CDM_DATAPORTAL_ALL_FOOTNOTES)) {
321
    return '';
322
  }
323
  if(!$footnote_list_key){
324
    $footnote_list_key = RenderHints::getFootnoteListKey();
325
  }
326

  
327
  $out = '<' . $enclosingTag . ' class="footnotes footnotes-' . $footnote_list_key . ' ">'
328
    . FootnoteManager::renderFootnoteList($footnote_list_key . '-annotations') . ' ' . FootnoteManager::renderFootnoteList($footnote_list_key)
329
    . '</' . $enclosingTag . '>';
330
  FootnoteManager::removeFootnoteList($footnote_list_key . '-annotations');
331
  FootnoteManager::removeFootnoteList($footnote_list_key);
332
  return $out;
333
}
334

  
306 335
/**
307 336
 * @todo Please document this function.
308 337
 * @see http://drupal.org/node/1354

Also available in: Unified diff