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 @@
</el-table-column>
<el-table-column
prop=
"actions"
label=
""
width=
"150"
>
<
template
scope=
"scope"
>
<a
class=
"btn btn-primary btn-flat"
@
click
.
prevent=
"insertMedia(scope)"
v-if=
"singleModal && ! scope.row.is_folder"
>
{{
trans
(
'
media.insert
'
)
}}
</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"
>
<i
class=
"fa fa-pencil"
></i>
<div
class=
"pull-right"
>
<a
class=
"btn btn-primary btn-flat"
@
click
.
prevent=
"insertMedia(scope)"
v-if=
"singleModal && ! scope.row.is_folder"
>
{{
trans
(
'
media.insert
'
)
}}
</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>
</
template
>
</el-table-column>
...
...
@@ -153,6 +155,7 @@
{
id
:
0
,
name
:
'
Home
'
},
],
filesAreDeleting
:
false
,
canEditFolders
:
true
,
}
},
methods
:
{
...
...
@@ -280,6 +283,9 @@
},
},
mounted
()
{
if
(
window
.
AsgardCMS
.
filesystem
===
'
s3
'
)
{
this
.
canEditFolders
=
false
;
}
this
.
selectedMedia
.
length
=
0
;
this
.
fetchMediaData
();
this
.
$events
.
listen
(
'
fileWasUploaded
'
,
eventData
=>
{
...
...
Themes/Adminlte/views/layouts/master.blade.php
View file @
cb768834
...
...
@@ -82,7 +82,8 @@
currentLocale
:
'
{{ locale() }}
'
,
editor
:
'
{{ $activeEditor }}
'
,
adminPrefix
:
'
{{ config(
'
asgard
.
core
.
core
.
admin
-
prefix
'
) }}
'
,
hideDefaultLocaleInURL
:
'
{{ config(
'
laravellocalization
.
hideDefaultLocaleInURL
'
) }}
'
hideDefaultLocaleInURL
:
'
{{ config(
'
laravellocalization
.
hideDefaultLocaleInURL
'
) }}
'
,
filesystem
:
'
{{ config(
'
asgard
.
media
.
config
.
filesystem
'
) }}
'
};
</script>
...
...
public/js/app.js
View file @
cb768834
...
...
@@ -93997,6 +93997,8 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
//
//
//
//
//
exports.default = {
components: {
...
...
@@ -94025,7 +94027,8 @@ exports.default = {
folderId: 0,
selectedMedia: {},
folderBreadcrumb: [{ id: 0, name: 'Home' }],
filesAreDeleting: false
filesAreDeleting: false,
canEditFolders: true
};
},
...
...
@@ -94155,6 +94158,9 @@ exports.default = {
mounted: function mounted() {
var _this4 = this;
if (window.AsgardCMS.filesystem === 's3') {
this.canEditFolders = false;
}
this.selectedMedia.length = 0;
this.fetchMediaData();
this.$events.listen('fileWasUploaded', function (eventData) {
...
...
@@ -95316,81 +95322,89 @@ var render = function() {
key: "default",
fn: function(scope) {
return [
_vm.singleModal && !scope.row.is_folder
? _c(
"a",
{
staticClass: "btn btn-primary btn-flat",
on: {
click: function($event) {
$event.preventDefault()
_vm.insertMedia(scope)
_c("div", { staticClass: "pull-right" }, [
_vm.singleModal && !scope.row.is_folder
? _c(
"a",
{
staticClass: "btn btn-primary btn-flat",
on: {
click: function($event) {
$event.preventDefault()
_vm.insertMedia(scope)
}
}
}
},
[
_vm._v(
"\n "
+
_vm._s(_vm.trans("media.insert")) +
"\n "
)
]
)
: _vm._e(
),
_vm._v(" "),
!_vm.singleModal
? _c(
"div",
[
!scope.row.is_folder
? _c(
"a",
{
staticClass:
"btn btn-default btn-flat",
on:
{
click: function($event) {
$event.preventDefault(
)
_vm.loadEditForm(scope)
}
,
[
_vm._v(
"\n " +
_vm._s(_vm.trans("media.insert"))
+
"\n "
)
]
)
: _vm._e(),
_vm._v(" "
),
!_vm.singleModal
? _c(
"div",
[
!scope.row.is_folder
? _c(
"a",
{
staticClass:
"btn btn-default btn-flat",
on: {
click: function($event)
{
$event.preventDefault()
_vm.loadEditForm(scope
)
}
}
}
},
[
_c("i", {
staticClass: "fa fa-pencil"
})
]
)
: _vm._e(),
_vm._v(" "),
scope.row.is_folder
? _c(
"a",
{
staticClass:
"btn btn-default btn-flat",
on: {
click: function($event) {
$event.preventDefault()
_vm.showEditFolder(scope.row)
},
[
_c("i", {
staticClass: "fa fa-pencil"
})
]
)
: _vm._e(),
_vm._v(" "),
scope.row.is_folder &&
_vm.canEditFolders
? _c(
"a",
{
staticClass:
"btn btn-default btn-flat",
on: {
click: function($event) {
$event.preventDefault()
_vm.showEditFolder(
scope.row
)
}
}
}
},
[
_c("i", {
staticClass: "fa fa-pencil"
})
]
)
: _vm._e(),
_vm._v(" "),
_c("delete-button", {
attrs: { scope: scope, rows: _vm.data }
})
],
1
)
: _vm._e()
},
[
_c("i", {
staticClass: "fa fa-pencil"
})
]
)
: _vm._e(),
_vm._v(" "),
_c("delete-button", {
attrs: {
scope: scope,
rows: _vm.data
}
})
],
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