File tree Expand file tree Collapse file tree 1 file changed +18
-24
lines changed
src/templates/_components/fieldtypes/Matrix Expand file tree Collapse file tree 1 file changed +18
-24
lines changed Original file line number Diff line number Diff line change 9090 {% endif %}
9191{% endif %}
9292
93+ {% set actionMenuItems = actionMenuItems | merge ([
94+ {hr : true },
95+ ]) %}
96+
9397{% if not staticEntries %}
9498 {% set actionMenuItems = actionMenuItems | merge ([
95- {hr : true },
9699 {
97100 icon : ' trash' ,
98101 label : ' Delete' |t(' app' ),
109112 data : {action : ' duplicate' },
110113 },
111114 },
112- {
113- icon : ' clone-dashed' ,
114- color : ' fuchsia' ,
115- label : ' Copy' |t(' app' ),
116- attributes : {
117- data : {action : ' copy' },
118- },
119- },
120- {hr : true },
121115 ]) %}
116+ {% endif %}
117+
118+ {% set actionMenuItems = actionMenuItems | merge ([
119+ {
120+ icon : ' clone-dashed' ,
121+ color : ' fuchsia' ,
122+ label : ' Copy' |t(' app' ),
123+ attributes : {
124+ data : {action : ' copy' },
125+ },
126+ },
127+ {hr : true },
128+ ]) %}
122129
130+ {% if not staticEntries %}
123131 {% for entryType in entryTypes %}
124132 {% set actionMenuItems = actionMenuItems | push({
125133 icon : entryType .icon ?? ' plus' ,
130138 },
131139 }) %}
132140 {% endfor %}
133- {% else %}
134- {# copy action should be available even for the "static" field - one entry type with min and max entries set to the same value #}
135- {% set actionMenuItems = actionMenuItems | merge ([
136- {hr : true },
137- {
138- icon : ' clone-dashed' ,
139- color : ' fuchsia' ,
140- label : ' Copy' |t(' app' ),
141- attributes : {
142- data : {action : ' copy' },
143- },
144- },
145- {hr : true },
146- ]) %}
147141{% endif %}
148142
149143{% namespace baseInputName %}
You can’t perform that action at this time.
0 commit comments