<?php /** * This file is part of contao-weinanlieferung-bundle. * * (c) vonRotenberg * * @license commercial */ use Contao\DC_Table; use Contao\DataContainer; use Contao\Config; $GLOBALS['TL_DCA']['tl_vr_wa_reservation'] = array ( // Config 'config' => array ( 'dataContainer' => DC_Table::class, // 'doNotCopyRecords' => true, // 'doNotDeleteRecords' => true, 'backlink' => 'do=weinanlieferung', 'enableVersioning' => true, 'sql' => array ( 'keys' => array ( 'id' => 'primary', 'pid' => 'index' ) ) ), // List 'list' => array ( 'sorting' => array ( 'mode' => DataContainer::MODE_SORTED, 'fields' => array('pid'/*,'(SELECT s.time FROM tl_vr_wa_slot s WHERE s.id = tl_vr_wa_reservation.pid) ASC'*/), // 'disableGrouping' => true, 'panelLayout' => 'filter;sort,limit', ), 'label' => array( 'fields' => array('pid','behaelter','uid'), 'format' => '%s', 'showColumns' => true, ), 'global_operations' => array ( 'all' => array ( 'href' => 'act=select', 'class' => 'header_edit_all', 'attributes' => 'onclick="Backend.getScrollOffset()" accesskey="e"' ) ), 'operations' => array ( 'edit' => array ( 'href' => 'act=edit', 'icon' => 'edit.gif', ), 'copy' => array ( 'href' => 'act=paste&mode=copy', 'icon' => 'copy.svg' ), 'cut' => array ( 'href' => 'act=paste&mode=cut', 'icon' => 'cut.svg', 'attributes' => 'onclick="Backend.getScrollOffset()"' ), 'delete' => array ( 'href' => 'act=delete', 'icon' => 'delete.gif', ), 'toggle' => array ( 'href' => 'act=toggle&field=buchbar', 'icon' => 'visible.svg', 'showInHeader' => true ), 'show' => array ( 'icon' => 'show.gif', ), ) ), // Palettes 'palettes' => array ( '__selector__' => array(), 'default' => 'pid,uid,unit,amount,behaelter,attribute_values,annotation,internalAnnotation,upload' ), // Subpalettes 'subpalettes' => array ( ), // Fields 'fields' => array ( 'id' => array ( 'sql' => "int(10) unsigned NOT NULL auto_increment" ), 'pid' => array ( 'exclude' => true, 'inputType' => 'select', 'foreignKey' => 'tl_vr_wa_slot.time', 'eval' => array('mandatory'=>true,'chosen'=>true,'includeBlankOption'=>true,'submitOnChange'=>true), 'sql' => "int(10) unsigned NOT NULL default '0'", 'relation' => array('type' => 'belongsTo', 'load' => 'lazy') ), 'tstamp' => array ( 'sql' => "int(10) unsigned NOT NULL default '0'" ), 'nc_sent' => array ( 'sql' => "int(10) unsigned NOT NULL default '0'" ), 'uid' => array ( 'exclude' => true, 'inputType' => 'select', 'foreignKey' => 'tl_member.username', 'eval' => array('mandatory'=>true,'chosen'=>true,'includeBlankOption'=>true,'tl_class'=>'w50'), 'sql' => "int(10) unsigned NOT NULL default '0'", 'relation' => array('type' => 'belongsTo', 'load' => 'lazy') ), 'lage' => array ( 'exclude' => true, 'inputType' => 'checkbox', 'eval' => array('mandatory'=>true,'multiple'=>true, 'csv'=>',','tl_class'=>'w50'), 'sql' => "blob NULL", 'relation' => array('type' => 'hasMany', 'load' => 'lazy', 'table'=>'tl_vr_wa_lage') ), 'unit' => array ( 'exclude' => true, 'inputType' => 'select', 'eval' => array ( 'mandatory' => false, 'includeBlankOption' => true, 'blankOptionLabel' => &$GLOBALS['TL_LANG']['MSC']['wa_container'], 'tl_class' => 'clr w50', ), 'sql' => "int(10) unsigned NOT NULL default '0'", 'relation' => array ( 'table' => 'tl_vr_wa_units', 'load' => 'lazy', 'type' => 'hasOne', 'field' => 'id' ) ), 'amount' => array ( 'exclude' => true, 'inputType' => 'text', 'eval' => array ( 'rgxp'=>'natural', 'tl_class'=>'w50', ), 'sql' => "smallint(3) unsigned NOT NULL default 0", ), 'behaelter' => array ( 'exclude' => true, 'inputType' => 'text', 'eval' => array('rgxp'=>'natural','tl_class'=>'clr w50','readonly'=>true), 'sql' => "smallint(3) unsigned NOT NULL default 0", ), 'sorten' => array ( 'exclude' => true, 'inputType' => 'checkbox', 'eval' => array('multiple'=>true, 'csv'=>';','tl_class'=>'w50'), 'sql' => "blob NULL", ), 'ernteart' => array ( 'exclude' => true, 'inputType' => 'checkbox', 'eval' => array('multiple'=>true, 'csv'=>',','tl_class'=>'w50'), 'sql' => "blob NULL", ), 'upload' => array ( 'exclude' => true, 'inputType' => 'fileTree', 'eval' => array('filesOnly'=>true, 'fieldType'=>'radio', 'tl_class'=>'clr w50', 'extensions'=>Config::get('allowedDownload')), 'sql' => "binary(16) NULL" ), 'filename' => array ( 'exclude' => true, 'inputType' => 'text', 'eval' => array ( 'maxlength' => 255, 'decodeEntities'=>true ), 'sql' => "varchar(255) BINARY NOT NULL default ''" ), 'attribute_values' => array ( 'exclude' => true, 'inputType' => 'textarea', 'eval' => array('tl_class'=>'clr', 'readonly'=>"true", 'allowHtml'=>false, 'preserveTags'=>false), 'sql' => "text NULL" ), 'annotation' => array ( 'exclude' => true, 'search' => true, 'inputType' => 'textarea', 'eval' => array('tl_class'=>'clr', 'readonly'=>"true"), 'sql' => "text NULL" ), 'internalAnnotation' => array ( 'exclude' => true, 'search' => true, 'inputType' => 'textarea', 'eval' => array('tl_class'=>'clr', 'rte'=>'tinyMCE'), 'sql' => "text NULL" ) ) );