forked from DGI-USC/usc_mirc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
usc_mirc.admin.inc
166 lines (162 loc) · 7.94 KB
/
usc_mirc.admin.inc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
<?php
function _usc_mirc_get_presets() {
$presets = array();
foreach (imagecache_presets() as $key => $preset) {
$presets[$preset['presetname']] = $preset['presetname'];
}
return $presets;
}
function usc_mirc_admin_form(&$form_state) {
$i = -100;
return system_settings_form(array(
'usc_mirc_mezzanine_collection' => array(
'#type' => 'textfield',
'#weight' => $i++,
'#title' => t('Top mezzanine collection'),
'#description' => t('May the same as the top collection of the Islandora config. Used to populate the list of collections to which a mezzanine may be migrated'),
'#default_value' => variable_get('usc_mirc_mezzanine_collection', variable_get('fedora_repository_pid', 'usc:mirc')),
),
'usc_mirc_namespace' => array(
'#type' => 'textfield',
'#weight' => $i++,
'#title' => t('MIRC PID namespace'),
'#description' => t('The namespace/prefix with which new items will be created in Fedora (where a COLLECTION_POLICY doesn\'t already dictate it).'),
'#default_value' => variable_get('usc_mirc_namespace', 'usc'),
),
'usc_mirc_number_per_page' => array(
'#type' => 'textfield',
'#weight' => $i++,
'#title' => t('Collection items per page'),
'#description' => t('The number of items which will appear in the mezzanine and preservation master collection displays. (A number)'),
'#default_value' => variable_get('usc_mirc_number_per_page', '15'),
),
'usc_mirc_imagecache_thumbnail_preset' => array(
'#type' => 'select',
'#weight' => $i++,
'#title' => t('Collection Thumbnail Imagecache preset'),
'#description' => t('The preset with which thumbnails will be created.'),
'#default_value' => variable_get('usc_mirc_imagecache_thumbnail_preset', 'usc_mirc_thumbnail'),
'#options' => _usc_mirc_get_presets(),
),
'usc_mirc_solr_imagecache_thumbnail_preset' => array(
'#type' => 'select',
'#weight' => $i++,
'#title' => t('Solr Result Thumbnail Imagecache preset'),
'#description' => t('The preset with which thumbnails will be created.'),
'#default_value' => variable_get('usc_mirc_solr_imagecache_thumbnail_preset', 'usc_mirc_solr_imagecache_thumbnail_preset'),
'#options' => _usc_mirc_get_presets(),
),
'autocomplete' => array(
'#type' => 'fieldset',
'#title' => t('Autocompletion'),
'#collapsible' => TRUE,
'#collapsed' => TRUE,
'#weight' => $i++,
'access_autocomplete' => array(
'#type' => 'fieldset',
'#title' => t('Access autocompletion'),
'#collapsible' => TRUE,
//'#collapsed' => TRUE,
'#weight' => $i++,
'usc_mirc_streaming_url' => array(
'#type' => 'textfield',
'#weight' => $i++,
'#title' => t('Streaming base URL'),
'#description' => t('URL (possibly with port and path), without a terminiating slash. (Used during access copy autocompletion)'),
'#default_value' => variable_get('usc_mirc_streaming_url', 'http://dvr-streaming.mirc.sc.edu'),
),
'usc_mirc_streaming_folder' => array(
'#type' => 'textfield',
'#weight' => $i++,
'#title' => t('Streaming folder'),
'#description' => t('Mountpoint/folder on server under which the streaming access copies are located. (Used during access copy autocompletion)'),
'#default_value' => variable_get('usc_mirc_streaming_folder', '/mnt/mirc/mezz/access'),
),
),
'mezzanine_autocomplete' => array(
'#type' => 'fieldset',
'#title' => t('Mezzanine autocompletion'),
'#collapsible' => TRUE,
//'#collapsed' => TRUE,
'#weight' => $i++,
'usc_mirc_mezzanine_url' => array(
'#type' => 'textfield',
'#weight' => $i++,
'#title' => t('Mezzanine base URL'),
'#description' => t('URL (possibly with port and path), without a terminiating slash. (Used during mezzanine autocompletion)'),
'#default_value' => variable_get('usc_mirc_mezzanine_url', '/mnt/mirc/mezz/mezzanine'),
),
'usc_mirc_mezzanine_folder' => array(
'#type' => 'textfield',
'#weight' => $i++,
'#title' => t('Mezzanine folder'),
'#description' => t('Mountpoint/folder on server under which the streaming access copies are located. (Used during mezzanine autocompletion)'),
'#default_value' => variable_get('usc_mirc_mezzanine_folder', '/mnt/mirc/mezz/mezzanine'),
),
'usc_mirc_mezzanine_type_vocab' => array(
'#type' => 'textfield',
'#weight' => $i++,
'#title' => t('Type Taxonomy vocabulary'),
'#description' => t('A taxonomy to use for the select box in the mezzanine ingest/edit form. (There is a minimal default if it does not exist.)'),
'#default_value' => variable_get('usc_mirc_mezzanine_type_vocab', 'usc_mirc_mezzanine_type_vocab'),
),
'usc_mirc_mezzanine_format_vocab' => array(
'#type' => 'textfield',
'#weight' => $i++,
'#title' => t('Format Taxonomy vocabulary'),
'#description' => t('A taxonomy to use for the select box in the mezzanine ingest/edit form. (There is a minimal default if it does not exist.)'),
'#default_value' => variable_get('usc_mirc_mezzanine_format_vocab', 'usc_mirc_mezzanine_format_vocab'),
),
),
'usc_mirc_streaming_extensions' => array(
'#type' => 'textfield',
'#weight' => $i++,
'#title' => t('File extensions'),
'#description' => t('Space-separated list of file extensions to autocomplete'),
'#default_value' => variable_get('usc_mirc_streaming_extensions', '.m4v .mp4 .flv .mov'),
),
),
'breakables' => array(
'#type' => 'fieldset',
'#title' => t('Breakables (CAUTION!)'),
'#description' => t('Settings which probably should not be touched after the initial installation.'),
'#collapsible' => TRUE,
'#collapsed' => TRUE,
'#weight' => $i++,
'usc_mirc_relationship' => array(
'#type' => 'textfield',
'#weight' => $i++,
'#title' => t('Relationship'),
'#description' => t('RELS-EXT relationship used to relate mezzanines to VROs and access copies to mezzanines. Probably a bad idea to change this after objects have already been created, as existing objects will not be changed.'),
'#default_value' => variable_get('usc_mirc_relationship', 'isDerivativeOf'),
),
'cmodels' => array(
'#type' => 'fieldset',
'#weight' => $i++,
'#title' => t('Content Models'),
'#description' => t('Content Models used for different purposes. Probably a bad idea to change any after objects have been created with them (existing objects may be orphaned). Fields may be hidden?'),
'usc_mirc_cmodel_vro' => array(
'#type' => 'textfield',
'#weight' => $i++,
'#title' => t('VRO Content Model'),
'#description' => t('Content Model used for Video Resource Objects.'),
'#default_value' => variable_get('usc_mirc_cmodel_vro', 'usc:test-vro'),
),
'usc_mirc_cmodel_mezzanine' => array(
'#type' => 'textfield',
'#weight' => $i++,
'#title' => t('Mezzanine Content Model'),
'#description' => t('Content Model used for mezzanine objects.'),
'#default_value' => variable_get('usc_mirc_cmodel_mezzanine', 'usc:test-mezzanine'),
),
'usc_mirc_cmodel_access' => array(
'#type' => 'textfield',
'#weight' => $i++,
'#title' => t('Access Content Model'),
'#description' => t('Content Model used for access copy objects.'),
'#default_value' => variable_get('usc_mirc_cmodel_access', 'usc:test-access'),
),
),
),
));
}