Project

General

Profile

« Previous | Next » 

Revision 6421984d

Added by Andreas Kohlbecker about 8 years ago

#5697 display of taxonRelationShipTypes configurable

View differences:

modules/cdm_dataportal/settings.php
348 348
// define('CDM_DATAPORTAL_DISPLAY_NAME_RELATIONSHIPS_2', array("default" => t('Display all')));
349 349
define('CDM_DATAPORTAL_DISPLAY_TAXON_RELATIONSHIPS_DEFAULT', 1);
350 350
define('CDM_DATAPORTAL_DISPLAY_NAME_RELATIONSHIPS_DEFAULT', 1);
351

  
351 352
/**
352 353
 * The drupal variable key for the array containing the uuids of the taxon relationship types to display in
353 354
 * the snonymy.
......
355 356
 * @var string
356 357
 */
357 358
define('CDM_TAXON_RELATIONSHIP_TYPES', 'cdm_taxon_relationship_types');
359

  
360
define('CDM_NAME_RELATIONSHIP_TYPES', 'cdm_name_relationship_types');
361
define('CDM_NAME_RELATIONSHIP_TYPES_DEFAULT', serialize(
362
    array(
363
      UUID_NAMERELATIONSHIPTYPE_LATER_HOMONYM,
364
      UUID_NAMERELATIONSHIPTYPE_TREATED_AS_LATER_HOMONYM,
365
      UUID_NAMERELATIONSHIPTYPE_BLOCKING_NAME_FOR
366
    )
367
  )
368
);
369

  
358 370
/**
359 371
 * The drupal variable for the configuration of the information aggregation along
360 372
 * the taxon relation ships. The mapped arrayis associative and holds two elements:
......
1679 1691
    '#type' => 'fieldset',
1680 1692
    '#title' => t('Taxon tabs'),
1681 1693
    '#collapsible' => TRUE,
1682
    '#collapsed' => FALSE,
1694
    '#collapsed' => TRUE,
1683 1695
    '#description' => t('If tabbed taxon page is enabled the taxon profile will
1684 1696
      be splitted in four diferent tabs; General, Synonymy, Images and
1685 1697
      Specimens. If the taxon has no information for any of the tabs/sections
......
1740 1752
    '#description' => t('<p>This section covers the settings related to the taxon
1741 1753
      profile tab, also known as the <strong>"General"</strong> tab.</p>'),
1742 1754
    '#collapsible' => TRUE,
1743
    '#collapsed' => FALSE,
1755
    '#collapsed' => TRUE,
1744 1756
  );
1745 1757

  
1746 1758
  // ---- PROFILE PICTURE ----//
......
1770 1782
   */
1771 1783
  $form['taxon_profile'][CDM_TAXON_PROFILE_IMAGE]['show'] = array(
1772 1784
    '#type' => 'checkbox',
1773
    '#title' => t('Enable profil picture'),
1774
    '#description' => t('Show the profil picture.'),
1785
    '#title' => t('Enable profile picture'),
1786
    '#description' => t('Show the profile picture.'),
1775 1787
    '#default_value' => $taxon_profile_image_settings['show'],
1776 1788
  );
1777 1789

  
1778 1790
  $form['taxon_profile'][CDM_TAXON_PROFILE_IMAGE]['maxextend'] = array(
1779 1791
      '#type' => 'textfield',
1780 1792
      '#tree' => TRUE,
1781
      '#title' => t('Profil picture maximum extend'),
1793
      '#title' => t('Profile picture maximum extend'),
1782 1794
      '#default_value' =>  $taxon_profile_image_settings['maxextend'],
1783 1795
      '#field_suffix' => 'px',
1784 1796
      '#maxlength' => 4,
......
2220 2232
  );
2221 2233
 */
2222 2234

  
2223
  $form['taxon_synonymy'][CDM_DATAPORTAL_DISPLAY_TAXON_RELATIONSHIPS] = array(
2235
  $form['taxon_synonymy']['taxon_relations'] = array(
2236
    '#type' => 'fieldset',
2237
    '#title' => t('Taxon relationships'),
2238
    '#collapsible' => FALSE,
2239
    '#collapsed' => FALSE
2240
  );
2241

  
2242
  $form['taxon_synonymy']['taxon_relations'][CDM_DATAPORTAL_DISPLAY_TAXON_RELATIONSHIPS] = array(
2224 2243
    '#type' => 'checkbox',
2225 2244
    '#title' => t('Show taxon relations ships of accepted taxon'),
2226 2245
    '#default_value' => variable_get(CDM_DATAPORTAL_DISPLAY_TAXON_RELATIONSHIPS, CDM_DATAPORTAL_DISPLAY_TAXON_RELATIONSHIPS_DEFAULT),
......
2229 2248
  );
2230 2249

  
2231 2250
  $taxonRelationshipTypeOptions = cdm_Vocabulary_as_option(UUID_TAXON_RELATIONSHIP_TYPE, '_cdm_relationship_type_term_label_callback');
2232
  $form['taxon_synonymy'][CDM_TAXON_RELATIONSHIP_TYPES] = array(
2251
  $form['taxon_synonymy']['taxon_relations'][CDM_TAXON_RELATIONSHIP_TYPES] = array(
2233 2252
    '#type' => 'checkboxes',
2234 2253
    '#title' => t('Taxon relationship types') . ':',
2235 2254
    '#description' => t('Only taxon relationships of the selected type will be
......
2239 2258
    '#disabled' => !variable_get(CDM_DATAPORTAL_DISPLAY_TAXON_RELATIONSHIPS, CDM_DATAPORTAL_DISPLAY_TAXON_RELATIONSHIPS_DEFAULT),
2240 2259
  );
2241 2260

  
2261
  $form['taxon_synonymy']['name_relations'] = array(
2262
    '#type' => 'fieldset',
2263
    '#title' => t('Name relationships'),
2264
    '#collapsible' => FALSE,
2265
    '#collapsed' => FALSE
2266
  );
2267

  
2268
  $taxonRelationshipTypeOptions = cdm_Vocabulary_as_option(UUID_NAME_RELATIONSHIP_TYPE, '_cdm_relationship_type_term_label_callback');
2269
  $form['taxon_synonymy']['name_relations'][CDM_NAME_RELATIONSHIP_TYPES] = array(
2270
    '#type' => 'checkboxes',
2271
    '#title' => t('Name relationship types') . ':',
2272
    '#description' => t('Only name relationships of the selected type will be
2273
      displayed'),
2274
    '#options' => $taxonRelationshipTypeOptions,
2275
    '#default_value' => variable_get(CDM_NAME_RELATIONSHIP_TYPES, unserialize(CDM_NAME_RELATIONSHIP_TYPES_DEFAULT)),
2276
  );
2277

  
2242 2278
  // ====== SPECIMENS ====== //
2243 2279
  $form['taxon_specimens'] = array(
2244 2280
    '#type' => 'fieldset',

Also available in: Unified diff