Revision f19f47fa
Added by Andreas Kohlbecker about 9 years ago
7.x/modules/cdm_dataportal/settings.php | ||
---|---|---|
29 | 29 |
} |
30 | 30 |
define('ANNOTATIONS_TYPES_AS_FOOTNOTES_DEFAULT', serialize($annotationTypeKeys)); |
31 | 31 |
|
32 |
define('BIBLIOGRAPHY_FOR_ORIGINAL_SOURCE', 'bibliography_for_original_source'); |
|
33 |
|
|
32 | 34 |
/* taxonRelationshipTypes */ |
33 | 35 |
define('CDM_TAXON_RELATIONSHIP_TYPES_DEFAULT', serialize(array(UUID_MISAPPLIED_NAME_FOR, UUID_INVALID_DESIGNATION_FOR))); |
34 | 36 |
|
35 | 37 |
|
36 | 38 |
|
37 | 39 |
/* ---- MAP SETTING CONSTANTS ---- */ |
38 |
/**
|
|
39 |
* @var array of URIs eg. http://edit.africamuseum.be"
|
|
40 |
* An options array
|
|
40 |
/** |
|
41 |
* @var array of URIs eg. http://edit.africamuseum.be" |
|
42 |
* An options array |
|
41 | 43 |
*/ |
42 | 44 |
define('EDIT_MAPSERVER_URI', serialize( |
43 | 45 |
array( |
... | ... | |
51 | 53 |
* @var array of versions eg. "v1.2" |
52 | 54 |
* An options array |
53 | 55 |
*/ |
54 |
define('EDIT_MAPSERVER_VERSION', serialize(
|
|
56 |
define('EDIT_MAPSERVER_VERSION', serialize( |
|
55 | 57 |
array( |
56 | 58 |
'v1' => 'v1' , |
57 | 59 |
'v1.1' => 'v1.1', |
... | ... | |
59 | 61 |
'v1.2' => 'v1.2', |
60 | 62 |
'v1.3_dev' => 'v1.3_dev', |
61 | 63 |
'v1.4_dev' => 'v1.4_dev' |
62 |
)
|
|
64 |
) |
|
63 | 65 |
) |
64 | 66 |
); |
65 | 67 |
define('EDIT_MAPSERVER_URI_DEFAULT', 'http://edit.africamuseum.be'); |
... | ... | |
127 | 129 |
|
128 | 130 |
define('CDM_PART_DEFINITIONS', 'cdm-part-definitions'); |
129 | 131 |
define('CDM_PART_DEFINITIONS_DEFAULT', serialize( |
130 |
array(
|
|
131 |
'ZoologicalName' => array(
|
|
132 |
array( |
|
133 |
'ZoologicalName' => array( |
|
132 | 134 |
'namePart' => array('name' => TRUE), |
133 |
'nameAuthorPart' => array('name' => TRUE),
|
|
134 |
'referencePart' => array('authors' => TRUE),
|
|
135 |
'microreferencePart' => array('microreference' => TRUE),
|
|
136 |
'statusPart' => array('status' => TRUE),
|
|
137 |
'descriptionPart' => array('description' => TRUE),
|
|
138 |
),
|
|
135 |
'nameAuthorPart' => array('name' => TRUE), |
|
136 |
'referencePart' => array('authors' => TRUE), |
|
137 |
'microreferencePart' => array('microreference' => TRUE), |
|
138 |
'statusPart' => array('status' => TRUE), |
|
139 |
'descriptionPart' => array('description' => TRUE), |
|
140 |
), |
|
139 | 141 |
'BotanicalName'=> array( |
140 | 142 |
'namePart' => array('name' => TRUE), |
141 | 143 |
'nameAuthorPart' => array('name' => TRUE, 'authors' => TRUE), |
... | ... | |
143 | 145 |
'referenceYearPart' => array('reference.year' => TRUE), |
144 | 146 |
'statusPart' => array('status' => TRUE), |
145 | 147 |
'descriptionPart' => array('description' => TRUE), |
146 |
),
|
|
147 |
'#DEFAULT' => array(
|
|
148 |
'namePart' => array(
|
|
149 |
'name' => TRUE
|
|
148 |
), |
|
149 |
'#DEFAULT' => array( |
|
150 |
'namePart' => array( |
|
151 |
'name' => TRUE |
|
150 | 152 |
), |
151 | 153 |
'nameAuthorPart' => array( |
152 | 154 |
'name' => TRUE, |
153 | 155 |
'authors' => TRUE |
154 |
),
|
|
155 |
'referencePart' => array(
|
|
156 |
'reference' => TRUE
|
|
157 |
),
|
|
158 |
'microreferencePart' => array(
|
|
159 |
'microreference' => TRUE,
|
|
160 |
),
|
|
161 |
'statusPart' => array(
|
|
162 |
'status' => TRUE,
|
|
163 |
),
|
|
164 |
'descriptionPart' => array(
|
|
165 |
'description' => TRUE,
|
|
166 |
),
|
|
167 |
)
|
|
156 |
), |
|
157 |
'referencePart' => array( |
|
158 |
'reference' => TRUE |
|
159 |
), |
|
160 |
'microreferencePart' => array( |
|
161 |
'microreference' => TRUE, |
|
162 |
), |
|
163 |
'statusPart' => array( |
|
164 |
'status' => TRUE, |
|
165 |
), |
|
166 |
'descriptionPart' => array( |
|
167 |
'description' => TRUE, |
|
168 |
), |
|
169 |
) |
|
168 | 170 |
) |
169 | 171 |
) |
170 | 172 |
); |
171 |
define('CDM_NAME_RENDER_TEMPLATES', 'cdm-name-render-templates');
|
|
173 |
define('CDM_NAME_RENDER_TEMPLATES', 'cdm-name-render-templates'); |
|
172 | 174 |
define('CDM_NAME_RENDER_TEMPLATES_DEFAULT', serialize( |
173 |
array (
|
|
175 |
array ( |
|
174 | 176 |
'taxon_page_title,polytomousKey'=> array( |
175 | 177 |
'namePart' => array('#uri' => TRUE), |
176 | 178 |
), |
... | ... | |
191 | 193 |
'#DEFAULT' => array( |
192 | 194 |
'nameAuthorPart' => array('#uri' => TRUE), |
193 | 195 |
'referencePart' => TRUE, |
194 |
)
|
|
196 |
) |
|
195 | 197 |
) |
196 | 198 |
)); |
197 | 199 |
|
... | ... | |
720 | 722 |
'#description' => 'Check one or more MarkerTypes to define the "hide marked area" filter .', |
721 | 723 |
); |
722 | 724 |
|
723 |
$form['aggregation'] = array(
|
|
724 |
'#type' => 'fieldset',
|
|
725 |
'#title' => t('Aggregation of data'),
|
|
726 |
'#collapsible' => FALSE,
|
|
725 |
$form['aggregation'] = array( |
|
726 |
'#type' => 'fieldset', |
|
727 |
'#title' => t('Aggregation of data'), |
|
728 |
'#collapsible' => FALSE, |
|
727 | 729 |
'#description' => 'This section covers the different aspects of aggregating information. |
728 | 730 |
<p> |
729 |
</p>',
|
|
731 |
</p>', |
|
730 | 732 |
); |
731 | 733 |
|
732 | 734 |
$form['aggregation'][CDM_TAXON_MEDIA_FILTER] = array( |
... | ... | |
746 | 748 |
want to make use of the caching capabilities of the dataportal.', |
747 | 749 |
); |
748 | 750 |
|
749 |
$form['aggregation']['media_aggregation'] = array(
|
|
750 |
'#type' => 'fieldset',
|
|
751 |
'#title' => t('Media aggregation'),
|
|
752 |
'#collapsible' => FALSE,
|
|
751 |
$form['aggregation']['media_aggregation'] = array( |
|
752 |
'#type' => 'fieldset', |
|
753 |
'#title' => t('Media aggregation'), |
|
754 |
'#collapsible' => FALSE, |
|
753 | 755 |
'#collapsed' => TRUE, |
754 |
'#description' => t("The media aggregation is also affected by the settigs in \"<strong>Aggregation via taxon relationsships</strong>\" below."),
|
|
755 |
|
|
756 |
'#description' => t("The media aggregation is also affected by the settigs in \"<strong>Aggregation via taxon relationsships</strong>\" below."), |
|
757 |
|
|
756 | 758 |
); |
757 |
$form['aggregation']['media_aggregation']['cdm_images_include_children'] = array(
|
|
758 |
'#type' => 'select',
|
|
759 |
'#title' => t('Aggregation of taxon pictures') . ':',
|
|
760 |
'#default_value' => variable_get('cdm_images_include_children', FALSE),
|
|
761 |
'#options' => array(
|
|
762 |
0 => "Show only pictures of the current taxon",
|
|
763 |
1 => "Include pictures of taxonomic children",
|
|
764 |
),
|
|
765 |
'#description' => t("Choose whether to include the images of the taxonomic children. This will affect the <em>Images</em> tab and image tumbnails like in the search results."),
|
|
759 |
$form['aggregation']['media_aggregation']['cdm_images_include_children'] = array( |
|
760 |
'#type' => 'select', |
|
761 |
'#title' => t('Aggregation of taxon pictures') . ':', |
|
762 |
'#default_value' => variable_get('cdm_images_include_children', FALSE), |
|
763 |
'#options' => array( |
|
764 |
0 => "Show only pictures of the current taxon", |
|
765 |
1 => "Include pictures of taxonomic children", |
|
766 |
), |
|
767 |
'#description' => t("Choose whether to include the images of the taxonomic children. This will affect the <em>Images</em> tab and image tumbnails like in the search results."), |
|
766 | 768 |
); |
767 | 769 |
|
768 |
$form['aggregation']['aggregate_by_taxon_relationships'][CDM_AGGREGATE_BY_TAXON_RELATIONSHIPS] = array(
|
|
770 |
$form['aggregation']['aggregate_by_taxon_relationships'][CDM_AGGREGATE_BY_TAXON_RELATIONSHIPS] = array( |
|
769 | 771 |
'#type' => 'fieldset', |
770 | 772 |
'#attributes' => array('class'=>array('clearfix')), |
771 | 773 |
'#title' => t('Aggregation via taxon relationsships'), |
772 | 774 |
'#collapsible' => TRUE, |
773 | 775 |
'#collapsed' => TRUE, |
774 |
'#tree' => TRUE,
|
|
776 |
'#tree' => TRUE, |
|
775 | 777 |
'#description' => t('Information on taxa will be aggregated along the below chosen |
776 | 778 |
taxon relation ships. This will affect images and occurrences (specimens). |
777 | 779 |
Taxon relation ships are directed and point form one taxon to another. The taxon |
778 | 780 |
relationships to be taken into accunt can therefore configured for the direct direction |
779 |
and for the inverse.'),
|
|
780 |
);
|
|
781 |
|
|
781 |
and for the inverse.'), |
|
782 |
); |
|
783 |
|
|
782 | 784 |
$taxonRelationshipTypeOptions = cdm_Vocabulary_as_option(UUID_TAXON_RELATIONSHIP_TYPE, '_cdm_relationship_type_term_label_callback'); |
783 | 785 |
$aggregate_by_taxon_relationships = variable_get(CDM_AGGREGATE_BY_TAXON_RELATIONSHIPS, unserialize(CDM_AGGREGATE_BY_TAXON_RELATIONSHIPS_DEFAULT)); |
784 |
|
|
785 |
$form['aggregation']['aggregate_by_taxon_relationships'][CDM_AGGREGATE_BY_TAXON_RELATIONSHIPS]['direct'] = array(
|
|
786 |
'#type' => 'checkboxes',
|
|
787 |
'#title' => t('Direct'),
|
|
788 |
'#options' => $taxonRelationshipTypeOptions,
|
|
789 |
'#default_value' => $aggregate_by_taxon_relationships['direct'],
|
|
786 |
|
|
787 |
$form['aggregation']['aggregate_by_taxon_relationships'][CDM_AGGREGATE_BY_TAXON_RELATIONSHIPS]['direct'] = array( |
|
788 |
'#type' => 'checkboxes', |
|
789 |
'#title' => t('Direct'), |
|
790 |
'#options' => $taxonRelationshipTypeOptions, |
|
791 |
'#default_value' => $aggregate_by_taxon_relationships['direct'], |
|
790 | 792 |
); |
791 |
$form['aggregation']['aggregate_by_taxon_relationships'][CDM_AGGREGATE_BY_TAXON_RELATIONSHIPS]['invers'] = array(
|
|
792 |
'#type' => 'checkboxes',
|
|
793 |
'#title' => t('Invers'),
|
|
794 |
'#options' => $taxonRelationshipTypeOptions,
|
|
795 |
'#default_value' => $aggregate_by_taxon_relationships['invers'],
|
|
793 |
$form['aggregation']['aggregate_by_taxon_relationships'][CDM_AGGREGATE_BY_TAXON_RELATIONSHIPS]['invers'] = array( |
|
794 |
'#type' => 'checkboxes', |
|
795 |
'#title' => t('Invers'), |
|
796 |
'#options' => $taxonRelationshipTypeOptions, |
|
797 |
'#default_value' => $aggregate_by_taxon_relationships['invers'], |
|
796 | 798 |
); |
797 | 799 |
|
798 | 800 |
// ---------------------- |
... | ... | |
888 | 890 |
$form['footnotes']['annotations_types_as_footnotes']['#default_value'] = $annotationsTypesAsFootnotes; |
889 | 891 |
} |
890 | 892 |
|
891 |
// --- Advanced Search --- // |
|
892 |
$form['asearch'] = array( |
|
893 |
'#type' => 'fieldset', |
|
894 |
'#title' => t('Advanced search'), |
|
895 |
'#collapsible' => FALSE, |
|
896 |
'#collapsed' => FALSE, |
|
897 |
); |
|
898 |
$form['asearch']['cdm_dataportal_show_advanced_search'] = array( |
|
899 |
'#type' => 'checkbox', |
|
900 |
'#title' => t('Show advanced search link'), |
|
901 |
'#default_value' => variable_get('cdm_dataportal_show_advanced_search', 1), |
|
902 |
'#description' => t('Check this box if the link to advanced search should be show below the search box.'), |
|
903 |
); |
|
904 |
|
|
905 |
// ---- Taxon Name Rendering --- // |
|
906 |
$form['taxon_name'] = array( |
|
907 |
'#type' => 'fieldset', |
|
908 |
'#title' => t('Taxon name display'), |
|
909 |
'#collapsible' => TRUE, |
|
910 |
'#collapsed' => TRUE, |
|
893 |
// ---- original source --- // |
|
894 |
$form['original_source'] = array( |
|
895 |
'#type' => 'fieldset', |
|
896 |
'#title' => t('Source Citations'), |
|
897 |
'#collapsible' => FALSE, |
|
898 |
'#collapsed' => FALSE, |
|
899 |
); |
|
900 |
|
|
901 |
$form['original_source'][BIBLIOGRAPHY_FOR_ORIGINAL_SOURCE] = array( |
|
902 |
'#type' => 'checkbox', |
|
903 |
'#title' => t('Original Source in bibliography'), |
|
904 |
'#default_value' => variable_get(BIBLIOGRAPHY_FOR_ORIGINAL_SOURCE, 1), |
|
905 |
'#description' => t('Show original source citations in bibliography block, instead of rendering them with other |
|
906 |
annotations in each feature block.'), |
|
907 |
); |
|
908 |
|
|
909 |
// --- Advanced Search --- // |
|
910 |
$form['asearch'] = array( |
|
911 |
'#type' => 'fieldset', |
|
912 |
'#title' => t('Advanced search'), |
|
913 |
'#collapsible' => FALSE, |
|
914 |
'#collapsed' => FALSE, |
|
915 |
); |
|
916 |
$form['asearch']['cdm_dataportal_show_advanced_search'] = array( |
|
917 |
'#type' => 'checkbox', |
|
918 |
'#title' => t('Show advanced search link'), |
|
919 |
'#default_value' => variable_get('cdm_dataportal_show_advanced_search', 1), |
|
920 |
'#description' => t('Check this box if the link to advanced search should be show below the search box.'), |
|
921 |
); |
|
922 |
|
|
923 |
// ---- Taxon Name Rendering --- // |
|
924 |
$form['taxon_name'] = array( |
|
925 |
'#type' => 'fieldset', |
|
926 |
'#title' => t('Taxon name display'), |
|
927 |
'#collapsible' => TRUE, |
|
928 |
'#collapsed' => TRUE, |
|
911 | 929 |
'#description' => t('The display of taxon names is configured by two parts.' |
912 | 930 |
. 'The <srong>name render templates</strong> define the parts of the name to be displayed in the different areas of the data portal pages.' |
913 |
. 'The name parts are defined in the <stong>part definitions</strong>'),
|
|
931 |
. 'The name parts are defined in the <stong>part definitions</strong>'), |
|
914 | 932 |
); |
915 | 933 |
|
916 | 934 |
drupal_add_js( |
... | ... | |
929 | 947 |
'scope' => 'footer' |
930 | 948 |
) |
931 | 949 |
); |
932 |
|
|
950 |
|
|
933 | 951 |
$default_part_definitions = unserialize(CDM_PART_DEFINITIONS_DEFAULT); |
934 | 952 |
|
935 | 953 |
$form['taxon_name'][CDM_PART_DEFINITIONS] = array( |
... | ... | |
1022 | 1040 |
|
1023 | 1041 |
$default_render_templates = unserialize(CDM_NAME_RENDER_TEMPLATES_DEFAULT); |
1024 | 1042 |
|
1025 |
$form['taxon_name'][CDM_NAME_RENDER_TEMPLATES] = array(
|
|
1026 |
'#type' => 'textarea',
|
|
1043 |
$form['taxon_name'][CDM_NAME_RENDER_TEMPLATES] = array( |
|
1044 |
'#type' => 'textarea', |
|
1027 | 1045 |
'#title' => t('Name render templates'), |
1028 |
'#element_validate' => array('form_element_validate_json'),
|
|
1029 |
'#default_value' => json_encode(variable_get(CDM_NAME_RENDER_TEMPLATES, $default_render_templates)),
|
|
1046 |
'#element_validate' => array('form_element_validate_json'), |
|
1047 |
'#default_value' => json_encode(variable_get(CDM_NAME_RENDER_TEMPLATES, $default_render_templates)), |
|
1030 | 1048 |
'#description' => ' |
1031 | 1049 |
<p> |
1032 | 1050 |
(Clearing the text area will reset it to the default) |
... | ... | |
1058 | 1076 |
The namePart, nameAuthorPart and referencePart can also hold an associative array with a single |
1059 | 1077 |
element: array(\'#uri\' => TRUE). The value of the #uri element will be replaced by the according |
1060 | 1078 |
links if the paramters $nameLink or $refenceLink are given to the name render function |
1061 |
(this is hard coded and cannot be configured here).',
|
|
1079 |
(this is hard coded and cannot be configured here).', |
|
1062 | 1080 |
); |
1063 | 1081 |
|
1064 | 1082 |
// @WA: D7 form api does not support reset buttons, |
... | ... | |
1067 | 1085 |
'#markup' => '<input id="reset" type="reset" class="form-submit" value="' . t('Reset to defaults') . '" />', |
1068 | 1086 |
'#weight' => 1000, |
1069 | 1087 |
); |
1070 |
|
|
1088 |
|
|
1071 | 1089 |
$form['#submit'] = array('submit_json_as_php_array'); |
1072 | 1090 |
// #json_elements especially defined for submit_json_as_php_array() |
1073 | 1091 |
$form['#json_elements'] = array(CDM_NAME_RENDER_TEMPLATES, CDM_PART_DEFINITIONS); |
... | ... | |
1604 | 1622 |
$saved_uuid = variable_get(CDM_OCCURRENCE_FEATURETREE_UUID, UUID_DEFAULT_FEATURETREE); |
1605 | 1623 |
if(!isset($featureTrees['options'][$saved_uuid])) { |
1606 | 1624 |
$saved_uuid = UUID_DEFAULT_FEATURETREE; |
1607 |
}
|
|
1608 |
$form['taxon_specimens']['feature_trees'][CDM_OCCURRENCE_FEATURETREE_UUID] = array(
|
|
1609 |
'#type' => 'radios',
|
|
1610 |
'#title' => t('Specimen description feature tree') . ':',
|
|
1611 |
'#default_value' => $saved_uuid,
|
|
1612 |
'#options' => $featureTrees['options'],
|
|
1625 |
} |
|
1626 |
$form['taxon_specimens']['feature_trees'][CDM_OCCURRENCE_FEATURETREE_UUID] = array( |
|
1627 |
'#type' => 'radios', |
|
1628 |
'#title' => t('Specimen description feature tree') . ':', |
|
1629 |
'#default_value' => $saved_uuid, |
|
1630 |
'#options' => $featureTrees['options'], |
|
1613 | 1631 |
'#pre_render' => array('form_pre_render_conditional_form_element', 'radios_prepare_options_suffix'), |
1614 |
'#options_suffixes' => $featureTrees['treeRepresentations'],
|
|
1615 |
'#description' => t('Select the feature tree to be used for displaying specimen descriptions. Click "Show Details" to see the Feature Tree elements.'
|
|
1616 |
),
|
|
1632 |
'#options_suffixes' => $featureTrees['treeRepresentations'], |
|
1633 |
'#description' => t('Select the feature tree to be used for displaying specimen descriptions. Click "Show Details" to see the Feature Tree elements.' |
|
1634 |
), |
|
1617 | 1635 |
); |
1618 | 1636 |
|
1619 | 1637 |
$form_name = CDM_DATAPORTAL_SPECIMEN_GALLERY_NAME; |
... | ... | |
1667 | 1685 |
site at <a href="./?q=admin/build/block">Administer->Site building->Blocks</a></p> '), |
1668 | 1686 |
); |
1669 | 1687 |
|
1670 |
$form['search_settings']['simple_search_ignore_classification'] = array(
|
|
1671 |
'#type' => 'checkbox',
|
|
1672 |
'#title' => t('Ignore the chosen classification in simple search'),
|
|
1673 |
'#default_value' => variable_get('simple_search_ignore_classification', TRUE),
|
|
1688 |
$form['search_settings']['simple_search_ignore_classification'] = array( |
|
1689 |
'#type' => 'checkbox', |
|
1690 |
'#title' => t('Ignore the chosen classification in simple search'), |
|
1691 |
'#default_value' => variable_get('simple_search_ignore_classification', TRUE), |
|
1674 | 1692 |
'#description' => t('The simple search, which can be executed via the search block, |
1675 | 1693 |
will by default search on all classifications. Remove the tick if you want your |
1676 | 1694 |
portal to search on the classification selected in the classification browser |
1677 |
selector.'),
|
|
1695 |
selector.'), |
|
1678 | 1696 |
); |
1679 | 1697 |
|
1680 | 1698 |
$form['search_settings']['cdm_dataportal_search_items_on_page'] = array( |
... | ... | |
1805 | 1823 |
The Geo Server is responsible for generating the maps.'), |
1806 | 1824 |
); |
1807 | 1825 |
|
1808 |
$form['edit_map_server']['base_uri'] = array(
|
|
1826 |
$form['edit_map_server']['base_uri'] = array( |
|
1809 | 1827 |
'#type' => 'select', |
1810 | 1828 |
'#title' => t('EDIT map service') . ':', |
1811 | 1829 |
'#default_value' => $current_geoserver_settings['base_uri'], |
1812 | 1830 |
'#options' => unserialize(EDIT_MAPSERVER_URI), |
1813 | 1831 |
'#description' => t('Select the EDIT map server you want to use within your data portal.'), |
1814 | 1832 |
); |
1815 |
$form['edit_map_server']['version'] = array(
|
|
1816 |
'#type' => 'select',
|
|
1817 |
'#title' => t('Version') . ':',
|
|
1818 |
'#default_value' => $current_geoserver_settings['version'],
|
|
1819 |
'#options' => unserialize(EDIT_MAPSERVER_VERSION),
|
|
1820 |
'#description' => t('The version of the EDIT map services'),
|
|
1833 |
$form['edit_map_server']['version'] = array( |
|
1834 |
'#type' => 'select', |
|
1835 |
'#title' => t('Version') . ':', |
|
1836 |
'#default_value' => $current_geoserver_settings['version'], |
|
1837 |
'#options' => unserialize(EDIT_MAPSERVER_VERSION), |
|
1838 |
'#description' => t('The version of the EDIT map services'), |
|
1821 | 1839 |
); |
1822 | 1840 |
|
1823 | 1841 |
$localhostkey = 'ABQIAAAAFho6eHAcUOTHLmH9IYHAeBRi_j0U6kJrkFvY4-OX2XYmEAa76BTsyMmEq-tn6nFNtD2UdEGvfhvoCQ'; |
Also available in: Unified diff
basic implementation of #4314 (taxon page: display of bibliography in a block on the taxon page)