Adding link on media file name

parent 07063f9b
......@@ -72,7 +72,10 @@
<strong v-if="scope.row.is_folder" style="cursor: pointer;" @click="enterFolder(scope)">
{{ scope.row.filename }}
</strong>
<span v-else>{{ scope.row.filename }}</span>
<span v-else>
<a href="#"
@click.prevent="goToEdit(scope)">{{ scope.row.filename }}</a>
</span>
</template>
</el-table-column>
<el-table-column prop="created_at" :label="trans('core.table.created at')" sortable="custom"
......@@ -282,6 +285,9 @@
});
});
},
goToEdit(scope) {
this.$router.push({name: 'admin.media.media.edit', params: {mediaId: scope.row.id}})
},
},
mounted() {
if (window.AsgardCMS.filesystem === 's3') {
......
......@@ -94070,6 +94070,9 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
//
//
//
//
//
//
exports.default = {
components: {
......@@ -94220,6 +94223,9 @@ exports.default = {
message: _this3.trans('core.delete cancelled')
});
});
},
goToEdit: function goToEdit(scope) {
this.$router.push({ name: 'admin.media.media.edit', params: { mediaId: scope.row.id } });
}
},
mounted: function mounted() {
......@@ -95365,7 +95371,19 @@ var render = function() {
]
)
: _c("span", [
_vm._v(_vm._s(scope.row.filename))
_c(
"a",
{
attrs: { href: "#" },
on: {
click: function($event) {
$event.preventDefault()
_vm.goToEdit(scope)
}
}
},
[_vm._v(_vm._s(scope.row.filename))]
)
])
]
}
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