Browse code

Progress

Benjamin Roth authored on21/02/2023 19:42:19
Showing1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,120 @@
1
+<?php
2
+/**
3
+ * TeamList for Contao
4
+ *
5
+ * Copyright (c) 2016 Benjamin Roth
6
+ *
7
+ * @license LGPL-3.0+
8
+ */
9
+
10
+/**
11
+ * Table tl_esm_team_group
12
+ */
13
+
14
+use Contao\DC_Table;
15
+use Contao\DataContainer;
16
+use Contao\System;
17
+use Contao\CoreBundle\Security\ContaoCorePermissions;
18
+
19
+$GLOBALS['TL_DCA']['tl_iso_product_month'] = array
20
+(
21
+
22
+	// Config
23
+	'config' => array
24
+	(
25
+		'dataContainer'               => DC_Table::class,
26
+        'enableVersioning'            => false,
27
+        'closed'                      => false,
28
+        'notEditable'                 => false,
29
+        'notDeletable'                => false,
30
+		'sql' => array
31
+		(
32
+			'keys' => array
33
+			(
34
+				'id' => 'primary'
35
+			)
36
+		)
37
+	),
38
+
39
+	// List
40
+	'list' => array
41
+	(
42
+		'sorting' => array
43
+		(
44
+			'mode'                    => DataContainer::MODE_SORTED,
45
+			'fields'                  => array('month'),
46
+			'flag'                    => 1,
47
+			'panelLayout'             => 'filter,search;sort,limit',
48
+		),
49
+		'label' => array
50
+		(
51
+			'fields'                  => array('month'),
52
+			'format'                  => '%s'
53
+		),
54
+		'global_operations' => array
55
+		(
56
+			'all' => array
57
+			(
58
+				'href'                => 'act=select',
59
+				'class'               => 'header_edit_all',
60
+				'attributes'          => 'onclick="Backend.getScrollOffset()" accesskey="e"'
61
+			)
62
+		),
63
+		'operations' => array
64
+		(
65
+            'edit' => array
66
+            (
67
+                'href'                => 'act=edit',
68
+                'icon'                => 'edit.svg'
69
+            ),
70
+            'copy' => array
71
+			(
72
+				'href'                => 'act=copy',
73
+				'icon'                => 'copy.svg'
74
+			),
75
+            'delete' => array
76
+            (
77
+                'href'                => 'act=delete',
78
+                'icon'                => 'delete.svg',
79
+                'attributes'          => 'onclick="if(!confirm(\'' . ($GLOBALS['TL_LANG']['MSC']['deleteConfirm'] ?? null) . '\'))return false;Backend.getScrollOffset()"'
80
+            ),
81
+            'show' => array
82
+            (
83
+                'href'                => 'act=show',
84
+                'icon'                => 'show.svg'
85
+            )
86
+		)
87
+	),
88
+
89
+	// Palettes
90
+	'palettes' => array
91
+	(
92
+		'default'                     => '{title_legend},month'
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
+            'relation'                 => ['type'=>'hasMany','load'=>'lazy','table'=>'tl_iso_product','field'=>'attr_monthYear']
107
+		),
108
+		'tstamp' => array
109
+		(
110
+			'sql'                     => "int(10) unsigned NOT NULL default '0'"
111
+		),
112
+		'month' => array
113
+		(
114
+			'exclude'                 => true,
115
+			'inputType'               => 'text',
116
+			'eval'                    => array('mandatory'=>true, 'tl_class'=>'w50'),
117
+			'sql'                     => "varchar(64) NOT NULL default ''"
118
+		)
119
+	)
120
+);