13
13
</h3 >
14
14
</div >
15
15
<div class =" level-right" >
16
- <a href =" {{ route ($crud_prefix . ' .pages.create' ) } }"
17
- class =" button is-success" >
18
- {{ trans (' SimpleMenu::messages.add_new' ) } }
19
- </a >
16
+ {{-- create new --}}
17
+ <div class =" level-item" >
18
+ <a href =" {{ route ($crud_prefix . ' .pages.create' ) } }"
19
+ class =" button is-success" >
20
+ {{ trans (' SimpleMenu::messages.add_new' ) } }
21
+ </a >
22
+ </div >
23
+
24
+ @if ($page -> trashed () )
25
+ {{-- restore --}}
26
+ <div class =" level-item" >
27
+ {{ Form:: open ([' method' => ' PUT' , ' route' => [$crud_prefix . ' .pages.restore' , $page -> id ]]) } }
28
+ <button type =" submit" class =" button is-link" >
29
+ {{ trans (' SimpleMenu::messages.restore' ) } }
30
+ </button >
31
+ {{ Form:: close () } }
32
+ </div >
33
+
34
+ {{-- soft delete --}}
35
+ <div class =" level-item" >
36
+ {{ Form:: open ([' method' => ' DELETE ' , ' route' => [$crud_prefix . ' .pages.destroy_force' , $page -> id ]]) } }
37
+ <button type =" submit" class =" button is-danger" >
38
+ {{ trans (' SimpleMenu::messages.perm_delete' ) } }
39
+ </button >
40
+ {{ Form:: close () } }
41
+ </div >
42
+ @else
43
+ <div class =" level-item" >
44
+ {{-- delete --}}
45
+ @php
46
+ $check = $page -> route_name == $crud_prefix ? ' disabled' : ' ' ;
47
+ @endphp
48
+
49
+ {{ Form:: open ([' method' => ' DELETE ' , ' route' => [$crud_prefix . ' .pages.destroy' , $page -> id ]]) } }
50
+ <button type =" submit" class =" button is-danger" {{ $check } } >
51
+ {{ trans (' SimpleMenu::messages.delete' ) } }
52
+ </button >
53
+ {{ Form:: close () } }
54
+ </div >
55
+ @endif
20
56
</div >
21
57
</div >
22
58
@@ -45,7 +81,7 @@ class="button is-success">
45
81
name =" meta[{{ $code } } ]"
46
82
class =" input toggle-pad"
47
83
v-show =" showMeta('{{ $code } } ')"
48
- value =" {{ $page -> getTranslationWithoutFallback (' meta' ,$code ) } }"
84
+ value =" {{ $page -> getTranslationWithoutFallback (' meta' , $code ) } }"
49
85
placeholder =" keyword1, etc.." >
50
86
@endforeach
51
87
</div >
@@ -67,10 +103,10 @@ class="input toggle-pad"
67
103
{{ Form:: label (' action' , trans (' SimpleMenu::messages.action' ), [' class' => ' label' ]) } }
68
104
<div class =" control" >
69
105
{{ Form:: text (
70
- ' action' ,
71
- $page -> action ,
72
- [' class' => ' input' ,
73
- ' placeholder' => " Any\Name\Space\SomeController@methodName" ,
106
+ ' action' ,
107
+ $page -> action ,
108
+ [' class' => ' input' ,
109
+ ' placeholder' => " Any\Name\Space\SomeController@methodName" ,
74
110
' ref' => ' action' ])
75
111
} }
76
112
<span class =" help" >
@@ -89,10 +125,10 @@ class="input toggle-pad"
89
125
{{ Form:: label (' template' , trans (' SimpleMenu::messages.template' ), [' class' => ' label' ]) } }
90
126
<div class =" control" >
91
127
{{ Form:: text (
92
- ' template' ,
93
- $page -> template ,
94
- [' class' => ' input' ,
95
- ' placeholder' => " ex.'folder.hero' or 'Vendor::xyz'" ,
128
+ ' template' ,
129
+ $page -> template ,
130
+ [' class' => ' input' ,
131
+ ' placeholder' => " ex.'folder.hero' or 'Vendor::xyz'" ,
96
132
' ref' => ' template' ])
97
133
} }
98
134
</div >
@@ -115,9 +151,9 @@ class="input toggle-pad"
115
151
{{ Form:: label (' route_name' , trans (' SimpleMenu::messages.route_name' ), [' class' => ' label' ]) } }
116
152
<div class =" control" >
117
153
{{ Form:: text (
118
- ' route_name' ,
119
- $page -> route_name ,
120
- [' class' => ' input' ,' placeholder' => " route-name" ])
154
+ ' route_name' ,
155
+ $page -> route_name ,
156
+ [' class' => ' input' , ' placeholder' => " route-name" ])
121
157
} }
122
158
</div >
123
159
@if ($errors -> has (' route_name' ) )
@@ -132,9 +168,9 @@ class="input toggle-pad"
132
168
{{ Form:: label (' middlewares' , trans (' SimpleMenu::messages.middlewares' ), [' class' => ' label' ]) } }
133
169
<div class =" control" >
134
170
{{ Form:: text (
135
- ' middlewares' ,
136
- $page -> middlewares ,
137
- [' class' => ' input' ,' placeholder' => " some, other, middleware" ])
171
+ ' middlewares' ,
172
+ $page -> middlewares ,
173
+ [' class' => ' input' , ' placeholder' => " some, other, middleware" ])
138
174
} }
139
175
</div >
140
176
</div >
@@ -183,7 +219,7 @@ class="input toggle-pad"
183
219
<input type =" text" name =" title[{{ $code } } ]"
184
220
class =" input toggle-pad"
185
221
v-show =" showTitle('{{ $code } } ')"
186
- value =" {{ $page -> getTranslationWithoutFallback (' title' ,$code ) } }"
222
+ value =" {{ $page -> getTranslationWithoutFallback (' title' , $code ) } }"
187
223
placeholder =" Some Title" >
188
224
@endforeach
189
225
</div >
@@ -210,7 +246,7 @@ class="input toggle-pad"
210
246
name =" body[{{ $code } } ]"
211
247
class =" textarea"
212
248
v-show =" showBody('{{ $code } } ')" >
213
- {{ $page -> getTranslationWithoutFallback (' body' ,$code ) } }
249
+ {{ $page -> getTranslationWithoutFallback (' body' , $code ) } }
214
250
</textarea >
215
251
@endforeach
216
252
</div >
@@ -232,7 +268,7 @@ class="textarea"
232
268
name =" desc[{{ $code } } ]"
233
269
class =" textarea"
234
270
v-show =" showDesc('{{ $code } } ')" >
235
- {{ $page -> getTranslationWithoutFallback (' desc' ,$code ) } }
271
+ {{ $page -> getTranslationWithoutFallback (' desc' , $code ) } }
236
272
</textarea >
237
273
@endforeach
238
274
</div >
@@ -265,7 +301,7 @@ class="textarea"
265
301
name =" prefix[{{ $code } } ]"
266
302
class =" input toggle-pad"
267
303
v-show =" showPrefix('{{ $code } } ')"
268
- value =" {{ $page -> getTranslationWithoutFallback (' prefix' ,$code ) } }"
304
+ value =" {{ $page -> getTranslationWithoutFallback (' prefix' , $code ) } }"
269
305
placeholder =" abc" >
270
306
@endforeach
271
307
</div >
@@ -287,7 +323,7 @@ class="input toggle-pad"
287
323
name =" url[{{ $code } } ]"
288
324
class =" input toggle-pad"
289
325
v-show =" showUrl('{{ $code } } ')"
290
- value =" {{ $page -> getTranslationWithoutFallback (' url' ,$code ) } }"
326
+ value =" {{ $page -> getTranslationWithoutFallback (' url' , $code ) } }"
291
327
placeholder =" xyz/{someParam}" >
292
328
@endforeach
293
329
</div >
@@ -303,9 +339,9 @@ class="input toggle-pad"
303
339
{{ Form:: label (' menus' , trans (' SimpleMenu::messages.menus' ), [' class' => ' label' ]) } }
304
340
<div class =" control" >
305
341
{{ Form:: select (
306
- ' menus[]' ,
307
- $menus ,
308
- $page -> menus -> pluck (' id' , ' name' ),
342
+ ' menus[]' ,
343
+ $menus ,
344
+ $page -> menus -> pluck (' id' , ' name' ),
309
345
[' class' => ' select2' , ' multiple' => ' multiple' ])
310
346
} }
311
347
</div >
@@ -327,9 +363,9 @@ class="input toggle-pad"
327
363
{{ Form:: label (' roles' , trans (' SimpleMenu::messages.roles' ), [' class' => ' label' ]) } }
328
364
<div class =" control" >
329
365
{{ Form:: select (
330
- ' roles[]' ,
331
- $roles ,
332
- $page -> roles -> pluck (' name' , ' name' ),
366
+ ' roles[]' ,
367
+ $roles ,
368
+ $page -> roles -> pluck (' name' , ' name' ),
333
369
[' class' => ' select2' , ' multiple' => ' multiple' ])
334
370
} }
335
371
</div >
@@ -340,9 +376,9 @@ class="input toggle-pad"
340
376
{{ Form:: label (' permissions' , trans (' SimpleMenu::messages.permissions' ), [' class' => ' label' ]) } }
341
377
<div class =" control" >
342
378
{{ Form:: select (
343
- ' permissions[]' ,
344
- $permissions ,
345
- $page -> permissions -> pluck (' name' , ' name' ),
379
+ ' permissions[]' ,
380
+ $permissions ,
381
+ $page -> permissions -> pluck (' name' , ' name' ),
346
382
[' class' => ' select2' , ' multiple' => ' multiple' ])
347
383
} }
348
384
</div >
0 commit comments