| ... | ... |
@@ -18,7 +18,8 @@ |
| 18 | 18 |
"contao/core-bundle": "^4.13", |
| 19 | 19 |
"symfony/config": "^5.4", |
| 20 | 20 |
"symfony/dependency-injection": "^5.4", |
| 21 |
- "symfony/http-kernel": "^5.4" |
|
| 21 |
+ "symfony/http-kernel": "^5.4", |
|
| 22 |
+ "vonrotenberg/htmx-bundle": "^1.0" |
|
| 22 | 23 |
}, |
| 23 | 24 |
"require-dev": {
|
| 24 | 25 |
"bamarni/composer-bin-plugin": "^1.5", |
| ... | ... |
@@ -62,5 +63,11 @@ |
| 62 | 63 |
"ecs": "@php tools/ecs/vendor/bin/ecs check src tests --config ecs.php --fix --ansi", |
| 63 | 64 |
"phpstan": "@php tools/phpstan/vendor/bin/phpstan analyze --ansi", |
| 64 | 65 |
"unit-tests": "@php vendor/bin/phpunit --colors=always" |
| 66 |
+ }, |
|
| 67 |
+ "repositories": {
|
|
| 68 |
+ "vonrotenberg": {
|
|
| 69 |
+ "type": "composer", |
|
| 70 |
+ "url": "https://satis.esales-media.de" |
|
| 71 |
+ } |
|
| 65 | 72 |
} |
| 66 | 73 |
} |
| 67 | 74 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,14 @@ |
| 1 |
+<?php |
|
| 2 |
+ |
|
| 3 |
+/** |
|
| 4 |
+ * This file is part of contao-weinanlieferung-bundle. |
|
| 5 |
+ * |
|
| 6 |
+ * (c) vonRotenberg |
|
| 7 |
+ * |
|
| 8 |
+ * @license commercial |
|
| 9 |
+ */ |
|
| 10 |
+ |
|
| 11 |
+$GLOBALS['BE_MOD']['content']['weinanlieferung'] = array |
|
| 12 |
+( |
|
| 13 |
+ 'tables' => array('tl_vr_wa_standort', 'tl_vr_wa_slot'),
|
|
| 14 |
+); |
| 0 | 15 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,126 @@ |
| 1 |
+<?php |
|
| 2 |
+ |
|
| 3 |
+/** |
|
| 4 |
+ * This file is part of contao-weinanlieferung-bundle. |
|
| 5 |
+ * |
|
| 6 |
+ * (c) vonRotenberg |
|
| 7 |
+ * |
|
| 8 |
+ * @license commercial |
|
| 9 |
+ */ |
|
| 10 |
+ |
|
| 11 |
+use Contao\DC_Table; |
|
| 12 |
+use Contao\DataContainer; |
|
| 13 |
+ |
|
| 14 |
+$GLOBALS['TL_DCA']['tl_vr_wa_slot'] = array |
|
| 15 |
+( |
|
| 16 |
+ |
|
| 17 |
+ // Config |
|
| 18 |
+ 'config' => array |
|
| 19 |
+ ( |
|
| 20 |
+ 'dataContainer' => DC_Table::class, |
|
| 21 |
+ 'ptable' => 'tl_vr_wa_standort', |
|
| 22 |
+ 'sql' => array |
|
| 23 |
+ ( |
|
| 24 |
+ 'keys' => array |
|
| 25 |
+ ( |
|
| 26 |
+ 'id' => 'primary', |
|
| 27 |
+ 'pid' => 'index' |
|
| 28 |
+ ) |
|
| 29 |
+ ) |
|
| 30 |
+ ), |
|
| 31 |
+ |
|
| 32 |
+ // List |
|
| 33 |
+ 'list' => array |
|
| 34 |
+ ( |
|
| 35 |
+ 'sorting' => array |
|
| 36 |
+ ( |
|
| 37 |
+ 'mode' => DataContainer::MODE_PARENT, |
|
| 38 |
+ 'fields' => array('time'),
|
|
| 39 |
+ 'headerFields' => array('title'),
|
|
| 40 |
+ 'disableGrouping' => true, |
|
| 41 |
+ 'panelLayout' => 'filter;sort,limit', |
|
| 42 |
+ ), |
|
| 43 |
+ 'global_operations' => array |
|
| 44 |
+ ( |
|
| 45 |
+ 'all' => array |
|
| 46 |
+ ( |
|
| 47 |
+ 'href' => 'act=select', |
|
| 48 |
+ 'class' => 'header_edit_all', |
|
| 49 |
+ 'attributes' => 'onclick="Backend.getScrollOffset()" accesskey="e"' |
|
| 50 |
+ ) |
|
| 51 |
+ ), |
|
| 52 |
+ 'operations' => array |
|
| 53 |
+ ( |
|
| 54 |
+ 'edit' => array |
|
| 55 |
+ ( |
|
| 56 |
+ 'href' => 'act=edit', |
|
| 57 |
+ 'icon' => 'edit.gif', |
|
| 58 |
+ ), |
|
| 59 |
+ 'copy' => array |
|
| 60 |
+ ( |
|
| 61 |
+ 'href' => 'act=paste&mode=copy', |
|
| 62 |
+ 'icon' => 'copy.svg' |
|
| 63 |
+ ), |
|
| 64 |
+ 'cut' => array |
|
| 65 |
+ ( |
|
| 66 |
+ 'href' => 'act=paste&mode=cut', |
|
| 67 |
+ 'icon' => 'cut.svg', |
|
| 68 |
+ 'attributes' => 'onclick="Backend.getScrollOffset()"' |
|
| 69 |
+ ), |
|
| 70 |
+ 'delete' => array |
|
| 71 |
+ ( |
|
| 72 |
+ 'href' => 'act=delete', |
|
| 73 |
+ 'icon' => 'delete.gif', |
|
| 74 |
+ ), |
|
| 75 |
+ 'show' => array |
|
| 76 |
+ ( |
|
| 77 |
+ 'icon' => 'show.gif', |
|
| 78 |
+ ), |
|
| 79 |
+ ) |
|
| 80 |
+ ), |
|
| 81 |
+ |
|
| 82 |
+ // Palettes |
|
| 83 |
+ 'palettes' => array |
|
| 84 |
+ ( |
|
| 85 |
+ 'default' => '{time_legend},date,time'
|
|
| 86 |
+ ), |
|
| 87 |
+ |
|
| 88 |
+ // Subpalettes |
|
| 89 |
+ 'subpalettes' => array |
|
| 90 |
+ (), |
|
| 91 |
+ |
|
| 92 |
+ // Fields |
|
| 93 |
+ 'fields' => array |
|
| 94 |
+ ( |
|
| 95 |
+ 'id' => array |
|
| 96 |
+ ( |
|
| 97 |
+ 'sql' => "int(10) unsigned NOT NULL auto_increment" |
|
| 98 |
+ ), |
|
| 99 |
+ 'pid' => array |
|
| 100 |
+ ( |
|
| 101 |
+ 'foreignKey' => 'tl_vr_wa_standort.title', |
|
| 102 |
+ 'sql' => "int(10) unsigned NOT NULL default '0'", |
|
| 103 |
+ 'relation' => array('type' => 'belongsTo', 'load' => 'lazy')
|
|
| 104 |
+ ), |
|
| 105 |
+ 'tstamp' => array |
|
| 106 |
+ ( |
|
| 107 |
+ 'sql' => "int(10) unsigned NOT NULL default '0'" |
|
| 108 |
+ ), |
|
| 109 |
+ 'date' => array |
|
| 110 |
+ ( |
|
| 111 |
+ 'inputType' => 'text', |
|
| 112 |
+ 'eval' => array('rgxp'=>'date', 'mandatory'=>true, 'doNotCopy'=>true, 'datepicker'=>true, 'tl_class'=>'w50 wizard'),
|
|
| 113 |
+ 'sql' => "int(10) unsigned NULL" |
|
| 114 |
+ ), |
|
| 115 |
+ 'time' => array |
|
| 116 |
+ ( |
|
| 117 |
+ 'default' => time(), |
|
| 118 |
+ 'filter' => true, |
|
| 119 |
+ 'sorting' => true, |
|
| 120 |
+ 'flag' => DataContainer::SORT_MONTH_DESC, |
|
| 121 |
+ 'inputType' => 'text', |
|
| 122 |
+ 'eval' => array('rgxp'=>'time', 'mandatory'=>true, 'doNotCopy'=>true, 'tl_class'=>'w50'),
|
|
| 123 |
+ 'sql' => "int(10) NULL" |
|
| 124 |
+ ), |
|
| 125 |
+ ) |
|
| 126 |
+); |
| 0 | 127 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,125 @@ |
| 1 |
+<?php |
|
| 2 |
+ |
|
| 3 |
+/** |
|
| 4 |
+ * This file is part of contao-weinanlieferung-bundle. |
|
| 5 |
+ * |
|
| 6 |
+ * (c) vonRotenberg |
|
| 7 |
+ * |
|
| 8 |
+ * @license commercial |
|
| 9 |
+ */ |
|
| 10 |
+ |
|
| 11 |
+use Contao\DC_Table; |
|
| 12 |
+use Contao\DataContainer; |
|
| 13 |
+ |
|
| 14 |
+$GLOBALS['TL_DCA']['tl_vr_wa_standort'] = array |
|
| 15 |
+( |
|
| 16 |
+ // Config |
|
| 17 |
+ 'config' => array |
|
| 18 |
+ ( |
|
| 19 |
+ 'dataContainer' => DC_Table::class, |
|
| 20 |
+ 'ctable' => array('tl_vr_wa_slot'),
|
|
| 21 |
+ 'enableVersioning' => true, |
|
| 22 |
+ 'sql' => array |
|
| 23 |
+ ( |
|
| 24 |
+ 'keys' => array |
|
| 25 |
+ ( |
|
| 26 |
+ 'id' => 'primary' |
|
| 27 |
+ ) |
|
| 28 |
+ ) |
|
| 29 |
+ ), |
|
| 30 |
+ |
|
| 31 |
+ // List |
|
| 32 |
+ 'list' => array |
|
| 33 |
+ ( |
|
| 34 |
+ 'sorting' => array |
|
| 35 |
+ ( |
|
| 36 |
+ 'mode' => DataContainer::MODE_SORTABLE, |
|
| 37 |
+ 'fields' => array('title'),
|
|
| 38 |
+ 'flag' => DataContainer::SORT_INITIAL_LETTER_ASC, |
|
| 39 |
+ 'panelLayout' => 'sort,search,limit' |
|
| 40 |
+ ), |
|
| 41 |
+ 'label' => array( |
|
| 42 |
+ 'fields' => array('title'),
|
|
| 43 |
+ 'format' => '%s' |
|
| 44 |
+ ), |
|
| 45 |
+ 'global_operations' => array |
|
| 46 |
+ ( |
|
| 47 |
+ 'all' => array |
|
| 48 |
+ ( |
|
| 49 |
+ 'href' => 'act=select', |
|
| 50 |
+ 'class' => 'header_edit_all', |
|
| 51 |
+ 'attributes' => 'onclick="Backend.getScrollOffset()" accesskey="e"' |
|
| 52 |
+ ) |
|
| 53 |
+ ), |
|
| 54 |
+ 'operations' => array |
|
| 55 |
+ ( |
|
| 56 |
+ 'edit' => array |
|
| 57 |
+ ( |
|
| 58 |
+ 'href' => 'table=tl_vr_wa_slot', |
|
| 59 |
+ 'icon' => 'edit.gif', |
|
| 60 |
+ ), |
|
| 61 |
+ 'editheader' => array |
|
| 62 |
+ ( |
|
| 63 |
+ 'href' => 'table=tl_vr_wa_standort&act=edit', |
|
| 64 |
+ 'icon' => 'header.svg' |
|
| 65 |
+ ), |
|
| 66 |
+ 'copy' => array |
|
| 67 |
+ ( |
|
| 68 |
+ 'href' => 'act=paste&mode=copy', |
|
| 69 |
+ 'icon' => 'copy.svg' |
|
| 70 |
+ ), |
|
| 71 |
+ 'cut' => array |
|
| 72 |
+ ( |
|
| 73 |
+ 'href' => 'act=paste&mode=cut', |
|
| 74 |
+ 'icon' => 'cut.svg', |
|
| 75 |
+ 'attributes' => 'onclick="Backend.getScrollOffset()"' |
|
| 76 |
+ ), |
|
| 77 |
+ 'delete' => array |
|
| 78 |
+ ( |
|
| 79 |
+ 'href' => 'act=delete', |
|
| 80 |
+ 'icon' => 'delete.gif', |
|
| 81 |
+ ), |
|
| 82 |
+ 'show' => array |
|
| 83 |
+ ( |
|
| 84 |
+ 'icon' => 'show.gif', |
|
| 85 |
+ ), |
|
| 86 |
+ ) |
|
| 87 |
+ ), |
|
| 88 |
+ |
|
| 89 |
+ // Palettes |
|
| 90 |
+ 'palettes' => array |
|
| 91 |
+ ( |
|
| 92 |
+ 'default' => '{title_legend},title'
|
|
| 93 |
+ ), |
|
| 94 |
+ |
|
| 95 |
+ // Subpalettes |
|
| 96 |
+ 'subpalettes' => array |
|
| 97 |
+ ( |
|
| 98 |
+ ), |
|
| 99 |
+ |
|
| 100 |
+ // Fields |
|
| 101 |
+ 'fields' => array |
|
| 102 |
+ ( |
|
| 103 |
+ 'id' => array |
|
| 104 |
+ ( |
|
| 105 |
+ 'sql' => "int(10) unsigned NOT NULL auto_increment" |
|
| 106 |
+ ), |
|
| 107 |
+ 'tstamp' => array |
|
| 108 |
+ ( |
|
| 109 |
+ 'sql' => "int(10) unsigned NOT NULL default 0" |
|
| 110 |
+ ), |
|
| 111 |
+ 'title' => array |
|
| 112 |
+ ( |
|
| 113 |
+ 'exclude' => true, |
|
| 114 |
+ 'sorting' => true, |
|
| 115 |
+ 'flag' => DataContainer::SORT_INITIAL_LETTER_ASC, |
|
| 116 |
+ 'inputType' => 'text', |
|
| 117 |
+ 'eval' => array |
|
| 118 |
+ ( |
|
| 119 |
+ 'mandatory' => true, |
|
| 120 |
+ 'maxlength' => 255 |
|
| 121 |
+ ), |
|
| 122 |
+ 'sql' => "varchar(255) NOT NULL default ''" |
|
| 123 |
+ ) |
|
| 124 |
+ ) |
|
| 125 |
+); |