File tree Expand file tree Collapse file tree 3 files changed +25
-0
lines changed
Cms/view/adminhtml/ui_component Expand file tree Collapse file tree 3 files changed +25
-0
lines changed Original file line number Diff line number Diff line change 120
120
<item name =" saveUrl" xsi : type =" url" path =" cms/page/inlineEdit" />
121
121
<item name =" validateBeforeSave" xsi : type =" boolean" >false</item >
122
122
</param >
123
+ <param name =" editUrl" xsi : type =" url" path =" cms/page/edit/page_id/:id" ></param >
123
124
<param name =" indexField" xsi : type =" string" >page_id</param >
124
125
<param name =" enabled" xsi : type =" boolean" >true</param >
125
126
<param name =" selectProvider" xsi : type =" string" >cms_page_listing.cms_page_listing.cms_page_columns.ids</param >
Original file line number Diff line number Diff line change @@ -308,6 +308,27 @@ define([
308
308
return this ;
309
309
} ,
310
310
311
+ /**
312
+ * Redirect to Edit page.
313
+ */
314
+ redirectToEdit : function ( ) {
315
+ var rowData = this . getData ( ) [ _ . keys ( this . getData ( ) ) [ 0 ] ] ,
316
+ indexFieldValue = ( typeof rowData [ this . indexField ] != "undefined" ) ? rowData [ this . indexField ] : "" ;
317
+
318
+ if ( indexFieldValue ) {
319
+ window . location . href = decodeURIComponent ( this . editUrl ) . replace ( ":id" , indexFieldValue ) ;
320
+ }
321
+ } ,
322
+
323
+ /**
324
+ * Check Edit url is defined in xml.
325
+ *
326
+ * @returns {Boolean }
327
+ */
328
+ hasEditUrl : function ( ) {
329
+ return ( typeof this . editUrl != "undefined" ) ? true : false ;
330
+ } ,
331
+
311
332
/**
312
333
* Validates all active records.
313
334
*
Original file line number Diff line number Diff line change 12
12
< button class ="action-primary " type ="button " click ="save " disable ="!canSave() ">
13
13
< span translate ="'Save' "/>
14
14
</ button >
15
+ < button class ="action-tertiary " type ="button " click ="redirectToEdit " visible ="hasEditUrl() ">
16
+ < span translate ="'Edit' "/>
17
+ </ button >
15
18
</ td >
16
19
</ tr >
You can’t perform that action at this time.
0 commit comments