1 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,245 @@ |
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 |
|
15 |
+ */ |
|
16 |
+$GLOBALS['TL_DCA']['tl_esm_clients'] = array |
|
17 |
+( |
|
18 |
+ |
|
19 |
+ // Config |
|
20 |
+ 'config' => array |
|
21 |
+ ( |
|
22 |
+ 'dataContainer' => 'Table', |
|
23 |
+ 'ctable' => array('tl_esm_clients_projects'), |
|
24 |
+ 'switchToEdit' => true, |
|
25 |
+ 'enableVersioning' => true, |
|
26 |
+ 'doNotCopyRecords' => true, |
|
27 |
+ 'onload_callback' => array |
|
28 |
+ ( |
|
29 |
+ ), |
|
30 |
+ 'oncopy_callback' => array |
|
31 |
+ ( |
|
32 |
+ ), |
|
33 |
+ 'onsubmit_callback' => array |
|
34 |
+ ( |
|
35 |
+ ), |
|
36 |
+ 'sql' => array |
|
37 |
+ ( |
|
38 |
+ 'keys' => array |
|
39 |
+ ( |
|
40 |
+ 'id' => 'primary', |
|
41 |
+ ) |
|
42 |
+ ) |
|
43 |
+ ), |
|
44 |
+ |
|
45 |
+ // List |
|
46 |
+ 'list' => array |
|
47 |
+ ( |
|
48 |
+ 'sorting' => array |
|
49 |
+ ( |
|
50 |
+ 'mode' => 2, |
|
51 |
+ 'fields' => array('title'), |
|
52 |
+ 'panelLayout' => 'filter;search,limit', |
|
53 |
+ ), |
|
54 |
+ 'label' => array |
|
55 |
+ ( |
|
56 |
+ 'fields' => array('title'), |
|
57 |
+ 'showColumns' => true, |
|
58 |
+// 'label_callback' => array('tl_member', 'addIcon') |
|
59 |
+ ), |
|
60 |
+ 'global_operations' => array |
|
61 |
+ ( |
|
62 |
+ 'settings' => array |
|
63 |
+ ( |
|
64 |
+ 'label' => &$GLOBALS['TL_LANG']['tl_esm_clients']['settings'], |
|
65 |
+ 'href' => 'table=tl_esm_clients_settings', |
|
66 |
+ 'icon' => 'settings.gif', |
|
67 |
+ ), |
|
68 |
+ 'sort' => array |
|
69 |
+ ( |
|
70 |
+ 'label' => &$GLOBALS['TL_LANG']['tl_esm_clients']['sort'], |
|
71 |
+ 'href' => 'key=sort', |
|
72 |
+ 'icon' => 'tablewizard.gif', |
|
73 |
+ ), |
|
74 |
+ 'all' => array |
|
75 |
+ ( |
|
76 |
+ 'label' => &$GLOBALS['TL_LANG']['MSC']['all'], |
|
77 |
+ 'href' => 'act=select', |
|
78 |
+ 'class' => 'header_edit_all', |
|
79 |
+ 'attributes' => 'onclick="Backend.getScrollOffset()" accesskey="e"' |
|
80 |
+ ) |
|
81 |
+ ), |
|
82 |
+ 'operations' => array |
|
83 |
+ ( |
|
84 |
+ 'edit' => array |
|
85 |
+ ( |
|
86 |
+ 'label' => &$GLOBALS['TL_LANG']['tl_esm_clients']['edit'], |
|
87 |
+ 'href' => 'table=tl_esm_clients_projects', |
|
88 |
+ 'icon' => 'edit.gif', |
|
89 |
+ ), |
|
90 |
+ 'editheader' => array |
|
91 |
+ ( |
|
92 |
+ 'label' => &$GLOBALS['TL_LANG']['tl_esm_clients']['editheader'], |
|
93 |
+ 'href' => 'act=edit', |
|
94 |
+ 'icon' => 'header.gif', |
|
95 |
+ ), |
|
96 |
+ 'copy' => array |
|
97 |
+ ( |
|
98 |
+ 'label' => &$GLOBALS['TL_LANG']['tl_esm_clients']['copy'], |
|
99 |
+ 'href' => 'act=copy', |
|
100 |
+ 'icon' => 'copy.gif' |
|
101 |
+ ), |
|
102 |
+ 'delete' => array |
|
103 |
+ ( |
|
104 |
+ 'label' => &$GLOBALS['TL_LANG']['tl_esm_clients']['delete'], |
|
105 |
+ 'href' => 'act=delete', |
|
106 |
+ 'icon' => 'delete.gif', |
|
107 |
+ 'attributes' => 'onclick="if(!confirm(\'' . $GLOBALS['TL_LANG']['MSC']['deleteConfirm'] . '\'))return false;Backend.getScrollOffset()"' |
|
108 |
+ ), |
|
109 |
+ 'toggle' => array |
|
110 |
+ ( |
|
111 |
+ 'label' => &$GLOBALS['TL_LANG']['tl_esm_clients']['toggle'], |
|
112 |
+ 'icon' => 'visible.gif', |
|
113 |
+ 'attributes' => 'onclick="Backend.getScrollOffset();return AjaxRequest.toggleVisibility(this,%s)"', |
|
114 |
+ 'button_callback' => array('tl_esm_clients', 'toggleIcon') |
|
115 |
+ ), |
|
116 |
+ 'show' => array |
|
117 |
+ ( |
|
118 |
+ 'label' => &$GLOBALS['TL_LANG']['tl_esm_clients']['show'], |
|
119 |
+ 'href' => 'act=show', |
|
120 |
+ 'icon' => 'show.gif' |
|
121 |
+ ) |
|
122 |
+ ) |
|
123 |
+ ), |
|
124 |
+ |
|
125 |
+ // Select |
|
126 |
+ 'select' => array |
|
127 |
+ ( |
|
128 |
+ 'buttons_callback' => array |
|
129 |
+ ( |
|
130 |
+ array('tl_esm_clients', 'addAliasButton') |
|
131 |
+ ) |
|
132 |
+ ), |
|
133 |
+ |
|
134 |
+ // Palettes |
|
135 |
+ 'palettes' => array |
|
136 |
+ ( |
|
137 |
+ 'default' => '{title_legend},title,alias;{categorize_legend},branch;{teaser_legend},text;{style_legend},basecolor,logo_neutral,logo_original;{invisible_legend:hide},invisible,start,stop' |
|
138 |
+ ), |
|
139 |
+ |
|
140 |
+ // Fields |
|
141 |
+ 'fields' => array |
|
142 |
+ ( |
|
143 |
+ 'id' => array |
|
144 |
+ ( |
|
145 |
+ 'sql' => "int(10) unsigned NOT NULL auto_increment" |
|
146 |
+ ), |
|
147 |
+ 'sorting' => array |
|
148 |
+ ( |
|
149 |
+ 'sql' => "int(10) unsigned NOT NULL default '0'" |
|
150 |
+ ), |
|
151 |
+ 'tstamp' => array |
|
152 |
+ ( |
|
153 |
+ 'sql' => "int(10) unsigned NOT NULL default '0'" |
|
154 |
+ ), |
|
155 |
+ 'alias' => array |
|
156 |
+ ( |
|
157 |
+ 'label' => &$GLOBALS['TL_LANG']['tl_esm_clients']['alias'], |
|
158 |
+ 'exclude' => true, |
|
159 |
+ 'search' => true, |
|
160 |
+ 'inputType' => 'text', |
|
161 |
+ 'eval' => array('rgxp'=>'alias', 'unique'=>true, 'maxlength'=>128, 'tl_class'=>'w50'), |
|
162 |
+ 'save_callback' => array |
|
163 |
+ ( |
|
164 |
+ array('tl_esm_clients', 'generateAlias') |
|
165 |
+ ), |
|
166 |
+ 'sql' => "varchar(128) COLLATE utf8_bin NOT NULL default ''" |
|
167 |
+ ), |
|
168 |
+ 'title' => array |
|
169 |
+ ( |
|
170 |
+ 'label' => &$GLOBALS['TL_LANG']['tl_esm_clients']['title'], |
|
171 |
+ 'inputType' => 'text', |
|
172 |
+ 'exclude' => true, |
|
173 |
+ 'search' => true, |
|
174 |
+ 'flag' => 1, |
|
175 |
+ 'eval' => array('mandatory'=>true, 'maxlength'=>128, 'tl_class'=>'w50'), |
|
176 |
+ 'sql' => "varchar(128) NOT NULL default ''" |
|
177 |
+ ), |
|
178 |
+ 'branch' => array |
|
179 |
+ ( |
|
180 |
+ 'label' => &$GLOBALS['TL_LANG']['tl_esm_clients']['branch'], |
|
181 |
+ 'inputType' => 'checkbox', |
|
182 |
+ 'exclude' => true, |
|
183 |
+ 'options_callback' => array('tl_esm_clients','getBranches'), |
|
184 |
+ 'eval' => array('mandatory'=>true, 'multiple'=>true, 'csv'=>','), |
|
185 |
+ 'sql' => "text NULL", |
|
186 |
+ 'relation' => array('type'=>'hasOne','load'=>'lazy','table'=>'tl_esm_clients_settings') |
|
187 |
+ ), |
|
188 |
+ 'text' => array |
|
189 |
+ ( |
|
190 |
+ 'label' => &$GLOBALS['TL_LANG']['tl_esm_clients']['text'], |
|
191 |
+ 'inputType' => 'textarea', |
|
192 |
+ 'exclude' => true, |
|
193 |
+ 'eval' => array('mandatory'=>true, 'maxlength'=>1024, 'rte'=>'tinyMCE'), |
|
194 |
+ 'sql' => "varchar(1024) NOT NULL default ''" |
|
195 |
+ ), |
|
196 |
+ 'basecolor' => array |
|
197 |
+ ( |
|
198 |
+ 'label' => &$GLOBALS['TL_LANG']['tl_esm_clients']['basecolor'], |
|
199 |
+ 'inputType' => 'text', |
|
200 |
+ 'eval' => array('mandatory'=>true,'maxlength'=>6, 'multiple'=>true, 'size'=>2, 'colorpicker'=>true, 'isHexColor'=>true, 'decodeEntities'=>true, 'tl_class'=>'w50 wizard'), |
|
201 |
+ 'sql' => "varchar(64) NOT NULL default ''" |
|
202 |
+ ), |
|
203 |
+ 'logo_neutral' => array |
|
204 |
+ ( |
|
205 |
+ 'label' => &$GLOBALS['TL_LANG']['tl_esm_clients']['logo_neutral'], |
|
206 |
+ 'exclude' => true, |
|
207 |
+ 'inputType' => 'fileTree', |
|
208 |
+ 'eval' => array('filesOnly'=>true, 'fieldType'=>'radio', 'mandatory'=>true, 'tl_class'=>'clr', 'extensions'=>Config::get('validImageTypes')), |
|
209 |
+ 'sql' => "binary(16) NULL", |
|
210 |
+ ), |
|
211 |
+ 'logo_original' => array |
|
212 |
+ ( |
|
213 |
+ 'label' => &$GLOBALS['TL_LANG']['tl_esm_clients']['logo_original'], |
|
214 |
+ 'exclude' => true, |
|
215 |
+ 'inputType' => 'fileTree', |
|
216 |
+ 'eval' => array('filesOnly'=>true, 'fieldType'=>'radio', 'mandatory'=>true, 'tl_class'=>'clr', 'extensions'=>Config::get('validImageTypes')), |
|
217 |
+ 'sql' => "binary(16) NULL", |
|
218 |
+ ), |
|
219 |
+ 'invisible' => array |
|
220 |
+ ( |
|
221 |
+ 'label' => &$GLOBALS['TL_LANG']['tl_esm_clients']['invisible'], |
|
222 |
+ 'exclude' => true, |
|
223 |
+ 'filter' => true, |
|
224 |
+ 'inputType' => 'checkbox', |
|
225 |
+ 'eval' => array('doNotCopy'=>true), |
|
226 |
+ 'sql' => "char(1) NOT NULL default ''" |
|
227 |
+ ), |
|
228 |
+ 'start' => array |
|
229 |
+ ( |
|
230 |
+ 'exclude' => true, |
|
231 |
+ 'label' => &$GLOBALS['TL_LANG']['tl_esm_clients']['start'], |
|
232 |
+ 'inputType' => 'text', |
|
233 |
+ 'eval' => array('rgxp'=>'datim', 'datepicker'=>true, 'tl_class'=>'w50 wizard'), |
|
234 |
+ 'sql' => "varchar(10) NOT NULL default ''" |
|
235 |
+ ), |
|
236 |
+ 'stop' => array |
|
237 |
+ ( |
|
238 |
+ 'exclude' => true, |
|
239 |
+ 'label' => &$GLOBALS['TL_LANG']['tl_esm_clients']['stop'], |
|
240 |
+ 'inputType' => 'text', |
|
241 |
+ 'eval' => array('rgxp'=>'datim', 'datepicker'=>true, 'tl_class'=>'w50 wizard'), |
|
242 |
+ 'sql' => "varchar(10) NOT NULL default ''" |
|
243 |
+ ) |
|
244 |
+ ) |
|
245 |
+); |
|
0 | 246 |
\ No newline at end of file |