Revision 6776a5bc
Added by Andreas Kohlbecker over 9 years ago
7.x/modules/cdm_dataportal/settings.php | ||
---|---|---|
462 | 462 |
|
463 | 463 |
// see #3257 (implement means to define the features to show up in the taxonprofile and in the specimen descriptions) |
464 | 464 |
|
465 |
// only needed as final option, when the settings are not having a default |
|
465 | 466 |
$default = array( |
467 |
'DEFAULT' => array( |
|
468 |
'as_list' => 'ul', |
|
469 |
'link_to_reference' => FALSE, |
|
470 |
'link_to_name_used_in_source' => TRUE, |
|
471 |
'sources_as_content' => TRUE, |
|
472 |
'sources_as_content_to_bibliography' => FALSE, |
|
473 |
'sort_elements' => NULL, |
|
474 |
'glue' => '', |
|
475 |
'element_tag'=> NULL |
|
476 |
) |
|
477 |
); |
|
478 |
|
|
479 |
// will be used as preset in the settings |
|
480 |
$other_themes_default = array( |
|
466 | 481 |
'DEFAULT' => array( |
467 | 482 |
'as_list' => 'ul', |
468 | 483 |
'link_to_reference' => FALSE, |
... | ... | |
571 | 586 |
), |
572 | 587 |
); |
573 | 588 |
|
589 |
$cyprus_default = $cichorieae_default; |
|
590 |
$cyprus_default[UUID_DISTRIBUTION ] = array( |
|
591 |
'as_list' => 'div', // currently ignored |
|
592 |
'link_to_reference' => FALSE, |
|
593 |
'link_to_name_used_in_source' => FALSE, |
|
594 |
'sources_as_content' => FALSE, |
|
595 |
'sources_as_content_to_bibliography' => FALSE, |
|
596 |
'sort_elements' => NULL, // will cause ... |
|
597 |
'glue' => '', |
|
598 |
'element_tag'=> 'div' |
|
599 |
); |
|
600 |
|
|
574 | 601 |
$default_theme = variable_get('theme_default', NULL); |
575 | 602 |
|
576 | 603 |
switch ($default_theme){ |
577 | 604 |
case 'garland_cichorieae': |
605 |
$settings_for_theme = $cichorieae_default; |
|
606 |
break; |
|
578 | 607 |
case 'cyprus': |
579 | 608 |
// cyprus: no longer used in production, |
580 | 609 |
// but is required for selenium tests see class eu.etaxonomy.dataportal.pages.PortalPage |
581 |
$settings_for_theme = $cichorieae_default;
|
|
610 |
$settings_for_theme = $cyprus_default;
|
|
582 | 611 |
break; |
583 | 612 |
case 'flore_afrique_centrale': |
584 | 613 |
case 'flora_malesiana': |
... | ... | |
590 | 619 |
$settings_for_theme = $palmweb_default; |
591 | 620 |
break; |
592 | 621 |
default: |
593 |
$settings_for_theme = $default; |
|
622 |
$settings_for_theme = $other_themes_default;
|
|
594 | 623 |
} |
595 | 624 |
|
596 | 625 |
if(isset($settings_for_theme[$feature_uuid])){ |
597 | 626 |
return $settings_for_theme[$feature_uuid]; |
598 | 627 |
} else if(isset($settings_for_theme['DEFAULT'])){ |
599 |
return $settings_for_theme['DEFAULT']; |
|
600 |
} else if(isset($settings_for_theme[$feature_uuid])){ |
|
601 |
return $default[$feature_uuid]; |
|
628 |
return $settings_for_theme['DEFAULT']; // the fallback cascade will usually stop here since all settings should have a default |
|
602 | 629 |
} else { |
603 | 630 |
return $default['DEFAULT']; |
604 | 631 |
} |
Also available in: Unified diff
adjusting feature block settings