Revision 80d21b78
Added by Andreas Kohlbecker over 5 years ago
modules/cdm_dataportal/settings.php | ||
---|---|---|
12 | 12 |
define('CDM_TAXONOMICTREE_UUID', 'cdm_taxonomictree_uuid'); |
13 | 13 |
define('CDM_TAXONTREE_INCLUDES', 'taxontree_includes'); |
14 | 14 |
|
15 |
define('CDM_SUB_TREE_FILTER_UUID', 'cdm_sub_tree_filter_uuid'); |
|
16 |
|
|
15 | 17 |
define('NO_SORT', -1); |
16 | 18 |
define('SORT_HIERARCHICAL', 9); |
17 | 19 |
|
... | ... | |
1216 | 1218 |
'#default_value' => variable_get('cdm_webservice_proxy_pwd', FALSE), |
1217 | 1219 |
); |
1218 | 1220 |
|
1221 |
$form['sub_tree_filter'] = array( |
|
1222 |
'#type' => 'fieldset', |
|
1223 |
'#title' => t('Subtree filter'), |
|
1224 |
'#collapsible' => FALSE, |
|
1225 |
'#collapsed' => TRUE, |
|
1226 |
'#description' => t('The Data Portal can be restricted to the taxa which belong to a specific classification subtree. Other taxa will not be shown or accessible otherwise.'), |
|
1227 |
); |
|
1228 |
|
|
1229 |
$sub_tree_filter_uuid_value = variable_get(CDM_SUB_TREE_FILTER_UUID, FALSE); |
|
1230 |
$taxon_node_info = ''; |
|
1231 |
if($sub_tree_filter_uuid_value){ |
|
1232 |
$taxon_node_dto = cdm_ws_get(CDM_WS_TAXONNODE, array($sub_tree_filter_uuid_value)); |
|
1233 |
if($taxon_node_dto){ |
|
1234 |
$taxon_node_info = " Current taxon node: <strong>" . cdm_tagged_text_to_markup($taxon_node_dto->taggedTitle) . " [" . $taxon_node_dto->treeIndex . "]</strong>"; |
|
1235 |
} |
|
1236 |
} |
|
1237 |
$form['sub_tree_filter'][CDM_SUB_TREE_FILTER_UUID] = array( |
|
1238 |
'#type' => 'textfield', |
|
1239 |
'#title' => t('Taxon Node UUID') . ':', |
|
1240 |
'#default_value' => variable_get(CDM_SUB_TREE_FILTER_UUID, FALSE), |
|
1241 |
'#description' => "The uuid of the TaxonNode entity to be used as filter." . $taxon_node_info |
|
1242 |
); |
|
1243 |
|
|
1219 | 1244 |
// TODO: settings are still incomplete, compare with |
1220 | 1245 |
// trunk/dataportal/inc/config_default.php.inc. |
1221 | 1246 |
$form['taxon_tree'] = array( |
Also available in: Unified diff
fix #7759 implementing classification subtree filtering