Revision c05ac190
Added by Andreas Kohlbecker over 4 years ago
modules/cdm_dataportal/cdm_dataportal.module | ||
---|---|---|
1978 | 1978 |
|
1979 | 1979 |
|
1980 | 1980 |
// related taxa |
1981 |
if ($taxa) { |
|
1982 |
$content['related_taxa_header'] = markup_to_render_array("<h2>Taxa for this name</h2>"); |
|
1983 |
$content['related_taxa'] = compose_list_of_taxa($taxa); |
|
1984 |
} |
|
1985 |
else { |
|
1986 |
$content['related_taxa'] = markup_to_render_array('This name is not assigned to a taxon.', null, '<div class="no-taxon-message">', '</div>'); |
|
1981 |
$show_taxa_section = variable_get(CDM_NAME_PAGE_SECTION_TAXA, CDM_NAME_PAGE_SECTION_TAXA_DEFAULT); |
|
1982 |
if($show_taxa_section){ |
|
1983 |
if ($taxa) { |
|
1984 |
$content['related_taxa_header'] = markup_to_render_array("<h2>Taxa for this name</h2>"); |
|
1985 |
$content['related_taxa'] = compose_list_of_taxa($taxa); |
|
1986 |
} |
|
1987 |
else { |
|
1988 |
$content['related_taxa'] = markup_to_render_array('This name is not assigned to a taxon.', null, '<div class="no-taxon-message">', '</div>'); |
|
1989 |
} |
|
1987 | 1990 |
} |
1988 | 1991 |
|
1989 | 1992 |
$content['footnotes'] = markup_to_render_array(theme('cdm_footnotes', array('footnoteListKey' => RenderHints::getFootnoteListKey()))); |
modules/cdm_dataportal/settings.php | ||
---|---|---|
9 | 9 |
|
10 | 10 |
const CDM_NAME_PAGE_AUTOREDIRECT = 'cdm_name_page_autoredirect'; |
11 | 11 |
|
12 |
const CDM_NAME_PAGE_SECTION_TAXA = 'cdm_name_page_section_taxa'; |
|
13 |
const CDM_NAME_PAGE_SECTION_TAXA_DEFAULT = 1; |
|
14 |
|
|
12 | 15 |
define('TAXONTREE_RANKLIMIT', 'cdm_taxontree_ranklimit'); |
13 | 16 |
define('TAXONTREE_RANKLIMIT_DEFAULT', 0); |
14 | 17 |
define('CDM_TAXONOMICTREE_UUID', 'cdm_taxonomictree_uuid'); |
... | ... | |
2857 | 2860 |
'#default_value' => variable_get(CDM_NAME_RELATIONSHIP_LIST_TYPES, cdm_vocabulary_as_defaults(UUID_NAME_RELATIONSHIP_TYPE)), |
2858 | 2861 |
); |
2859 | 2862 |
|
2863 |
$form[CDM_NAME_PAGE_SECTION_TAXA] = array ( |
|
2864 |
'#type' => 'checkbox', |
|
2865 |
'#title' => 'Show the associated taxa section', |
|
2866 |
'#default_value' => variable_get(CDM_NAME_PAGE_SECTION_TAXA, CDM_NAME_PAGE_SECTION_TAXA_DEFAULT) |
|
2860 | 2867 |
|
2868 |
); |
|
2861 | 2869 |
|
2862 | 2870 |
return system_settings_form($form); |
2863 | 2871 |
} |
Also available in: Unified diff
fix #8504 setting to hide the taxa section in the name page