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
cb768834
Unverified
Commit
cb768834
authored
Oct 05, 2017
by
Nicolas Widart
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Hide edit folder button for s3 filesystem.
Allign buttons to the right
parent
eed6baf4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
107 additions
and
86 deletions
+107
-86
MediaList.vue
Modules/Media/Assets/js/components/MediaList.vue
+18
-12
master.blade.php
Themes/Adminlte/views/layouts/master.blade.php
+2
-1
app.js
public/js/app.js
+87
-73
No files found.
Modules/Media/Assets/js/components/MediaList.vue
View file @
cb768834
...
@@ -80,20 +80,22 @@
...
@@ -80,20 +80,22 @@
</el-table-column>
</el-table-column>
<el-table-column
prop=
"actions"
label=
""
width=
"150"
>
<el-table-column
prop=
"actions"
label=
""
width=
"150"
>
<
template
scope=
"scope"
>
<
template
scope=
"scope"
>
<a
class=
"btn btn-primary btn-flat"
@
click
.
prevent=
"insertMedia(scope)"
<div
class=
"pull-right"
>
v-if=
"singleModal && ! scope.row.is_folder"
>
<a
class=
"btn btn-primary btn-flat"
@
click
.
prevent=
"insertMedia(scope)"
{{
trans
(
'
media.insert
'
)
}}
v-if=
"singleModal && ! scope.row.is_folder"
>
</a>
{{
trans
(
'
media.insert
'
)
}}
<div
v-if=
"! singleModal"
>
<a
class=
"btn btn-default btn-flat"
@
click
.
prevent=
"loadEditForm(scope)"
v-if=
"! scope.row.is_folder"
><i
class=
"fa fa-pencil"
></i></a>
<a
@
click
.
prevent=
"showEditFolder(scope.row)"
class=
"btn btn-default btn-flat"
v-if=
"scope.row.is_folder"
>
<i
class=
"fa fa-pencil"
></i>
</a>
</a>
<div
v-if=
"! singleModal"
>
<a
class=
"btn btn-default btn-flat"
@
click
.
prevent=
"loadEditForm(scope)"
v-if=
"! scope.row.is_folder"
><i
class=
"fa fa-pencil"
></i></a>
<a
@
click
.
prevent=
"showEditFolder(scope.row)"
class=
"btn btn-default btn-flat"
v-if=
"scope.row.is_folder && canEditFolders"
>
<i
class=
"fa fa-pencil"
></i>
</a>
<delete-button
:scope=
"scope"
:rows=
"data"
></delete-button>
<delete-button
:scope=
"scope"
:rows=
"data"
></delete-button>
</div>
</div>
</div>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
...
@@ -153,6 +155,7 @@
...
@@ -153,6 +155,7 @@
{
id
:
0
,
name
:
'
Home
'
},
{
id
:
0
,
name
:
'
Home
'
},
],
],
filesAreDeleting
:
false
,
filesAreDeleting
:
false
,
canEditFolders
:
true
,
}
}
},
},
methods
:
{
methods
:
{
...
@@ -280,6 +283,9 @@
...
@@ -280,6 +283,9 @@
},
},
},
},
mounted
()
{
mounted
()
{
if
(
window
.
AsgardCMS
.
filesystem
===
'
s3
'
)
{
this
.
canEditFolders
=
false
;
}
this
.
selectedMedia
.
length
=
0
;
this
.
selectedMedia
.
length
=
0
;
this
.
fetchMediaData
();
this
.
fetchMediaData
();
this
.
$events
.
listen
(
'
fileWasUploaded
'
,
eventData
=>
{
this
.
$events
.
listen
(
'
fileWasUploaded
'
,
eventData
=>
{
...
...
Themes/Adminlte/views/layouts/master.blade.php
View file @
cb768834
...
@@ -82,7 +82,8 @@
...
@@ -82,7 +82,8 @@
currentLocale
:
'
{{ locale() }}
'
,
currentLocale
:
'
{{ locale() }}
'
,
editor
:
'
{{ $activeEditor }}
'
,
editor
:
'
{{ $activeEditor }}
'
,
adminPrefix
:
'
{{ config(
'
asgard
.
core
.
core
.
admin
-
prefix
'
) }}
'
,
adminPrefix
:
'
{{ config(
'
asgard
.
core
.
core
.
admin
-
prefix
'
) }}
'
,
hideDefaultLocaleInURL
:
'
{{ config(
'
laravellocalization
.
hideDefaultLocaleInURL
'
) }}
'
hideDefaultLocaleInURL
:
'
{{ config(
'
laravellocalization
.
hideDefaultLocaleInURL
'
) }}
'
,
filesystem
:
'
{{ config(
'
asgard
.
media
.
config
.
filesystem
'
) }}
'
};
};
</script>
</script>
...
...
public/js/app.js
View file @
cb768834
...
@@ -93997,6 +93997,8 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
...
@@ -93997,6 +93997,8 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
//
//
//
//
//
//
//
//
exports.default = {
exports.default = {
components: {
components: {
...
@@ -94025,7 +94027,8 @@ exports.default = {
...
@@ -94025,7 +94027,8 @@ exports.default = {
folderId: 0,
folderId: 0,
selectedMedia: {},
selectedMedia: {},
folderBreadcrumb: [{ id: 0, name: 'Home' }],
folderBreadcrumb: [{ id: 0, name: 'Home' }],
filesAreDeleting: false
filesAreDeleting: false,
canEditFolders: true
};
};
},
},
...
@@ -94155,6 +94158,9 @@ exports.default = {
...
@@ -94155,6 +94158,9 @@ exports.default = {
mounted: function mounted() {
mounted: function mounted() {
var _this4 = this;
var _this4 = this;
if (window.AsgardCMS.filesystem === 's3') {
this.canEditFolders = false;
}
this.selectedMedia.length = 0;
this.selectedMedia.length = 0;
this.fetchMediaData();
this.fetchMediaData();
this.$events.listen('fileWasUploaded', function (eventData) {
this.$events.listen('fileWasUploaded', function (eventData) {
...
@@ -95316,81 +95322,89 @@ var render = function() {
...
@@ -95316,81 +95322,89 @@ var render = function() {
key: "default",
key: "default",
fn: function(scope) {
fn: function(scope) {
return [
return [
_vm.singleModal && !scope.row.is_folder
_c("div", { staticClass: "pull-right" }, [
? _c(
_vm.singleModal && !scope.row.is_folder
"a",
? _c(
{
"a",
staticClass: "btn btn-primary btn-flat",
{
on: {
staticClass: "btn btn-primary btn-flat",
click: function($event) {
on: {
$event.preventDefault()
click: function($event) {
_vm.insertMedia(scope)
$event.preventDefault()
_vm.insertMedia(scope)
}
}
}
}
}
,
},
[
[
_vm._v(
_vm._v(
"\n " +
"\n "
+
_vm._s(_vm.trans("media.insert"))
+
_vm._s(_vm.trans("media.insert")) +
"\n "
"\n "
)
)
]
]
)
)
: _vm._e(),
: _vm._e(
),
_vm._v(" "
),
_vm._v(" "),
!_vm.singleModal
!_vm.singleModal
? _c(
? _c(
"div",
"div",
[
[
!scope.row.is_folder
!scope.row.is_folder
? _c(
? _c(
"a",
"a",
{
{
staticClass:
staticClass:
"btn btn-default btn-flat",
"btn btn-default btn-flat",
on: {
on:
{
click: function($event)
{
click: function($event) {
$event.preventDefault()
$event.preventDefault(
)
_vm.loadEditForm(scope
)
_vm.loadEditForm(scope)
}
}
}
}
},
},
[
[
_c("i", {
_c("i", {
staticClass: "fa fa-pencil"
staticClass: "fa fa-pencil"
})
})
]
]
)
)
: _vm._e(),
: _vm._e(),
_vm._v(" "),
_vm._v(" "),
scope.row.is_folder &&
scope.row.is_folder
_vm.canEditFolders
? _c(
? _c(
"a",
"a",
{
{
staticClass:
staticClass:
"btn btn-default btn-flat",
"btn btn-default btn-flat",
on: {
on: {
click: function($event) {
click: function($event) {
$event.preventDefault()
$event.preventDefault()
_vm.showEditFolder(scope.row)
_vm.showEditFolder(
scope.row
)
}
}
}
}
},
},
[
[
_c("i", {
_c("i", {
staticClass: "fa fa-pencil"
staticClass: "fa fa-pencil"
})
})
]
]
)
)
: _vm._e(),
: _vm._e(),
_vm._v(" "),
_vm._v(" "),
_c("delete-button", {
_c("delete-button", {
attrs: {
attrs: { scope: scope, rows: _vm.data }
scope: scope,
})
rows: _vm.data
],
}
1
})
)
],
: _vm._e()
1
)
: _vm._e()
])
]
]
}
}
}
}
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