Project

General

Profile

« Previous | Next » 

Revision aec9ca7d

Added by Andreas Kohlbecker almost 4 years ago

fix #9076 fixing missing synonymie div

View differences:

modules/cdm_dataportal/includes/pages.inc
333 333
    if ($page_part == 'all') {
334 334
      $synonymy_html .= '<h2>' . t(cdm_taxonpage_tab_label('Synonymy')) . '</h2>';
335 335
    }
336
    $addAcceptedTaxon = variable_get('cdm_dataportal_nomref_in_title', CDM_DATAPORTAL_NOMREF_IN_TITLE);
336
    $addAcceptedTaxon = variable_get(CDM_DATAPORTAL_NOMREF_IN_TITLE, CDM_DATAPORTAL_NOMREF_IN_TITLE_DEFAULT);
337 337

  
338 338
    $synonym_a = compose_cdm_taxon_page_synonymy($taxon, $addAcceptedTaxon);
339 339
    $synonymy_html .= drupal_render($synonym_a);
......
391 391

  
392 392
  // set up the TOC for the pages which contain all pageparts
393 393
  if($page_part == 'all') {
394

  
394
    $toc_elements = [];
395 395
    asort($taxontabs_weights);
396 396
    foreach(array_keys($taxontabs_weights) as $tab_key){
397 397
      if(isset($render_array[$tab_key])){
......
434 434
        '#suffix' => '</div>',
435 435
        '#prefix'=> '<div id="page-toc">'
436 436
    );
437

  
437 438
  }
438 439

  
439 440

  
......
543 544
  if($add_synonymy){
544 545
    $synonymy_a = compose_cdm_taxon_page_synonymy($taxon, true);
545 546
    $synonymy_a['#weight'] = -102;
547
    $synonymy_a['#prefix'] = '<div id="synonymy">';
548
    $synonymy_a['#suffix'] = '</div>';
546 549
    $render_array['synonymy'] = $synonymy_a;
547 550
  }
548 551

  
modules/cdm_dataportal/settings.php
33 33

  
34 34
  define('SEARCH_RESULTS_SHOW_THUMBNAIL_CHECKBOX_DEFAULT', 1);
35 35
  define('SEARCH_RESULTS_SHOW_THUMBNAIL_CHECKBOX', 'search_results_show_thumbnail_checkbox');
36

  
37
  define('CDM_DATAPORTAL_NOMREF_IN_TITLE', 1);
36
 const CDM_DATAPORTAL_NOMREF_IN_TITLE = 'cdm_dataportal_nomref_in_title';
37
 const CDM_DATAPORTAL_NOMREF_IN_TITLE_DEFAULT =  1;
38 38
  define('CDM_DATAPORTAL_COMPRESSED_SPECIMEN_DERIVATE_TABLE', 0);
39 39
  define('CDM_DATAPORTAL_COMPRESSED_SPECIMEN_DERIVATE_TABLE_PAGE_SIZE', 50);
40 40
  define('CDM_DATAPORTAL_COMPRESSED_SPECIMEN_DERIVATE_TABLE_SHOW_DETERMINED_AS', 0);
......
2597 2597
  $form['taxon_synonymy']['cdm_dataportal_nomref_in_title'] = array(
2598 2598
    '#type' => 'checkbox',
2599 2599
    '#title' => t('Accepted taxon on top of the synonymy'),
2600
    '#default_value' => variable_get('cdm_dataportal_nomref_in_title', CDM_DATAPORTAL_NOMREF_IN_TITLE),
2600
    '#default_value' => variable_get('cdm_dataportal_nomref_in_title', CDM_DATAPORTAL_NOMREF_IN_TITLE_DEFAULT),
2601 2601
    '#description' => t('If checked, the first homotypic taxon is a repetition
2602 2602
      of the accepted taxon most likely with the full nomenclatural reference, 
2603 2603
      depending on the ' . l('Name render templates', 'admin/config/cdm_dataportal/settings/layout') . '.'),
......
2610 2610
    '#description' => t('You may want to remove the <code>"secReferencePart": true,</code> entry from <code>"accepted_taxon.taxon_page_synonymy"{</code> the in the '
2611 2611
      . l('Name render templates', 'admin/config/cdm_dataportal/settings/layout')
2612 2612
      . ' (Only applicable when the "Show accepted taxon on top of the synonymy" option above is enabled.)'),
2613
    '#disabled' =>  !variable_get('cdm_dataportal_nomref_in_title', CDM_DATAPORTAL_NOMREF_IN_TITLE)
2613
    '#disabled' =>  !variable_get(CDM_DATAPORTAL_NOMREF_IN_TITLE, CDM_DATAPORTAL_NOMREF_IN_TITLE_DEFAULT)
2614 2614
  );
2615 2615

  
2616 2616
  $form['taxon_synonymy'][CDM_SYNONYMY_ACCEPTED_TAXON_SEC_SEPARATE_LABEL] = array(

Also available in: Unified diff