| ... | ... |
@@ -13,363 +13,364 @@ use Contao\DataContainer; |
| 13 | 13 |
|
| 14 | 14 |
$GLOBALS['TL_DCA']['tl_vr_real_estate_assets'] = array |
| 15 | 15 |
( |
| 16 |
- // Config |
|
| 17 |
- 'config' => array |
|
| 18 |
- ( |
|
| 19 |
- 'dataContainer' => DC_Table::class, |
|
| 20 |
- 'ptable' => 'tl_vr_real_estate_categories', |
|
| 21 |
- 'enableVersioning' => true, |
|
| 22 |
- 'switchToEdit' => true, |
|
| 23 |
- 'markAsCopy' => 'title', |
|
| 24 |
- 'sql' => array |
|
| 25 |
- ( |
|
| 26 |
- 'keys' => array |
|
| 27 |
- ( |
|
| 28 |
- 'id' => 'primary', |
|
| 29 |
- 'pid' => 'index', |
|
| 30 |
- ) |
|
| 31 |
- ) |
|
| 32 |
- ), |
|
| 33 |
- |
|
| 34 |
- // List |
|
| 35 |
- 'list' => array |
|
| 36 |
- ( |
|
| 37 |
- 'sorting' => array |
|
| 38 |
- ( |
|
| 39 |
- 'mode' => DataContainer::MODE_PARENT, |
|
| 40 |
- 'fields' => array('address','assetNo','title'),
|
|
| 41 |
- 'flag' => DataContainer::SORT_INITIAL_LETTER_ASC, |
|
| 42 |
- 'headerFields' => array('title'),
|
|
| 43 |
- 'disableGrouping' => false, |
|
| 44 |
- 'child_record_callback' => function($arrRow) |
|
| 45 |
- {
|
|
| 46 |
- $time = time(); |
|
| 47 |
- $isUnpublished = !$arrRow['published'] || ($arrRow['stop'] && $arrRow['stop'] <= time()); |
|
| 48 |
- return '<div class="tl_content_left"><div class="estable"><div class="estable_cell estable_w25">' . $arrRow['title'] . ' <div class="esc_grey">[' . $arrRow['assetNo'] . ']</div></div><div class="estable_cell estable_w10" style="text-align:right; padding-right: 10px;">' . number_format($arrRow['livingSpace'],2, ',', '') . ' m²</div>'. (!$isUnpublished ? '<div class="estable_cell esc_blue">Veröffentlicht<br>ab: ' . ($time < $arrRow['start'] ? \Contao\Date::parse(\Contao\Date::getNumericDatimFormat(),$arrRow['start']) : 'sofort') . '<br>bis: '. ($time < $arrRow['stop'] ? \Contao\Date::parse(\Contao\Date::getNumericDatimFormat(),$arrRow['stop']) : 'endlos') .'</div>' : '') .'</div></div>'; |
|
| 49 |
- }, |
|
| 50 |
- 'panelLayout' => 'filter;sort,search,limit' |
|
| 51 |
- ), |
|
| 52 |
- 'label' => array |
|
| 53 |
- ( |
|
| 54 |
- 'fields' => array('title'),
|
|
| 55 |
- ), |
|
| 56 |
- 'global_operations' => array |
|
| 57 |
- ( |
|
| 58 |
- 'all' => array |
|
| 59 |
- ( |
|
| 60 |
- 'href' => 'act=select', |
|
| 61 |
- 'class' => 'header_edit_all', |
|
| 62 |
- 'attributes' => 'onclick="Backend.getScrollOffset()" accesskey="e"' |
|
| 63 |
- ) |
|
| 16 |
+ // Config |
|
| 17 |
+ 'config' => array |
|
| 18 |
+ ( |
|
| 19 |
+ 'dataContainer' => DC_Table::class, |
|
| 20 |
+ 'ptable' => 'tl_vr_real_estate_categories', |
|
| 21 |
+ 'enableVersioning' => true, |
|
| 22 |
+ 'switchToEdit' => true, |
|
| 23 |
+ 'markAsCopy' => 'title', |
|
| 24 |
+ 'sql' => array |
|
| 25 |
+ ( |
|
| 26 |
+ 'keys' => array |
|
| 27 |
+ ( |
|
| 28 |
+ 'id' => 'primary', |
|
| 29 |
+ 'pid' => 'index', |
|
| 30 |
+ ) |
|
| 31 |
+ ) |
|
| 64 | 32 |
), |
| 65 |
- 'operations' => array |
|
| 66 |
- ( |
|
| 67 |
- 'edit' => array |
|
| 68 |
- ( |
|
| 69 |
- 'href' => 'act=edit', |
|
| 70 |
- 'icon' => 'edit.svg' |
|
| 71 |
- ), |
|
| 72 |
- 'copy' => array |
|
| 73 |
- ( |
|
| 74 |
- 'href' => 'act=paste&mode=copy', |
|
| 75 |
- 'icon' => 'copy.svg' |
|
| 76 |
- ), |
|
| 77 |
- 'cut' => array |
|
| 78 |
- ( |
|
| 79 |
- 'href' => 'act=paste&mode=cut', |
|
| 80 |
- 'icon' => 'cut.svg' |
|
| 81 |
- ), |
|
| 82 |
- 'delete' => array |
|
| 83 |
- ( |
|
| 84 |
- 'href' => 'act=delete', |
|
| 85 |
- 'icon' => 'delete.svg', |
|
| 86 |
- 'attributes' => 'onclick="if(!confirm(\'' . ($GLOBALS['TL_LANG']['MSC']['deleteConfirm'] ?? null) . '\'))return false;Backend.getScrollOffset()"' |
|
| 87 |
- ), |
|
| 88 |
- 'show' => array |
|
| 89 |
- ( |
|
| 90 |
- 'href' => 'act=show', |
|
| 91 |
- 'icon' => 'show.svg' |
|
| 92 |
- ) |
|
| 93 |
- ) |
|
| 94 |
- ), |
|
| 95 | 33 |
|
| 96 |
- // Palettes |
|
| 97 |
- 'palettes' => array |
|
| 98 |
- ( |
|
| 99 |
- '__selector__' => array('availability'),
|
|
| 100 |
- 'default' => '{title_legend},title,assetNo,address,floor,postal,city;{availability_legend},availability;{misc_legend},description;{basic_data_legend},livingSpace,numberOfRooms,rent,coldRent,advanceOperatingCosts,constructionYear,cooperativeShares;{features_legend},features,heatingType,energyPassType,energyConsumption;{images_legend},gallerySRC,floorPlansSRC;{publish_legend},published,start,stop',
|
|
| 101 |
- ), |
|
| 102 |
- |
|
| 103 |
- // Subpalettes |
|
| 104 |
- 'subpalettes' => array |
|
| 105 |
- ( |
|
| 106 |
- 'availability_from' => 'availableFrom', |
|
| 107 |
- ), |
|
| 108 |
- |
|
| 109 |
- // Fields |
|
| 110 |
- 'fields' => array |
|
| 111 |
- ( |
|
| 112 |
- 'id' => array |
|
| 113 |
- ( |
|
| 114 |
- 'sql' => "int(10) unsigned NOT NULL auto_increment" |
|
| 115 |
- ), |
|
| 116 |
- 'pid' => array |
|
| 117 |
- ( |
|
| 118 |
- 'sql' => "int(10) unsigned NOT NULL" |
|
| 119 |
- ), |
|
| 120 |
- 'tstamp' => array |
|
| 121 |
- ( |
|
| 122 |
- 'sql' => "int(10) unsigned NOT NULL default 0" |
|
| 123 |
- ), |
|
| 124 |
- 'title' => array |
|
| 125 |
- ( |
|
| 126 |
- 'exclude' => true, |
|
| 127 |
- 'flag' => DataContainer::SORT_INITIAL_LETTER_ASC, |
|
| 128 |
- 'default' => '2 Zimmer Wohnung', |
|
| 129 |
- 'inputType' => 'text', |
|
| 130 |
- 'eval' => array('mandatory'=>true, 'maxlength'=>255, 'tl_class'=>'w50'),
|
|
| 131 |
- 'sql' => "varchar(255) NOT NULL default ''" |
|
| 132 |
- ), |
|
| 133 |
- 'postal' => array |
|
| 134 |
- ( |
|
| 135 |
- 'exclude' => true, |
|
| 136 |
- 'inputType' => 'text', |
|
| 137 |
- 'eval' => array('mandatory'=>true, 'rgxp'=>'natural', 'maxlength'=>5, 'tl_class'=>'w50'),
|
|
| 138 |
- 'sql' => "varchar(5) NOT NULL default ''" |
|
| 139 |
- ), |
|
| 140 |
- 'city' => array |
|
| 141 |
- ( |
|
| 142 |
- 'exclude' => true, |
|
| 143 |
- 'inputType' => 'text', |
|
| 144 |
- 'default' => 'Kehl', |
|
| 145 |
- 'eval' => array('mandatory'=>true, 'maxlength'=>255, 'tl_class'=>'w50'),
|
|
| 146 |
- 'sql' => "varchar(255) NOT NULL default ''" |
|
| 147 |
- ), |
|
| 148 |
- 'address' => array |
|
| 149 |
- ( |
|
| 150 |
- 'exclude' => true, |
|
| 151 |
- 'filter' => true, |
|
| 152 |
- 'inputType' => 'text', |
|
| 153 |
- 'eval' => array('mandatory'=>false, 'maxlength'=>255, 'tl_class'=>'w50'),
|
|
| 154 |
- 'sql' => "varchar(255) NOT NULL default ''" |
|
| 155 |
- ), |
|
| 156 |
- 'floor' => array |
|
| 157 |
- ( |
|
| 158 |
- 'exclude' => true, |
|
| 159 |
- 'inputType' => 'text', |
|
| 160 |
- 'eval' => array('mandatory'=>false, 'maxlength'=>255, 'tl_class'=>'w50'),
|
|
| 161 |
- 'sql' => "varchar(255) NOT NULL default ''" |
|
| 162 |
- ), |
|
| 163 |
- 'assetNo' => array |
|
| 164 |
- ( |
|
| 165 |
- 'exclude' => true, |
|
| 166 |
- 'inputType' => 'text', |
|
| 167 |
- 'eval' => array('mandatory'=>true, 'maxlength'=>8, 'tl_class'=>'w50'),
|
|
| 168 |
- 'sql' => "varchar(8) NOT NULL default ''" |
|
| 169 |
- ), |
|
| 170 |
- 'livingSpace' => array |
|
| 171 |
- ( |
|
| 172 |
- 'exclude' => true, |
|
| 173 |
- 'inputType' => 'text', |
|
| 174 |
- 'eval' => array('mandatory'=>false, 'rgxp'=>'float', 'maxlength'=>6, 'tl_class'=>'w50'),
|
|
| 175 |
- 'sql' => "float(5,2) unsigned NOT NULL default 0.00" |
|
| 176 |
- ), |
|
| 177 |
- 'numberOfRooms' => array |
|
| 178 |
- ( |
|
| 179 |
- 'exclude' => true, |
|
| 180 |
- 'inputType' => 'text', |
|
| 181 |
- 'eval' => array('mandatory'=>false, 'rgxp'=>'natural', 'maxlength'=>2, 'tl_class'=>'w50'),
|
|
| 182 |
- 'sql' => "tinyint(2) unsigned NOT NULL default 0" |
|
| 183 |
- ), |
|
| 184 |
- 'rent' => array |
|
| 185 |
- ( |
|
| 186 |
- 'exclude' => true, |
|
| 187 |
- 'inputType' => 'text', |
|
| 188 |
- 'eval' => array('mandatory'=>false, 'rgxp'=>'currency', 'maxlength'=>15, 'tl_class'=>'w50'),
|
|
| 189 |
- 'sql' => "decimal(12,2) NOT NULL default '0.00'" |
|
| 190 |
- ), |
|
| 191 |
- 'coldRent' => array |
|
| 192 |
- ( |
|
| 193 |
- 'exclude' => true, |
|
| 194 |
- 'inputType' => 'text', |
|
| 195 |
- 'eval' => array('mandatory'=>false, 'rgxp'=>'currency', 'maxlength'=>15, 'tl_class'=>'w50'),
|
|
| 196 |
- 'sql' => "decimal(12,2) NOT NULL default '0.00'" |
|
| 34 |
+ // List |
|
| 35 |
+ 'list' => array |
|
| 36 |
+ ( |
|
| 37 |
+ 'sorting' => array |
|
| 38 |
+ ( |
|
| 39 |
+ 'mode' => DataContainer::MODE_PARENT, |
|
| 40 |
+ 'fields' => array('address', 'assetNo', 'title'),
|
|
| 41 |
+ 'flag' => DataContainer::SORT_INITIAL_LETTER_ASC, |
|
| 42 |
+ 'headerFields' => array('title'),
|
|
| 43 |
+ 'disableGrouping' => false, |
|
| 44 |
+ 'child_record_callback' => function ($arrRow) {
|
|
| 45 |
+ $time = time(); |
|
| 46 |
+ $isUnpublished = !$arrRow['published'] || ($arrRow['stop'] && $arrRow['stop'] <= time()); |
|
| 47 |
+ return '<div class="tl_content_left"><div class="estable"><div class="estable_cell estable_w25">' . $arrRow['title'] . ' <div class="esc_grey">[' . $arrRow['assetNo'] . ']</div></div><div class="estable_cell estable_w10" style="text-align:right; padding-right: 10px;">' . number_format($arrRow['livingSpace'], 2, ',', '') . ' m²</div>' . (!$isUnpublished ? '<div class="estable_cell esc_blue">Veröffentlicht<br>ab: ' . ($time < $arrRow['start'] ? \Contao\Date::parse(\Contao\Date::getNumericDatimFormat(), $arrRow['start']) : 'sofort') . '<br>bis: ' . ($time < $arrRow['stop'] ? \Contao\Date::parse(\Contao\Date::getNumericDatimFormat(), $arrRow['stop']) : 'endlos') . '</div>' : '') . '</div></div>'; |
|
| 48 |
+ }, |
|
| 49 |
+ 'panelLayout' => 'filter;sort,search,limit' |
|
| 50 |
+ ), |
|
| 51 |
+ 'label' => array |
|
| 52 |
+ ( |
|
| 53 |
+ 'fields' => array('title'),
|
|
| 54 |
+ ), |
|
| 55 |
+ 'global_operations' => array |
|
| 56 |
+ ( |
|
| 57 |
+ 'all' => array |
|
| 58 |
+ ( |
|
| 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 |
+ 'href' => 'act=edit', |
|
| 69 |
+ 'icon' => 'edit.svg' |
|
| 70 |
+ ), |
|
| 71 |
+ 'copy' => array |
|
| 72 |
+ ( |
|
| 73 |
+ 'href' => 'act=paste&mode=copy', |
|
| 74 |
+ 'icon' => 'copy.svg' |
|
| 75 |
+ ), |
|
| 76 |
+ 'cut' => array |
|
| 77 |
+ ( |
|
| 78 |
+ 'href' => 'act=paste&mode=cut', |
|
| 79 |
+ 'icon' => 'cut.svg' |
|
| 80 |
+ ), |
|
| 81 |
+ 'delete' => array |
|
| 82 |
+ ( |
|
| 83 |
+ 'href' => 'act=delete', |
|
| 84 |
+ 'icon' => 'delete.svg', |
|
| 85 |
+ 'attributes' => 'onclick="if(!confirm(\'' . ($GLOBALS['TL_LANG']['MSC']['deleteConfirm'] ?? null) . '\'))return false;Backend.getScrollOffset()"' |
|
| 86 |
+ ), |
|
| 87 |
+ 'show' => array |
|
| 88 |
+ ( |
|
| 89 |
+ 'href' => 'act=show', |
|
| 90 |
+ 'icon' => 'show.svg' |
|
| 91 |
+ ) |
|
| 92 |
+ ) |
|
| 197 | 93 |
), |
| 198 |
- 'advanceOperatingCosts' => array |
|
| 199 |
- ( |
|
| 200 |
- 'exclude' => true, |
|
| 201 |
- 'inputType' => 'text', |
|
| 202 |
- 'eval' => array('mandatory'=>false, 'rgxp'=>'currency', 'maxlength'=>15, 'tl_class'=>'w50'),
|
|
| 203 |
- 'sql' => "decimal(12,2) NOT NULL default '0.00'" |
|
| 204 |
- ), |
|
| 205 |
- 'heatingCosts' => array |
|
| 206 |
- ( |
|
| 207 |
- 'exclude' => true, |
|
| 208 |
- 'inputType' => 'text', |
|
| 209 |
- 'eval' => array('mandatory'=>false, 'rgxp'=>'currency', 'maxlength'=>15, 'tl_class'=>'w50'),
|
|
| 210 |
- 'sql' => "decimal(12,2) NOT NULL default '0.00'" |
|
| 211 |
- ), |
|
| 212 |
- 'condition' => array |
|
| 213 |
- ( |
|
| 214 |
- 'exclude' => true, |
|
| 215 |
- 'inputType' => 'select', |
|
| 216 |
- 'options' => array |
|
| 217 |
- ( |
|
| 218 |
- 'new', |
|
| 219 |
- 'renovated', |
|
| 220 |
- 'partially_renovated', |
|
| 221 |
- 'maintained', |
|
| 222 |
- ), |
|
| 223 |
- 'reference' => &$GLOBALS['TL_LANG']['REF']['re_condition'], |
|
| 224 |
- 'eval' => array('mandatory'=>false, 'includeBlankOption'=>true, 'tl_class'=>'w50'),
|
|
| 225 |
- 'sql' => "varchar(32) NOT NULL default ''" |
|
| 226 |
- ), |
|
| 227 |
- 'constructionYear' => array |
|
| 228 |
- ( |
|
| 229 |
- 'exclude' => true, |
|
| 230 |
- 'inputType' => 'text', |
|
| 231 |
- 'eval' => array('mandatory'=>false, 'rgxp'=>'digit', 'maxlength'=>4, 'tl_class'=>'w50'),
|
|
| 232 |
- 'sql' => "varchar(4) NOT NULL default ''" |
|
| 233 |
- ), |
|
| 234 |
- 'cooperativeShares' => array |
|
| 235 |
- ( |
|
| 236 |
- 'exclude' => true, |
|
| 237 |
- 'inputType' => 'text', |
|
| 238 |
- 'eval' => array('mandatory'=>false, 'rgxp'=>'natural', 'maxlength'=>2, 'tl_class'=>'w50'),
|
|
| 239 |
- 'sql' => "tinyint(2) unsigned NULL" |
|
| 240 |
- ), |
|
| 241 |
- 'features' => array |
|
| 242 |
- ( |
|
| 243 |
- 'exclude' => true, |
|
| 244 |
- 'inputType' => 'checkbox', |
|
| 245 |
- 'options' => array |
|
| 246 |
- ( |
|
| 247 |
- 'kitchen', |
|
| 248 |
- 'bathroom', |
|
| 249 |
- 'guestToilet', |
|
| 250 |
- 'garret', |
|
| 251 |
- 'balcony', |
|
| 252 |
- 'loggia', |
|
| 253 |
- 'gardenShare', |
|
| 254 |
- 'basementRoom', |
|
| 255 |
- 'garage', |
|
| 256 |
- 'carport', |
|
| 257 |
- 'cable' |
|
| 258 |
- ), |
|
| 259 |
- 'reference' => &$GLOBALS['TL_LANG']['REF']['re_features'], |
|
| 260 |
- 'eval' => array('mandatory'=>false, 'multiple'=>true, 'tl_class'=>'w50'),
|
|
| 261 |
- 'sql' => "blob NULL" |
|
| 262 |
- ), |
|
| 263 |
- 'heatingType' => array |
|
| 264 |
- ( |
|
| 265 |
- 'exclude' => true, |
|
| 266 |
- 'inputType' => 'select', |
|
| 267 |
- 'options' => array |
|
| 268 |
- ( |
|
| 269 |
- 'geh', |
|
| 270 |
- 'fw', |
|
| 271 |
- 'zh', |
|
| 272 |
- 'gzh', |
|
| 273 |
- 'nsp', |
|
| 274 |
- 'go' |
|
| 275 |
- ), |
|
| 276 |
- 'reference' => &$GLOBALS['TL_LANG']['REF']['re_heatingType'], |
|
| 277 |
- 'eval' => array('mandatory'=>false, 'includeBlankOption'=>true, 'tl_class'=>'w50'),
|
|
| 278 |
- 'sql' => "varchar(16) NOT NULL default ''" |
|
| 279 |
- ), |
|
| 280 |
- 'energyPassType' => array |
|
| 281 |
- ( |
|
| 282 |
- 'exclude' => true, |
|
| 283 |
- 'inputType' => 'select', |
|
| 284 |
- 'options' => array |
|
| 285 |
- ( |
|
| 286 |
- 'eav', |
|
| 287 |
- 'eab', |
|
| 288 |
- ), |
|
| 289 |
- 'reference' => &$GLOBALS['TL_LANG']['REF']['re_energyPassType'], |
|
| 290 |
- 'eval' => array('mandatory'=>false, 'includeBlankOption'=>true, 'tl_class'=>'clr w50'),
|
|
| 291 |
- 'sql' => "varchar(16) NOT NULL default ''" |
|
| 292 |
- ), |
|
| 293 |
- 'energyConsumption' => array |
|
| 294 |
- ( |
|
| 295 |
- 'exclude' => true, |
|
| 296 |
- 'inputType' => 'text', |
|
| 297 |
- 'eval' => array('mandatory'=>false, 'rgxp'=>'digit', 'maxlength'=>6, 'tl_class'=>'w50'),
|
|
| 298 |
- 'sql' => "float(6,2) NOT NULL default 0.00" |
|
| 299 |
- ), |
|
| 300 |
- 'gallerySRC' => array |
|
| 301 |
- ( |
|
| 302 |
- 'exclude' => true, |
|
| 303 |
- 'inputType' => 'fileTree', |
|
| 304 |
- 'eval' => array('mandatory'=>true,'filesOnly'=>true, 'fieldType'=>'checkbox', 'multiple'=>true, 'tl_class'=>'clr','orderField'=>'orderSRC','files'=>true, 'extensions'=>\Contao\Config::get('validImageTypes'),'isGallery'=>true),
|
|
| 305 |
- 'sql' => "blob NULL" |
|
| 306 |
- ), |
|
| 307 |
- 'orderSRC' => array |
|
| 308 |
- ( |
|
| 309 |
- 'label' => &$GLOBALS['TL_LANG']['MSC']['sortOrder'], |
|
| 310 |
- 'sql' => "blob NULL" |
|
| 311 |
- ), |
|
| 312 |
- 'floorPlansSRC' => array |
|
| 313 |
- ( |
|
| 314 |
- 'exclude' => true, |
|
| 315 |
- 'inputType' => 'fileTree', |
|
| 316 |
- 'eval' => array('filesOnly'=>true, 'fieldType'=>'checkbox', 'multiple'=>true, 'tl_class'=>'clr','orderField'=>'floorPlansOrderSRC','files'=>true, 'extensions'=>\Contao\Config::get('validImageTypes'),'isGallery'=>true),
|
|
| 317 |
- 'sql' => "blob NULL" |
|
| 318 |
- ), |
|
| 319 |
- 'floorPlansOrderSRC' => array |
|
| 320 |
- ( |
|
| 321 |
- 'label' => &$GLOBALS['TL_LANG']['MSC']['sortOrder'], |
|
| 322 |
- 'sql' => "blob NULL" |
|
| 323 |
- ), |
|
| 324 |
- 'availability' => array |
|
| 325 |
- ( |
|
| 326 |
- 'exclude' => true, |
|
| 327 |
- 'inputType' => 'radio', |
|
| 328 |
- 'options' => array |
|
| 329 |
- ( |
|
| 330 |
- 'immediately', |
|
| 331 |
- 'from' |
|
| 332 |
- ), |
|
| 333 |
- 'reference' => &$GLOBALS['TL_LANG']['REF']['re_availability'], |
|
| 334 |
- 'eval' => array('mandatory'=>false, 'tl_class'=>'w50', 'submitOnChange'=>true),
|
|
| 335 |
- 'sql' => "varchar(16) NOT NULL default 'immediately'" |
|
| 336 |
- ), |
|
| 337 |
- 'availableFrom' => array |
|
| 338 |
- ( |
|
| 339 |
- 'exclude' => true, |
|
| 340 |
- 'inputType' => 'text', |
|
| 341 |
- 'eval' => array('mandatory'=>false, 'rgxp'=>'date', 'datepicker'=>true, 'tl_class'=>'w50 wizard'),
|
|
| 342 |
- 'sql' => "int(10) unsigned NULL" |
|
| 343 |
- ), |
|
| 344 |
- 'description' => array |
|
| 345 |
- ( |
|
| 346 |
- 'exclude' => true, |
|
| 347 |
- 'inputType' => 'textarea', |
|
| 348 |
- 'eval' => array('mandatory'=>false, 'rte'=>'tinyMCE', 'helpwizard'=>true, 'tl_class'=>'clr'),
|
|
| 349 |
- 'explanation' => 'insertTags', |
|
| 350 |
- 'sql' => "mediumtext NULL" |
|
| 351 |
- ), |
|
| 352 |
- 'published' => array |
|
| 94 |
+ |
|
| 95 |
+ // Palettes |
|
| 96 |
+ 'palettes' => array |
|
| 353 | 97 |
( |
| 354 |
- 'exclude' => true, |
|
| 355 |
- 'filter' => true, |
|
| 356 |
- 'inputType' => 'checkbox', |
|
| 357 |
- 'eval' => array('doNotCopy'=>true),
|
|
| 358 |
- 'sql' => "char(1) NOT NULL default ''" |
|
| 98 |
+ '__selector__' => array('availability'),
|
|
| 99 |
+ 'default' => '{title_legend},title,assetNo,address,floor,postal,city;{availability_legend},availability;{misc_legend},description;{basic_data_legend},livingSpace,numberOfRooms,rent,coldRent,advanceOperatingCosts,constructionYear,cooperativeShares;{features_legend},features,heatingType,energyPassType,energyConsumption;{images_legend},gallerySRC,floorPlansSRC;{publish_legend},published,start,stop',
|
|
| 359 | 100 |
), |
| 360 |
- 'start' => array |
|
| 101 |
+ |
|
| 102 |
+ // Subpalettes |
|
| 103 |
+ 'subpalettes' => array |
|
| 361 | 104 |
( |
| 362 |
- 'exclude' => true, |
|
| 363 |
- 'inputType' => 'text', |
|
| 364 |
- 'eval' => array('rgxp'=>'datim', 'datepicker'=>true, 'tl_class'=>'w50 wizard'),
|
|
| 365 |
- 'sql' => "varchar(10) NOT NULL default ''" |
|
| 105 |
+ 'availability_from' => 'availableFrom', |
|
| 366 | 106 |
), |
| 367 |
- 'stop' => array |
|
| 368 |
- ( |
|
| 369 |
- 'exclude' => true, |
|
| 370 |
- 'inputType' => 'text', |
|
| 371 |
- 'eval' => array('rgxp'=>'datim', 'datepicker'=>true, 'tl_class'=>'w50 wizard'),
|
|
| 372 |
- 'sql' => "varchar(10) NOT NULL default ''" |
|
| 107 |
+ |
|
| 108 |
+ // Fields |
|
| 109 |
+ 'fields' => array |
|
| 110 |
+ ( |
|
| 111 |
+ 'id' => array |
|
| 112 |
+ ( |
|
| 113 |
+ 'sql' => "int(10) unsigned NOT NULL auto_increment" |
|
| 114 |
+ ), |
|
| 115 |
+ 'pid' => array |
|
| 116 |
+ ( |
|
| 117 |
+ 'foreignKey' => 'tl_vr_real_estate_categories.title', |
|
| 118 |
+ 'sql' => "int(10) unsigned NOT NULL", |
|
| 119 |
+ 'relation' => array('type' => 'belongsTo', 'load' => 'lazy')
|
|
| 120 |
+ ), |
|
| 121 |
+ 'tstamp' => array |
|
| 122 |
+ ( |
|
| 123 |
+ 'sql' => "int(10) unsigned NOT NULL default 0" |
|
| 124 |
+ ), |
|
| 125 |
+ 'title' => array |
|
| 126 |
+ ( |
|
| 127 |
+ 'exclude' => true, |
|
| 128 |
+ 'flag' => DataContainer::SORT_INITIAL_LETTER_ASC, |
|
| 129 |
+ 'default' => '2 Zimmer Wohnung', |
|
| 130 |
+ 'inputType' => 'text', |
|
| 131 |
+ 'eval' => array('mandatory' => true, 'maxlength' => 255, 'tl_class' => 'w50'),
|
|
| 132 |
+ 'sql' => "varchar(255) NOT NULL default ''" |
|
| 133 |
+ ), |
|
| 134 |
+ 'postal' => array |
|
| 135 |
+ ( |
|
| 136 |
+ 'exclude' => true, |
|
| 137 |
+ 'inputType' => 'text', |
|
| 138 |
+ 'eval' => array('mandatory' => true, 'rgxp' => 'natural', 'maxlength' => 5, 'tl_class' => 'w50'),
|
|
| 139 |
+ 'sql' => "varchar(5) NOT NULL default ''" |
|
| 140 |
+ ), |
|
| 141 |
+ 'city' => array |
|
| 142 |
+ ( |
|
| 143 |
+ 'exclude' => true, |
|
| 144 |
+ 'inputType' => 'text', |
|
| 145 |
+ 'default' => 'Kehl', |
|
| 146 |
+ 'eval' => array('mandatory' => true, 'maxlength' => 255, 'tl_class' => 'w50'),
|
|
| 147 |
+ 'sql' => "varchar(255) NOT NULL default ''" |
|
| 148 |
+ ), |
|
| 149 |
+ 'address' => array |
|
| 150 |
+ ( |
|
| 151 |
+ 'exclude' => true, |
|
| 152 |
+ 'filter' => true, |
|
| 153 |
+ 'inputType' => 'text', |
|
| 154 |
+ 'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50'),
|
|
| 155 |
+ 'sql' => "varchar(255) NOT NULL default ''" |
|
| 156 |
+ ), |
|
| 157 |
+ 'floor' => array |
|
| 158 |
+ ( |
|
| 159 |
+ 'exclude' => true, |
|
| 160 |
+ 'inputType' => 'text', |
|
| 161 |
+ 'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50'),
|
|
| 162 |
+ 'sql' => "varchar(255) NOT NULL default ''" |
|
| 163 |
+ ), |
|
| 164 |
+ 'assetNo' => array |
|
| 165 |
+ ( |
|
| 166 |
+ 'exclude' => true, |
|
| 167 |
+ 'inputType' => 'text', |
|
| 168 |
+ 'eval' => array('mandatory' => true, 'maxlength' => 8, 'tl_class' => 'w50'),
|
|
| 169 |
+ 'sql' => "varchar(8) NOT NULL default ''" |
|
| 170 |
+ ), |
|
| 171 |
+ 'livingSpace' => array |
|
| 172 |
+ ( |
|
| 173 |
+ 'exclude' => true, |
|
| 174 |
+ 'inputType' => 'text', |
|
| 175 |
+ 'eval' => array('mandatory' => false, 'rgxp' => 'float', 'maxlength' => 6, 'tl_class' => 'w50'),
|
|
| 176 |
+ 'sql' => "float(5,2) unsigned NOT NULL default 0.00" |
|
| 177 |
+ ), |
|
| 178 |
+ 'numberOfRooms' => array |
|
| 179 |
+ ( |
|
| 180 |
+ 'exclude' => true, |
|
| 181 |
+ 'inputType' => 'text', |
|
| 182 |
+ 'eval' => array('mandatory' => false, 'rgxp' => 'natural', 'maxlength' => 2, 'tl_class' => 'w50'),
|
|
| 183 |
+ 'sql' => "tinyint(2) unsigned NOT NULL default 0" |
|
| 184 |
+ ), |
|
| 185 |
+ 'rent' => array |
|
| 186 |
+ ( |
|
| 187 |
+ 'exclude' => true, |
|
| 188 |
+ 'inputType' => 'text', |
|
| 189 |
+ 'eval' => array('mandatory' => false, 'rgxp' => 'currency', 'maxlength' => 15, 'tl_class' => 'w50'),
|
|
| 190 |
+ 'sql' => "decimal(12,2) NOT NULL default '0.00'" |
|
| 191 |
+ ), |
|
| 192 |
+ 'coldRent' => array |
|
| 193 |
+ ( |
|
| 194 |
+ 'exclude' => true, |
|
| 195 |
+ 'inputType' => 'text', |
|
| 196 |
+ 'eval' => array('mandatory' => false, 'rgxp' => 'currency', 'maxlength' => 15, 'tl_class' => 'w50'),
|
|
| 197 |
+ 'sql' => "decimal(12,2) NOT NULL default '0.00'" |
|
| 198 |
+ ), |
|
| 199 |
+ 'advanceOperatingCosts' => array |
|
| 200 |
+ ( |
|
| 201 |
+ 'exclude' => true, |
|
| 202 |
+ 'inputType' => 'text', |
|
| 203 |
+ 'eval' => array('mandatory' => false, 'rgxp' => 'currency', 'maxlength' => 15, 'tl_class' => 'w50'),
|
|
| 204 |
+ 'sql' => "decimal(12,2) NOT NULL default '0.00'" |
|
| 205 |
+ ), |
|
| 206 |
+ 'heatingCosts' => array |
|
| 207 |
+ ( |
|
| 208 |
+ 'exclude' => true, |
|
| 209 |
+ 'inputType' => 'text', |
|
| 210 |
+ 'eval' => array('mandatory' => false, 'rgxp' => 'currency', 'maxlength' => 15, 'tl_class' => 'w50'),
|
|
| 211 |
+ 'sql' => "decimal(12,2) NOT NULL default '0.00'" |
|
| 212 |
+ ), |
|
| 213 |
+ 'condition' => array |
|
| 214 |
+ ( |
|
| 215 |
+ 'exclude' => true, |
|
| 216 |
+ 'inputType' => 'select', |
|
| 217 |
+ 'options' => array |
|
| 218 |
+ ( |
|
| 219 |
+ 'new', |
|
| 220 |
+ 'renovated', |
|
| 221 |
+ 'partially_renovated', |
|
| 222 |
+ 'maintained', |
|
| 223 |
+ ), |
|
| 224 |
+ 'reference' => &$GLOBALS['TL_LANG']['REF']['re_condition'], |
|
| 225 |
+ 'eval' => array('mandatory' => false, 'includeBlankOption' => true, 'tl_class' => 'w50'),
|
|
| 226 |
+ 'sql' => "varchar(32) NOT NULL default ''" |
|
| 227 |
+ ), |
|
| 228 |
+ 'constructionYear' => array |
|
| 229 |
+ ( |
|
| 230 |
+ 'exclude' => true, |
|
| 231 |
+ 'inputType' => 'text', |
|
| 232 |
+ 'eval' => array('mandatory' => false, 'rgxp' => 'digit', 'maxlength' => 4, 'tl_class' => 'w50'),
|
|
| 233 |
+ 'sql' => "varchar(4) NOT NULL default ''" |
|
| 234 |
+ ), |
|
| 235 |
+ 'cooperativeShares' => array |
|
| 236 |
+ ( |
|
| 237 |
+ 'exclude' => true, |
|
| 238 |
+ 'inputType' => 'text', |
|
| 239 |
+ 'eval' => array('mandatory' => false, 'rgxp' => 'natural', 'maxlength' => 2, 'tl_class' => 'w50'),
|
|
| 240 |
+ 'sql' => "tinyint(2) unsigned NULL" |
|
| 241 |
+ ), |
|
| 242 |
+ 'features' => array |
|
| 243 |
+ ( |
|
| 244 |
+ 'exclude' => true, |
|
| 245 |
+ 'inputType' => 'checkbox', |
|
| 246 |
+ 'options' => array |
|
| 247 |
+ ( |
|
| 248 |
+ 'kitchen', |
|
| 249 |
+ 'bathroom', |
|
| 250 |
+ 'guestToilet', |
|
| 251 |
+ 'garret', |
|
| 252 |
+ 'balcony', |
|
| 253 |
+ 'loggia', |
|
| 254 |
+ 'gardenShare', |
|
| 255 |
+ 'basementRoom', |
|
| 256 |
+ 'garage', |
|
| 257 |
+ 'carport', |
|
| 258 |
+ 'cable' |
|
| 259 |
+ ), |
|
| 260 |
+ 'reference' => &$GLOBALS['TL_LANG']['REF']['re_features'], |
|
| 261 |
+ 'eval' => array('mandatory' => false, 'multiple' => true, 'tl_class' => 'w50'),
|
|
| 262 |
+ 'sql' => "blob NULL" |
|
| 263 |
+ ), |
|
| 264 |
+ 'heatingType' => array |
|
| 265 |
+ ( |
|
| 266 |
+ 'exclude' => true, |
|
| 267 |
+ 'inputType' => 'select', |
|
| 268 |
+ 'options' => array |
|
| 269 |
+ ( |
|
| 270 |
+ 'geh', |
|
| 271 |
+ 'fw', |
|
| 272 |
+ 'zh', |
|
| 273 |
+ 'gzh', |
|
| 274 |
+ 'nsp', |
|
| 275 |
+ 'go' |
|
| 276 |
+ ), |
|
| 277 |
+ 'reference' => &$GLOBALS['TL_LANG']['REF']['re_heatingType'], |
|
| 278 |
+ 'eval' => array('mandatory' => false, 'includeBlankOption' => true, 'tl_class' => 'w50'),
|
|
| 279 |
+ 'sql' => "varchar(16) NOT NULL default ''" |
|
| 280 |
+ ), |
|
| 281 |
+ 'energyPassType' => array |
|
| 282 |
+ ( |
|
| 283 |
+ 'exclude' => true, |
|
| 284 |
+ 'inputType' => 'select', |
|
| 285 |
+ 'options' => array |
|
| 286 |
+ ( |
|
| 287 |
+ 'eav', |
|
| 288 |
+ 'eab', |
|
| 289 |
+ ), |
|
| 290 |
+ 'reference' => &$GLOBALS['TL_LANG']['REF']['re_energyPassType'], |
|
| 291 |
+ 'eval' => array('mandatory' => false, 'includeBlankOption' => true, 'tl_class' => 'clr w50'),
|
|
| 292 |
+ 'sql' => "varchar(16) NOT NULL default ''" |
|
| 293 |
+ ), |
|
| 294 |
+ 'energyConsumption' => array |
|
| 295 |
+ ( |
|
| 296 |
+ 'exclude' => true, |
|
| 297 |
+ 'inputType' => 'text', |
|
| 298 |
+ 'eval' => array('mandatory' => false, 'rgxp' => 'digit', 'maxlength' => 6, 'tl_class' => 'w50'),
|
|
| 299 |
+ 'sql' => "float(6,2) NOT NULL default 0.00" |
|
| 300 |
+ ), |
|
| 301 |
+ 'gallerySRC' => array |
|
| 302 |
+ ( |
|
| 303 |
+ 'exclude' => true, |
|
| 304 |
+ 'inputType' => 'fileTree', |
|
| 305 |
+ 'eval' => array('mandatory' => true, 'filesOnly' => true, 'fieldType' => 'checkbox', 'multiple' => true, 'tl_class' => 'clr', 'orderField' => 'orderSRC', 'files' => true, 'extensions' => \Contao\Config::get('validImageTypes'), 'isGallery' => true),
|
|
| 306 |
+ 'sql' => "blob NULL" |
|
| 307 |
+ ), |
|
| 308 |
+ 'orderSRC' => array |
|
| 309 |
+ ( |
|
| 310 |
+ 'label' => &$GLOBALS['TL_LANG']['MSC']['sortOrder'], |
|
| 311 |
+ 'sql' => "blob NULL" |
|
| 312 |
+ ), |
|
| 313 |
+ 'floorPlansSRC' => array |
|
| 314 |
+ ( |
|
| 315 |
+ 'exclude' => true, |
|
| 316 |
+ 'inputType' => 'fileTree', |
|
| 317 |
+ 'eval' => array('filesOnly' => true, 'fieldType' => 'checkbox', 'multiple' => true, 'tl_class' => 'clr', 'orderField' => 'floorPlansOrderSRC', 'files' => true, 'extensions' => \Contao\Config::get('validImageTypes'), 'isGallery' => true),
|
|
| 318 |
+ 'sql' => "blob NULL" |
|
| 319 |
+ ), |
|
| 320 |
+ 'floorPlansOrderSRC' => array |
|
| 321 |
+ ( |
|
| 322 |
+ 'label' => &$GLOBALS['TL_LANG']['MSC']['sortOrder'], |
|
| 323 |
+ 'sql' => "blob NULL" |
|
| 324 |
+ ), |
|
| 325 |
+ 'availability' => array |
|
| 326 |
+ ( |
|
| 327 |
+ 'exclude' => true, |
|
| 328 |
+ 'inputType' => 'radio', |
|
| 329 |
+ 'options' => array |
|
| 330 |
+ ( |
|
| 331 |
+ 'immediately', |
|
| 332 |
+ 'from' |
|
| 333 |
+ ), |
|
| 334 |
+ 'reference' => &$GLOBALS['TL_LANG']['REF']['re_availability'], |
|
| 335 |
+ 'eval' => array('mandatory' => false, 'tl_class' => 'w50', 'submitOnChange' => true),
|
|
| 336 |
+ 'sql' => "varchar(16) NOT NULL default 'immediately'" |
|
| 337 |
+ ), |
|
| 338 |
+ 'availableFrom' => array |
|
| 339 |
+ ( |
|
| 340 |
+ 'exclude' => true, |
|
| 341 |
+ 'inputType' => 'text', |
|
| 342 |
+ 'eval' => array('mandatory' => false, 'rgxp' => 'date', 'datepicker' => true, 'tl_class' => 'w50 wizard'),
|
|
| 343 |
+ 'sql' => "int(10) unsigned NULL" |
|
| 344 |
+ ), |
|
| 345 |
+ 'description' => array |
|
| 346 |
+ ( |
|
| 347 |
+ 'exclude' => true, |
|
| 348 |
+ 'inputType' => 'textarea', |
|
| 349 |
+ 'eval' => array('mandatory' => false, 'rte' => 'tinyMCE', 'helpwizard' => true, 'tl_class' => 'clr'),
|
|
| 350 |
+ 'explanation' => 'insertTags', |
|
| 351 |
+ 'sql' => "mediumtext NULL" |
|
| 352 |
+ ), |
|
| 353 |
+ 'published' => array |
|
| 354 |
+ ( |
|
| 355 |
+ 'exclude' => true, |
|
| 356 |
+ 'filter' => true, |
|
| 357 |
+ 'inputType' => 'checkbox', |
|
| 358 |
+ 'eval' => array('doNotCopy' => true),
|
|
| 359 |
+ 'sql' => "char(1) NOT NULL default ''" |
|
| 360 |
+ ), |
|
| 361 |
+ 'start' => array |
|
| 362 |
+ ( |
|
| 363 |
+ 'exclude' => true, |
|
| 364 |
+ 'inputType' => 'text', |
|
| 365 |
+ 'eval' => array('rgxp' => 'datim', 'datepicker' => true, 'tl_class' => 'w50 wizard'),
|
|
| 366 |
+ 'sql' => "varchar(10) NOT NULL default ''" |
|
| 367 |
+ ), |
|
| 368 |
+ 'stop' => array |
|
| 369 |
+ ( |
|
| 370 |
+ 'exclude' => true, |
|
| 371 |
+ 'inputType' => 'text', |
|
| 372 |
+ 'eval' => array('rgxp' => 'datim', 'datepicker' => true, 'tl_class' => 'w50 wizard'),
|
|
| 373 |
+ 'sql' => "varchar(10) NOT NULL default ''" |
|
| 374 |
+ ) |
|
| 373 | 375 |
) |
| 374 |
- ) |
|
| 375 | 376 |
); |