Adding links on page title and slugs

parent fe01b235
......@@ -60,8 +60,18 @@
<el-table-column prop="id" label="Id" width="100" sortable="custom">
</el-table-column>
<el-table-column prop="translations.title" :label="trans('page.title')">
<template scope="scope">
<a @click.prevent="goToEdit(scope)" href="#">
{{ scope.row.translations.title }}
</a>
</template>
</el-table-column>
<el-table-column prop="translations.slug" :label="trans('page.slug')">
<template scope="scope">
<a @click.prevent="goToEdit(scope)" href="#">
{{ scope.row.translations.slug }}
</a>
</template>
</el-table-column>
<el-table-column prop="created_at" :label="trans('core.table.created at')" sortable="custom">
</el-table-column>
......@@ -198,6 +208,9 @@
handleSelectionChange(selectedPages) {
this.selectedPages = selectedPages;
},
goToEdit(scope) {
this.$router.push({name: 'admin.page.page.edit', params: {pageId: scope.row.id}})
},
},
mounted() {
this.fetchData();
......
......@@ -91820,6 +91820,16 @@ var _data = void 0; //
//
//
//
//
//
//
//
//
//
//
//
//
//
exports.default = {
mixins: [_ShortcutHelper2.default],
......@@ -91919,6 +91929,9 @@ exports.default = {
},
handleSelectionChange: function handleSelectionChange(selectedPages) {
this.selectedPages = selectedPages;
},
goToEdit: function goToEdit(scope) {
this.$router.push({ name: 'admin.page.page.edit', params: { pageId: scope.row.id } });
}
},
mounted: function mounted() {
......@@ -92168,14 +92181,70 @@ var render = function() {
attrs: {
prop: "translations.title",
label: _vm.trans("page.title")
}
},
scopedSlots: _vm._u([
{
key: "default",
fn: function(scope) {
return [
_c(
"a",
{
attrs: { href: "#" },
on: {
click: function($event) {
$event.preventDefault()
_vm.goToEdit(scope)
}
}
},
[
_vm._v(
"\n " +
_vm._s(scope.row.translations.title) +
"\n "
)
]
)
]
}
}
])
}),
_vm._v(" "),
_c("el-table-column", {
attrs: {
prop: "translations.slug",
label: _vm.trans("page.slug")
}
},
scopedSlots: _vm._u([
{
key: "default",
fn: function(scope) {
return [
_c(
"a",
{
attrs: { href: "#" },
on: {
click: function($event) {
$event.preventDefault()
_vm.goToEdit(scope)
}
}
},
[
_vm._v(
"\n " +
_vm._s(scope.row.translations.slug) +
"\n "
)
]
)
]
}
}
])
}),
_vm._v(" "),
_c("el-table-column", {
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment