Project

General

Profile

Revision a1493182

IDa14931820943bae0ba0b21433d7d1895787b940f
Parent f79d32d6
Child 8bb9f541

Added by Andreas Kohlbecker over 2 years ago

ref #6301 sources as inline elements on media page - bugfix

View differences:

modules/cdm_dataportal/includes/descriptions.inc
330 330
    )
331 331
{
332 332

  
333
  $bibliography_settings = get_bibliography_settings();
334

  
335 333
  return cdm_create_footnotes($description_element,
336 334
    $separator,
337
    original_source_footnote_list_key($footnote_list_key_suggestion),
335
    $footnote_list_key_suggestion,
338 336
    $do_link_to_reference,
339 337
    $do_link_to_name_used_in_source,
340
    $bibliography_settings['enabled'] == 1 ? 'div' : null // null will cause original_source_footnote_list_key to use the default
338
    true
341 339

  
342 340
  );
343 341
}
......
362 360
function cdm_create_footnotes(
363 361
    $description_element,
364 362
    $separator = ',',
365
    $footnote_list_key = null,
363
    $footnote_list_key_suggestion = null,
366 364
    $do_link_to_reference = FALSE,
367 365
    $do_link_to_name_used_in_source = FALSE,
368
    $original_source_footnote_tag = NULL
366
    $is_bibliography_aware = FALSE
369 367
  ){
370 368

  
371 369
  // Annotations as footnotes.
372
  $footNoteKeys = cdm_annotations_as_footnotekeys($description_element, $footnote_list_key);
370
  $footNoteKeys = cdm_annotations_as_footnotekeys($description_element, $footnote_list_key_suggestion);
373 371

  
374 372
  // Source references as footnotes.
373

  
374
  if($is_bibliography_aware){
375
    $bibliography_settings = get_bibliography_settings();
376
    $sources_footnote_list_key = original_source_footnote_list_key($footnote_list_key_suggestion);
377
    $original_source_footnote_tag = $bibliography_settings['enabled'] == 1 ? 'div' : null; // null will cause original_source_footnote_list_key to use the default
378
  } else {
379
    $sources_footnote_list_key = $footnote_list_key_suggestion;
380
    $original_source_footnote_tag = NULL;
381
  }
382

  
375 383
  usort($description_element->sources, 'compare_original_sources');
376 384
  foreach ($description_element->sources as $source) {
377 385
    if (_is_original_source_type($source)) {
378 386
      $fn_key = FootnoteManager::addNewFootnote(
379
        $footnote_list_key,
387
        $sources_footnote_list_key,
380 388
        theme('cdm_OriginalSource', array(
381 389
          'source' => $source,
382 390
          'doLink' => $do_link_to_reference,

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)