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
7e80c64a
Unverified
Commit
7e80c64a
authored
Sep 05, 2018
by
Christian Giupponi
Committed by
GitHub
Sep 05, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3 from AsgardCms/3.0
merge latest asgard update
parents
8445397d
c63fabab
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
177 additions
and
30 deletions
+177
-30
AsgardCms.php
Modules/Core/Foundation/AsgardCms.php
+1
-1
RoutingServiceProvider.php
Modules/Core/Providers/RoutingServiceProvider.php
+8
-24
changelog.yml
Modules/Core/changelog.yml
+4
-0
changelog.yml
Modules/Media/changelog.yml
+3
-0
changelog.yml
Modules/Page/changelog.yml
+4
-1
changelog.yml
Modules/Setting/changelog.yml
+1
-1
changelog.yml
Modules/User/changelog.yml
+1
-1
WorkshopServiceProvider.php
Modules/Workshop/Providers/WorkshopServiceProvider.php
+2
-2
changelog.yml
Modules/Workshop/changelog.yml
+3
-0
MultipleMedia.vue
public/modules/media/js/components/MultipleMedia.vue
+123
-0
MultipleFileSelector.js
public/modules/media/js/mixins/MultipleFileSelector.js
+27
-0
No files found.
Modules/Core/Foundation/AsgardCms.php
View file @
7e80c64a
...
@@ -8,5 +8,5 @@ class AsgardCms
...
@@ -8,5 +8,5 @@ class AsgardCms
* The AsgardCms version.
* The AsgardCms version.
* @var string
* @var string
*/
*/
const
VERSION
=
'3.
5.3
'
;
const
VERSION
=
'3.
6.0
'
;
}
}
Modules/Core/Providers/RoutingServiceProvider.php
View file @
7e80c64a
...
@@ -52,30 +52,14 @@ abstract class RoutingServiceProvider extends ServiceProvider
...
@@ -52,30 +52,14 @@ abstract class RoutingServiceProvider extends ServiceProvider
$this
->
loadApiRoutes
(
$router
);
$this
->
loadApiRoutes
(
$router
);
});
});
$prefixes
=
$this
->
getPrefixes
();
$router
->
group
([
foreach
(
$prefixes
as
$prefix
)
{
'namespace'
=>
$this
->
namespace
,
$router
->
group
([
'prefix'
=>
LaravelLocalization
::
setLocale
(),
'namespace'
=>
$this
->
namespace
,
'middleware'
=>
[
'localizationRedirect'
,
'web'
],
'prefix'
=>
$prefix
,
],
function
(
Router
$router
)
{
'middleware'
=>
[
'localizationRedirect'
,
'web'
],
$this
->
loadBackendRoutes
(
$router
);
],
function
(
Router
$router
)
{
$this
->
loadFrontendRoutes
(
$router
);
$this
->
loadBackendRoutes
(
$router
);
});
$this
->
loadFrontendRoutes
(
$router
);
});
}
}
/**
* Get locale prefixes
* @return array
*/
private
function
getPrefixes
()
{
if
(
app
(
'asgard.isInstalled'
))
{
return
array_merge
(
json_decode
(
setting
(
'core::locales'
)),
[
''
]);
}
return
[
LaravelLocalization
::
setLocale
()];
}
}
/**
/**
...
...
Modules/Core/changelog.yml
View file @
7e80c64a
url
:
https://github.com/AsgardCms/Platform
url
:
https://github.com/AsgardCms/Platform
versions
:
versions
:
"
@unreleased"
:
"
@unreleased"
:
changed
:
-
Fixed routing issues with localization introduced in 3.6.0
"
3.6.0"
:
added
:
added
:
-
New Hungarian translations
-
New Hungarian translations
-
new <code>i18nFile</code> & <code>normalFile</code> macros
changed
:
changed
:
-
Updating Dutch translations
-
Updating Dutch translations
-
Fix Carbon locale
-
Fix Carbon locale
...
...
Modules/Media/changelog.yml
View file @
7e80c64a
url
:
https://github.com/AsgardCms/Platform
url
:
https://github.com/AsgardCms/Platform
versions
:
versions
:
"
3.6.0"
:
added
:
-
New MediaMuliple component for vuejs projects
"
3.5.1"
:
"
3.5.1"
:
changed
:
changed
:
-
Modify media controller to use Imagy non-statically
-
Modify media controller to use Imagy non-statically
...
...
Modules/Page/changelog.yml
View file @
7e80c64a
url
:
https://github.com/AsgardCms/Platform
url
:
https://github.com/AsgardCms/Platform
versions
:
versions
:
"
@unreleased"
:
"
3.6.0"
:
added
:
-
Add canonical and metadata for pages
changed
:
changed
:
-
Don't show draft pages
-
Don't show draft pages
-
Throw a 404 if page status is disabled
-
Throw a 404 if page status is disabled
-
Fixed a bug that checked the last radio even if wasn't the right one
"
3.5.2"
:
"
3.5.2"
:
changed
:
changed
:
-
Adding support for UTF-8 slug for non ASCII characters (Chinese etc.)
-
Adding support for UTF-8 slug for non ASCII characters (Chinese etc.)
...
...
Modules/Setting/changelog.yml
View file @
7e80c64a
url
:
https://github.com/AsgardCms/Platform
url
:
https://github.com/AsgardCms/Platform
versions
:
versions
:
"
@unreleased
"
:
"
3.6.0
"
:
added
:
added
:
-
New <code>@hasSetting()</code> and <code>@endHasSetting</code> directives
-
New <code>@hasSetting()</code> and <code>@endHasSetting</code> directives
"
3.5.3"
:
"
3.5.3"
:
...
...
Modules/User/changelog.yml
View file @
7e80c64a
url
:
https://github.com/AsgardCms/Platform
url
:
https://github.com/AsgardCms/Platform
versions
:
versions
:
"
@unreleased
"
:
"
3.6.0
"
:
changed
:
changed
:
-
Adding a test the user token is correctly generated
-
Adding a test the user token is correctly generated
-
Fix creation of an activated user
-
Fix creation of an activated user
...
...
Modules/Workshop/Providers/WorkshopServiceProvider.php
View file @
7e80c64a
...
@@ -21,7 +21,7 @@ use Modules\Workshop\Scaffold\Module\Generators\ValueObjectGenerator;
...
@@ -21,7 +21,7 @@ use Modules\Workshop\Scaffold\Module\Generators\ValueObjectGenerator;
use
Modules\Workshop\Scaffold\Module\ModuleScaffold
;
use
Modules\Workshop\Scaffold\Module\ModuleScaffold
;
use
Modules\Workshop\Scaffold\Theme\ThemeGeneratorFactory
;
use
Modules\Workshop\Scaffold\Theme\ThemeGeneratorFactory
;
use
Modules\Workshop\Scaffold\Theme\ThemeScaffold
;
use
Modules\Workshop\Scaffold\Theme\ThemeScaffold
;
use
Nwidart\Modules\
Repository
;
use
Nwidart\Modules\
Contracts\RepositoryInterface
;
class
WorkshopServiceProvider
extends
ServiceProvider
class
WorkshopServiceProvider
extends
ServiceProvider
{
{
...
@@ -55,7 +55,7 @@ class WorkshopServiceProvider extends ServiceProvider
...
@@ -55,7 +55,7 @@ class WorkshopServiceProvider extends ServiceProvider
});
});
app
(
'router'
)
->
bind
(
'module'
,
function
(
$module
)
{
app
(
'router'
)
->
bind
(
'module'
,
function
(
$module
)
{
return
app
(
Repository
::
class
)
->
find
(
$module
);
return
app
(
Repository
Interface
::
class
)
->
find
(
$module
);
});
});
app
(
'router'
)
->
bind
(
'theme'
,
function
(
$theme
)
{
app
(
'router'
)
->
bind
(
'theme'
,
function
(
$theme
)
{
return
app
(
ThemeManager
::
class
)
->
find
(
$theme
);
return
app
(
ThemeManager
::
class
)
->
find
(
$theme
);
...
...
Modules/Workshop/changelog.yml
View file @
7e80c64a
url
:
https://github.com/AsgardCms/Platform
url
:
https://github.com/AsgardCms/Platform
versions
:
versions
:
"
@unreleased"
:
changed
:
-
Fixed issue with incorrect binding to the laravel-modules Repository class
"
3.5.1"
:
"
3.5.1"
:
changed
:
changed
:
-
Fixing issue with ThemeManager caused when a theme name has the same name as project name
-
Fixing issue with ThemeManager caused when a theme name has the same name as project name
...
...
public/modules/media/js/components/MultipleMedia.vue
0 → 100644
View file @
7e80c64a
<
template
>
<div>
<label
class=
"el-form-item__label"
>
{{
getFieldLabel
()
}}
</label>
<div
class=
"jsThumbnailImageWrapper jsSingleThumbnailWrapper"
v-if=
"hasSelectedMedia"
>
<figure
v-for=
"media in this.selectedMedia"
:key=
"media.id"
>
<img
:src=
"media.small_thumb"
alt=
""
v-if=
"media.is_image"
/>
<i
:class=
"`fa $
{media.fa_icon}`" style="font-size: 60px;" v-if="! media.is_image">
</i>
<span
v-if=
"! media.is_image"
style=
"display:block;"
>
{{
media
.
filename
}}
</span>
<span
class=
"el-icon-error remove-media"
@
click=
"unSelectMedia(media.id)"
></span>
</figure>
<div
class=
"clearfix"
></div>
</div>
<div>
<el-button
type=
"button"
@
click=
"dialogVisible = true"
>
{{
trans
(
'
media.Browse
'
)
}}
</el-button>
</div>
<el-dialog
:visible
.
sync=
"dialogVisible"
fullscreen
:before-close=
"handleClose"
>
<media-list
single-modal
:event-name=
"this.eventName"
></media-list>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"dialogVisible = false"
>
{{
trans
(
'
core.button.cancel
'
)
}}
</el-button>
</span>
</el-dialog>
</div>
</
template
>
<
script
>
import
axios
from
'
axios
'
;
import
UploadZone
from
'
../../../../Media/Assets/js/components/UploadZone.vue
'
;
import
MediaList
from
'
../../../../Media/Assets/js/components/MediaList.vue
'
;
import
StringHelpers
from
'
../../../../Core/Assets/js/mixins/StringHelpers.vue
'
;
export
default
{
mixins
:
[
StringHelpers
],
props
:
{
zone
:
{
type
:
String
,
required
:
true
},
entity
:
{
type
:
String
,
required
:
true
},
entityId
:
{
default
:
null
},
label
:
{
type
:
String
},
},
components
:
{
'
upload-zone
'
:
UploadZone
,
'
media-list
'
:
MediaList
,
},
watch
:
{
entityId
()
{
if
(
this
.
entityId
)
{
this
.
fetchMedia
();
}
},
},
data
()
{
return
{
dialogVisible
:
false
,
selectedMedia
:
[],
eventName
:
''
,
};
},
computed
:
{
hasSelectedMedia
()
{
return
this
.
selectedMedia
!==
undefined
&&
!
_
.
isEmpty
(
this
.
selectedMedia
);
},
},
methods
:
{
handleClose
(
done
)
{
done
();
},
unSelectMedia
(
id
)
{
this
.
selectedMedia
=
_
.
reject
(
this
.
selectedMedia
,
media
=>
media
.
id
===
id
);
this
.
$emit
(
'
fileUnselected
'
,
{
id
,
zone
:
this
.
zone
});
},
fetchMedia
()
{
axios
.
get
(
route
(
'
api.media.get-by-zone-and-entity
'
,
{
zone
:
this
.
zone
,
entity
:
this
.
entity
,
entity_id
:
this
.
entityId
,
}))
.
then
((
response
)
=>
{
this
.
selectedMedia
=
response
.
data
.
data
;
_
.
forEach
(
this
.
selectedMedia
,
(
file
)
=>
{
this
.
$emit
(
'
multipleFileSelected
'
,
{
id
:
file
.
id
,
zone
:
this
.
zone
});
});
});
},
getFieldLabel
()
{
return
this
.
label
||
this
.
ucwords
(
this
.
zone
.
replace
(
'
_
'
,
'
'
));
},
makeId
()
{
let
text
=
''
;
const
possible
=
'
ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
'
;
for
(
let
i
=
0
;
i
<
5
;
i
++
)
{
text
+=
possible
.
charAt
(
Math
.
floor
(
Math
.
random
()
*
possible
.
length
));
}
return
text
;
},
},
mounted
()
{
if
(
this
.
entityId
)
{
this
.
fetchMedia
();
}
this
.
eventName
=
`fileWasSelected
${
this
.
makeId
()}${
Math
.
floor
(
Math
.
random
()
*
999999
)}
`
;
this
.
$events
.
listen
(
this
.
eventName
,
(
mediaData
)
=>
{
if
(
_
.
find
(
this
.
selectedMedia
,
mediaData
)
===
undefined
)
{
if
(
!
this
.
selectedMedia
)
this
.
selectedMedia
=
[];
this
.
selectedMedia
.
push
(
mediaData
);
this
.
$emit
(
'
multipleFileSelected
'
,
_
.
merge
(
mediaData
,
{
zone
:
this
.
zone
}));
}
});
},
};
</
script
>
<
style
>
.remove-media
{
position
:
absolute
;
top
:
5px
;
left
:
5px
;
color
:
#FA5555
;
}
</
style
>
\ No newline at end of file
public/modules/media/js/mixins/MultipleFileSelector.js
0 → 100644
View file @
7e80c64a
export
default
{
methods
:
{
selectMultipleFile
(
event
,
model
)
{
if
(
!
this
[
model
].
medias_multi
)
{
this
[
model
].
medias_multi
=
{};
}
if
(
!
this
[
model
].
medias_multi
[
event
.
zone
])
{
this
[
model
].
medias_multi
[
event
.
zone
]
=
{
files
:
[]
};
}
this
[
model
].
medias_multi
[
event
.
zone
].
files
.
push
(
event
.
id
);
},
unselectFile
(
event
,
model
)
{
if
(
!
this
[
model
].
medias_multi
)
{
this
[
model
].
medias_multi
=
{};
}
if
(
!
this
[
model
].
medias_multi
[
event
.
zone
])
{
this
[
model
].
medias_multi
[
event
.
zone
]
=
{
files
:
[]
};
if
(
this
.
$refs
[
'
multiple-media
'
]
!==
undefined
&&
this
.
$refs
[
'
multiple-media
'
].
selectedMedia
!==
undefined
&&
!
_
.
isEmpty
(
this
.
$refs
[
'
multiple-media
'
].
selectedMedia
))
{
_
.
forEach
(
this
.
$refs
[
'
multiple-media
'
].
selectedMedia
,
(
file
,
key
)
=>
{
this
[
model
].
medias_multi
[
event
.
zone
].
files
.
push
(
file
.
id
);
});
}
}
this
[
model
].
medias_multi
[
event
.
zone
].
files
=
_
.
reject
(
this
[
model
].
medias_multi
[
event
.
zone
].
files
,
media
=>
media
===
event
.
id
);
},
},
};
\ No newline at end of file
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