[TASK] Cleanup TCA select field configuration
[Packages/TYPO3.CMS.git] / typo3 / sysext / workspaces / Configuration / TCA / sys_workspace.php
1 <?php
2 return array(
3 'ctrl' => array(
4 'label' => 'title',
5 'tstamp' => 'tstamp',
6 'title' => 'LLL:EXT:lang/locallang_tca.xlf:sys_workspace',
7 'adminOnly' => 1,
8 'rootLevel' => 1,
9 'delete' => 'deleted',
10 'iconfile' => 'mimetypes-x-sys_workspace',
11 'typeicon_classes' => array(
12 'default' => 'mimetypes-x-sys_workspace'
13 ),
14 'versioningWS_alwaysAllowLiveEdit' => TRUE
15 ),
16 'columns' => array(
17 'title' => array(
18 'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.title',
19 'config' => array(
20 'type' => 'input',
21 'size' => '20',
22 'max' => '30',
23 'eval' => 'required,trim,unique'
24 )
25 ),
26 'description' => array(
27 'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.description',
28 'config' => array(
29 'type' => 'text',
30 'rows' => 5,
31 'cols' => 30
32 )
33 ),
34 'adminusers' => array(
35 'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_workspace.adminusers',
36 'config' => array(
37 'type' => 'group',
38 'internal_type' => 'db',
39 'allowed' => 'be_users,be_groups',
40 'prepend_tname' => 1,
41 'size' => '3',
42 'maxitems' => '10',
43 'autoSizeMax' => 10,
44 'show_thumbs' => '1',
45 'wizards' => array(
46 'suggest' => array(
47 'type' => 'suggest'
48 )
49 )
50 )
51 ),
52 'members' => array(
53 'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_workspace.members',
54 'config' => array(
55 'type' => 'group',
56 'internal_type' => 'db',
57 'allowed' => 'be_users,be_groups',
58 'prepend_tname' => 1,
59 'size' => '3',
60 'maxitems' => '100',
61 'autoSizeMax' => 10,
62 'show_thumbs' => '1',
63 'wizards' => array(
64 'suggest' => array(
65 'type' => 'suggest'
66 )
67 )
68 )
69 ),
70 'db_mountpoints' => array(
71 'label' => 'LLL:EXT:lang/locallang_tca.xlf:db_mountpoints',
72 'config' => array(
73 'type' => 'group',
74 'internal_type' => 'db',
75 'allowed' => 'pages',
76 'size' => '3',
77 'maxitems' => 25,
78 'autoSizeMax' => 10,
79 'show_thumbs' => '1',
80 'wizards' => array(
81 'suggest' => array(
82 'type' => 'suggest'
83 )
84 )
85 )
86 ),
87 'file_mountpoints' => array(
88 'label' => 'LLL:EXT:lang/locallang_tca.xlf:file_mountpoints',
89 'config' => array(
90 'type' => 'select',
91 'renderType' => 'selectCheckBox',
92 'foreign_table' => 'sys_filemounts',
93 'foreign_table_where' => ' AND sys_filemounts.pid=0 ORDER BY sys_filemounts.title',
94 'size' => '3',
95 'maxitems' => 25,
96 'autoSizeMax' => 10,
97 )
98 ),
99 'publish_time' => array(
100 'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_workspace.publish_time',
101 'config' => array(
102 'type' => 'input',
103 'size' => '8',
104 'eval' => 'datetime',
105 'default' => '0',
106 'checkbox' => '0'
107 )
108 ),
109 'unpublish_time' => array(
110 'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_workspace.unpublish_time',
111 'config' => array(
112 'type' => 'input',
113 'size' => '8',
114 'eval' => 'datetime',
115 'checkbox' => '0',
116 'default' => '0',
117 'range' => array(
118 'upper' => mktime(0, 0, 0, 12, 31, 2020)
119 )
120 ),
121 'displayCond' => 'FALSE'
122 ),
123 'freeze' => array(
124 'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_workspace.freeze',
125 'config' => array(
126 'type' => 'check',
127 'default' => '0'
128 )
129 ),
130 'live_edit' => array(
131 'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_workspace.live_edit',
132 'config' => array(
133 'type' => 'check',
134 'default' => '0'
135 )
136 ),
137 'swap_modes' => array(
138 'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_workspace.swap_modes',
139 'config' => array(
140 'type' => 'select',
141 'renderType' => 'selectSingle',
142 'items' => array(
143 array('', 0),
144 array('Swap-Into-Workspace on Auto-publish', 1),
145 array('Disable Swap-Into-Workspace', 2)
146 )
147 )
148 ),
149 'publish_access' => array(
150 'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_workspace.publish_access',
151 'config' => array(
152 'type' => 'check',
153 'items' => array(
154 array('Publish only content in publish stage', 0),
155 array('Only workspace owner can publish', 0)
156 )
157 )
158 ),
159 'stagechg_notification' => array(
160 'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_workspace.stagechg_notification',
161 'config' => array(
162 'type' => 'select',
163 'renderType' => 'selectSingle',
164 'items' => array(
165 array('', 0),
166 array('Notify users on next stage only', 1),
167 array('Notify all users on any change', 10)
168 )
169 )
170 ),
171 'custom_stages' => array(
172 'exclude' => 1,
173 'label' => 'LLL:EXT:workspaces/Resources/Private/Language/locallang_db.xlf:sys_workspace.custom_stages',
174 'config' => array(
175 'type' => 'inline',
176 'foreign_table' => 'sys_workspace_stage',
177 'appearance' => 'useSortable,expandSingle',
178 'foreign_field' => 'parentid',
179 'foreign_table_field' => 'parenttable',
180 'minitems' => 0
181 ),
182 'default' => 0
183 ),
184 // @deprecated not used anymore
185 'edit_notification_mode' => array(
186 'label' => 'LLL:EXT:workspaces/Resources/Private/Language/locallang_db.xlf:sys_workspace.edit_notification_mode',
187 'config' => array(
188 'type' => 'select',
189 'renderType' => 'selectSingle',
190 'items' => array(
191 array('LLL:EXT:workspaces/Resources/Private/Language/locallang_db.xlf:sys_workspace.notification_mode.0', 0),
192 array('LLL:EXT:workspaces/Resources/Private/Language/locallang_db.xlf:sys_workspace.notification_mode.1', 1),
193 array('LLL:EXT:workspaces/Resources/Private/Language/locallang_db.xlf:sys_workspace.notification_mode.2', 2)
194 )
195 )
196 ),
197 'edit_notification_defaults' => array(
198 'label' => 'LLL:EXT:workspaces/Resources/Private/Language/locallang_db.xlf:sys_workspace_stage.notification_defaults',
199 'displayCond' => 'FIELD:edit_allow_notificaton_settings:BIT:1',
200 'config' => array(
201 'type' => 'group',
202 'internal_type' => 'db',
203 'allowed' => 'be_users,be_groups',
204 'prepend_tname' => 1,
205 'size' => '3',
206 'maxitems' => '100',
207 'autoSizeMax' => 20,
208 'show_thumbs' => '1',
209 'wizards' => array(
210 'suggest' => array(
211 'type' => 'suggest'
212 )
213 )
214 )
215 ),
216 'edit_allow_notificaton_settings' => array(
217 'label' => 'LLL:EXT:workspaces/Resources/Private/Language/locallang_db.xlf:sys_workspace.settingsDialog',
218 'config' => array(
219 'type' => 'check',
220 'items' => array(
221 array('LLL:EXT:workspaces/Resources/Private/Language/locallang_db.xlf:sys_workspace.settingsDialog.showDialog', ''),
222 array('LLL:EXT:workspaces/Resources/Private/Language/locallang_db.xlf:sys_workspace.settingsDialog.changeablePreselection', ''),
223 ),
224 'default' => 3,
225 'cols' => 2,
226 )
227 ),
228 'edit_notification_preselection' => array(
229 'label' => 'LLL:EXT:workspaces/Resources/Private/Language/locallang_db.xlf:sys_workspace.preselection',
230 'config' => array(
231 'type' => 'check',
232 'items' => array(
233 array('LLL:EXT:workspaces/Resources/Private/Language/locallang_db.xlf:sys_workspace.preselection.owners', ''),
234 array('LLL:EXT:workspaces/Resources/Private/Language/locallang_db.xlf:sys_workspace.preselection.members', ''),
235 array('LLL:EXT:workspaces/Resources/Private/Language/locallang_db.xlf:sys_workspace.preselection.editors', ''),
236 ),
237 'default' => 2,
238 'cols' => 3,
239 )
240 ),
241 // @deprecated not used anymore
242 'publish_notification_mode' => array(
243 'label' => 'LLL:EXT:workspaces/Resources/Private/Language/locallang_db.xlf:sys_workspace.publish_notification_mode',
244 'config' => array(
245 'type' => 'select',
246 'renderType' => 'selectSingle',
247 'items' => array(
248 array('LLL:EXT:workspaces/Resources/Private/Language/locallang_db.xlf:sys_workspace.notification_mode.0', 0),
249 array('LLL:EXT:workspaces/Resources/Private/Language/locallang_db.xlf:sys_workspace.notification_mode.1', 1),
250 array('LLL:EXT:workspaces/Resources/Private/Language/locallang_db.xlf:sys_workspace.notification_mode.2', 2)
251 )
252 )
253 ),
254 'publish_notification_defaults' => array(
255 'label' => 'LLL:EXT:workspaces/Resources/Private/Language/locallang_db.xlf:sys_workspace_stage.notification_defaults',
256 'displayCond' => 'FIELD:publish_allow_notificaton_settings:BIT:1',
257 'config' => array(
258 'type' => 'group',
259 'internal_type' => 'db',
260 'allowed' => 'be_users,be_groups',
261 'prepend_tname' => 1,
262 'size' => '3',
263 'maxitems' => '100',
264 'autoSizeMax' => 20,
265 'show_thumbs' => '1',
266 'wizards' => array(
267 'suggest' => array(
268 'type' => 'suggest'
269 )
270 )
271 )
272 ),
273 'publish_allow_notificaton_settings' => array(
274 'label' => 'LLL:EXT:workspaces/Resources/Private/Language/locallang_db.xlf:sys_workspace.settingsDialog',
275 'config' => array(
276 'type' => 'check',
277 'items' => array(
278 array('LLL:EXT:workspaces/Resources/Private/Language/locallang_db.xlf:sys_workspace.settingsDialog.showDialog', ''),
279 array('LLL:EXT:workspaces/Resources/Private/Language/locallang_db.xlf:sys_workspace.settingsDialog.changeablePreselection', ''),
280 ),
281 'default' => 3,
282 'cols' => 2,
283 )
284 ),
285 'publish_notification_preselection' => array(
286 'label' => 'LLL:EXT:workspaces/Resources/Private/Language/locallang_db.xlf:sys_workspace.preselection',
287 'config' => array(
288 'type' => 'check',
289 'items' => array(
290 array('LLL:EXT:workspaces/Resources/Private/Language/locallang_db.xlf:sys_workspace.preselection.owners', ''),
291 array('LLL:EXT:workspaces/Resources/Private/Language/locallang_db.xlf:sys_workspace.preselection.members', ''),
292 array('LLL:EXT:workspaces/Resources/Private/Language/locallang_db.xlf:sys_workspace.preselection.editors', ''),
293 ),
294 'default' => 1,
295 'cols' => 3,
296 )
297 ),
298 'execute_notification_defaults' => array(
299 'label' => 'LLL:EXT:workspaces/Resources/Private/Language/locallang_db.xlf:sys_workspace_stage.notification_defaults',
300 'displayCond' => 'FIELD:execute_allow_notificaton_settings:BIT:1',
301 'config' => array(
302 'type' => 'group',
303 'internal_type' => 'db',
304 'allowed' => 'be_users,be_groups',
305 'prepend_tname' => 1,
306 'size' => '3',
307 'maxitems' => '100',
308 'autoSizeMax' => 20,
309 'show_thumbs' => '1',
310 'wizards' => array(
311 'suggest' => array(
312 'type' => 'suggest'
313 )
314 )
315 )
316 ),
317 'execute_allow_notificaton_settings' => array(
318 'label' => 'LLL:EXT:workspaces/Resources/Private/Language/locallang_db.xlf:sys_workspace.settingsDialog',
319 'config' => array(
320 'type' => 'check',
321 'items' => array(
322 array('LLL:EXT:workspaces/Resources/Private/Language/locallang_db.xlf:sys_workspace.settingsDialog.showDialog', ''),
323 array('LLL:EXT:workspaces/Resources/Private/Language/locallang_db.xlf:sys_workspace.settingsDialog.changeablePreselection', ''),
324 ),
325 'default' => 3,
326 'cols' => 2,
327 )
328 ),
329 'execute_notification_preselection' => array(
330 'label' => 'LLL:EXT:workspaces/Resources/Private/Language/locallang_db.xlf:sys_workspace.preselection',
331 'config' => array(
332 'type' => 'check',
333 'items' => array(
334 array('LLL:EXT:workspaces/Resources/Private/Language/locallang_db.xlf:sys_workspace.preselection.owners', ''),
335 array('LLL:EXT:workspaces/Resources/Private/Language/locallang_db.xlf:sys_workspace.preselection.members', ''),
336 array('LLL:EXT:workspaces/Resources/Private/Language/locallang_db.xlf:sys_workspace.preselection.editors', ''),
337 ),
338 'default' => 3,
339 'cols' => 3,
340 )
341 )
342 ),
343 'palettes' => array(
344 'stage.edit' => array(
345 'canNotCollapse' => TRUE,
346 'showitem' => 'edit_allow_notificaton_settings, edit_notification_preselection,',
347 ),
348 'stage.publish' => array(
349 'canNotCollapse' => TRUE,
350 'showitem' => 'publish_allow_notificaton_settings, publish_notification_preselection,',
351 ),
352 'stage.execute' => array(
353 'canNotCollapse' => TRUE,
354 'showitem' => 'execute_allow_notificaton_settings, execute_notification_preselection,',
355 )
356 ),
357 'types' => array(
358 '0' => array('showitem' => 'title,description,
359 --div--;LLL:EXT:lang/locallang_tca.xlf:sys_filemounts.tabs.users,adminusers,members,
360 --div--;LLL:EXT:workspaces/Resources/Private/Language/locallang_db.xlf:tabs.notification_settings, stagechg_notification,
361 --palette--;LLL:EXT:workspaces/Resources/Private/Language/locallang_db.xml:sys_workspace.palette.stage.edit;stage.edit, edit_notification_defaults,
362 --palette--;LLL:EXT:workspaces/Resources/Private/Language/locallang_db.xml:sys_workspace.palette.stage.publish;stage.publish, publish_notification_defaults,
363 --palette--;LLL:EXT:workspaces/Resources/Private/Language/locallang_db.xml:sys_workspace.palette.stage.execute;stage.execute, execute_notification_defaults,
364 --div--;LLL:EXT:lang/locallang_tca.xlf:sys_filemounts.tabs.mountpoints,db_mountpoints,file_mountpoints,
365 --div--;LLL:EXT:lang/locallang_tca.xlf:sys_filemounts.tabs.publishing,publish_time,unpublish_time,
366 --div--;LLL:EXT:workspaces/Resources/Private/Language/locallang_db.xlf:sys_filemounts.tabs.staging,custom_stages,
367 --div--;LLL:EXT:lang/locallang_tca.xlf:sys_filemounts.tabs.other,freeze,live_edit,swap_modes,publish_access')
368 )
369 );