Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Platform
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Platform
Commits
ff4da45c
Unverified
Commit
ff4da45c
authored
Sep 11, 2017
by
Nicolas Widart
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add the create button via vuejs
parent
93b5634f
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
14 deletions
+22
-14
PageTable.vue
Modules/Page/Assets/js/components/PageTable.vue
+10
-1
index.blade.php
Modules/Page/Resources/views/admin/index.blade.php
+0
-11
app.js
public/js/app.js
+12
-2
No files found.
Modules/Page/Assets/js/components/PageTable.vue
View file @
ff4da45c
<
template
>
<
template
>
<data-tables
:data=
"data"
>
<data-tables
:data=
"data"
:actions-def=
"actionsDef"
>
<el-table-column
prop=
"id"
label=
"Id"
width=
"100"
>
<el-table-column
prop=
"id"
label=
"Id"
width=
"100"
>
</el-table-column>
</el-table-column>
<el-table-column
prop=
"title"
label=
"Title"
>
<el-table-column
prop=
"title"
label=
"Title"
>
...
@@ -27,6 +27,15 @@
...
@@ -27,6 +27,15 @@
data
()
{
data
()
{
return
{
return
{
data
,
data
,
actionsDef
:
{
def
:
[{
name
:
'
Create a page
'
,
icon
:
'
edit
'
,
handler
:
()
=>
{
window
.
location
=
route
(
'
admin.page.page.create
'
);
}
}]
}
}
}
},
},
methods
:
{
methods
:
{
...
...
Modules/Page/Resources/views/admin/index.blade.php
View file @
ff4da45c
...
@@ -13,21 +13,10 @@
...
@@ -13,21 +13,10 @@
@section('content')
@section('content')
<div
class=
"row"
>
<div
class=
"row"
>
<div
class=
"col-xs-12"
>
<div
class=
"col-xs-12"
>
<div
class=
"row"
>
<div
class=
"btn-group pull-right"
style=
"margin: 0 15px 15px 0;"
>
<a
href=
"{{ URL::route('admin.page.page.create') }}"
class=
"btn btn-primary btn-flat"
style=
"padding: 4px 10px;"
>
<i
class=
"fa fa-pencil"
></i>
{{ trans('page::pages.button.create page') }}
</a>
</div>
</div>
<div
class=
"box box-primary"
>
<div
class=
"box box-primary"
>
<div
class=
"box-header"
>
</div>
<!-- /.box-header -->
<div
class=
"box-body"
>
<div
class=
"box-body"
>
<page-table></page-table>
<page-table></page-table>
</div>
</div>
<!-- /.box -->
</div>
</div>
</div>
</div>
</div>
</div>
...
...
public/js/app.js
View file @
ff4da45c
...
@@ -69213,7 +69213,16 @@ var _data = void 0;
...
@@ -69213,7 +69213,16 @@ var _data = void 0;
/* harmony default export */ __webpack_exports__["default"] = ({
/* harmony default export */ __webpack_exports__["default"] = ({
data: function data() {
data: function data() {
return {
return {
data: _data
data: _data,
actionsDef: {
def: [{
name: 'Create a page',
icon: 'edit',
handler: function handler() {
window.location = route('admin.page.page.create');
}
}]
}
};
};
},
},
...
@@ -69240,7 +69249,8 @@ var _data = void 0;
...
@@ -69240,7 +69249,8 @@ var _data = void 0;
module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;
module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;
return _c('data-tables', {
return _c('data-tables', {
attrs: {
attrs: {
"data": _vm.data
"data": _vm.data,
"actions-def": _vm.actionsDef
}
}
}, [_c('el-table-column', {
}, [_c('el-table-column', {
attrs: {
attrs: {
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment