Skip to content

Commit

Permalink
admin grid updates
Browse files Browse the repository at this point in the history
  • Loading branch information
indpurvesh committed Apr 18, 2017
1 parent bf869e1 commit f6f5c02
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,15 @@
sortable: false,
render: function (data, type, object, meta) {
return '<a href="' + object.id + '">Edit</a>';
return '<a href="/admin/attribute/'+ object.id +'/edit">Edit</a>';
}
},
{
data: 'destroy',
name: 'destroy',
sortable: false,
render: function (data, type, object, meta) {
return '<a href="' + object.id + '">Destroy</a>';
return '<form id="admin-attribute-destroy-'+object.id+'" method="post" action="/admin/attribute/'+object.id+'" ><input type="hidden" name="_method" value="DELETE"/><input type="hidden" name="_token" value="{{ csrf_token() }}"/> </form> <a onclick="event.preventDefault();jQuery(\'#admin-attribute-destroy-'+object.id+'\').submit()" href="/admin/attribute/'+object.id+'">Destroy</a>';
}
}
]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

{!! Form::text('name','Category Name') !!}
{!! Form::text('name','Category Name',['autofocus'=>true,'class' => 'form-control']) !!}
{!! Form::text('slug','Category Slug') !!}
{!! Form::select('parent_id','Parent Category',$categoryOptions) !!}

Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,15 @@
name: 'edit',
sortable: false,
render: function (data, type, object, meta) {
return '<a href="' + object.id + '">Edit</a>';
return '<a href="/admin/category/'+ object.id +'/edit">Edit</a>';
}
},
{
data: 'destroy',
name: 'destroy',
sortable: false,
render: function (data, type, object, meta) {
return '<a href="' + object.id + '">Destroy</a>';
return '<form id="admin-category-destroy-'+object.id+'" method="post" action="/admin/category/'+object.id+'" ><input type="hidden" name="_method" value="DELETE"/><input type="hidden" name="_token" value="{{ csrf_token() }}"/> </form> <a onclick="event.preventDefault();jQuery(\'#admin-category-destroy-'+object.id+'\').submit()" href="/admin/category/'+object.id+'">Destroy</a>';
}
}
]
Expand Down
4 changes: 2 additions & 2 deletions modules/base/Mage2/Catalog/views/admin/review/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@
sortable: false,
render: function (data, type, object, meta) {
return '<a href="' + object.id + '">Edit</a>';
return '<a href="/admin/review/'+ object.id +'/edit">Edit</a>';
}
},
{
data: 'destroy',
name: 'destroy',
sortable: false,
render: function (data, type, object, meta) {
return '<a href="' + object.id + '">Destroy</a>';
return '<form id="admin-review-destroy-'+object.id+'" method="post" action="/admin/review/'+object.id+'" ><input type="hidden" name="_method" value="DELETE"/><input type="hidden" name="_token" value="{{ csrf_token() }}"/> </form> <a onclick="event.preventDefault();jQuery(\'#admin-review-destroy-'+object.id+'\').submit()" href="/admin/review/'+object.id+'">Destroy</a>';
}
}
]
Expand Down
4 changes: 2 additions & 2 deletions modules/base/Mage2/Page/views/admin/page/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,15 @@
sortable: false,
render: function (data, type, object, meta) {
return '<a href="' + object.id + '">Edit</a>';
return '<a href="/admin/page/'+ object.id +'/edit">Edit</a>';
}
},
{
data: 'destroy',
name: 'destroy',
sortable: false,
render: function (data, type, object, meta) {
return '<a href="' + object.id + '">Destroy</a>';
return '<form id="admin-page-destroy-'+object.id+'" method="post" action="/admin/page/'+object.id+'" ><input type="hidden" name="_method" value="DELETE"/><input type="hidden" name="_token" value="{{ csrf_token() }}"/> </form> <a onclick="event.preventDefault();jQuery(\'#admin-page-destroy-'+object.id+'\').submit()" href="/admin/page/'+object.id+'">Destroy</a>';
}
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,14 @@
name: 'edit',
sortable: false,
render: function ( data, type, object, meta ) {
return '<a href="'+object.id+'">Edit</a>';
return '<a href="/admin/admin-user/'+ object.id +'/edit">Edit</a>';
}
},
{ data: 'destroy',
name: 'destroy',
sortable: false,
render: function ( data, type, object, meta ) {
return '<a href="'+object.id+'">Destroy</a>';
return '<form id="admin-admin-user-destroy-'+object.id+'" method="post" action="/admin/admin-user/'+object.id+'" ><input type="hidden" name="_method" value="DELETE"/><input type="hidden" name="_token" value="{{ csrf_token() }}"/> </form> <a onclick="event.preventDefault();jQuery(\'#admin-admin-user-destroy-'+object.id+'\').submit()" href="/admin/admin-user/'+object.id+'">Destroy</a>';
}
}
]
Expand Down

0 comments on commit f6f5c02

Please sign in to comment.