Project

General

Profile

Revision 14832ae9

ID14832ae945e7f6e03c37e80e677f1ffb9de7ca10
Parent f264279e
Child 4c812e71

Added by Andreas Kohlbecker about 1 year ago

ref #8304 global switch to enable the name page redirecting to taxa

View differences:

modules/cdm_dataportal/cdm_dataportal.module
2268 2268
    $res = 'cdm_dataportal/name/' . $name_uuid .
2269 2269
    '/' . (is_uuid($taxon_to_hide_uuid) ? $taxon_to_hide_uuid : "null") .
2270 2270
    '/' . (is_uuid($highlited_synonym_uuid) ? $highlited_synonym_uuid : "null") .
2271
    '/' . ($redirect_to_taxon ? "redirect_to_taxon" : "");
2271
    '/' . ($redirect_to_taxon || variable_get(CDM_NAME_PAGE_AUTOREDIRECT, 0) ? "redirect_to_taxon" : "");
2272 2272
  }
2273 2273

  
2274 2274
  return $res;
modules/cdm_dataportal/settings.php
7 7

  
8 8
  // TODO Genus UUID.
9 9

  
10
  define('TAXONTREE_RANKLIMIT', 'cdm_taxontree_ranklimit');
11
  define('TAXONTREE_RANKLIMIT_DEFAULT', 0);
10
const CDM_NAME_PAGE_AUTOREDIRECT = 'cdm_name_page_autoredirect';
11

  
12
define('TAXONTREE_RANKLIMIT', 'cdm_taxontree_ranklimit');
13
define('TAXONTREE_RANKLIMIT_DEFAULT', 0);
12 14
  define('CDM_TAXONOMICTREE_UUID', 'cdm_taxonomictree_uuid');
13 15
  define('CDM_TAXONTREE_INCLUDES', 'taxontree_includes');
14 16

  
......
1633 1635
      '#description' => t('Check this box if the link to advanced search should be show below the search box.'),
1634 1636
  );
1635 1637

  
1638
  // --- Name page autoredirect feature --- //
1639
  $form['name_page'] = array(
1640
    '#type' => 'fieldset',
1641
    '#title' => t('Name page'),
1642
    '#collapsible' => FALSE,
1643
    '#collapsed' => FALSE,
1644
  );
1645
  $form['name_page'][CDM_NAME_PAGE_AUTOREDIRECT] = array(
1646
    '#type' => 'checkbox',
1647
    '#title' => 'Always redirect to taxon',
1648
    '#default_value' => variable_get(CDM_NAME_PAGE_AUTOREDIRECT, 0),
1649
    '#description' => t('By checking this option you can globally enable the redirection behavior of the name page. 
1650
    Depending on the context from which a user navigates to the name page the data portal chooses to show the name page or it redirects to the related taxon if there is only one. 
1651
    This option allows to enable this behavior also for contexts in which the redirection normally is not active.'),
1652
  );
1653

  
1636 1654
  // --- Registrations --- //
1637 1655
  $form['registrations'] = array(
1638 1656
    '#type' => 'fieldset',

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)