Revision 7370f4f7
Added by Andreas Kohlbecker about 5 years ago
modules/cdm_dataportal/settings.php | ||
---|---|---|
46 | 46 |
// Additional value for the NULL case. |
47 | 47 |
$annotationTypeKeys[] = 'NULL_VALUE'; |
48 | 48 |
} |
49 |
|
|
50 |
define('ANNOTATION_TYPES_VISIBLE', 'annotations_types_as_footnotes'); |
|
49 | 51 |
define('ANNOTATIONS_TYPES_AS_FOOTNOTES_DEFAULT', serialize($annotationTypeKeys)); |
50 | 52 |
|
51 | 53 |
define('BIBLIOGRAPHY_FOR_ORIGINAL_SOURCE', 'bibliography_for_original_source'); |
... | ... | |
1542 | 1544 |
'#description' => t('Check this if you do not want to show annotation footnotes'), |
1543 | 1545 |
); |
1544 | 1546 |
|
1547 |
$form['annotations'] = array( |
|
1548 |
'#type' => 'fieldset', |
|
1549 |
'#title' => t('Annotations'), |
|
1550 |
'#collapsible' => FALSE, |
|
1551 |
'#collapsed' => FALSE, |
|
1552 |
'#description' => t('This sections allows configuring global settings regarding annotations and thus will affect annotations dispayed as footnote and others.'), |
|
1553 |
); |
|
1554 |
|
|
1545 | 1555 |
$annotationTypeOptions = cdm_terms_by_type_as_option('AnnotationType'); |
1546 | 1556 |
// Additional option for the NULL case. |
1547 | 1557 |
$annotationTypeOptions['NULL_VALUE'] = t('untyped'); |
1548 |
$form['footnotes']['annotations_types_as_footnotes'] = array( |
|
1558 |
$annotationsTypesAsFootnotes = variable_get(ANNOTATION_TYPES_VISIBLE, unserialize(ANNOTATIONS_TYPES_AS_FOOTNOTES_DEFAULT)); |
|
1559 |
$form['annotations'][ANNOTATION_TYPES_VISIBLE] = array( |
|
1549 | 1560 |
'#type' => 'checkboxes', |
1550 |
'#title' => t('Annotation types as footnotes'), |
|
1551 |
'#description' => t("Only annotations of the selected type will be displayed |
|
1552 |
as footnotes. You may want to turn 'technical annotations' off."), |
|
1561 |
'#title' => t('Visbility of annotation types'), |
|
1562 |
'#description' => t("Only annotations of the selected type will be displayed. You may want to turn 'technical annotations' off."), |
|
1553 | 1563 |
'#options' => $annotationTypeOptions, |
1564 |
'#default_value' => $annotationsTypesAsFootnotes |
|
1554 | 1565 |
); |
1555 |
$annotationsTypesAsFootnotes = variable_get('annotations_types_as_footnotes', unserialize(ANNOTATIONS_TYPES_AS_FOOTNOTES_DEFAULT)); |
|
1556 |
if (!empty($annotationsTypesAsFootnotes)) { |
|
1557 |
$form['footnotes']['annotations_types_as_footnotes']['#default_value'] = $annotationsTypesAsFootnotes; |
|
1558 |
} |
|
1566 |
|
|
1559 | 1567 |
|
1560 | 1568 |
// ---- original source --- // |
1561 | 1569 |
$form[BIBLIOGRAPHY_FOR_ORIGINAL_SOURCE] = array( |
Also available in: Unified diff
fix #7907 centalizing annotation filtering:
- annotation type filter settings are general
- render hint for reference page
- cdm_fetch_visible_annotations() implemented