... | ... |
@@ -110,7 +110,7 @@ $GLOBALS['TL_DCA']['tl_esm_clients_projects'] = array |
110 | 110 |
// Palettes |
111 | 111 |
'palettes' => array |
112 | 112 |
( |
113 |
- 'default' => '{title_legend},title,alias;{categorize_legend},type;{details_legend},text,projectUrl,services,features,tech;{images_legend},gallerySRC;{invisible_legend:hide},invisible,start,stop' |
|
113 |
+ 'default' => '{title_legend},title,alias;{categorize_legend},type;{details_legend},text,projectUrl,services,features,tech;{images_legend},gallerySRC,desktopSRC,phoneSRC,tabletSRC;{invisible_legend:hide},invisible,start,stop' |
|
114 | 114 |
), |
115 | 115 |
|
116 | 116 |
// Fields |
... | ... |
@@ -194,7 +194,7 @@ $GLOBALS['TL_DCA']['tl_esm_clients_projects'] = array |
194 | 194 |
'label' => &$GLOBALS['TL_LANG']['tl_esm_clients_projects']['features'], |
195 | 195 |
'inputType' => 'listWizard', |
196 | 196 |
'exclude' => true, |
197 |
- 'eval' => array('mandatory'=>true), |
|
197 |
+ 'eval' => array('mandatory'=>false), |
|
198 | 198 |
'sql' => "text NULL" |
199 | 199 |
), |
200 | 200 |
'tech' => array |
... | ... |
@@ -242,6 +242,30 @@ $GLOBALS['TL_DCA']['tl_esm_clients_projects'] = array |
242 | 242 |
'inputType' => 'text', |
243 | 243 |
'eval' => array('rgxp'=>'datim', 'datepicker'=>true, 'tl_class'=>'w50 wizard'), |
244 | 244 |
'sql' => "varchar(10) NOT NULL default ''" |
245 |
- ) |
|
245 |
+ ), |
|
246 |
+ 'desktopSRC' => array |
|
247 |
+ ( |
|
248 |
+ 'label' => &$GLOBALS['TL_LANG']['tl_esm_clients_projects']['desktopSRC'], |
|
249 |
+ 'exclude' => true, |
|
250 |
+ 'inputType' => 'fileTree', |
|
251 |
+ 'eval' => array('fieldType'=>'radio', 'filesOnly'=>true, 'extensions'=>\Config::get('validImageTypes')), |
|
252 |
+ 'sql' => "binary(16) NULL" |
|
253 |
+ ), |
|
254 |
+ 'phoneSRC' => array |
|
255 |
+ ( |
|
256 |
+ 'label' => &$GLOBALS['TL_LANG']['tl_esm_clients_projects']['phoneSRC'], |
|
257 |
+ 'exclude' => true, |
|
258 |
+ 'inputType' => 'fileTree', |
|
259 |
+ 'eval' => array('fieldType'=>'radio', 'filesOnly'=>true, 'extensions'=>\Config::get('validImageTypes')), |
|
260 |
+ 'sql' => "binary(16) NULL" |
|
261 |
+ ), |
|
262 |
+ 'tabletSRC' => array |
|
263 |
+ ( |
|
264 |
+ 'label' => &$GLOBALS['TL_LANG']['tl_esm_clients_projects']['tabletSRC'], |
|
265 |
+ 'exclude' => true, |
|
266 |
+ 'inputType' => 'fileTree', |
|
267 |
+ 'eval' => array('fieldType'=>'radio', 'filesOnly'=>true, 'extensions'=>\Config::get('validImageTypes')), |
|
268 |
+ 'sql' => "binary(16) NULL" |
|
269 |
+ ), |
|
246 | 270 |
) |
247 | 271 |
); |
248 | 272 |
\ No newline at end of file |
1 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,247 @@ |
1 |
+<?php |
|
2 |
+ |
|
3 |
+/** |
|
4 |
+ * References for Contao |
|
5 |
+ * |
|
6 |
+ * Copyright (c) 2014 Benjamin Roth [http://www.esales-media.de] |
|
7 |
+ * |
|
8 |
+ * @package eSM_clients |
|
9 |
+ * @link http://www.esales-media.de |
|
10 |
+ * @license commercial |
|
11 |
+ */ |
|
12 |
+ |
|
13 |
+/** |
|
14 |
+ * Table tl_esm_clients_projects |
|
15 |
+ */ |
|
16 |
+$GLOBALS['TL_DCA']['tl_esm_clients_projects'] = array |
|
17 |
+( |
|
18 |
+ |
|
19 |
+ // Config |
|
20 |
+ 'config' => array |
|
21 |
+ ( |
|
22 |
+ 'dataContainer' => 'Table', |
|
23 |
+ 'ptable' => 'tl_esm_clients', |
|
24 |
+ 'enableVersioning' => true, |
|
25 |
+ 'onload_callback' => array |
|
26 |
+ ( |
|
27 |
+ ), |
|
28 |
+ 'oncopy_callback' => array |
|
29 |
+ ( |
|
30 |
+ ), |
|
31 |
+ 'onsubmit_callback' => array |
|
32 |
+ ( |
|
33 |
+ ), |
|
34 |
+ 'sql' => array |
|
35 |
+ ( |
|
36 |
+ 'keys' => array |
|
37 |
+ ( |
|
38 |
+ 'id' => 'primary', |
|
39 |
+ ) |
|
40 |
+ ) |
|
41 |
+ ), |
|
42 |
+ |
|
43 |
+ // List |
|
44 |
+ 'list' => array |
|
45 |
+ ( |
|
46 |
+ 'sorting' => array |
|
47 |
+ ( |
|
48 |
+ 'mode' => 4, |
|
49 |
+ 'fields' => array('sorting'), |
|
50 |
+ 'panelLayout' => 'filter;search,limit', |
|
51 |
+ 'headerFields' => array('title'), |
|
52 |
+ 'child_record_callback' => array('tl_esm_clients_projects', 'addProjects') |
|
53 |
+ ), |
|
54 |
+ 'global_operations' => array |
|
55 |
+ ( |
|
56 |
+ 'all' => array |
|
57 |
+ ( |
|
58 |
+ 'label' => &$GLOBALS['TL_LANG']['MSC']['all'], |
|
59 |
+ 'href' => 'act=select', |
|
60 |
+ 'class' => 'header_edit_all', |
|
61 |
+ 'attributes' => 'onclick="Backend.getScrollOffset()" accesskey="e"' |
|
62 |
+ ) |
|
63 |
+ ), |
|
64 |
+ 'operations' => array |
|
65 |
+ ( |
|
66 |
+ 'edit' => array |
|
67 |
+ ( |
|
68 |
+ 'label' => &$GLOBALS['TL_LANG']['tl_esm_clients_projects']['edit'], |
|
69 |
+ 'href' => 'act=edit', |
|
70 |
+ 'icon' => 'edit.gif', |
|
71 |
+ ), |
|
72 |
+ 'copy' => array |
|
73 |
+ ( |
|
74 |
+ 'label' => &$GLOBALS['TL_LANG']['tl_esm_clients_projects']['copy'], |
|
75 |
+ 'href' => 'act=copy', |
|
76 |
+ 'icon' => 'copy.gif' |
|
77 |
+ ), |
|
78 |
+ 'delete' => array |
|
79 |
+ ( |
|
80 |
+ 'label' => &$GLOBALS['TL_LANG']['tl_esm_clients_projects']['delete'], |
|
81 |
+ 'href' => 'act=delete', |
|
82 |
+ 'icon' => 'delete.gif', |
|
83 |
+ 'attributes' => 'onclick="if(!confirm(\'' . $GLOBALS['TL_LANG']['MSC']['deleteConfirm'] . '\'))return false;Backend.getScrollOffset()"' |
|
84 |
+ ), |
|
85 |
+ 'toggle' => array |
|
86 |
+ ( |
|
87 |
+ 'label' => &$GLOBALS['TL_LANG']['tl_esm_clients_projects']['toggle'], |
|
88 |
+ 'icon' => 'visible.gif', |
|
89 |
+ 'attributes' => 'onclick="Backend.getScrollOffset();return AjaxRequest.toggleVisibility(this,%s)"', |
|
90 |
+ 'button_callback' => array('tl_esm_clients_projects', 'toggleIcon') |
|
91 |
+ ), |
|
92 |
+ 'show' => array |
|
93 |
+ ( |
|
94 |
+ 'label' => &$GLOBALS['TL_LANG']['tl_esm_clients_projects']['show'], |
|
95 |
+ 'href' => 'act=show', |
|
96 |
+ 'icon' => 'show.gif' |
|
97 |
+ ) |
|
98 |
+ ) |
|
99 |
+ ), |
|
100 |
+ |
|
101 |
+ // Select |
|
102 |
+ 'select' => array |
|
103 |
+ ( |
|
104 |
+ 'buttons_callback' => array |
|
105 |
+ ( |
|
106 |
+ array('tl_esm_clients_projects', 'addAliasButton') |
|
107 |
+ ) |
|
108 |
+ ), |
|
109 |
+ |
|
110 |
+ // Palettes |
|
111 |
+ 'palettes' => array |
|
112 |
+ ( |
|
113 |
+ 'default' => '{title_legend},title,alias;{categorize_legend},type;{details_legend},text,projectUrl,services,features,tech;{images_legend},gallerySRC;{invisible_legend:hide},invisible,start,stop' |
|
114 |
+ ), |
|
115 |
+ |
|
116 |
+ // Fields |
|
117 |
+ 'fields' => array |
|
118 |
+ ( |
|
119 |
+ 'id' => array |
|
120 |
+ ( |
|
121 |
+ 'sql' => "int(10) unsigned NOT NULL auto_increment" |
|
122 |
+ ), |
|
123 |
+ 'pid' => array |
|
124 |
+ ( |
|
125 |
+ 'foreignKey' => 'tl_esm_clients.title', |
|
126 |
+ 'sql' => "int(10) unsigned NOT NULL default '0'", |
|
127 |
+ 'relation' => array('type'=>'belongsTo', 'load'=>'lazy') |
|
128 |
+ ), |
|
129 |
+ 'sorting' => array |
|
130 |
+ ( |
|
131 |
+ 'sql' => "int(10) unsigned NOT NULL default '0'" |
|
132 |
+ ), |
|
133 |
+ 'tstamp' => array |
|
134 |
+ ( |
|
135 |
+ 'sql' => "int(10) unsigned NOT NULL default '0'" |
|
136 |
+ ), |
|
137 |
+ 'alias' => array |
|
138 |
+ ( |
|
139 |
+ 'label' => &$GLOBALS['TL_LANG']['tl_esm_clients_projects']['alias'], |
|
140 |
+ 'exclude' => true, |
|
141 |
+ 'search' => true, |
|
142 |
+ 'inputType' => 'text', |
|
143 |
+ 'eval' => array('rgxp'=>'alias', 'unique'=>true, 'maxlength'=>128, 'tl_class'=>'w50'), |
|
144 |
+ 'save_callback' => array |
|
145 |
+ ( |
|
146 |
+ array('tl_esm_clients_projects', 'generateAlias') |
|
147 |
+ ), |
|
148 |
+ 'sql' => "varchar(128) COLLATE utf8_bin NOT NULL default ''" |
|
149 |
+ ), |
|
150 |
+ 'title' => array |
|
151 |
+ ( |
|
152 |
+ 'label' => &$GLOBALS['TL_LANG']['tl_esm_clients_projects']['title'], |
|
153 |
+ 'inputType' => 'text', |
|
154 |
+ 'exclude' => true, |
|
155 |
+ 'eval' => array('mandatory'=>true, 'maxlength'=>128,'tl_class'=>'w50'), |
|
156 |
+ 'sql' => "varchar(128) NOT NULL default ''" |
|
157 |
+ ), |
|
158 |
+ 'text' => array |
|
159 |
+ ( |
|
160 |
+ 'label' => &$GLOBALS['TL_LANG']['tl_esm_clients_projects']['text'], |
|
161 |
+ 'inputType' => 'textarea', |
|
162 |
+ 'exclude' => true, |
|
163 |
+ 'eval' => array('mandatory'=>true, 'maxlength'=>1024, 'rte'=>'tinyMCE'), |
|
164 |
+ 'sql' => "varchar(1024) NOT NULL default ''" |
|
165 |
+ ), |
|
166 |
+ 'type' => array |
|
167 |
+ ( |
|
168 |
+ 'label' => &$GLOBALS['TL_LANG']['tl_esm_clients_projects']['type'], |
|
169 |
+ 'inputType' => 'select', |
|
170 |
+ 'exclude' => true, |
|
171 |
+ 'options_callback' => array('tl_esm_clients_projects','getTypes'), |
|
172 |
+ 'eval' => array('mandatory'=>true, 'includeBlankOption'=>true,'csv'=>','), |
|
173 |
+ 'sql' => "text NULL" |
|
174 |
+ ), |
|
175 |
+ 'projectUrl' => array |
|
176 |
+ ( |
|
177 |
+ 'label' => &$GLOBALS['TL_LANG']['tl_esm_clients_projects']['projectUrl'], |
|
178 |
+ 'inputType' => 'text', |
|
179 |
+ 'exclude' => true, |
|
180 |
+ 'eval' => array('rgxp'=>'url', 'maxlength'=>128), |
|
181 |
+ 'sql' => "varchar(128) NOT NULL default ''" |
|
182 |
+ ), |
|
183 |
+ 'services' => array |
|
184 |
+ ( |
|
185 |
+ 'label' => &$GLOBALS['TL_LANG']['tl_esm_clients_projects']['services'], |
|
186 |
+ 'inputType' => 'checkboxWizard', |
|
187 |
+ 'exclude' => true, |
|
188 |
+ 'options_callback' => array('tl_esm_clients_projects','getServices'), |
|
189 |
+ 'eval' => array('mandatory'=>true, 'multiple'=>true, 'csv'=>','), |
|
190 |
+ 'sql' => "text NULL" |
|
191 |
+ ), |
|
192 |
+ 'features' => array |
|
193 |
+ ( |
|
194 |
+ 'label' => &$GLOBALS['TL_LANG']['tl_esm_clients_projects']['features'], |
|
195 |
+ 'inputType' => 'listWizard', |
|
196 |
+ 'exclude' => true, |
|
197 |
+ 'eval' => array('mandatory'=>true), |
|
198 |
+ 'sql' => "text NULL" |
|
199 |
+ ), |
|
200 |
+ 'tech' => array |
|
201 |
+ ( |
|
202 |
+ 'label' => &$GLOBALS['TL_LANG']['tl_esm_clients_projects']['tech'], |
|
203 |
+ 'inputType' => 'checkboxWizard', |
|
204 |
+ 'exclude' => true, |
|
205 |
+ 'options_callback' => array('tl_esm_clients_projects','getTech'), |
|
206 |
+ 'eval' => array('mandatory'=>true, 'multiple'=>true, 'csv'=>','), |
|
207 |
+ 'sql' => "text NULL" |
|
208 |
+ ), |
|
209 |
+ 'gallerySRC' => array |
|
210 |
+ ( |
|
211 |
+ 'label' => &$GLOBALS['TL_LANG']['tl_esm_clients_projects']['gallerySRC'], |
|
212 |
+ 'exclude' => true, |
|
213 |
+ 'inputType' => 'fileTree', |
|
214 |
+ 'eval' => array('multiple'=>true, 'fieldType'=>'checkbox', 'orderField'=>'galleryOrder', 'files'=>true, 'mandatory'=>true, 'extensions'=>\Config::get('validImageTypes'), 'isGallery'=>true), |
|
215 |
+ 'sql' => "blob NULL" |
|
216 |
+ ), |
|
217 |
+ 'galleryOrder' => array |
|
218 |
+ ( |
|
219 |
+ 'label' => &$GLOBALS['TL_LANG']['tl_esm_clients_projects']['galleryOrder'], |
|
220 |
+ 'sql' => "blob NULL" |
|
221 |
+ ), |
|
222 |
+ 'invisible' => array |
|
223 |
+ ( |
|
224 |
+ 'label' => &$GLOBALS['TL_LANG']['tl_esm_clients_projects']['invisible'], |
|
225 |
+ 'exclude' => true, |
|
226 |
+ 'filter' => true, |
|
227 |
+ 'inputType' => 'checkbox', |
|
228 |
+ 'sql' => "char(1) NOT NULL default ''" |
|
229 |
+ ), |
|
230 |
+ 'start' => array |
|
231 |
+ ( |
|
232 |
+ 'exclude' => true, |
|
233 |
+ 'label' => &$GLOBALS['TL_LANG']['tl_esm_clients_projects']['start'], |
|
234 |
+ 'inputType' => 'text', |
|
235 |
+ 'eval' => array('rgxp'=>'datim', 'datepicker'=>true, 'tl_class'=>'w50 wizard'), |
|
236 |
+ 'sql' => "varchar(10) NOT NULL default ''" |
|
237 |
+ ), |
|
238 |
+ 'stop' => array |
|
239 |
+ ( |
|
240 |
+ 'exclude' => true, |
|
241 |
+ 'label' => &$GLOBALS['TL_LANG']['tl_esm_clients_projects']['stop'], |
|
242 |
+ 'inputType' => 'text', |
|
243 |
+ 'eval' => array('rgxp'=>'datim', 'datepicker'=>true, 'tl_class'=>'w50 wizard'), |
|
244 |
+ 'sql' => "varchar(10) NOT NULL default ''" |
|
245 |
+ ) |
|
246 |
+ ) |
|
247 |
+); |
|
0 | 248 |
\ No newline at end of file |