Merge branch 'develop' of github.com:octobercms/october into develop
This commit is contained in:
commit
176f41f0f1
|
|
@ -26,6 +26,13 @@ Please follow the following guides and code standards:
|
|||
|
||||
The CMS uses [Laravel](http://laravel.com) as a foundation PHP framework.
|
||||
|
||||
### Using LESS
|
||||
|
||||
The theme is based on the Twitter Bootstrap framework and uses LESS language for generating the CSS. Please use a suitable LESS application for compiling the **assets/less/*.less** file to **assets/css/*.css**. The following applications are recommended:
|
||||
|
||||
* [LESS.app](http://incident57.com/less/) for Mac
|
||||
* [WinLess](http://winless.org/) for Windows
|
||||
|
||||
### Contact
|
||||
|
||||
You can communicate with us using the following mediums:
|
||||
|
|
|
|||
|
|
@ -121,8 +121,8 @@ class ServiceProvider extends ModuleServiceProvider
|
|||
*/
|
||||
BackendAuth::registerCallback(function($manager) {
|
||||
$manager->registerPermissions('October.Backend', [
|
||||
'backend.access_dashboard' => ['label' => 'View the dashboard', 'tab' => 'System'],
|
||||
'backend.manage_users' => ['label' => 'Manage other administrators', 'tab' => 'System'],
|
||||
'backend.access_dashboard' => ['label' => 'system::lang.permissions.view_the_dashboard', 'tab' => 'System'],
|
||||
'backend.manage_users' => ['label' => 'system::lang.permissions.manage_other_administrators', 'tab' => 'System'],
|
||||
]);
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -6613,13 +6613,20 @@ a .icon-flip-vertical:before {
|
|||
}
|
||||
[class^="flag-"],
|
||||
[class*=" flag-"] {
|
||||
background: url(../images/flag-icons-small.png) no-repeat;
|
||||
background-image: url("../images/flag-icons-small.png");
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
line-height: 16px;
|
||||
vertical-align: middle;
|
||||
display: inline-block;
|
||||
margin: -1px 2px 0 2px;
|
||||
margin: -3px 2px 0 2px;
|
||||
}
|
||||
@media only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min--moz-device-pixel-ratio: 2), only screen and (-o-min-device-pixel-ratio: 2/1), only screen and (min-device-pixel-ratio: 2), only screen and (min-resolution: 192dpi), only screen and (min-resolution: 2dppx) {
|
||||
[class^="flag-"],
|
||||
[class*=" flag-"] {
|
||||
background-image: url("../images/flag-icons-large.png");
|
||||
background-size: 16px 3952px;
|
||||
}
|
||||
}
|
||||
.flag-AfricanUnion {
|
||||
background-position: 0 -16px;
|
||||
|
|
@ -7490,6 +7497,278 @@ a .icon-flip-vertical:before {
|
|||
font-style: italic;
|
||||
font-weight: 600;
|
||||
}
|
||||
@-webkit-keyframes fadeIn {
|
||||
0% {
|
||||
opacity: 0;
|
||||
}
|
||||
100% {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
@keyframes fadeIn {
|
||||
0% {
|
||||
opacity: 0;
|
||||
}
|
||||
100% {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
.fadeIn {
|
||||
-webkit-animation-name: fadeIn;
|
||||
animation-name: fadeIn;
|
||||
}
|
||||
@-webkit-keyframes fadeInDown {
|
||||
0% {
|
||||
opacity: 0;
|
||||
-webkit-transform: translate3d(0, -100%, 0);
|
||||
transform: translate3d(0, -100%, 0);
|
||||
}
|
||||
100% {
|
||||
opacity: 1;
|
||||
-webkit-transform: none;
|
||||
transform: none;
|
||||
}
|
||||
}
|
||||
@keyframes fadeInDown {
|
||||
0% {
|
||||
opacity: 0;
|
||||
-webkit-transform: translate3d(0, -100%, 0);
|
||||
-ms-transform: translate3d(0, -100%, 0);
|
||||
transform: translate3d(0, -100%, 0);
|
||||
}
|
||||
100% {
|
||||
opacity: 1;
|
||||
-webkit-transform: none;
|
||||
-ms-transform: none;
|
||||
transform: none;
|
||||
}
|
||||
}
|
||||
.fadeInDown {
|
||||
-webkit-animation-name: fadeInDown;
|
||||
animation-name: fadeInDown;
|
||||
}
|
||||
@-webkit-keyframes fadeInLeft {
|
||||
0% {
|
||||
opacity: 0;
|
||||
-webkit-transform: translate3d(-100%, 0, 0);
|
||||
transform: translate3d(-100%, 0, 0);
|
||||
}
|
||||
100% {
|
||||
opacity: 1;
|
||||
-webkit-transform: none;
|
||||
transform: none;
|
||||
}
|
||||
}
|
||||
@keyframes fadeInLeft {
|
||||
0% {
|
||||
opacity: 0;
|
||||
-webkit-transform: translate3d(-100%, 0, 0);
|
||||
-ms-transform: translate3d(-100%, 0, 0);
|
||||
transform: translate3d(-100%, 0, 0);
|
||||
}
|
||||
100% {
|
||||
opacity: 1;
|
||||
-webkit-transform: none;
|
||||
-ms-transform: none;
|
||||
transform: none;
|
||||
}
|
||||
}
|
||||
.fadeInLeft {
|
||||
-webkit-animation-name: fadeInLeft;
|
||||
animation-name: fadeInLeft;
|
||||
}
|
||||
@-webkit-keyframes fadeInRight {
|
||||
0% {
|
||||
opacity: 0;
|
||||
-webkit-transform: translate3d(100%, 0, 0);
|
||||
transform: translate3d(100%, 0, 0);
|
||||
}
|
||||
100% {
|
||||
opacity: 1;
|
||||
-webkit-transform: none;
|
||||
transform: none;
|
||||
}
|
||||
}
|
||||
@keyframes fadeInRight {
|
||||
0% {
|
||||
opacity: 0;
|
||||
-webkit-transform: translate3d(100%, 0, 0);
|
||||
-ms-transform: translate3d(100%, 0, 0);
|
||||
transform: translate3d(100%, 0, 0);
|
||||
}
|
||||
100% {
|
||||
opacity: 1;
|
||||
-webkit-transform: none;
|
||||
-ms-transform: none;
|
||||
transform: none;
|
||||
}
|
||||
}
|
||||
.fadeInRight {
|
||||
-webkit-animation-name: fadeInRight;
|
||||
animation-name: fadeInRight;
|
||||
}
|
||||
@-webkit-keyframes fadeInUp {
|
||||
0% {
|
||||
opacity: 0;
|
||||
-webkit-transform: translate3d(0, 100%, 0);
|
||||
transform: translate3d(0, 100%, 0);
|
||||
}
|
||||
100% {
|
||||
opacity: 1;
|
||||
-webkit-transform: none;
|
||||
transform: none;
|
||||
}
|
||||
}
|
||||
@keyframes fadeInUp {
|
||||
0% {
|
||||
opacity: 0;
|
||||
-webkit-transform: translate3d(0, 100%, 0);
|
||||
-ms-transform: translate3d(0, 100%, 0);
|
||||
transform: translate3d(0, 100%, 0);
|
||||
}
|
||||
100% {
|
||||
opacity: 1;
|
||||
-webkit-transform: none;
|
||||
-ms-transform: none;
|
||||
transform: none;
|
||||
}
|
||||
}
|
||||
.fadeInUp {
|
||||
-webkit-animation-name: fadeInUp;
|
||||
animation-name: fadeInUp;
|
||||
}
|
||||
@-webkit-keyframes fadeInUpBig {
|
||||
0% {
|
||||
opacity: 0;
|
||||
-webkit-transform: translate3d(0, 2000px, 0);
|
||||
transform: translate3d(0, 2000px, 0);
|
||||
}
|
||||
100% {
|
||||
opacity: 1;
|
||||
-webkit-transform: none;
|
||||
transform: none;
|
||||
}
|
||||
}
|
||||
@-webkit-keyframes fadeOut {
|
||||
0% {
|
||||
opacity: 1;
|
||||
}
|
||||
100% {
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
@keyframes fadeOut {
|
||||
0% {
|
||||
opacity: 1;
|
||||
}
|
||||
100% {
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
.fadeOut {
|
||||
-webkit-animation-name: fadeOut;
|
||||
animation-name: fadeOut;
|
||||
}
|
||||
@-webkit-keyframes fadeOutDown {
|
||||
0% {
|
||||
opacity: 1;
|
||||
}
|
||||
100% {
|
||||
opacity: 0;
|
||||
-webkit-transform: translate3d(0, 100%, 0);
|
||||
transform: translate3d(0, 100%, 0);
|
||||
}
|
||||
}
|
||||
@keyframes fadeOutDown {
|
||||
0% {
|
||||
opacity: 1;
|
||||
}
|
||||
100% {
|
||||
opacity: 0;
|
||||
-webkit-transform: translate3d(0, 100%, 0);
|
||||
-ms-transform: translate3d(0, 100%, 0);
|
||||
transform: translate3d(0, 100%, 0);
|
||||
}
|
||||
}
|
||||
.fadeOutDown {
|
||||
-webkit-animation-name: fadeOutDown;
|
||||
animation-name: fadeOutDown;
|
||||
}
|
||||
@-webkit-keyframes fadeOutLeft {
|
||||
0% {
|
||||
opacity: 1;
|
||||
}
|
||||
100% {
|
||||
opacity: 0;
|
||||
-webkit-transform: translate3d(-100%, 0, 0);
|
||||
transform: translate3d(-100%, 0, 0);
|
||||
}
|
||||
}
|
||||
@keyframes fadeOutLeft {
|
||||
0% {
|
||||
opacity: 1;
|
||||
}
|
||||
100% {
|
||||
opacity: 0;
|
||||
-webkit-transform: translate3d(-100%, 0, 0);
|
||||
-ms-transform: translate3d(-100%, 0, 0);
|
||||
transform: translate3d(-100%, 0, 0);
|
||||
}
|
||||
}
|
||||
.fadeOutLeft {
|
||||
-webkit-animation-name: fadeOutLeft;
|
||||
animation-name: fadeOutLeft;
|
||||
}
|
||||
@-webkit-keyframes fadeOutRight {
|
||||
0% {
|
||||
opacity: 1;
|
||||
}
|
||||
100% {
|
||||
opacity: 0;
|
||||
-webkit-transform: translate3d(100%, 0, 0);
|
||||
transform: translate3d(100%, 0, 0);
|
||||
}
|
||||
}
|
||||
@keyframes fadeOutRight {
|
||||
0% {
|
||||
opacity: 1;
|
||||
}
|
||||
100% {
|
||||
opacity: 0;
|
||||
-webkit-transform: translate3d(100%, 0, 0);
|
||||
-ms-transform: translate3d(100%, 0, 0);
|
||||
transform: translate3d(100%, 0, 0);
|
||||
}
|
||||
}
|
||||
.fadeOutRight {
|
||||
-webkit-animation-name: fadeOutRight;
|
||||
animation-name: fadeOutRight;
|
||||
}
|
||||
@-webkit-keyframes fadeOutUp {
|
||||
0% {
|
||||
opacity: 1;
|
||||
}
|
||||
100% {
|
||||
opacity: 0;
|
||||
-webkit-transform: translate3d(0, -100%, 0);
|
||||
transform: translate3d(0, -100%, 0);
|
||||
}
|
||||
}
|
||||
@keyframes fadeOutUp {
|
||||
0% {
|
||||
opacity: 1;
|
||||
}
|
||||
100% {
|
||||
opacity: 0;
|
||||
-webkit-transform: translate3d(0, -100%, 0);
|
||||
-ms-transform: translate3d(0, -100%, 0);
|
||||
transform: translate3d(0, -100%, 0);
|
||||
}
|
||||
}
|
||||
.fadeOutUp {
|
||||
-webkit-animation-name: fadeOutUp;
|
||||
animation-name: fadeOutUp;
|
||||
}
|
||||
body.drag * {
|
||||
cursor: drag !important;
|
||||
cursor: -webkit-grab !important;
|
||||
|
|
@ -9592,17 +9871,19 @@ table.table.data tr.list-tree-level-25 td.list-cell-index-1 {
|
|||
border-bottom: 1px solid #949ea6;
|
||||
}
|
||||
.control-filter a {
|
||||
color: #949ea6;
|
||||
text-decoration: none;
|
||||
color: #949ea6;
|
||||
}
|
||||
.control-filter > .filter-set {
|
||||
.control-filter > .filter-scope {
|
||||
display: inline-block;
|
||||
padding: 15px;
|
||||
}
|
||||
.control-filter > .filter-set .filter-setting {
|
||||
.control-filter > .filter-scope .filter-setting {
|
||||
display: inline-block;
|
||||
-webkit-transition: color 0.6s;
|
||||
transition: color 0.6s;
|
||||
}
|
||||
.control-filter > .filter-set:after {
|
||||
.control-filter > .filter-scope:after {
|
||||
font-size: 14px;
|
||||
font-family: FontAwesome;
|
||||
font-weight: normal;
|
||||
|
|
@ -9612,7 +9893,7 @@ table.table.data tr.list-tree-level-25 td.list-cell-index-1 {
|
|||
*margin-right: .3em;
|
||||
content: "\f107";
|
||||
}
|
||||
.control-filter > .filter-set.active .filter-setting {
|
||||
.control-filter > .filter-scope.active .filter-setting {
|
||||
padding-left: 5px;
|
||||
padding-right: 5px;
|
||||
color: #FFF;
|
||||
|
|
@ -9620,14 +9901,26 @@ table.table.data tr.list-tree-level-25 td.list-cell-index-1 {
|
|||
-webkit-border-radius: 4px;
|
||||
-moz-border-radius: 4px;
|
||||
border-radius: 4px;
|
||||
-webkit-transition: color 1s, background-color 1s;
|
||||
transition: color 1s, background-color 1s;
|
||||
}
|
||||
.control-filter > .filter-set:hover {
|
||||
.control-filter > .filter-scope.checkbox {
|
||||
padding-left: 35px;
|
||||
}
|
||||
.control-filter > .filter-scope.checkbox,
|
||||
.control-filter > .filter-scope.checkbox label {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.control-filter > .filter-scope.checkbox:after {
|
||||
content: '';
|
||||
}
|
||||
.control-filter > .filter-scope:hover {
|
||||
color: #000;
|
||||
}
|
||||
.control-filter > .filter-set:hover .filter-label {
|
||||
.control-filter > .filter-scope:hover .filter-label {
|
||||
color: #949ea6;
|
||||
}
|
||||
.control-filter > .filter-set:hover.active .filter-setting {
|
||||
.control-filter > .filter-scope:hover.active .filter-setting {
|
||||
background-color: #b32d00;
|
||||
}
|
||||
.control-filter-popover {
|
||||
|
|
@ -9640,10 +9933,15 @@ table.table.data tr.list-tree-level-25 td.list-cell-index-1 {
|
|||
min-height: 36px;
|
||||
border: none;
|
||||
border-bottom: 1px solid #949ea6;
|
||||
background: transparent url(../images/bitmap-icons.png) no-repeat 100% -82px;
|
||||
-webkit-border-radius: 0;
|
||||
-moz-border-radius: 0;
|
||||
border-radius: 0;
|
||||
border-bottom-right-radius: 0;
|
||||
border-bottom-left-radius: 0;
|
||||
background-color: transparent;
|
||||
}
|
||||
.control-filter-popover .filter-search .form-control.icon.search {
|
||||
background-position: right -81px;
|
||||
}
|
||||
.control-filter-popover .filter-search .close {
|
||||
display: none;
|
||||
}
|
||||
.control-filter-popover .filter-items,
|
||||
.control-filter-popover .filter-active-items {
|
||||
|
|
@ -9658,6 +9956,11 @@ table.table.data tr.list-tree-level-25 td.list-cell-index-1 {
|
|||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
.control-filter-popover .filter-items li,
|
||||
.control-filter-popover .filter-active-items li {
|
||||
-webkit-transition: color 0.6s, background-color 0.3s;
|
||||
transition: color 0.6s, background-color 0.3s;
|
||||
}
|
||||
.control-filter-popover .filter-items a,
|
||||
.control-filter-popover .filter-active-items a {
|
||||
text-decoration: none;
|
||||
|
|
@ -9677,6 +9980,8 @@ table.table.data tr.list-tree-level-25 td.list-cell-index-1 {
|
|||
color: #FFFFFF;
|
||||
}
|
||||
.control-filter-popover .filter-items {
|
||||
height: 100px;
|
||||
overflow: auto;
|
||||
background-color: #fafafa;
|
||||
border-bottom: 1px solid #949ea6;
|
||||
}
|
||||
|
|
@ -9689,6 +9994,23 @@ table.table.data tr.list-tree-level-25 td.list-cell-index-1 {
|
|||
*margin-right: .3em;
|
||||
content: "\f067";
|
||||
}
|
||||
.control-filter-popover .filter-items li.loading {
|
||||
padding: 7px;
|
||||
}
|
||||
.control-filter-popover .filter-items li.loading > span {
|
||||
display: block;
|
||||
height: 20px;
|
||||
width: 20px;
|
||||
background-image: url(../images/loading-indicator.svg);
|
||||
background-size: 20px 20px;
|
||||
background-position: 50% 50%;
|
||||
-webkit-animation: spin 1s linear infinite;
|
||||
animation: spin 1s linear infinite;
|
||||
}
|
||||
.control-filter-popover .filter-items li.animate-enter {
|
||||
-webkit-animation: fadeInUp 0.5s;
|
||||
animation: fadeInUp 0.5s;
|
||||
}
|
||||
.control-filter-popover .filter-active-items a:before {
|
||||
font-family: FontAwesome;
|
||||
font-weight: normal;
|
||||
|
|
@ -9698,6 +10020,31 @@ table.table.data tr.list-tree-level-25 td.list-cell-index-1 {
|
|||
*margin-right: .3em;
|
||||
content: "\f00d";
|
||||
}
|
||||
.control-filter-popover .filter-active-items li.animate-enter {
|
||||
-webkit-animation: fadeInDown 0.5s;
|
||||
animation: fadeInDown 0.5s;
|
||||
}
|
||||
@media (max-width: 480px) {
|
||||
.control-filter-popover .filter-items {
|
||||
height: 200px;
|
||||
}
|
||||
.control-filter-popover .filter-search input {
|
||||
padding-left: 36px;
|
||||
padding-right: 36px;
|
||||
}
|
||||
.control-filter-popover .filter-search .form-control.icon.search {
|
||||
background-position: 0 -81px;
|
||||
}
|
||||
.control-filter-popover .filter-search .close {
|
||||
width: 30px;
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: 5px;
|
||||
right: 5px;
|
||||
font-size: 28px;
|
||||
z-index: 2;
|
||||
}
|
||||
}
|
||||
.modal-content {
|
||||
-webkit-box-shadow: none;
|
||||
box-shadow: none;
|
||||
|
|
|
|||
|
|
@ -84,6 +84,7 @@
|
|||
return false
|
||||
})
|
||||
|
||||
$(document).on('ready', $.proxy(this.fixScrollClasses, this))
|
||||
$(window).on('resize', $.proxy(this.fixScrollClasses, this))
|
||||
|
||||
/*
|
||||
|
|
@ -354,4 +355,4 @@
|
|||
$.fn.dragScroll = old
|
||||
return this
|
||||
}
|
||||
}(window.jQuery);
|
||||
}(window.jQuery);
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@
|
|||
'an hidden input element with the data-inspector-values property.')
|
||||
}
|
||||
|
||||
Inspector.prototype.getPopoverTemplate = function() {
|
||||
Inspector.prototype.getPopoverTemplate = function() {
|
||||
return ' \
|
||||
<div class="popover-head"> \
|
||||
<h3>{{title}}</h3> \
|
||||
|
|
@ -182,14 +182,14 @@
|
|||
this.$el.data('oc.inspectorVisible', true)
|
||||
|
||||
var displayPopover = function() {
|
||||
var offset = self.$el.data('inspector-offset')
|
||||
var offset = self.$el.data('inspector-offset')
|
||||
if (offset === undefined)
|
||||
offset = 15
|
||||
|
||||
var offsetX = self.$el.data('inspector-offset-x'),
|
||||
offsetY = self.$el.data('inspector-offset-y')
|
||||
|
||||
var placement = self.$el.data('inspector-placement')
|
||||
var offsetX = self.$el.data('inspector-offset-x'),
|
||||
offsetY = self.$el.data('inspector-offset-y')
|
||||
|
||||
var placement = self.$el.data('inspector-placement')
|
||||
if (placement === undefined)
|
||||
placement = 'bottom'
|
||||
|
||||
|
|
@ -248,8 +248,9 @@
|
|||
displayPopover()
|
||||
}
|
||||
|
||||
// Creates group nodes in the property set
|
||||
//
|
||||
/*
|
||||
* Creates group nodes in the property set
|
||||
*/
|
||||
Inspector.prototype.preprocessConfig = function() {
|
||||
var fields = [],
|
||||
result = {
|
||||
|
|
@ -707,15 +708,15 @@
|
|||
|
||||
InspectorEditorDropdown.prototype.showLoadingIndicator = function() {
|
||||
if (!Modernizr.touch)
|
||||
this.indicatorContainer.loadIndicator({'opaque': true})
|
||||
this.indicatorContainer.loadIndicator({'opaque': true})
|
||||
}
|
||||
|
||||
InspectorEditorDropdown.prototype.hideLoadingIndicator = function() {
|
||||
if (!Modernizr.touch)
|
||||
this.indicatorContainer.loadIndicator('hide')
|
||||
this.indicatorContainer.loadIndicator('hide')
|
||||
}
|
||||
|
||||
InspectorEditorDropdown.prototype.loadOptions= function() {
|
||||
InspectorEditorDropdown.prototype.loadOptions = function() {
|
||||
var $form = $(this.selector).closest('form'),
|
||||
data = this.inspector.propertyValues,
|
||||
$select = $(this.selector),
|
||||
|
|
@ -764,7 +765,7 @@
|
|||
|
||||
// INSPECTOR DATA-API
|
||||
// ==================
|
||||
|
||||
|
||||
$(document).on('click', '[data-inspectable]', function(){
|
||||
var $this = $(this),
|
||||
inspector = $this.data('oc.inspector')
|
||||
|
|
|
|||
|
|
@ -31,9 +31,10 @@
|
|||
* Events:
|
||||
* - showing.oc.popover - triggered before the popover is displayed. Allows to override the
|
||||
* popover options (for example the content) or cancel the action with e.preventDefault()
|
||||
* - show.oc.popover - triggered after the popover is displayed.
|
||||
* - hiding.oc.popover - triggered before the popover is closed. Allows to cancel the action with
|
||||
* e.preventDefault()
|
||||
* - hide.oc.popover - triggered after the popover is hidden.
|
||||
* - hide.oc.popover - triggered after the popover is hidden.
|
||||
*
|
||||
* JavaScript API:
|
||||
* $('#element').ocPopover({
|
||||
|
|
@ -55,14 +56,14 @@
|
|||
Popover.prototype.hide = function() {
|
||||
var e = $.Event('hiding.oc.popover', {relatedTarget: this.$el})
|
||||
this.$el.trigger(e, this)
|
||||
if (e.isDefaultPrevented())
|
||||
if (e.isDefaultPrevented())
|
||||
return
|
||||
|
||||
if (this.$container) this.$container.remove()
|
||||
if (this.$overlay) this.$overlay.remove()
|
||||
|
||||
this.$overlay = false;
|
||||
this.$container = false;
|
||||
this.$overlay = false
|
||||
this.$container = false
|
||||
|
||||
this.$el.removeClass('popover-highlight')
|
||||
this.$el.data('oc.popover', null)
|
||||
|
|
@ -70,46 +71,46 @@
|
|||
|
||||
$(document).unbind('mousedown', this.docClickHandler);
|
||||
this.$el.trigger('hide.oc.popover')
|
||||
$(document).off('.oc.popover');
|
||||
$(document).off('.oc.popover')
|
||||
}
|
||||
|
||||
Popover.prototype.show = function(options) {
|
||||
var self = this;
|
||||
var self = this
|
||||
|
||||
/*
|
||||
* Trigger the show event
|
||||
*/
|
||||
var e = $.Event('showing.oc.popover', {relatedTarget: this.$el})
|
||||
this.$el.trigger(e, this)
|
||||
if (e.isDefaultPrevented())
|
||||
if (e.isDefaultPrevented())
|
||||
return
|
||||
|
||||
/*
|
||||
* Create the popover container and overlay
|
||||
*/
|
||||
|
||||
this.$container = $('<div/>')
|
||||
this.$container = $('<div />')
|
||||
.addClass('control-popover')
|
||||
.css('visibility', 'hidden')
|
||||
|
||||
if (this.options.containerClass)
|
||||
this.$container.addClass(this.options.containerClass)
|
||||
|
||||
var $content = $('<div/>').html(this.getContent())
|
||||
var $content = $('<div />').html(this.getContent())
|
||||
this.$container.append($content)
|
||||
|
||||
if (this.options.width)
|
||||
this.$container.width(this.options.width)
|
||||
|
||||
if (this.options.modal) {
|
||||
this.$overlay = $('<div/>').addClass('popover-overlay')
|
||||
this.$overlay = $('<div />').addClass('popover-overlay')
|
||||
$(document.body).append(this.$overlay)
|
||||
if (this.options.highlightModalTarget) {
|
||||
this.$el.addClass('popover-highlight')
|
||||
this.$el.blur()
|
||||
}
|
||||
} else
|
||||
} else {
|
||||
this.$overlay = false
|
||||
}
|
||||
|
||||
if (this.options.container)
|
||||
$(this.options.container).append(this.$container);
|
||||
|
|
@ -119,8 +120,7 @@
|
|||
/*
|
||||
* Determine the popover position
|
||||
*/
|
||||
|
||||
var
|
||||
var
|
||||
placement = this.calcPlacement(),
|
||||
position = this.calcPosition(placement);
|
||||
|
||||
|
|
@ -132,14 +132,13 @@
|
|||
/*
|
||||
* Display the popover
|
||||
*/
|
||||
|
||||
this.$container.css('visibility', 'visible')
|
||||
$(document.body).addClass('popover-open')
|
||||
this.$el.trigger('show.oc.popover')
|
||||
|
||||
/*
|
||||
* Bind events
|
||||
*/
|
||||
|
||||
this.$container.on('mousedown', function(e){
|
||||
e.stopPropagation();
|
||||
})
|
||||
|
|
@ -173,12 +172,12 @@
|
|||
}
|
||||
|
||||
Popover.prototype.calcDimensions = function() {
|
||||
var
|
||||
var
|
||||
documentWidth = $(document).width(),
|
||||
documentHeight = $(document).height(),
|
||||
targetOffset = this.$el.offset(),
|
||||
targetWidth = this.$el.outerWidth(),
|
||||
targetHeight = this.$el.outerHeight();
|
||||
targetHeight = this.$el.outerHeight()
|
||||
|
||||
return {
|
||||
containerWidth: this.$container.outerWidth() + this.arrowSize,
|
||||
|
|
@ -242,24 +241,24 @@
|
|||
}
|
||||
|
||||
Popover.prototype.calcPosition = function(placement) {
|
||||
var
|
||||
var
|
||||
dimensions = this.calcDimensions(),
|
||||
result;
|
||||
result
|
||||
|
||||
switch (placement) {
|
||||
case 'left' :
|
||||
case 'left':
|
||||
var realOffset = this.options.offsetY === undefined ? this.options.offset : this.options.offsetY
|
||||
result = {x: (dimensions.targetOffset.left - dimensions.containerWidth), y: dimensions.targetOffset.top + realOffset}
|
||||
break;
|
||||
case 'top' :
|
||||
case 'top':
|
||||
var realOffset = this.options.offsetX === undefined ? this.options.offset : this.options.offsetX
|
||||
result = {x: dimensions.targetOffset.left + realOffset, y: (dimensions.targetOffset.top - dimensions.containerHeight)}
|
||||
break;
|
||||
case 'bottom' :
|
||||
case 'bottom':
|
||||
var realOffset = this.options.offsetX === undefined ? this.options.offset : this.options.offsetX
|
||||
result = {x: dimensions.targetOffset.left + realOffset, y: (dimensions.targetOffset.top + dimensions.targetHeight + this.arrowSize)}
|
||||
break;
|
||||
case 'right' :
|
||||
case 'right':
|
||||
var realOffset = this.options.offsetY === undefined ? this.options.offset : this.options.offsetY
|
||||
result = {x: (dimensions.targetOffset.left + dimensions.targetWidth + this.arrowSize), y: dimensions.targetOffset.top + realOffset}
|
||||
break;
|
||||
|
|
@ -268,14 +267,14 @@
|
|||
if (!this.options.container)
|
||||
return result
|
||||
|
||||
var
|
||||
var
|
||||
$container = $(this.options.container),
|
||||
containerOffset = $container.offset();
|
||||
containerOffset = $container.offset()
|
||||
|
||||
result.x -= containerOffset.left;
|
||||
result.y -= containerOffset.top;
|
||||
result.x -= containerOffset.left
|
||||
result.y -= containerOffset.top
|
||||
|
||||
return result;
|
||||
return result
|
||||
}
|
||||
|
||||
Popover.prototype.onDocumentClick = function() {
|
||||
|
|
|
|||
|
|
@ -10,16 +10,17 @@
|
|||
border-top: 1px solid @color-filter-border;
|
||||
border-bottom: 1px solid @color-filter-border;
|
||||
a {
|
||||
text-decoration: none;
|
||||
color: @color-filter-text;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
>.filter-set {
|
||||
> .filter-scope {
|
||||
display: inline-block;
|
||||
padding: 15px;
|
||||
.filter-label {}
|
||||
.filter-setting {
|
||||
display: inline-block;
|
||||
.transition(color 0.6s);
|
||||
}
|
||||
|
||||
&:after {
|
||||
|
|
@ -34,6 +35,18 @@
|
|||
color: #FFF;
|
||||
background-color: @color-filter-bg-active;
|
||||
.border-radius(4px);
|
||||
.transition(~'color 1s, background-color 1s');
|
||||
}
|
||||
}
|
||||
|
||||
&.checkbox {
|
||||
padding-left: 35px;
|
||||
&, label {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
&:after {
|
||||
content: '';
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -52,22 +65,37 @@
|
|||
min-height: 36px;
|
||||
input {
|
||||
min-height: 36px;
|
||||
border: none;
|
||||
border: none;
|
||||
border-bottom: 1px solid @color-filter-border;
|
||||
background: transparent url(../images/bitmap-icons.png) no-repeat 100% -82px;
|
||||
.border-radius(0);
|
||||
.border-bottom-radius(0);
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.form-control.icon.search {
|
||||
background-position: right -81px;
|
||||
}
|
||||
|
||||
.close {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.filter-items, .filter-active-items {
|
||||
color: @color-filter-text;
|
||||
font-size: 13px;
|
||||
ul, li { list-style-type: none; margin:0; padding:0; }
|
||||
ul, li {
|
||||
list-style-type: none;
|
||||
margin:0;
|
||||
padding:0;
|
||||
}
|
||||
li {
|
||||
.transition(~'color 0.6s, background-color 0.3s');
|
||||
}
|
||||
a {
|
||||
text-decoration: none;
|
||||
color: @color-filter-text;
|
||||
display: block;
|
||||
padding: 7px 15px;
|
||||
padding: 7px 15px;
|
||||
|
||||
&:before {
|
||||
margin-right: 8px;
|
||||
|
|
@ -83,12 +111,57 @@
|
|||
}
|
||||
|
||||
.filter-items {
|
||||
height: 100px;
|
||||
overflow: auto;
|
||||
|
||||
background-color: @color-filter-items-bg;
|
||||
border-bottom: 1px solid @color-filter-border;
|
||||
a:before { .icon(@plus); }
|
||||
|
||||
li.loading {
|
||||
padding: 7px;
|
||||
> span {
|
||||
display: block;
|
||||
height: 20px;
|
||||
width: 20px;
|
||||
background-image: url(../images/loading-indicator.svg);
|
||||
background-size: 20px 20px;
|
||||
background-position: 50% 50%;
|
||||
.animation(spin 1s linear infinite);
|
||||
}
|
||||
}
|
||||
|
||||
li.animate-enter { .animation(fadeInUp .5s); }
|
||||
}
|
||||
|
||||
.filter-active-items {
|
||||
a:before { .icon(@times); }
|
||||
li.animate-enter { .animation(fadeInDown .5s); }
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: @screen-xs) {
|
||||
.control-filter-popover {
|
||||
.filter-items {
|
||||
height: 200px;
|
||||
}
|
||||
.filter-search {
|
||||
input {
|
||||
padding-left: 36px;
|
||||
padding-right: 36px;
|
||||
}
|
||||
.form-control.icon.search {
|
||||
background-position: 0 -81px;
|
||||
}
|
||||
.close {
|
||||
width: 30px;
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: 5px;
|
||||
right: 5px;
|
||||
font-size: 28px;
|
||||
z-index: 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,363 @@
|
|||
//
|
||||
// Fade In
|
||||
//
|
||||
|
||||
@-webkit-keyframes fadeIn {
|
||||
0% {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
100% {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes fadeIn {
|
||||
0% {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
100% {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.fadeIn {
|
||||
-webkit-animation-name: fadeIn;
|
||||
animation-name: fadeIn;
|
||||
}
|
||||
|
||||
//
|
||||
// Fade In Down
|
||||
//
|
||||
|
||||
@-webkit-keyframes fadeInDown {
|
||||
0% {
|
||||
opacity: 0;
|
||||
-webkit-transform: translate3d(0, -100%, 0);
|
||||
transform: translate3d(0, -100%, 0);
|
||||
}
|
||||
|
||||
100% {
|
||||
opacity: 1;
|
||||
-webkit-transform: none;
|
||||
transform: none;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes fadeInDown {
|
||||
0% {
|
||||
opacity: 0;
|
||||
-webkit-transform: translate3d(0, -100%, 0);
|
||||
-ms-transform: translate3d(0, -100%, 0);
|
||||
transform: translate3d(0, -100%, 0);
|
||||
}
|
||||
|
||||
100% {
|
||||
opacity: 1;
|
||||
-webkit-transform: none;
|
||||
-ms-transform: none;
|
||||
transform: none;
|
||||
}
|
||||
}
|
||||
|
||||
.fadeInDown {
|
||||
-webkit-animation-name: fadeInDown;
|
||||
animation-name: fadeInDown;
|
||||
}
|
||||
|
||||
//
|
||||
// Fade In Left
|
||||
//
|
||||
|
||||
@-webkit-keyframes fadeInLeft {
|
||||
0% {
|
||||
opacity: 0;
|
||||
-webkit-transform: translate3d(-100%, 0, 0);
|
||||
transform: translate3d(-100%, 0, 0);
|
||||
}
|
||||
|
||||
100% {
|
||||
opacity: 1;
|
||||
-webkit-transform: none;
|
||||
transform: none;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes fadeInLeft {
|
||||
0% {
|
||||
opacity: 0;
|
||||
-webkit-transform: translate3d(-100%, 0, 0);
|
||||
-ms-transform: translate3d(-100%, 0, 0);
|
||||
transform: translate3d(-100%, 0, 0);
|
||||
}
|
||||
|
||||
100% {
|
||||
opacity: 1;
|
||||
-webkit-transform: none;
|
||||
-ms-transform: none;
|
||||
transform: none;
|
||||
}
|
||||
}
|
||||
|
||||
.fadeInLeft {
|
||||
-webkit-animation-name: fadeInLeft;
|
||||
animation-name: fadeInLeft;
|
||||
}
|
||||
|
||||
//
|
||||
// Fade In Right
|
||||
//
|
||||
|
||||
@-webkit-keyframes fadeInRight {
|
||||
0% {
|
||||
opacity: 0;
|
||||
-webkit-transform: translate3d(100%, 0, 0);
|
||||
transform: translate3d(100%, 0, 0);
|
||||
}
|
||||
|
||||
100% {
|
||||
opacity: 1;
|
||||
-webkit-transform: none;
|
||||
transform: none;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes fadeInRight {
|
||||
0% {
|
||||
opacity: 0;
|
||||
-webkit-transform: translate3d(100%, 0, 0);
|
||||
-ms-transform: translate3d(100%, 0, 0);
|
||||
transform: translate3d(100%, 0, 0);
|
||||
}
|
||||
|
||||
100% {
|
||||
opacity: 1;
|
||||
-webkit-transform: none;
|
||||
-ms-transform: none;
|
||||
transform: none;
|
||||
}
|
||||
}
|
||||
|
||||
.fadeInRight {
|
||||
-webkit-animation-name: fadeInRight;
|
||||
animation-name: fadeInRight;
|
||||
}
|
||||
|
||||
//
|
||||
// Fade In Up
|
||||
//
|
||||
|
||||
@-webkit-keyframes fadeInUp {
|
||||
0% {
|
||||
opacity: 0;
|
||||
-webkit-transform: translate3d(0, 100%, 0);
|
||||
transform: translate3d(0, 100%, 0);
|
||||
}
|
||||
|
||||
100% {
|
||||
opacity: 1;
|
||||
-webkit-transform: none;
|
||||
transform: none;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes fadeInUp {
|
||||
0% {
|
||||
opacity: 0;
|
||||
-webkit-transform: translate3d(0, 100%, 0);
|
||||
-ms-transform: translate3d(0, 100%, 0);
|
||||
transform: translate3d(0, 100%, 0);
|
||||
}
|
||||
|
||||
100% {
|
||||
opacity: 1;
|
||||
-webkit-transform: none;
|
||||
-ms-transform: none;
|
||||
transform: none;
|
||||
}
|
||||
}
|
||||
|
||||
.fadeInUp {
|
||||
-webkit-animation-name: fadeInUp;
|
||||
animation-name: fadeInUp;
|
||||
}
|
||||
|
||||
@-webkit-keyframes fadeInUpBig {
|
||||
0% {
|
||||
opacity: 0;
|
||||
-webkit-transform: translate3d(0, 2000px, 0);
|
||||
transform: translate3d(0, 2000px, 0);
|
||||
}
|
||||
|
||||
100% {
|
||||
opacity: 1;
|
||||
-webkit-transform: none;
|
||||
transform: none;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Fade Out
|
||||
//
|
||||
|
||||
@-webkit-keyframes fadeOut {
|
||||
0% {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
100% {
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes fadeOut {
|
||||
0% {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
100% {
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.fadeOut {
|
||||
-webkit-animation-name: fadeOut;
|
||||
animation-name: fadeOut;
|
||||
}
|
||||
|
||||
//
|
||||
// Fade Out Down
|
||||
//
|
||||
|
||||
@-webkit-keyframes fadeOutDown {
|
||||
0% {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
100% {
|
||||
opacity: 0;
|
||||
-webkit-transform: translate3d(0, 100%, 0);
|
||||
transform: translate3d(0, 100%, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes fadeOutDown {
|
||||
0% {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
100% {
|
||||
opacity: 0;
|
||||
-webkit-transform: translate3d(0, 100%, 0);
|
||||
-ms-transform: translate3d(0, 100%, 0);
|
||||
transform: translate3d(0, 100%, 0);
|
||||
}
|
||||
}
|
||||
|
||||
.fadeOutDown {
|
||||
-webkit-animation-name: fadeOutDown;
|
||||
animation-name: fadeOutDown;
|
||||
}
|
||||
|
||||
//
|
||||
// Fade Out Left
|
||||
//
|
||||
|
||||
@-webkit-keyframes fadeOutLeft {
|
||||
0% {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
100% {
|
||||
opacity: 0;
|
||||
-webkit-transform: translate3d(-100%, 0, 0);
|
||||
transform: translate3d(-100%, 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes fadeOutLeft {
|
||||
0% {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
100% {
|
||||
opacity: 0;
|
||||
-webkit-transform: translate3d(-100%, 0, 0);
|
||||
-ms-transform: translate3d(-100%, 0, 0);
|
||||
transform: translate3d(-100%, 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
.fadeOutLeft {
|
||||
-webkit-animation-name: fadeOutLeft;
|
||||
animation-name: fadeOutLeft;
|
||||
}
|
||||
|
||||
//
|
||||
// Fade Out Right
|
||||
//
|
||||
|
||||
@-webkit-keyframes fadeOutRight {
|
||||
0% {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
100% {
|
||||
opacity: 0;
|
||||
-webkit-transform: translate3d(100%, 0, 0);
|
||||
transform: translate3d(100%, 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes fadeOutRight {
|
||||
0% {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
100% {
|
||||
opacity: 0;
|
||||
-webkit-transform: translate3d(100%, 0, 0);
|
||||
-ms-transform: translate3d(100%, 0, 0);
|
||||
transform: translate3d(100%, 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
.fadeOutRight {
|
||||
-webkit-animation-name: fadeOutRight;
|
||||
animation-name: fadeOutRight;
|
||||
}
|
||||
|
||||
//
|
||||
// Fade Out Up
|
||||
//
|
||||
|
||||
@-webkit-keyframes fadeOutUp {
|
||||
0% {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
100% {
|
||||
opacity: 0;
|
||||
-webkit-transform: translate3d(0, -100%, 0);
|
||||
transform: translate3d(0, -100%, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes fadeOutUp {
|
||||
0% {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
100% {
|
||||
opacity: 0;
|
||||
-webkit-transform: translate3d(0, -100%, 0);
|
||||
-ms-transform: translate3d(0, -100%, 0);
|
||||
transform: translate3d(0, -100%, 0);
|
||||
}
|
||||
}
|
||||
|
||||
.fadeOutUp {
|
||||
-webkit-animation-name: fadeOutUp;
|
||||
animation-name: fadeOutUp;
|
||||
}
|
||||
|
|
@ -1,13 +1,13 @@
|
|||
|
||||
[class^="flag-"],
|
||||
[class*=" flag-"] {
|
||||
background:url(../images/flag-icons-small.png) no-repeat;
|
||||
.img-retina('../images/flag-icons-small.png', '../images/flag-icons-large.png', 16px, 3952px);
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
line-height: 16px;
|
||||
vertical-align: middle;
|
||||
display: inline-block;
|
||||
margin: -1px 2px 0 2px;
|
||||
margin: -3px 2px 0 2px;
|
||||
}
|
||||
|
||||
.flag-AfricanUnion { background-position:0 -16px }
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
@import "core/icons.less";
|
||||
@import "core/flags.less";
|
||||
@import "core/fonts.less";
|
||||
@import "core/animations.less";
|
||||
|
||||
// Boot variables and mixins
|
||||
@import "core/boot.less";
|
||||
|
|
|
|||
|
|
@ -36,6 +36,11 @@ class ListController extends ControllerBehavior
|
|||
*/
|
||||
protected $toolbarWidgets = [];
|
||||
|
||||
/**
|
||||
* @var WidgetBase Reference to the filter widget objects.
|
||||
*/
|
||||
protected $filterWidgets = [];
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
|
|
@ -174,6 +179,31 @@ class ListController extends ControllerBehavior
|
|||
$this->toolbarWidgets[$definition] = $toolbarWidget;
|
||||
}
|
||||
|
||||
/*
|
||||
* Prepare the filter widget (optional)
|
||||
*/
|
||||
if (isset($listConfig->filter)) {
|
||||
$widget->cssClasses[] = 'list-flush';
|
||||
|
||||
$filterConfig = $this->makeConfig($listConfig->filter);
|
||||
$filterConfig->alias = $widget->alias . 'Filter';
|
||||
$filterWidget = $this->makeWidget('Backend\Widgets\Filter', $filterConfig);
|
||||
$filterWidget->bindToController();
|
||||
|
||||
/*
|
||||
* Filter the list when the scopes are changed
|
||||
*/
|
||||
$filterWidget->bindEvent('filter.update', function() use ($widget, $filterWidget){
|
||||
$widget->addFilter([$filterWidget, 'applyAllScopesToQuery']);
|
||||
return $widget->onRefresh();
|
||||
});
|
||||
|
||||
// Apply predefined filter values
|
||||
$widget->addFilter([$filterWidget, 'applyAllScopesToQuery']);
|
||||
|
||||
$this->filterWidgets[$definition] = $filterWidget;
|
||||
}
|
||||
|
||||
return $widget;
|
||||
}
|
||||
|
||||
|
|
@ -206,6 +236,9 @@ class ListController extends ControllerBehavior
|
|||
if (isset($this->toolbarWidgets[$definition]))
|
||||
$collection[] = $this->toolbarWidgets[$definition]->render();
|
||||
|
||||
if (isset($this->filterWidgets[$definition]))
|
||||
$collection[] = $this->filterWidgets[$definition]->render();
|
||||
|
||||
$collection[] = $this->listWidgets[$definition]->render();
|
||||
|
||||
return implode(PHP_EOL, $collection);
|
||||
|
|
|
|||
|
|
@ -3,5 +3,5 @@
|
|||
data-handler="onRelationManageForm"
|
||||
href="javascript:;"
|
||||
class="btn btn-sm btn-primary oc-icon-plus">
|
||||
<?= trans('backend::lang.relation.add_name', ['name'=>$relationLabel]) ?>
|
||||
<?= e(trans('backend::lang.relation.add_name', ['name'=>trans($relationLabel)])) ?>
|
||||
</a>
|
||||
|
|
|
|||
|
|
@ -3,5 +3,5 @@
|
|||
data-handler="onRelationManageForm"
|
||||
href="javascript:;"
|
||||
class="btn btn-sm btn-primary oc-icon-plus">
|
||||
<?= trans('backend::lang.relation.create_name', ['name'=>$relationLabel]) ?>
|
||||
<?= e(trans('backend::lang.relation.create_name', ['name'=>trans($relationLabel)])) ?>
|
||||
</a>
|
||||
|
|
|
|||
|
|
@ -5,10 +5,10 @@
|
|||
})"
|
||||
disabled="disabled"
|
||||
data-request="onRelationManageDelete"
|
||||
data-request-confirm="Are you sure?"
|
||||
data-request-confirm="<?= e(trans('backend::lang.relation.delete_confirm')) ?>"
|
||||
data-trigger-type="enable"
|
||||
data-trigger="#<?= $this->relationGetId('view') ?> .control-list input[type=checkbox]"
|
||||
data-trigger-condition="checked"
|
||||
data-stripe-load-indicator>
|
||||
<?= trans('backend::lang.relation.delete') ?>
|
||||
<?= e(trans('backend::lang.relation.delete')) ?>
|
||||
</button>
|
||||
|
|
@ -9,5 +9,5 @@
|
|||
data-trigger="#<?= $this->relationGetId('view') ?> .control-list input[type=checkbox]"
|
||||
data-trigger-condition="checked"
|
||||
data-stripe-load-indicator>
|
||||
<?= trans('backend::lang.relation.remove') ?>
|
||||
<?= e(trans('backend::lang.relation.remove')) ?>
|
||||
</button>
|
||||
|
|
@ -7,7 +7,7 @@
|
|||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="popup">×</button>
|
||||
<h4 class="modal-title">
|
||||
<?= trans('backend::lang.relation.create_name', ['name'=>$relationLabel]) ?>
|
||||
<?= e(trans('backend::lang.relation.create_name', ['name'=>$relationLabel])) ?>
|
||||
</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
|
@ -20,13 +20,13 @@
|
|||
type="submit"
|
||||
class="btn btn-primary"
|
||||
data-dismiss="popup">
|
||||
<?= trans('backend::lang.relation.update') ?>
|
||||
<?= e(trans('backend::lang.relation.update')) ?>
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-default"
|
||||
data-dismiss="popup">
|
||||
Cancel
|
||||
<?= e(trans('backend::lang.relation.cancel')) ?>
|
||||
</button>
|
||||
</div>
|
||||
<?= Form::close() ?>
|
||||
|
|
@ -40,7 +40,7 @@
|
|||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="popup">×</button>
|
||||
<h4 class="modal-title">
|
||||
<?= trans('backend::lang.relation.create_name', ['name'=>$relationLabel]) ?>
|
||||
<?= e(trans('backend::lang.relation.create_name', ['name'=>$relationLabel])) ?>
|
||||
</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
|
@ -53,13 +53,13 @@
|
|||
type="submit"
|
||||
class="btn btn-primary"
|
||||
data-dismiss="popup">
|
||||
<?= trans('backend::lang.relation.create') ?>
|
||||
<?= e(trans('backend::lang.relation.create')) ?>
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-default"
|
||||
data-dismiss="popup">
|
||||
Cancel
|
||||
<?= e(trans('backend::lang.relation.cancel')) ?>
|
||||
</button>
|
||||
</div>
|
||||
<?= Form::close() ?>
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
<div data-request-data="_relation_field: '<?= $relationField ?>'">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="popup">×</button>
|
||||
<h4 class="modal-title">Add a new <?= $relationLabel ?></h4>
|
||||
<h4 class="modal-title"><?= e(trans('backend::lang.relation.add_a_new', ['name'=>$relationLabel])) ?></h4>
|
||||
</div>
|
||||
|
||||
<?= $relationManageWidget->render() ?>
|
||||
|
|
@ -14,13 +14,13 @@
|
|||
data-request="onRelationManageAdd"
|
||||
data-dismiss="popup"
|
||||
data-stripe-load-indicator>
|
||||
Add selected
|
||||
<?= e(trans('backend::lang.relation.add_selected')) ?>
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-default"
|
||||
data-dismiss="popup">
|
||||
Cancel
|
||||
<?= e(trans('backend::lang.relation.cancel')) ?>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -2,10 +2,10 @@
|
|||
<?= Form::open() ?>
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="popup">×</button>
|
||||
<h4 class="modal-title">Add a new <?= $relationLabel ?></h4>
|
||||
<h4 class="modal-title"><?= e(trans('backend::lang.relation.add_a_new', ['name'=>$relationLabel])) ?></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p>Click on an item to add</p>
|
||||
<p><?= e(trans('backend::lang.relation.help')) ?></p>
|
||||
</div>
|
||||
|
||||
<?= $relationManageWidget->render() ?>
|
||||
|
|
@ -15,7 +15,7 @@
|
|||
type="button"
|
||||
class="btn btn-default"
|
||||
data-dismiss="popup">
|
||||
Cancel
|
||||
<?= e(trans('backend::lang.relation.cancel')) ?>
|
||||
</button>
|
||||
</div>
|
||||
<?= Form::close() ?>
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="popup">×</button>
|
||||
<h4 class="modal-title">Related <?= $relationLabel ?> data</h4>
|
||||
<h4 class="modal-title"><?= e(trans('backend::lang.relation.related_data', ['name'=>$relatedLabel])) ?></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<?= $relationPivotWidget->render() ?>
|
||||
|
|
@ -17,13 +17,13 @@
|
|||
type="submit"
|
||||
class="btn btn-primary"
|
||||
data-dismiss="popup">
|
||||
Update
|
||||
<?= e(trans('backend::lang.relation.update')) ?>
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-default"
|
||||
data-dismiss="popup">
|
||||
Cancel
|
||||
<?= e(trans('backend::lang.relation.cancel')) ?>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
|
|
@ -38,7 +38,7 @@
|
|||
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="popup">×</button>
|
||||
<h4 class="modal-title">Related <?= $relationLabel ?> data</h4>
|
||||
<h4 class="modal-title"><?= e(trans('backend::lang.relation.related_data', ['name'=>$relatedLabel])) ?></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<?= $relationPivotWidget->render() ?>
|
||||
|
|
@ -48,13 +48,13 @@
|
|||
type="submit"
|
||||
class="btn btn-primary"
|
||||
data-dismiss="popup">
|
||||
Add
|
||||
<?= e(trans('backend::lang.relation.add')) ?>
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-default"
|
||||
data-dismiss="popup">
|
||||
Cancel
|
||||
<?= e(trans('backend::lang.relation.cancel')) ?>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ class BackendController extends ControllerBase
|
|||
*/
|
||||
$module = isset($params[0]) ? $params[0] : 'backend';
|
||||
$controller = isset($params[1]) ? $params[1] : 'index';
|
||||
self::$action = $action = isset($params[2]) ? camel_case($params[2]) : 'index';
|
||||
self::$action = $action = isset($params[2]) ? $this->parseAction($params[2]) : 'index';
|
||||
self::$params = $controllerParams = array_slice($params, 3);
|
||||
$controllerClass = '\\'.$module.'\Controllers\\'.$controller;
|
||||
if ($controllerObj = $this->findController($controllerClass, $action, '/modules'))
|
||||
|
|
@ -55,7 +55,7 @@ class BackendController extends ControllerBase
|
|||
if (count($params) >= 2) {
|
||||
list($author, $plugin) = $params;
|
||||
$controller = isset($params[2]) ? $params[2] : 'index';
|
||||
self::$action = $action = isset($params[3]) ? camel_case($params[3]) : 'index';
|
||||
self::$action = $action = isset($params[3]) ? $this->parseAction($params[3]) : 'index';
|
||||
self::$params = $controllerParams = array_slice($params, 4);
|
||||
$controllerClass = '\\'.$author.'\\'.$plugin.'\Controllers\\'.$controller;
|
||||
if ($controllerObj = $this->findController($controllerClass, $action, Config::get('cms.pluginsDir', '/plugins')))
|
||||
|
|
@ -97,4 +97,17 @@ class BackendController extends ControllerBase
|
|||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Process the action name, since dashes are not supported in PHP methods.
|
||||
* @param string $actionName
|
||||
* @return string
|
||||
*/
|
||||
protected function parseAction($actionName)
|
||||
{
|
||||
if (strpos($actionName, '-') !== false)
|
||||
return camel_case($actionName);
|
||||
|
||||
return $actionName;
|
||||
}
|
||||
}
|
||||
|
|
@ -325,7 +325,7 @@ class Controller extends Extendable
|
|||
* Execute the handler
|
||||
*/
|
||||
if (!$result = $this->runAjaxHandler($handler))
|
||||
throw new SystemException(Lang::get('cms::lang.ajax_handler.not_found', ['name'=>$handler]));
|
||||
throw new ApplicationException(Lang::get('cms::lang.ajax_handler.not_found', ['name'=>$handler]));
|
||||
|
||||
/*
|
||||
* If the handler returned an array, we should add it to output for rendering.
|
||||
|
|
|
|||
|
|
@ -0,0 +1,147 @@
|
|||
<?php namespace Backend\Classes;
|
||||
|
||||
use Str;
|
||||
|
||||
/**
|
||||
* Filter scope definition
|
||||
* A translation of the filter scope configuration
|
||||
*
|
||||
* @package october\backend
|
||||
* @author Alexey Bobkov, Samuel Georges
|
||||
*/
|
||||
class FilterScope
|
||||
{
|
||||
/**
|
||||
* @var string Scope name.
|
||||
*/
|
||||
public $scopeName;
|
||||
|
||||
/**
|
||||
* @var string A prefix to the field identifier so it can be totally unique.
|
||||
*/
|
||||
public $idPrefix;
|
||||
|
||||
/**
|
||||
* @var string Column to display for the display name
|
||||
*/
|
||||
public $nameColumn = 'name';
|
||||
|
||||
/**
|
||||
* @var string Column to display for the description (optional)
|
||||
*/
|
||||
public $descriptionColumn;
|
||||
|
||||
/**
|
||||
* @var string Filter scope label.
|
||||
*/
|
||||
public $label;
|
||||
|
||||
/**
|
||||
* @var string Filter scope value.
|
||||
*/
|
||||
public $value;
|
||||
|
||||
/**
|
||||
* @var string Filter mode.
|
||||
*/
|
||||
public $type = 'group';
|
||||
|
||||
/**
|
||||
* @var string Filter options.
|
||||
*/
|
||||
public $options;
|
||||
|
||||
/**
|
||||
* @var string Specifies contextual visibility of this form scope.
|
||||
*/
|
||||
public $context = null;
|
||||
|
||||
/**
|
||||
* @var bool Specify if the scope is disabled or not.
|
||||
*/
|
||||
public $disabled = false;
|
||||
|
||||
/**
|
||||
* @var string Specifies a default value for supported scopes.
|
||||
*/
|
||||
public $defaults;
|
||||
|
||||
/**
|
||||
* @var string Raw SQL conditions to use when applying this scope.
|
||||
*/
|
||||
public $conditions;
|
||||
|
||||
/**
|
||||
* @var string Model scope method to use when applying this filter scope.
|
||||
*/
|
||||
public $scope;
|
||||
|
||||
/**
|
||||
* @var string Specifies a CSS class to attach to the scope container.
|
||||
*/
|
||||
public $cssClass;
|
||||
|
||||
/**
|
||||
* @var array Raw scope configuration.
|
||||
*/
|
||||
public $config;
|
||||
|
||||
public function __construct($scopeName, $label)
|
||||
{
|
||||
$this->scopeName = $scopeName;
|
||||
$this->label = $label;
|
||||
}
|
||||
|
||||
/**
|
||||
* Specifies a scope control rendering mode. Supported modes are:
|
||||
* - group - filter by a group of IDs. Default.
|
||||
* - checkbox - filter by a simple toggle switch.
|
||||
* @param string $type Specifies a render mode as described above
|
||||
* @param array $config A list of render mode specific config.
|
||||
*/
|
||||
public function displayAs($type, $config = [])
|
||||
{
|
||||
$this->type = strtolower($type) ?: $this->type;
|
||||
$this->config = $this->evalConfig($config);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Process options and apply them to this object.
|
||||
* @param array $config
|
||||
* @return array
|
||||
*/
|
||||
protected function evalConfig($config)
|
||||
{
|
||||
if (isset($config['options'])) $this->options($config['options']);
|
||||
if (isset($config['context'])) $this->context = $config['context'];
|
||||
if (isset($config['default'])) $this->defaults = $config['default'];
|
||||
if (isset($config['conditions'])) $this->conditions = $config['conditions'];
|
||||
if (isset($config['scope'])) $this->scope = $config['scope'];
|
||||
if (isset($config['cssClass'])) $this->cssClass = $config['cssClass'];
|
||||
if (isset($config['nameColumn'])) $this->nameColumn = $config['nameColumn'];
|
||||
if (isset($config['descriptionColumn'])) $this->descriptionColumn = $config['descriptionColumn'];
|
||||
|
||||
if (array_key_exists('disabled', $config)) $this->disabled = $config['disabled'];
|
||||
return $config;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a value suitable for the scope id property.
|
||||
*/
|
||||
public function getId($suffix = null)
|
||||
{
|
||||
$id = 'scope';
|
||||
$id .= '-'.$this->scopeName;
|
||||
|
||||
if ($suffix)
|
||||
$id .= '-'.$suffix;
|
||||
|
||||
if ($this->idPrefix)
|
||||
$id = $this->idPrefix . '-' . $id;
|
||||
|
||||
$id = rtrim(str_replace(['[', ']'], '-', $id), '-');
|
||||
return $id;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -98,9 +98,9 @@ class Users extends Controller
|
|||
'comment' => $permission->comment,
|
||||
'type' => 'balloon-selector',
|
||||
'options' => [
|
||||
1 => 'Allow',
|
||||
0 => 'Inherit',
|
||||
-1 => 'Deny',
|
||||
1 => 'backend::lang.user.allow',
|
||||
0 => 'backend::lang.user.inherit',
|
||||
-1 => 'backend::lang.user.deny',
|
||||
],
|
||||
'attributes' => [
|
||||
'data-trigger' => "input[name='User[permissions][superuser]']",
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<h2><?= trans('backend::lang.account.enter_new_password') ?></h2>
|
||||
<h2><?= e(trans('backend::lang.account.enter_new_password')) ?></h2>
|
||||
|
||||
<?= Form::open() ?>
|
||||
<input type="hidden" name="postback" value="1" />
|
||||
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
<p class="pull-right forgot-password">
|
||||
<a href="<?= Backend::url('backend/auth') ?>" class="text-muted">
|
||||
<?= trans('backend::lang.form.cancel') ?>
|
||||
<?= e(trans('backend::lang.form.cancel')) ?>
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<h2><?= trans('backend::lang.account.enter_login') ?></h2>
|
||||
<h2><?= e(trans('backend::lang.account.enter_login')) ?></h2>
|
||||
|
||||
<?= Form::open() ?>
|
||||
<input type="hidden" name="postback" value="1" />
|
||||
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
<p class="pull-right forgot-password">
|
||||
<a href="<?= Backend::url('backend/auth') ?>" class="text-muted">
|
||||
<?= trans('backend::lang.form.cancel') ?>
|
||||
<?= e(trans('backend::lang.form.cancel')) ?>
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<h2><?= trans('system::lang.app.motto') ?></h2>
|
||||
<h2><?= e(trans('system::lang.app.motto')) ?></h2>
|
||||
|
||||
<?= Form::open() ?>
|
||||
<input type="hidden" name="postback" value="1" />
|
||||
|
|
@ -34,7 +34,7 @@
|
|||
<p class="oc-icon-lock pull-right forgot-password">
|
||||
<!-- Forgot your password? -->
|
||||
<a href="<?= Backend::url('backend/auth/restore') ?>" class="text-muted">
|
||||
<?= trans('backend::lang.account.forgot_password') ?>
|
||||
<?= e(trans('backend::lang.account.forgot_password')) ?>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
|
|
|
|||
|
|
@ -22,13 +22,13 @@
|
|||
<li class="fullscreen-enable">
|
||||
<a href="javascript:;">
|
||||
<i class="icon-desktop"></i>
|
||||
<abbr title="ctrl+alt+f">Enter fullscreen mode</abbr>
|
||||
<abbr title="ctrl+alt+f"><?= e(trans('cms::lang.editor.enter_fullscreen')) ?></abbr>
|
||||
</a>
|
||||
</li>
|
||||
<li class="fullscreen-disable">
|
||||
<a href="javascript:;">
|
||||
<i class="icon-desktop"></i>
|
||||
<abbr title="ctrl+alt+f or esc">Exit fullscreen mode</abbr>
|
||||
<abbr title="ctrl+alt+f or esc"><?= e(trans('cms::lang.editor.exit_fullscreen')) ?></abbr>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
|
|
|||
|
|
@ -3,15 +3,13 @@
|
|||
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="popup">×</button>
|
||||
<h4 class="modal-title">Attachment: <?= $file->file_name ?></h4>
|
||||
<h4 class="modal-title"><?= e(trans('backend::lang.fileupload.attachment')) ?>: <?= $file->file_name ?></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p>
|
||||
Add a title and description for this attachment.
|
||||
</p>
|
||||
<p><?= e(trans('backend::lang.fileupload.help')) ?></p>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Title</label>
|
||||
<label><?= e(trans('backend::lang.fileupload.title_label')) ?></label>
|
||||
<input
|
||||
type="text"
|
||||
name="title"
|
||||
|
|
@ -20,7 +18,7 @@
|
|||
/>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Description</label>
|
||||
<label><?= e(trans('backend::lang.fileupload.description_label')) ?></label>
|
||||
<textarea name="description" class="form-control"><?= $file->description ?></textarea>
|
||||
</div>
|
||||
|
||||
|
|
@ -31,13 +29,13 @@
|
|||
class="btn btn-primary"
|
||||
data-request="<?= $this->getEventHandler('onSaveAttachmentConfig') ?>"
|
||||
data-stripe-load-indicator>
|
||||
Save
|
||||
<?= e(trans('backend::lang.form.save')) ?>
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-default"
|
||||
data-dismiss="popup">
|
||||
Cancel
|
||||
<?= e(trans('backend::lang.form.cancel')) ?>
|
||||
</button>
|
||||
</div>
|
||||
<?= Form::close() ?>
|
||||
|
|
@ -48,6 +48,21 @@ return [
|
|||
'widget_label' => 'Widget',
|
||||
'widget_width' => 'Width',
|
||||
'add_widget' => 'Add widget',
|
||||
'widget_inspector_title' => 'Widget configuration',
|
||||
'widget_inspector_description' => 'Configure the report widget',
|
||||
'widget_columns_label' => 'Width :columns',
|
||||
'widget_columns_description' => 'The widget width, a number between 1 and 10.',
|
||||
'widget_columns_error' => 'Please enter the widget width as a number between 1 and 10.',
|
||||
'columns' => '{1} column|[2,Inf] columns',
|
||||
'widget_new_row_label' => 'Force new row',
|
||||
'widget_new_row_description' => 'Put the widget in a new row.',
|
||||
'widget_title_label' => 'Widget title',
|
||||
'widget_title_error' => 'The Widget Title is required.',
|
||||
'status' => [
|
||||
'widget_title_default' => 'System status',
|
||||
'online' => 'online',
|
||||
'update_available' => '{0} updates available!|{1} update available!|[2,Inf] updates available!',
|
||||
]
|
||||
],
|
||||
'user' => [
|
||||
'name' => 'Administrator',
|
||||
|
|
@ -71,6 +86,9 @@ return [
|
|||
'send_invite_comment' => 'Use this checkbox to send an invitation to the user by email',
|
||||
'delete_confirm' => 'Do you really want to delete this administrator?',
|
||||
'return' => 'Return to the administrator list',
|
||||
'allow' => 'Allow',
|
||||
'inherit' => 'Inherit',
|
||||
'deny' => 'Deny',
|
||||
'group' => [
|
||||
'name' => 'Group',
|
||||
'name_field' => 'Name',
|
||||
|
|
@ -94,6 +112,22 @@ return [
|
|||
'missing_definition' => "List behavior does not contain a column for ':field'.",
|
||||
'behavior_not_ready' => 'List behavior has not been initialized, check that you have called makeLists() in your controller.',
|
||||
'invalid_column_datetime' => "Column value ':column' is not a DateTime object, are you missing a \$dates reference in the Model?",
|
||||
'pagination' => 'Displayed records: :from-:to of :total',
|
||||
'prev_page' => 'Previous page',
|
||||
'next_page' => 'Next page',
|
||||
'loading' => 'Loading...',
|
||||
'setup_title' => 'List Setup',
|
||||
'setup_help' => 'Use checkboxes to select columns you want to see in the list. You can change position of columns by dragging them up or down.',
|
||||
'records_per_page' => 'Records per page',
|
||||
'records_per_page_help' => 'Select the number of records per page to display. Please note that high number of records on a single page can reduce performance.',
|
||||
'apply_changes' => 'Apply changes',
|
||||
'cancel' => 'Cancel'
|
||||
],
|
||||
'fileupload' => [
|
||||
'attachment' => 'Attachment',
|
||||
'help' => 'Add a title and description for this attachment.',
|
||||
'title_label' => 'Title',
|
||||
'description_label' => 'Description'
|
||||
],
|
||||
'form' => [
|
||||
'create_title' => "New :name",
|
||||
|
|
@ -129,13 +163,20 @@ return [
|
|||
'select' => 'Select',
|
||||
'select_all' => 'all',
|
||||
'select_none' => 'none',
|
||||
'insert_row' => 'Insert Row',
|
||||
'delete_row' => 'Delete Row'
|
||||
],
|
||||
'relation' => [
|
||||
'missing_definition' => "Relation behavior does not contain a definition for ':field'.",
|
||||
'missing_model' => "Relation behavior used in :class does not have a model defined.",
|
||||
'invalid_action_single' => "This action cannot be performed on a singular relationship.",
|
||||
'invalid_action_multi' => "This action cannot be performed on a multiple relationship.",
|
||||
'help' => "Click on an item to add",
|
||||
'related_data' => "Related :name data",
|
||||
'add' => "Add",
|
||||
'add_selected' => "Add selected",
|
||||
'add_a_new' => "Add a new :name",
|
||||
'cancel' => "Cancel",
|
||||
'add_name' => "Add :name",
|
||||
'create' => "Create",
|
||||
'create_name' => "Create :name",
|
||||
|
|
@ -145,6 +186,7 @@ return [
|
|||
'remove_name' => "Remove :name",
|
||||
'delete' => "Delete",
|
||||
'delete_name' => "Delete :name",
|
||||
'delete_confirm' => "Are you sure?",
|
||||
],
|
||||
'model' => [
|
||||
'name' => "Model",
|
||||
|
|
|
|||
|
|
@ -45,6 +45,9 @@ return [
|
|||
],
|
||||
'dashboard' => [
|
||||
'menu_label' => 'Tableau de bord',
|
||||
'widget_label' => 'Widget',
|
||||
'widget_width' => 'Taille',
|
||||
'add_widget' => 'Ajouter un widget',
|
||||
],
|
||||
'user' => [
|
||||
'name' => 'Administrateur',
|
||||
|
|
@ -114,6 +117,7 @@ return [
|
|||
'undefined_tab' => 'Misc',
|
||||
'field_off' => 'Off',
|
||||
'field_on' => 'On',
|
||||
'add' => 'Ajouter',
|
||||
'apply' => 'Appliquer',
|
||||
'cancel' => 'Annuler',
|
||||
'close' => 'Fermer',
|
||||
|
|
|
|||
|
|
@ -0,0 +1,227 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
'field' => [
|
||||
'invalid_type' => 'Il tipo di campo :type non è valido.',
|
||||
'options_method_not_exists' => 'La classe :model deve definire un metodo :method() che ritorni le opzioni per il campo ":field".',
|
||||
],
|
||||
'widget' => [
|
||||
'not_registered' => "Nessun widget ':name' è stato registrato",
|
||||
'not_bound' => "Nessun widget ':name' è stato legato al controller",
|
||||
],
|
||||
'page' => [
|
||||
'untitled' => "Senza titolo",
|
||||
'access_denied' => [
|
||||
'label' => "Accesso negato",
|
||||
'help' => "Non hai le autorizzazioni necessarie per accedere a questa pagina.",
|
||||
'cms_link' => "Ritorna al pannello di controllo",
|
||||
],
|
||||
],
|
||||
'partial' => [
|
||||
'not_found' => "La vista parziale ':name' non è stata trovata.",
|
||||
],
|
||||
'account' => [
|
||||
'sign_out' => 'Esci',
|
||||
'login' => 'Accedi',
|
||||
'reset' => 'Reimposta',
|
||||
'restore' => 'Ripristina',
|
||||
'login_placeholder' => 'login',
|
||||
'password_placeholder' => 'password',
|
||||
'forgot_password' => "Dimenticato la password?",
|
||||
'enter_email' => "Inserisci in tuo indirizzo e-mail",
|
||||
'enter_login' => "Inserisci il login.",
|
||||
'email_placeholder' => "email",
|
||||
'enter_new_password' => "Inserisci una nuova password",
|
||||
'password_reset' => "Reimposta password",
|
||||
'restore_success' => "Le istruzioni per reimpostare la password sono state inviate al tuo indirizzo e-mail.",
|
||||
'restore_error' => "Nessun utente con login ':login' è stato trovato.",
|
||||
'reset_success' => "La tua password è stata reimpostata con successo. Ora puoi effettuare l'accesso.",
|
||||
'reset_error' => "I dati forniti per la reimpostazione della password non sono validi. Riprova!",
|
||||
'reset_fail' => "Impossibile ripristinare la password!",
|
||||
'apply' => 'Applica',
|
||||
'cancel' => 'Annulla',
|
||||
'delete' => 'Elimina',
|
||||
'ok' => 'OK',
|
||||
],
|
||||
'dashboard' => [
|
||||
'menu_label' => 'Dashboard',
|
||||
'widget_label' => 'Widget',
|
||||
'widget_width' => 'Larghezza',
|
||||
'add_widget' => 'Aggiungi widget',
|
||||
'widget_inspector_title' => 'Configurazione widget',
|
||||
'widget_inspector_description' => 'Configura il widget',
|
||||
'widget_columns_label' => 'Larghezza :columns',
|
||||
'widget_columns_description' => 'La larghezza del widget, un numero compreso tra 1 e 10.',
|
||||
'widget_columns_error' => 'La larghezza del widget deve essere un numero compreso tra 1 e 10.',
|
||||
'columns' => '{1} colonna|[2,Inf] colonne',
|
||||
'widget_new_row_label' => 'Forza nuova riga',
|
||||
'widget_new_row_description' => 'Inserisci il widget su una nuova riga.',
|
||||
'widget_title_label' => 'Titolo del widget',
|
||||
'widget_title_error' => 'Il titolo del widget è un campo obbligatorio.',
|
||||
'status' => [
|
||||
'widget_title_default' => 'Stato del sistema',
|
||||
'online' => 'online',
|
||||
'update_available' => '{0} aggiornamenti disponibili!|{1} aggiornamento disponibile!|[2,Inf] aggiornamenti disponibili!',
|
||||
]
|
||||
],
|
||||
'user' => [
|
||||
'name' => 'Amministratori',
|
||||
'menu_label' => 'Amministratori',
|
||||
'menu_description' => 'Gestisci gli utenti amministratori, i gruppi e le autorizzazioni.',
|
||||
'list_title' => 'Gestisci amministratori',
|
||||
'new' => 'Nuovo amministratorre',
|
||||
'login' => "Login",
|
||||
'first_name' => "Nome",
|
||||
'last_name' => "Cognome",
|
||||
'full_name' => "Nome completo",
|
||||
'email' => "Indirizzo e-mail",
|
||||
'groups' => "Gruppi",
|
||||
'groups_comment' => "Seleziona i gruppi a cui appartiene l'utente.",
|
||||
'avatar' => "Avatar",
|
||||
'password' => "Password",
|
||||
'password_confirmation' => "Conferma password",
|
||||
'superuser' => "Super User",
|
||||
'superuser_comment' => "Seleziona per consentire all'utente di accedere a tutte le aree.",
|
||||
'send_invite' => 'Invia invito tramite e-mail',
|
||||
'send_invite_comment' => 'Seleziona per inviare un invito all\'utente tramite e-mail',
|
||||
'delete_confirm' => 'Vuoi davvero eliminare questo amministratore?',
|
||||
'return' => 'Ritorna alla lista degli amministratori',
|
||||
'group' => [
|
||||
'name' => 'Gruppo',
|
||||
'name_field' => 'Nome',
|
||||
'menu_label' => 'Gruppi',
|
||||
'list_title' => 'Gestisci gruppi',
|
||||
'new' => 'Nuovo gruppo amministratore',
|
||||
'delete_confirm' => 'Vuoi davvero eliminare questo gruppo amministratore?',
|
||||
'return' => 'Ritorna alla lista dei gruppi',
|
||||
],
|
||||
'preferences' => [
|
||||
'not_authenticated' => 'Non c\'è nessun utente autenticato per cui caricare o salvare le preferenze.'
|
||||
]
|
||||
],
|
||||
'list' => [
|
||||
'default_title' => 'Elenco',
|
||||
'search_prompt' => 'Cerca...',
|
||||
'no_records' => 'Nessun risultato trovato.',
|
||||
'missing_model' => 'L\'elenco utilizzato nella classe :class non ha un modello definito.',
|
||||
'missing_column' => 'Non ci sono colonne definite per :columns.',
|
||||
'missing_columns' => 'L\'elenco utilizzato nella classe :class non ha un elenco di colonne definito.',
|
||||
'missing_definition' => "L'elenco non contiene una colonna per il campo ':field'.",
|
||||
'behavior_not_ready' => 'L\'elenco non è stato inizializzato, controlla di aver chiamato il metodo makeLists() nel controller.',
|
||||
'invalid_column_datetime' => "Il valore della colonna ':column' non è un oggetto di tipo DateTime, hai dimenticato un riferimento a \$dates nel modello?",
|
||||
'pagination' => 'Record visualizzati: :from-:to di :total',
|
||||
'setup_title' => 'Configura elenco',
|
||||
'setup_help' => 'Utilizza le checkbox per selezionare le colonne che vuoi visualizzare nell\'elenco. Puoi cambiare la posizione delle colonne trascinandole verso l\'alto o il basso.',
|
||||
'records_per_page' => 'Record per pagina',
|
||||
'records_per_page_help' => 'Seleziona il numero di record da visualizzare su ogni pagina. Ricorda che un numero elevato di record in una singola pagina può ridurre le prestazioni.',
|
||||
'apply_changes' => 'Applica modifiche',
|
||||
'cancel' => 'Annulla'
|
||||
],
|
||||
'form' => [
|
||||
'create_title' => "Nuovo :name",
|
||||
'update_title' => "Modifica :name",
|
||||
'preview_title' => "Anteprima :name",
|
||||
'create_success' => ':name creato con successo',
|
||||
'update_success' => ':name modificato con successo',
|
||||
'delete_success' => ':name eliminato con successo',
|
||||
'missing_id' => "L'ID del record non è stato specificato.",
|
||||
'missing_model' => 'Il form utilizzato nella classe :class non ha un modello definito.',
|
||||
'missing_definition' => "Il form non contiene il campo ':field'.",
|
||||
'not_found' => 'Nessun record per l\'ID :id è stato trovato.',
|
||||
'create' => 'Crea',
|
||||
'create_and_close' => 'Crea e chiudi',
|
||||
'creating' => 'Creazione in corso...',
|
||||
'save' => 'Salva',
|
||||
'save_and_close' => 'Salva e chiudi',
|
||||
'saving' => 'Salvataggio in corso...',
|
||||
'delete' => 'Elimina',
|
||||
'deleting' => 'Eliminazione in corso...',
|
||||
'undefined_tab' => 'Varie',
|
||||
'field_off' => 'Off',
|
||||
'field_on' => 'On',
|
||||
'add' => 'Aggiungi',
|
||||
'apply' => 'Applica',
|
||||
'cancel' => 'Annulla',
|
||||
'close' => 'Chiudi',
|
||||
'ok' => 'OK',
|
||||
'or' => 'o',
|
||||
'confirm_tab_close' => 'Vuoi davvero chiudere il tab? Le modifiche non salvate andranno perse.',
|
||||
'behavior_not_ready' => 'Il form non è stato inizializzato, verifica di aver chiamato il metodo initForm() nel controller.',
|
||||
'preview_no_files_message' => 'I file non sono stati caricati',
|
||||
'select' => 'Seleziona',
|
||||
'select_all' => 'tutti',
|
||||
'select_none' => 'nessuno',
|
||||
],
|
||||
'relation' => [
|
||||
'missing_definition' => "La relazione non contiene una definizione per il campo ':field'.",
|
||||
'missing_model' => "La relazione utilizzata nella classe :class non ha un modello definito.",
|
||||
'invalid_action_single' => "L'azione non può essere eseguita su una relazione singola.",
|
||||
'invalid_action_multi' => "L'azione non può essere eseguita su una relazione multipla.",
|
||||
'add' => "Aggiungi",
|
||||
'add_name' => "Aggiungi :name",
|
||||
'create' => "Crea",
|
||||
'create_name' => "Crea :name",
|
||||
'update' => "Aggiorna",
|
||||
'update_name' => "Aggiorna :name",
|
||||
'remove' => "Rimuovi",
|
||||
'remove_name' => "Rimuovi :name",
|
||||
'delete' => "Elimina",
|
||||
'delete_name' => "Elimina :name",
|
||||
],
|
||||
'model' => [
|
||||
'name' => "Modello",
|
||||
'not_found' => "Nessun modello di ':class' con l'ID :id trovato.",
|
||||
'missing_id' => "Nessun ID specificato.",
|
||||
'missing_relation' => "Il modello ':class' non contiene una definizione per la relazione ':relation'.",
|
||||
'invalid_class' => "Il modello :model utilizzato nella classe :class non è valido, deve ereditare la classe Model.",
|
||||
'mass_assignment_failed' => "Assegnazione massiva fallita per l'attributo ':attribute' del modello.",
|
||||
],
|
||||
'warnings' => [
|
||||
'tips' => 'Suggerimenti di configurazione del sistema',
|
||||
'tips_description' => 'Ci sono elementi a cui è necessario prestare attenzione al fine di configurare il sistema in maniera corretta.',
|
||||
'permissions' => 'La cartella :name o le sue sottocartelle non sono scrivibili da PHP. Imposta le corrette autorizzazioni per il server web su questa cartella.',
|
||||
'extension' => 'L\'estenzione di PHP :name non è installata. Installa questa libreria ed attiva l\'estensione.'
|
||||
],
|
||||
'editor' => [
|
||||
'menu_label' => 'Preferenze editor di codice',
|
||||
'menu_description' => 'Personalizza le impostazioni dell\'editor, come la dimensione del carattere e lo schema di colori.',
|
||||
'font_size' => 'Dimensione carattere',
|
||||
'tab_size' => 'Dimensione Tab',
|
||||
'use_hard_tabs' => 'Indenta utilizzando i Tab',
|
||||
'code_folding' => 'Raggruppa il codice',
|
||||
'word_wrap' => 'A capo automatico',
|
||||
'highlight_active_line' => 'Evidenzia la linea attiva',
|
||||
'show_invisibles' => 'Mostra caratteri invisibili',
|
||||
'show_gutter' => 'Visualizza numeri di linea',
|
||||
'theme' => 'Schema di colori',
|
||||
],
|
||||
'tooltips' => [
|
||||
'preview_website' => 'Anteprima del sito web'
|
||||
],
|
||||
'mysettings' => [
|
||||
'menu_label' => 'Impostazioni personali',
|
||||
'menu_description' => 'Impostazioni legate al tuo account amministratore',
|
||||
],
|
||||
'myaccount' => [
|
||||
'menu_label' => 'Il mio account',
|
||||
'menu_description' => 'Aggiorna i dettagli del tuo account, come il nome, l\'indirizzo e-mail e la password.',
|
||||
'menu_keywords' => 'sicurezza login'
|
||||
],
|
||||
'backend_preferences' => [
|
||||
'menu_label' => 'Preferenze pannello di controllo',
|
||||
'menu_description' => 'Gestisci le preferenze della lingua e l\'aspetto del pannello di controllo.',
|
||||
'locale' => 'Lingua',
|
||||
'locale_comment' => 'Seleziona la lingua da utilizzare.',
|
||||
],
|
||||
'access_log' => [
|
||||
'hint' => 'Questo registro visualizza un elenco dei tentativi di accesso di un amministratore avvenuti con successo. I record sono mantenuti per un totale di :days giorni.',
|
||||
'menu_label' => 'Registro accessi',
|
||||
'menu_description' => 'Visualizza una lista degli accessi da parte degli amministratori.',
|
||||
'created_at' => 'Data e ora',
|
||||
'login' => 'Login',
|
||||
'ip_address' => 'Indirizzo IP',
|
||||
'first_name' => 'Nome',
|
||||
'last_name' => 'Cognome',
|
||||
'email' => 'Indirizzo e-mail',
|
||||
],
|
||||
];
|
||||
|
|
@ -45,6 +45,9 @@ return [
|
|||
],
|
||||
'dashboard' => [
|
||||
'menu_label' => 'Панель управления',
|
||||
'widget_label' => 'Виджет',
|
||||
'widget_width' => 'Ширина',
|
||||
'add_widget' => 'Добавить виджет',
|
||||
],
|
||||
'user' => [
|
||||
'name' => 'Администратора',
|
||||
|
|
@ -114,6 +117,7 @@ return [
|
|||
'undefined_tab' => 'Разное',
|
||||
'field_off' => 'Выкл',
|
||||
'field_on' => 'Вкл',
|
||||
'add' => 'Добавить',
|
||||
'apply' => 'Применить',
|
||||
'cancel' => 'Отмена',
|
||||
'close' => 'Закрыть',
|
||||
|
|
@ -187,4 +191,15 @@ return [
|
|||
'locale' => 'Язык',
|
||||
'locale_comment' => 'Выберите желаемый язык панели управления.',
|
||||
],
|
||||
'access_log' => [
|
||||
'hint' => 'В этом журнале отображается список успешных попыток авторизаций администраторов. Записи хранятся :days дней.',
|
||||
'menu_label' => 'Журнал доступа',
|
||||
'menu_description' => 'Просмотр списка успешных авторизаций администраторов.',
|
||||
'created_at' => 'Дата & Время',
|
||||
'login' => 'Логин',
|
||||
'ip_address' => 'IP адересс',
|
||||
'first_name' => 'Имя',
|
||||
'last_name' => 'Фамилия',
|
||||
'email' => 'Почта',
|
||||
],
|
||||
];
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
<footer id="layout-footer">
|
||||
<div class="brand">
|
||||
<span class="logo"><i class="icon-leaf"></i></span>
|
||||
<span class="name"><?= trans('system::lang.app.name') ?></span>
|
||||
<span class="name"><?= e(trans('system::lang.app.name')) ?></span>
|
||||
</div>
|
||||
<div class="motto">
|
||||
<p><?= trans('system::lang.app.motto') ?></p>
|
||||
<p><?= e(trans('system::lang.app.motto')) ?></p>
|
||||
</div>
|
||||
</footer>
|
||||
|
|
@ -1,6 +1,7 @@
|
|||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, user-scalable=0">
|
||||
<link rel="icon" type="image/png" href="<?= URL::asset('modules/backend/assets/images/favicon.png') ?>" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, user-scalable=0, minimal-ui">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<link rel="icon" type="image/png" href="<?= URL::asset('modules/backend/assets/images/favicon.png') ?>">
|
||||
<title data-title-template="<?= empty($this->pageTitleTemplate) ? '%s | October CMS' : e($this->pageTitleTemplate) ?>">
|
||||
<?= $this->pageTitle ?> | October CMS
|
||||
</title>
|
||||
|
|
|
|||
|
|
@ -28,7 +28,12 @@
|
|||
*/
|
||||
?>
|
||||
<li class="icon preview">
|
||||
<a href="<?= URL::to('/') ?>" target="_blank" data-toggle="tooltip" data-placement="bottom" title="<?= trans('backend::lang.tooltips.preview_website') ?>">
|
||||
<a
|
||||
href="<?= URL::to('/') ?>"
|
||||
target="_blank"
|
||||
data-toggle="tooltip"
|
||||
data-placement="bottom"
|
||||
title="<?= e(trans('backend::lang.tooltips.preview_website')) ?>">
|
||||
<i class="icon-crosshairs"></i>
|
||||
</a>
|
||||
</li>
|
||||
|
|
@ -41,7 +46,13 @@
|
|||
</a>
|
||||
</li>
|
||||
<li class="icon power-off">
|
||||
<a data-toggle="tooltip" data-placement="left" href="<?= Backend::url('backend/auth/signout') ?>" title="<?= trans('backend::lang.account.sign_out') ?>"><i class="icon-power-off"></i></a>
|
||||
<a
|
||||
data-toggle="tooltip"
|
||||
data-placement="left"
|
||||
href="<?= Backend::url('backend/auth/signout') ?>"
|
||||
title="<?= e(trans('backend::lang.account.sign_out')) ?>">
|
||||
<i class="icon-power-off"></i>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
<div class="layout">
|
||||
<div class="layout-row min-size layout-head">
|
||||
<div class="layout-cell">
|
||||
<h1><?= trans('system::lang.app.name') ?></h1>
|
||||
<h1><?= e(trans('system::lang.app.name')) ?></h1>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layout-row">
|
||||
|
|
|
|||
|
|
@ -27,20 +27,26 @@ class BackendPreferences extends Model
|
|||
|
||||
public function getLocaleOptions()
|
||||
{
|
||||
return [
|
||||
$locales = [
|
||||
'en' => [Lang::get('system::lang.locale.en'), 'flag-gb'],
|
||||
'ru' => [Lang::get('system::lang.locale.ru'), 'flag-ru'],
|
||||
'nl' => [Lang::get('system::lang.locale.nl'), 'flag-nl'],
|
||||
'ja' => [Lang::get('system::lang.locale.ja'), 'flag-jp'],
|
||||
'sv' => [Lang::get('system::lang.locale.sv'), 'flag-sv'],
|
||||
'se' => [Lang::get('system::lang.locale.se'), 'flag-se'],
|
||||
'tr' => [Lang::get('system::lang.locale.tr'), 'flag-tr'],
|
||||
'br' => [Lang::get('system::lang.locale.br'), 'flag-br'],
|
||||
'de' => [Lang::get('system::lang.locale.de'), 'flag-de'],
|
||||
'fr' => [Lang::get('system::lang.locale.fr'), 'flag-fr'],
|
||||
'it' => [Lang::get('system::lang.locale.it'), 'flag-it'],
|
||||
];
|
||||
|
||||
// Sort the locales alphabetically
|
||||
asort($locales);
|
||||
return $locales;
|
||||
}
|
||||
|
||||
public function afterSave()
|
||||
{
|
||||
Session::put('locale', $this->locale);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -65,6 +65,6 @@ class EditorPreferences extends Model
|
|||
|
||||
// Sort the theme alphabetically, and push the default theme
|
||||
asort($themes);
|
||||
return [static::DEFAULT_THEME => 'Twilight'] + $themes;
|
||||
return [static::DEFAULT_THEME => ucwords(static::DEFAULT_THEME)] + $themes;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,6 +1,11 @@
|
|||
<?php namespace Backend\Widgets;
|
||||
|
||||
use DB as Db;
|
||||
use Event;
|
||||
use Backend\Classes\WidgetBase;
|
||||
use Backend\Classes\FilterScope;
|
||||
use System\Classes\ApplicationException;
|
||||
use October\Rain\Support\Util;
|
||||
|
||||
/**
|
||||
* Filter Widget
|
||||
|
|
@ -16,6 +21,48 @@ class Filter extends WidgetBase
|
|||
*/
|
||||
public $defaultAlias = 'filter';
|
||||
|
||||
/**
|
||||
* @var boolean Determines if scope definitions have been created.
|
||||
*/
|
||||
protected $scopesDefined = false;
|
||||
|
||||
/**
|
||||
* @var array Collection of all scopes used in this filter.
|
||||
*/
|
||||
protected $allScopes = [];
|
||||
|
||||
/**
|
||||
* @var array Collection of all scopes models used in this filter.
|
||||
*/
|
||||
protected $scopeModels = [];
|
||||
|
||||
/**
|
||||
* @var string The context of this filter, scopes that do not belong
|
||||
* to this context will not be shown.
|
||||
*/
|
||||
protected $activeContext = null;
|
||||
|
||||
/**
|
||||
* @var array List of CSS classes to apply to the filter container element
|
||||
*/
|
||||
public $cssClasses = [];
|
||||
|
||||
/**
|
||||
* Initialize the widget, called by the constructor and free from its parameters.
|
||||
*/
|
||||
public function init()
|
||||
{
|
||||
$this->activeContext = $this->getConfig('context');
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function loadAssets()
|
||||
{
|
||||
$this->addJs('js/october.filter.js', 'core');
|
||||
}
|
||||
|
||||
/**
|
||||
* Renders the widget.
|
||||
*/
|
||||
|
|
@ -30,5 +77,388 @@ class Filter extends WidgetBase
|
|||
*/
|
||||
public function prepareVars()
|
||||
{
|
||||
$this->defineFilterScopes();
|
||||
$this->vars['cssClasses'] = implode(' ', $this->cssClasses);
|
||||
$this->vars['scopes'] = $this->allScopes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Renders the HTML element for a scope
|
||||
*/
|
||||
public function renderScopeElement($scope)
|
||||
{
|
||||
return $this->makePartial('scope_'.$scope->type, ['scope' => $scope]);
|
||||
}
|
||||
|
||||
//
|
||||
// AJAX
|
||||
//
|
||||
|
||||
/**
|
||||
* Update a filter scope value.
|
||||
* @return array
|
||||
*/
|
||||
public function onFilterUpdate()
|
||||
{
|
||||
$this->defineFilterScopes();
|
||||
|
||||
if (!$scope = post('scopeName'))
|
||||
return;
|
||||
|
||||
$scope = $this->getScope($scope);
|
||||
|
||||
switch ($scope->type) {
|
||||
case 'group':
|
||||
$active = $this->optionsFromAjax(post('options.active'));
|
||||
$this->setScopeValue($scope, $active);
|
||||
break;
|
||||
|
||||
case 'checkbox':
|
||||
$checked = post('value') == 'true' ? true : false;
|
||||
$this->setScopeValue($scope, $checked);
|
||||
break;
|
||||
}
|
||||
|
||||
/*
|
||||
* Trigger class event, merge results as viewable array
|
||||
*/
|
||||
$params = func_get_args();
|
||||
$result = $this->fireEvent('filter.update', [$params]);
|
||||
if ($result && is_array($result))
|
||||
return Util::arrayMerge($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns available options for group scope type.
|
||||
* @return array
|
||||
*/
|
||||
public function onFilterGetOptions()
|
||||
{
|
||||
$this->defineFilterScopes();
|
||||
|
||||
$searchQuery = post('search');
|
||||
if (!$scopeName = post('scopeName'))
|
||||
return;
|
||||
|
||||
$scope = $this->getScope($scopeName);
|
||||
$activeKeys = $scope->value ? array_keys($scope->value) : [];
|
||||
$available = $this->getAvailableOptions($scope, $searchQuery);
|
||||
$active = $searchQuery ? [] : $this->filterActiveOptions($activeKeys, $available);
|
||||
|
||||
return [
|
||||
'scopeName' => $scopeName,
|
||||
'options' => [
|
||||
'available' => $this->optionsToAjax($available),
|
||||
'active' => $this->optionsToAjax($active),
|
||||
]
|
||||
];
|
||||
}
|
||||
|
||||
//
|
||||
// Internals
|
||||
//
|
||||
|
||||
/**
|
||||
* Returns the available options a scope can use, either from the
|
||||
* model relation or from a supplied array. Optionally apply a search
|
||||
* constraint to the options.
|
||||
* @param string $scope
|
||||
* @param string $searchQuery
|
||||
* @return array
|
||||
*/
|
||||
protected function getAvailableOptions($scope, $searchQuery = null)
|
||||
{
|
||||
$available = [];
|
||||
$nameColumn = $this->getScopeNameColumn($scope);
|
||||
$options = $this->getOptionsFromModel($scope, $searchQuery);
|
||||
foreach ($options as $option) {
|
||||
$available[$option->getKey()] = $option->{$nameColumn};
|
||||
}
|
||||
return $available;
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes any already selected options from the available options, returns
|
||||
* a newly built array.
|
||||
* @param array $activeKeys
|
||||
* @param array $availableOptions
|
||||
* @return array
|
||||
*/
|
||||
protected function filterActiveOptions(array $activeKeys, array &$availableOptions)
|
||||
{
|
||||
$active = [];
|
||||
foreach ($availableOptions as $id => $option) {
|
||||
if (!in_array($id, $activeKeys))
|
||||
continue;
|
||||
|
||||
$active[$id] = $option;
|
||||
unset($availableOptions[$id]);
|
||||
}
|
||||
|
||||
return $active;
|
||||
}
|
||||
|
||||
/**
|
||||
* Looks at the model for defined scope items.
|
||||
*/
|
||||
protected function getOptionsFromModel($scope, $searchQuery = null)
|
||||
{
|
||||
$model = $this->scopeModels[$scope->scopeName];
|
||||
if (!$searchQuery)
|
||||
return $model->all();
|
||||
|
||||
$searchFields = [$model->getKeyName(), $this->getScopeNameColumn($scope)];
|
||||
return $model->searchWhere($searchQuery, $searchFields)->get();
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a flat array of filter scopes from the configuration.
|
||||
*/
|
||||
protected function defineFilterScopes()
|
||||
{
|
||||
if ($this->scopesDefined)
|
||||
return;
|
||||
|
||||
/*
|
||||
* Extensibility
|
||||
*/
|
||||
Event::fire('backend.filter.extendScopesBefore', [$this]);
|
||||
$this->fireEvent('filter.extendScopesBefore');
|
||||
|
||||
/*
|
||||
* All scopes
|
||||
*/
|
||||
if (!isset($this->config->scopes) || !is_array($this->config->scopes))
|
||||
$this->config->scopes = [];
|
||||
|
||||
$this->addScopes($this->config->scopes);
|
||||
|
||||
/*
|
||||
* Extensibility
|
||||
*/
|
||||
Event::fire('backend.filter.extendScopes', [$this]);
|
||||
$this->fireEvent('filter.extendScopes');
|
||||
|
||||
$this->scopesDefined = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Programatically add scopes, used internally and for extensibility.
|
||||
*/
|
||||
public function addScopes(array $scopes)
|
||||
{
|
||||
foreach ($scopes as $name => $config) {
|
||||
|
||||
$scopeObj = $this->makeFilterScope($name, $config);
|
||||
|
||||
/*
|
||||
* Check that the filter scope matches the active context
|
||||
*/
|
||||
if ($scopeObj->context !== null) {
|
||||
$context = (is_array($scopeObj->context)) ? $scopeObj->context : [$scopeObj->context];
|
||||
if (!in_array($this->getContext(), $context))
|
||||
continue;
|
||||
}
|
||||
|
||||
/*
|
||||
* Validate scope model
|
||||
*/
|
||||
if (isset($config['modelClass'])) {
|
||||
$class = $config['modelClass'];
|
||||
$model = new $class;
|
||||
$this->scopeModels[$name] = $model;
|
||||
}
|
||||
|
||||
$this->allScopes[$name] = $scopeObj;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a filter scope object from name and configuration.
|
||||
*/
|
||||
protected function makeFilterScope($name, $config)
|
||||
{
|
||||
$label = (isset($config['label'])) ? $config['label'] : null;
|
||||
$scopeType = isset($config['type']) ? $config['type'] : null;
|
||||
|
||||
$scope = new FilterScope($name, $label);
|
||||
$scope->displayAs($scopeType, $config);
|
||||
|
||||
/*
|
||||
* Set scope value
|
||||
*/
|
||||
$scope->value = $this->getScopeValue($scope);
|
||||
|
||||
return $scope;
|
||||
}
|
||||
|
||||
//
|
||||
// Filter query logic
|
||||
//
|
||||
|
||||
/**
|
||||
* Applies all scopes to a DB query.
|
||||
* @param Builder $query
|
||||
* @return Builder
|
||||
*/
|
||||
public function applyAllScopesToQuery($query)
|
||||
{
|
||||
foreach ($this->allScopes as $scope) {
|
||||
$this->applyScopeToQuery($scope, $query);
|
||||
}
|
||||
|
||||
return $query;
|
||||
}
|
||||
|
||||
/**
|
||||
* Applies a filter scope constraints to a DB query.
|
||||
* @param string $scope
|
||||
* @param Builder $query
|
||||
* @return Builder
|
||||
*/
|
||||
public function applyScopeToQuery($scope, $query)
|
||||
{
|
||||
if (is_string($scope))
|
||||
$scope = $this->getScope($scope);
|
||||
|
||||
if (!$scope->value)
|
||||
return;
|
||||
|
||||
$value = is_array($scope->value) ? array_keys($scope->value) : $scope->value;
|
||||
|
||||
/*
|
||||
* Condition
|
||||
*/
|
||||
if ($scopeConditions = $scope->conditions) {
|
||||
if (is_array($value)) {
|
||||
$filtered = implode(',', array_build($value, function($key, $_value){
|
||||
return [$key, Db::getPdo()->quote($_value)];
|
||||
}));
|
||||
}
|
||||
else {
|
||||
$filtered = Db::getPdo()->quote($value);
|
||||
}
|
||||
|
||||
$query->whereRaw(strtr($scopeConditions, [':filtered' => $filtered]));
|
||||
}
|
||||
|
||||
/*
|
||||
* Scope
|
||||
*/
|
||||
if ($scopeMethod = $scope->scope) {
|
||||
$query->$scopeMethod($value);
|
||||
}
|
||||
|
||||
return $query;
|
||||
}
|
||||
|
||||
//
|
||||
// Access layer
|
||||
//
|
||||
|
||||
/**
|
||||
* Returns a scope value for this widget instance.
|
||||
*/
|
||||
public function getScopeValue($scope, $default = null)
|
||||
{
|
||||
if (is_string($scope))
|
||||
$scope = $this->getScope($scope);
|
||||
|
||||
$cacheKey = 'scope-'.$scope->scopeName;
|
||||
return $this->getSession($cacheKey, $default);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets an scope value for this widget instance.
|
||||
*/
|
||||
public function setScopeValue($scope, $value)
|
||||
{
|
||||
if (is_string($scope))
|
||||
$scope = $this->getScope($scope);
|
||||
|
||||
$cacheKey = 'scope-'.$scope->scopeName;
|
||||
$this->putSession($cacheKey, $value);
|
||||
|
||||
$scope->value = $value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all the registered scopes for the instance.
|
||||
* @return array
|
||||
*/
|
||||
public function getScopes()
|
||||
{
|
||||
return $this->allScopes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a specified scope object
|
||||
* @param string $scope
|
||||
* @return mixed
|
||||
*/
|
||||
public function getScope($scope)
|
||||
{
|
||||
if (!isset($this->allScopes[$scope]))
|
||||
throw new ApplicationException('No definition for scope ' . $scope);
|
||||
|
||||
return $this->allScopes[$scope];
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the display name column for a scope.
|
||||
* @param string $scope
|
||||
* @return string
|
||||
*/
|
||||
public function getScopeNameColumn($scope)
|
||||
{
|
||||
if (is_string($scope))
|
||||
$scope = $this->getScope($scope);
|
||||
|
||||
return $scope->nameColumn;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the active context for displaying the filter.
|
||||
*/
|
||||
public function getContext()
|
||||
{
|
||||
return $this->activeContext;
|
||||
}
|
||||
|
||||
//
|
||||
// Helpers
|
||||
//
|
||||
|
||||
/**
|
||||
* Convert a key/pair array to a named array {id: 1, name: 'Foobar'}
|
||||
* @param array $options
|
||||
* @return array
|
||||
*/
|
||||
protected function optionsToAjax($options)
|
||||
{
|
||||
$processed = [];
|
||||
foreach ($options as $id => $result) {
|
||||
$processed[] = ['id' => $id, 'name' => $result];
|
||||
}
|
||||
return $processed;
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert a named array to a key/pair array
|
||||
* @param array $options
|
||||
* @return array
|
||||
*/
|
||||
protected function optionsFromAjax($options)
|
||||
{
|
||||
$processed = [];
|
||||
if (!is_array($options))
|
||||
return $processed;
|
||||
|
||||
foreach ($options as $option) {
|
||||
if (!$id = array_get($option, 'id')) continue;
|
||||
$processed[$id] = array_get($option, 'name');
|
||||
}
|
||||
return $processed;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -78,7 +78,12 @@ class Lists extends WidgetBase
|
|||
/**
|
||||
* @var string Filter the records by a search term.
|
||||
*/
|
||||
public $searchTerm;
|
||||
protected $searchTerm;
|
||||
|
||||
/**
|
||||
* @var array Collection of functions to apply to each list query.
|
||||
*/
|
||||
protected $filterCallbacks = [];
|
||||
|
||||
/**
|
||||
* @var bool Shows the sorting options for each column.
|
||||
|
|
@ -339,8 +344,11 @@ class Lists extends WidgetBase
|
|||
}
|
||||
|
||||
/*
|
||||
* @todo Apply filters etc
|
||||
* Apply filters
|
||||
*/
|
||||
foreach ($this->filterCallbacks as $callback) {
|
||||
$callback($query);
|
||||
}
|
||||
|
||||
/*
|
||||
* Extensibility
|
||||
|
|
@ -694,6 +702,15 @@ class Lists extends WidgetBase
|
|||
return $value;
|
||||
}
|
||||
|
||||
//
|
||||
// Filtering
|
||||
//
|
||||
|
||||
public function addFilter(callable $filter)
|
||||
{
|
||||
$this->filterCallbacks[] = $filter;
|
||||
}
|
||||
|
||||
//
|
||||
// Searching
|
||||
//
|
||||
|
|
|
|||
|
|
@ -1,11 +1,12 @@
|
|||
<?php namespace Backend\Widgets;
|
||||
|
||||
use Backend\Classes\WidgetBase;
|
||||
use System\Classes\ApplicationException;
|
||||
use File;
|
||||
use Lang;
|
||||
use Request;
|
||||
use Backend\Classes\WidgetBase;
|
||||
use Backend\Classes\WidgetManager;
|
||||
use Backend\Models\UserPreferences;
|
||||
use File;
|
||||
use System\Classes\ApplicationException;
|
||||
|
||||
/**
|
||||
* Report Container Widget
|
||||
|
|
@ -143,9 +144,9 @@ class ReportContainer extends WidgetBase
|
|||
|
||||
return [
|
||||
'@#'.$this->getId('container-list') => $this->makePartial('widget', [
|
||||
'widget' => $widget,
|
||||
'widget' => $widget,
|
||||
'widgetAlias' => $widgetInfo['alias'],
|
||||
'sortOrder' => $widgetInfo['sortOrder']
|
||||
'sortOrder' => $widgetInfo['sortOrder']
|
||||
])
|
||||
];
|
||||
}
|
||||
|
|
@ -282,45 +283,45 @@ class ReportContainer extends WidgetBase
|
|||
|
||||
$property = [
|
||||
'property' => 'ocWidgetWidth',
|
||||
'title' => 'Width (1-10)',
|
||||
'description' => 'The widget width, a number between 1 and 10.',
|
||||
'title' => Lang::get('backend::lang.dashboard.widget_columns_label', ['columns' => '(1-10)']),
|
||||
'description' => Lang::get('backend::lang.dashboard.widget_columns_description'),
|
||||
'type' => 'dropdown',
|
||||
'validationPattern' => '^[0-9]+$',
|
||||
'validationMessage' => 'Please enter the widget width as a number between 1 and 10.',
|
||||
'validationMessage' => Lang::get('backend::lang.dashboard.widget_columns_error'),
|
||||
'options' => [
|
||||
1 => '1 column',
|
||||
2 => '2 columns',
|
||||
3 => '3 columns',
|
||||
4 => '4 columns',
|
||||
5 => '5 columns',
|
||||
6 => '6 columns',
|
||||
7 => '7 columns',
|
||||
8 => '8 columns',
|
||||
9 => '9 columns',
|
||||
10 => '10 columns'
|
||||
1 => '1 ' . Lang::choice('backend::lang.dashboard.columns', 1),
|
||||
2 => '2 ' . Lang::choice('backend::lang.dashboard.columns', 2),
|
||||
3 => '3 ' . Lang::choice('backend::lang.dashboard.columns', 3),
|
||||
4 => '4 ' . Lang::choice('backend::lang.dashboard.columns', 4),
|
||||
5 => '5 ' . Lang::choice('backend::lang.dashboard.columns', 5),
|
||||
6 => '6 ' . Lang::choice('backend::lang.dashboard.columns', 6),
|
||||
7 => '7 ' . Lang::choice('backend::lang.dashboard.columns', 7),
|
||||
8 => '8 ' . Lang::choice('backend::lang.dashboard.columns', 8),
|
||||
9 => '9 ' . Lang::choice('backend::lang.dashboard.columns', 9),
|
||||
10 => '10 ' . Lang::choice('backend::lang.dashboard.columns', 10)
|
||||
]
|
||||
];
|
||||
$result[] = $property;
|
||||
|
||||
$property = [
|
||||
'property' => 'ocWidgetNewRow',
|
||||
'title' => 'Force new row',
|
||||
'description' => 'Put the widget in a new row.',
|
||||
'title' => Lang::get('backend::lang.dashboard.widget_new_row_label'),
|
||||
'description' => Lang::get('backend::lang.dashboard.widget_new_row_description'),
|
||||
'type' => 'checkbox'
|
||||
];
|
||||
|
||||
$result[] = $property;
|
||||
foreach ($properties as $name=>$params) {
|
||||
foreach ($properties as $name => $params) {
|
||||
|
||||
$property = [
|
||||
'property' => $name,
|
||||
'title' => isset($params['title']) ? $params['title'] : $name,
|
||||
'title' => isset($params['title']) ? Lang::get($params['title']) : $name,
|
||||
'type' => isset($params['type']) ? $params['type'] : 'string'
|
||||
];
|
||||
|
||||
foreach ($params as $name => $value) {
|
||||
if (isset($property[$name])) continue;
|
||||
$property[$name] = $value;
|
||||
$property[$name] = Lang::get($value);
|
||||
}
|
||||
|
||||
$result[] = $property;
|
||||
|
|
@ -334,8 +335,9 @@ class ReportContainer extends WidgetBase
|
|||
$result = [];
|
||||
|
||||
$properties = $widget->defineProperties();
|
||||
foreach ($properties as $name=>$params)
|
||||
$result[$name] = $widget->property($name);
|
||||
foreach ($properties as $name => $params) {
|
||||
$result[$name] = Lang::get($widget->property($name));
|
||||
}
|
||||
|
||||
$result['ocWidgetWidth'] = $widget->property('ocWidgetWidth');
|
||||
$result['ocWidgetNewRow'] = $widget->property('ocWidgetNewRow');
|
||||
|
|
|
|||
|
|
@ -109,7 +109,8 @@ class Search extends WidgetBase
|
|||
*/
|
||||
$params = func_get_args();
|
||||
$result = $this->fireEvent('search.submit', [$params]);
|
||||
return Util::arrayMerge($result);
|
||||
if ($result && is_array($result))
|
||||
return Util::arrayMerge($result);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -0,0 +1,367 @@
|
|||
/*
|
||||
* Filter Widget
|
||||
*
|
||||
* Data attributes:
|
||||
* - data-behavior="filter" - enables the filter plugin
|
||||
*
|
||||
* Dependences:
|
||||
* - October Popover (october.popover.js)
|
||||
*/
|
||||
+function ($) { "use strict";
|
||||
|
||||
var FilterWidget = function (element, options) {
|
||||
|
||||
var $el = this.$el = $(element);
|
||||
|
||||
this.options = options || {}
|
||||
this.scopeValues = {}
|
||||
this.$activeScope = null
|
||||
this.activeScopeName = null
|
||||
this.isActiveScopeDirty = false
|
||||
|
||||
this.init()
|
||||
}
|
||||
|
||||
FilterWidget.DEFAULTS = {
|
||||
optionsHandler: null,
|
||||
updateHandler: null
|
||||
}
|
||||
|
||||
/*
|
||||
* Get popover template
|
||||
*/
|
||||
FilterWidget.prototype.getPopoverTemplate = function() {
|
||||
return ' \
|
||||
<form> \
|
||||
<input type="hidden" name="scopeName" value="{{ scopeName }}" /> \
|
||||
<div id="controlFilterPopover" class="control-filter-popover"> \
|
||||
<div class="filter-search loading-indicator-container size-input-text"> \
|
||||
<button class="close" data-dismiss="popover" type="button">×</button> \
|
||||
<input \
|
||||
type="text" \
|
||||
name="search" \
|
||||
autocomplete="off" \
|
||||
class="filter-search-input form-control icon search" \
|
||||
data-request="{{ optionsHandler }}" \
|
||||
data-load-indicator-opaque \
|
||||
data-load-indicator \
|
||||
data-track-input /> \
|
||||
</div> \
|
||||
<div class="filter-items"> \
|
||||
<ul> \
|
||||
{{#available}} \
|
||||
<li data-item-id="{{id}}"><a href="javascript:;">{{name}}</a></li> \
|
||||
{{/available}} \
|
||||
{{#loading}} \
|
||||
<li class="loading"><span></span></li> \
|
||||
{{/loading}} \
|
||||
</ul> \
|
||||
</div> \
|
||||
<div class="filter-active-items"> \
|
||||
<ul> \
|
||||
{{#active}} \
|
||||
<li data-item-id="{{id}}"><a href="javascript:;">{{name}}</a></li> \
|
||||
{{/active}} \
|
||||
</ul> \
|
||||
</div> \
|
||||
</div> \
|
||||
</form> \
|
||||
'
|
||||
}
|
||||
|
||||
FilterWidget.prototype.init = function() {
|
||||
var self = this
|
||||
|
||||
this.$el.on('change', '.filter-scope input[type="checkbox"]', function(){
|
||||
var isChecked = $(this).is(':checked'),
|
||||
$scope = $(this).closest('.filter-scope'),
|
||||
scopeName = $scope.data('scope-name')
|
||||
|
||||
self.scopeValues[scopeName] = isChecked
|
||||
self.checkboxToggle(scopeName, isChecked)
|
||||
})
|
||||
|
||||
this.$el.on('click', 'a.filter-scope', function(){
|
||||
var $scope = $(this),
|
||||
scopeName = $scope.data('scope-name')
|
||||
|
||||
// Second click closes the filter scope
|
||||
if ($scope.hasClass('filter-scope-open')) return
|
||||
|
||||
self.$activeScope = $scope
|
||||
self.activeScopeName = scopeName
|
||||
self.isActiveScopeDirty = false
|
||||
self.displayPopover($scope)
|
||||
$scope.addClass('filter-scope-open')
|
||||
})
|
||||
|
||||
this.$el.on('show.oc.popover', 'a.filter-scope', function(){
|
||||
self.focusSearch()
|
||||
})
|
||||
|
||||
this.$el.on('hide.oc.popover', 'a.filter-scope', function(){
|
||||
var $scope = $(this)
|
||||
self.pushOptions(self.activeScopeName)
|
||||
self.activeScopeName = null
|
||||
self.$activeScope = null
|
||||
|
||||
// Second click closes the filter scope
|
||||
setTimeout(function() { $scope.removeClass('filter-scope-open') }, 200)
|
||||
})
|
||||
|
||||
$(document).on('click', '#controlFilterPopover .filter-items > ul > li', function(){
|
||||
self.selectItem($(this))
|
||||
})
|
||||
|
||||
$(document).on('click', '#controlFilterPopover .filter-active-items > ul > li', function(){
|
||||
self.selectItem($(this), true)
|
||||
})
|
||||
|
||||
$(document).on('ajaxDone', '#controlFilterPopover input.filter-search-input', function(event, context, data){
|
||||
self.filterAvailable(data.scopeName, data.options.available)
|
||||
})
|
||||
}
|
||||
|
||||
FilterWidget.prototype.focusSearch = function() {
|
||||
if (Modernizr.touch)
|
||||
return
|
||||
|
||||
var $input = $('#controlFilterPopover input.filter-search-input'),
|
||||
length = $input.val().length
|
||||
|
||||
$input.focus()
|
||||
$input.get(0).setSelectionRange(length, length)
|
||||
}
|
||||
|
||||
FilterWidget.prototype.updateScopeSetting = function($scope, amount) {
|
||||
var $setting = $scope.find('.filter-setting')
|
||||
|
||||
if (amount) {
|
||||
$setting.text(amount)
|
||||
$scope.addClass('active')
|
||||
}
|
||||
else {
|
||||
$setting.text('all')
|
||||
$scope.removeClass('active')
|
||||
}
|
||||
}
|
||||
|
||||
FilterWidget.prototype.selectItem = function($item, isDeselect) {
|
||||
var $otherContainer = isDeselect
|
||||
? $item.closest('.control-filter-popover').find('.filter-items:first > ul')
|
||||
: $item.closest('.control-filter-popover').find('.filter-active-items:first > ul')
|
||||
|
||||
$item
|
||||
.addClass('animate-enter')
|
||||
.prependTo($otherContainer)
|
||||
.one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function(){
|
||||
$(this).removeClass('animate-enter')
|
||||
})
|
||||
|
||||
if (!this.scopeValues[this.activeScopeName])
|
||||
return
|
||||
|
||||
var
|
||||
itemId = $item.data('item-id'),
|
||||
items = this.scopeValues[this.activeScopeName],
|
||||
fromItems = isDeselect ? items.active : items.available,
|
||||
toItems = isDeselect ? items.available : items.active,
|
||||
testFunc = function(item){ return item.id == itemId },
|
||||
item = $.grep(fromItems, testFunc).pop(),
|
||||
filtered = $.grep(fromItems, testFunc, true)
|
||||
|
||||
if (isDeselect)
|
||||
this.scopeValues[this.activeScopeName].active = filtered
|
||||
else
|
||||
this.scopeValues[this.activeScopeName].available = filtered
|
||||
|
||||
if (item)
|
||||
toItems.push(item)
|
||||
|
||||
this.updateScopeSetting(this.$activeScope, items.active.length)
|
||||
this.isActiveScopeDirty = true
|
||||
this.focusSearch()
|
||||
}
|
||||
|
||||
FilterWidget.prototype.displayPopover = function($scope) {
|
||||
var self = this,
|
||||
scopeName = $scope.data('scope-name'),
|
||||
data = this.scopeValues[scopeName]
|
||||
|
||||
if (!data) {
|
||||
self.loadOptions(scopeName)
|
||||
data = { loading: true }
|
||||
}
|
||||
|
||||
data.scopeName = scopeName
|
||||
data.optionsHandler = self.options.optionsHandler
|
||||
|
||||
// Destroy any popovers already bound
|
||||
$scope.data('oc.popover', null)
|
||||
|
||||
$scope.ocPopover({
|
||||
content: Mustache.render(self.getPopoverTemplate(), data),
|
||||
modal: false,
|
||||
highlightModalTarget: true,
|
||||
closeOnPageClick: true,
|
||||
placement: 'bottom'
|
||||
})
|
||||
}
|
||||
|
||||
FilterWidget.prototype.loadOptions = function(scopeName) {
|
||||
var $form = this.$el.closest('form'),
|
||||
self = this,
|
||||
data = { scopeName: scopeName }
|
||||
|
||||
$form.request(this.options.optionsHandler, {
|
||||
data: data,
|
||||
success: function(data) {
|
||||
|
||||
if (self.scopeValues[scopeName])
|
||||
return
|
||||
|
||||
self.scopeValues[scopeName] = data.options
|
||||
|
||||
// Do not render if scope has changed
|
||||
if (scopeName != self.activeScopeName)
|
||||
return
|
||||
|
||||
/*
|
||||
* Inject available
|
||||
*/
|
||||
if (data.options.available) {
|
||||
var container = $('#controlFilterPopover .filter-items > ul').empty()
|
||||
self.addItemsToListElement(container, data.options.available)
|
||||
}
|
||||
|
||||
/*
|
||||
* Inject active
|
||||
*/
|
||||
if (data.options.active) {
|
||||
var container = $('#controlFilterPopover .filter-active-items > ul')
|
||||
self.addItemsToListElement(container, data.options.active)
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
FilterWidget.prototype.filterAvailable = function(scopeName, available) {
|
||||
if (this.activeScopeName != scopeName)
|
||||
return
|
||||
|
||||
if (!this.scopeValues[this.activeScopeName])
|
||||
return
|
||||
|
||||
var
|
||||
self = this,
|
||||
filtered = [],
|
||||
items = this.scopeValues[scopeName]
|
||||
|
||||
/*
|
||||
* Ensure any active items do not appear in the search results
|
||||
*/
|
||||
if (items.active.length) {
|
||||
var compareFunc = function(a, b) { return a.id == b.id },
|
||||
inArrayFunc = function(elem, array, testFunc) {
|
||||
var i = array.length
|
||||
do { if (i-- === 0) return i } while (testFunc(array[i], elem))
|
||||
return i
|
||||
}
|
||||
|
||||
filtered = $.grep(available, function(item) {
|
||||
return !inArrayFunc(item, items.active, compareFunc)
|
||||
})
|
||||
}
|
||||
else {
|
||||
filtered = available
|
||||
}
|
||||
|
||||
var container = $('#controlFilterPopover .filter-items > ul').empty()
|
||||
self.addItemsToListElement(container, filtered)
|
||||
}
|
||||
|
||||
FilterWidget.prototype.addItemsToListElement = function($ul, items) {
|
||||
$.each(items, function(key, obj){
|
||||
var item = $('<li />').data({ 'item-id': obj.id })
|
||||
.append($('<a />').prop({ 'href': 'javascript:;',}).text(obj.name))
|
||||
|
||||
$ul.append(item)
|
||||
})
|
||||
}
|
||||
|
||||
FilterWidget.prototype.pushOptions = function(scopeName) {
|
||||
if (!this.isActiveScopeDirty)
|
||||
return
|
||||
|
||||
var $form = this.$el.closest('form'),
|
||||
data = {
|
||||
scopeName: scopeName,
|
||||
options: this.scopeValues[scopeName]
|
||||
}
|
||||
|
||||
$.oc.stripeLoadIndicator.show()
|
||||
$form.request(this.options.updateHandler, {
|
||||
data: data
|
||||
}).always(function(){
|
||||
$.oc.stripeLoadIndicator.hide()
|
||||
})
|
||||
}
|
||||
|
||||
FilterWidget.prototype.checkboxToggle = function(scopeName, isChecked) {
|
||||
var $form = this.$el.closest('form'),
|
||||
data = {
|
||||
scopeName: scopeName,
|
||||
value: isChecked
|
||||
}
|
||||
|
||||
$.oc.stripeLoadIndicator.show()
|
||||
$form.request(this.options.updateHandler, {
|
||||
data: data
|
||||
}).always(function(){
|
||||
$.oc.stripeLoadIndicator.hide()
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// FILTER WIDGET PLUGIN DEFINITION
|
||||
// ============================
|
||||
|
||||
var old = $.fn.filterWidget
|
||||
|
||||
$.fn.filterWidget = function (option) {
|
||||
var args = arguments,
|
||||
result
|
||||
|
||||
this.each(function () {
|
||||
var $this = $(this)
|
||||
var data = $this.data('oc.filterwidget')
|
||||
var options = $.extend({}, FilterWidget.DEFAULTS, $this.data(), typeof option == 'object' && option)
|
||||
if (!data) $this.data('oc.filterwidget', (data = new FilterWidget(this, options)))
|
||||
if (typeof option == 'string') result = data[option].call($this)
|
||||
if (typeof result != 'undefined') return false
|
||||
})
|
||||
|
||||
return result ? result : this
|
||||
}
|
||||
|
||||
$.fn.filterWidget.Constructor = FilterWidget
|
||||
|
||||
// FILTER WIDGET NO CONFLICT
|
||||
// =================
|
||||
|
||||
$.fn.filterWidget.noConflict = function () {
|
||||
$.fn.filterWidget = old
|
||||
return this
|
||||
}
|
||||
|
||||
// FILTER WIDGET DATA-API
|
||||
// ==============
|
||||
|
||||
$(document).render(function(){
|
||||
$('[data-control="filterwidget"]').filterWidget();
|
||||
})
|
||||
|
||||
}(window.jQuery);
|
||||
|
||||
|
|
@ -1,48 +1,9 @@
|
|||
<div class="control-filter">
|
||||
<div
|
||||
class="control-filter"
|
||||
data-control="filterwidget"
|
||||
data-options-handler="<?= $this->getEventHandler('onFilterGetOptions') ?>"
|
||||
data-update-handler="<?= $this->getEventHandler('onFilterUpdate') ?>">
|
||||
|
||||
<a class="filter-set" href="javascript:;">
|
||||
<span class="filter-label">Categories:</span>
|
||||
<span class="filter-setting">all</span>
|
||||
</a>
|
||||
|
||||
<a class="filter-set active" href="javascript:;">
|
||||
<span class="filter-label">Statuses:</span>
|
||||
<span class="filter-setting">2</span>
|
||||
</a>
|
||||
<?= $this->makePartial('filter_scopes') ?>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$('.control-filter').on('click', 'a.filter-set', function(){
|
||||
$(this).ocPopover({
|
||||
content: $('#popovertemplate').html(),
|
||||
modal: false,
|
||||
highlightModalTarget: true,
|
||||
closeOnPageClick: true,
|
||||
placement: 'bottom'
|
||||
})
|
||||
|
||||
return false
|
||||
})
|
||||
</script>
|
||||
|
||||
<script type="text/template" id="popovertemplate">
|
||||
<div class="control-filter-popover">
|
||||
<div class="filter-search">
|
||||
<input type="text" class="form-control" />
|
||||
</div>
|
||||
<div class="filter-items">
|
||||
<ul>
|
||||
<li><a href="#">Deleted</a></li>
|
||||
<li><a href="#">Deployed</a></li>
|
||||
<li><a href="#">Detailed</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="filter-active-items">
|
||||
<ul>
|
||||
<li><a href="#">Published</a></li>
|
||||
<li><a href="#">Draft</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,3 @@
|
|||
<?php foreach ($scopes as $scope): ?>
|
||||
<?= $this->renderScopeElement($scope) ?>
|
||||
<?php endforeach ?>
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
<!-- Checkbox scope -->
|
||||
<div
|
||||
class="filter-scope checkbox custom-checkbox"
|
||||
data-scope-name="<?= $scope->scopeName ?>">
|
||||
<input type="checkbox" id="<?= $scope->getId() ?>" <?= $scope->value ? 'checked' : '' ?> />
|
||||
<label for="<?= $scope->getId() ?>"><?= e($scope->label) ?></label>
|
||||
</div>
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
<!-- Group scope -->
|
||||
<a
|
||||
class="filter-scope <?= $scope->value ? 'active' : '' ?>"
|
||||
href="javascript:;"
|
||||
data-scope-name="<?= $scope->scopeName ?>">
|
||||
<span class="filter-label"><?= e($scope->label) ?>:</span>
|
||||
<span class="filter-setting"><?= $scope->value ? count($scope->value) : 'all' ?></span>
|
||||
</a>
|
||||
|
|
@ -5,7 +5,7 @@
|
|||
<div data-control="balloon-selector" id="<?= $field->getId() ?>" <?= HTML::attributes($field->attributes) ?>>
|
||||
<ul>
|
||||
<?php foreach ($fieldOptions as $value => $text): ?>
|
||||
<li data-value="<?= e($value) ?>" class="<?= $value == $field->value ? 'active' : '' ?>"><?= e($text) ?></li>
|
||||
<li data-value="<?= e($value) ?>" class="<?= $value == $field->value ? 'active' : '' ?>"><?= e(trans($text)) ?></li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<!-- Switch -->
|
||||
<div class="field-switch">
|
||||
<label><?= $field->label ?></label>
|
||||
<label><?= e(trans($field->label)) ?></label>
|
||||
<?php if ($field->comment): ?>
|
||||
<p class="help-block"><?= e(trans($field->comment)) ?></p>
|
||||
<?php endif ?>
|
||||
|
|
|
|||
|
|
@ -2,5 +2,5 @@
|
|||
href="javascript:;"
|
||||
class="btn btn-sm btn-default oc-icon-minus-square"
|
||||
onclick="$(this).closest('.datagrid-widget').find('[data-control=datagrid]').dataGrid('removeRow')">
|
||||
Delete Row
|
||||
<?= e(trans('backend::lang.form.delete_row')) ?>
|
||||
</a>
|
||||
|
|
@ -2,5 +2,5 @@
|
|||
href="javascript:;"
|
||||
class="btn btn-sm btn-default oc-icon-plus-square"
|
||||
onclick="$(this).closest('.datagrid-widget').find('[data-control=datagrid]').dataGrid('insertRow')">
|
||||
Insert Row
|
||||
<?= e(trans('backend::lang.form.insert_row')) ?>
|
||||
</a>
|
||||
|
|
@ -1,14 +1,16 @@
|
|||
<div class="loading-indicator-container size-small pull-right">
|
||||
<div class="control-pagination">
|
||||
<span class="page-iteration">Displayed records: <?= $pageFrom ?>-<?= $pageTo ?> of <?= $recordTotal ?></span>
|
||||
<span class="page-iteration">
|
||||
<?= e(trans('backend::lang.list.pagination', ['from' => $pageFrom, 'to' => $pageTo, 'total' => $recordTotal])) ?>
|
||||
</span>
|
||||
<?php if ($pageCurrent > 1): ?>
|
||||
<a
|
||||
href="javascript:;"
|
||||
class="page-back"
|
||||
data-request="<?= $this->getEventHandler('onPaginate') ?>"
|
||||
data-request-data="page: <?= $pageCurrent-1 ?>"
|
||||
data-load-indicator="Loading..."
|
||||
title="Previous page"></a>
|
||||
data-load-indicator="<?= e(trans('backend::lang.list.loading')) ?>"
|
||||
title="<?= e(trans('backend::lang.list.prev_page')) ?>"></a>
|
||||
<?php endif ?>
|
||||
<?php if ($pageLast > $pageCurrent): ?>
|
||||
<a
|
||||
|
|
@ -16,8 +18,8 @@
|
|||
class="page-next"
|
||||
data-request-data="page: <?= $pageCurrent+1 ?>"
|
||||
data-request="<?= $this->getEventHandler('onPaginate') ?>"
|
||||
data-load-indicator="Loading..."
|
||||
title="Next page"></a>
|
||||
data-load-indicator="<?= e(trans('backend::lang.list.loading')) ?>"
|
||||
title="<?= e(trans('backend::lang.list.next_page')) ?>"></a>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1,13 +1,10 @@
|
|||
<?= Form::open() ?>
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="popup">×</button>
|
||||
<h4 class="modal-title">List Setup</h4>
|
||||
<h4 class="modal-title"><?= e(trans('backend::lang.list.setup_title')) ?></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p>
|
||||
Use checkboxes to select columns you want to see in the list.
|
||||
You can change position of columns by dragging them up or down.
|
||||
</p>
|
||||
<p><?= e(trans('backend::lang.list.setup_help')) ?></p>
|
||||
|
||||
<div class="control-simplelist with-checkboxes is-sortable" data-control="simplelist">
|
||||
<ul>
|
||||
|
|
@ -37,10 +34,9 @@
|
|||
|
||||
<?php if ($this->showPagination): ?>
|
||||
<div class="form-group">
|
||||
<label>Records per page</label>
|
||||
<label><?= e(trans('backend::lang.list.records_per_page')) ?></label>
|
||||
<p class="help-block">
|
||||
Select the number of records per page to display.
|
||||
Please note that high number of records on a single page can reduce performance.
|
||||
<?= e(trans('backend::lang.list.records_per_page_help')) ?>
|
||||
</p>
|
||||
<select class="form-control custom-select" name="records_per_page">
|
||||
<?php foreach ($perPageOptions as $optionValue): ?>
|
||||
|
|
@ -58,13 +54,13 @@
|
|||
data-request="<?= $this->getEventHandler('onApplySetup') ?>"
|
||||
data-dismiss="popup"
|
||||
data-stripe-load-indicator>
|
||||
Apply changes
|
||||
<?= e(trans('backend::lang.list.apply_changes')) ?>
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-default"
|
||||
data-dismiss="popup">
|
||||
Cancel
|
||||
<?= e(trans('backend::lang.list.cancel')) ?>
|
||||
</button>
|
||||
</div>
|
||||
<?= Form::close() ?>
|
||||
|
|
@ -13,7 +13,7 @@
|
|||
<select class="form-control custom-select" name="className" data-placeholder="please select">
|
||||
<option></option>
|
||||
<?php foreach ($widgets as $className => $widgetInfo):?>
|
||||
<option value="<?= e($className) ?>"><?= isset($widgetInfo['label']) ? e($widgetInfo['label']) : $className ?></option>
|
||||
<option value="<?= e($className) ?>"><?= isset($widgetInfo['label']) ? e(trans($widgetInfo['label'])) : $className ?></option>
|
||||
<?php endforeach ?>
|
||||
</select>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -11,8 +11,8 @@
|
|||
<a href="javascript:;"
|
||||
class="oc-icon-cog widget-control edit-widget"
|
||||
data-inspectable
|
||||
data-inspector-title="Widget configuration"
|
||||
data-inspector-description="Configure the report widget"
|
||||
data-inspector-title="<?= e(trans('backend::lang.dashboard.widget_inspector_title')) ?>"
|
||||
data-inspector-description="<?= e(trans('backend::lang.dashboard.widget_inspector_description')) ?>"
|
||||
data-inspector-config="<?= e($this->getWidgetPropertyConfig($widget)) ?>"
|
||||
data-inspector-class="<?= get_class($widget) ?>"
|
||||
data-inspector-offset="-3"
|
||||
|
|
|
|||
|
|
@ -86,12 +86,12 @@ class ServiceProvider extends ModuleServiceProvider
|
|||
*/
|
||||
BackendAuth::registerCallback(function($manager) {
|
||||
$manager->registerPermissions('October.Cms', [
|
||||
'cms.manage_content' => ['label' => 'Manage content', 'tab' => 'Cms'],
|
||||
'cms.manage_assets' => ['label' => 'Manage assets', 'tab' => 'Cms'],
|
||||
'cms.manage_pages' => ['label' => 'Manage pages', 'tab' => 'Cms'],
|
||||
'cms.manage_layouts' => ['label' => 'Manage layouts', 'tab' => 'Cms'],
|
||||
'cms.manage_partials' => ['label' => 'Manage partials', 'tab' => 'Cms'],
|
||||
'cms.manage_themes' => ['label' => 'Manage themes', 'tab' => 'Cms']
|
||||
'cms.manage_content' => ['label' => 'cms::lang.permissions.manage_content', 'tab' => 'Cms'],
|
||||
'cms.manage_assets' => ['label' => 'cms::lang.permissions.manage_assets', 'tab' => 'Cms'],
|
||||
'cms.manage_pages' => ['label' => 'cms::lang.permissions.manage_pages', 'tab' => 'Cms'],
|
||||
'cms.manage_layouts' => ['label' => 'cms::lang.permissions.manage_layouts', 'tab' => 'Cms'],
|
||||
'cms.manage_partials' => ['label' => 'cms::lang.permissions.manage_partials', 'tab' => 'Cms'],
|
||||
'cms.manage_themes' => ['label' => 'cms::lang.permissions.manage_themes', 'tab' => 'Cms']
|
||||
]);
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ abstract class ComponentBase extends Extendable
|
|||
/**
|
||||
* @var array Cache of linked Component objects, used for page links.
|
||||
*/
|
||||
protected $pageLinkCache = [];
|
||||
// protected $pageLinkCache = [];
|
||||
|
||||
/**
|
||||
* Component constructor. Takes in the page or layout code section object
|
||||
|
|
|
|||
|
|
@ -264,8 +264,18 @@ class Controller extends BaseController
|
|||
$this->twig->addExtension(new SystemTwigExtension);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the Twig environment.
|
||||
* @return Twig_Environment
|
||||
*/
|
||||
public function getTwig()
|
||||
{
|
||||
return $this->twig;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes the custom layout and page objects.
|
||||
* @return void
|
||||
*/
|
||||
protected function initCustomObjects()
|
||||
{
|
||||
|
|
@ -286,6 +296,7 @@ class Controller extends BaseController
|
|||
|
||||
/**
|
||||
* Initializes the components for the layout and page.
|
||||
* @return void
|
||||
*/
|
||||
protected function initComponents()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -100,7 +100,9 @@ return [
|
|||
'code' => 'Code',
|
||||
'content' => 'Content',
|
||||
'hidden' => 'Hidden',
|
||||
'hidden_comment' => 'Hidden pages are accessible only by logged-in back-end users.'
|
||||
'hidden_comment' => 'Hidden pages are accessible only by logged-in back-end users.',
|
||||
'enter_fullscreen' => 'Enter fullscreen mode',
|
||||
'exit_fullscreen' => 'Exit fullscreen mode'
|
||||
],
|
||||
'asset' => [
|
||||
'menu_label' => "Assets",
|
||||
|
|
@ -109,9 +111,12 @@ return [
|
|||
'upload_files' => 'Upload file(s)',
|
||||
'create_file' => 'Create file',
|
||||
'create_directory' => 'Create directory',
|
||||
'directory_popup_title' => 'New directory',
|
||||
'directory_name' => 'Directory name',
|
||||
'rename' => 'Rename',
|
||||
'delete' => 'Delete',
|
||||
'move' => 'Move',
|
||||
'select' => 'Select',
|
||||
'new' => 'New file',
|
||||
'rename_popup_title' => 'Rename',
|
||||
'rename_new_name' => 'New name',
|
||||
|
|
@ -156,5 +161,13 @@ return [
|
|||
'invalid_type' => "Unknown template type.",
|
||||
'not_found' => "The requested template was not found.",
|
||||
'saved'=> "The template has been successfully saved."
|
||||
],
|
||||
'permissions' => [
|
||||
'manage_content' => 'Manage content',
|
||||
'manage_assets' => 'Manage assets',
|
||||
'manage_pages' => 'Manage pages',
|
||||
'manage_layouts' => 'Manage layouts',
|
||||
'manage_partials' => 'Manage partials',
|
||||
'manage_themes' => 'Manage themes'
|
||||
]
|
||||
];
|
||||
|
|
@ -0,0 +1,170 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
'cms_object' => [
|
||||
'invalid_file' => 'Nome file non valido: :name. I nomi dei file possono contenere solo caratteri alfanumerici, underscores, trattini e punti. Alcuni esempi di nome di file corretti: page.htm, page, subdirectory/page',
|
||||
'invalid_property' => 'La proprietà ":name" non può essere impostata',
|
||||
'file_already_exists' => 'File ":name" già esistente.',
|
||||
'error_saving' => 'Errore nel salvataggio del file ":name". Verifica le autorizzazioni di scrittura.',
|
||||
'error_creating_directory' => 'Errore nella creazione della cartella :name. Verifica le autorizzazioni di scrittura.',
|
||||
'invalid_file_extension'=>'Estensione del file non valida: :invalid. Le estensioni consentite sono: :allowed.',
|
||||
'error_deleting' => 'Errore nella cancellazione del file ":name". Verifica le autorizzazioni di scrittura.',
|
||||
'delete_success' => 'File eliminati correttamente: :count.',
|
||||
'file_name_required' => 'Il campo Nome file è obbligatorio.'
|
||||
],
|
||||
'theme' => [
|
||||
'active' => [
|
||||
'not_set' => "Il tema attivo non è impostato.",
|
||||
'not_found' => "Il tema attivo non è stato trovato.",
|
||||
],
|
||||
'edit' => [
|
||||
'not_set' => "Il tema di modifica non è impostato.",
|
||||
'not_found' => "Il tema di modifica non è stato trovato.",
|
||||
'not_match' => "L'oggetto a cui stai cercando di accedere non appartiene al tema che stai modificando. Si prega di ricaricare la pagina."
|
||||
],
|
||||
'settings_menu' => 'Tema del sito',
|
||||
'settings_menu_description' => 'Visualizza l\'anteprima dei temi installati e seleziona un tema attivo.',
|
||||
'find_more_themes' => 'Trova altri temi su OctoberCMS Theme Marketplace.',
|
||||
'activate_button' => 'Attiva',
|
||||
'active_button' => 'Attivo',
|
||||
],
|
||||
'page' => [
|
||||
'not_found' => [
|
||||
'label' => "Pagina non trovata",
|
||||
'help' => "La pagina richiesta non è stata trovata.",
|
||||
],
|
||||
'custom_error' => [
|
||||
'label' => "Errore nella pagina",
|
||||
'help' => "Siamo spiacenti, ma qualcosa è andato storto e la pagina non può essere visualizzata.",
|
||||
],
|
||||
'menu_label' => 'Pagine',
|
||||
'no_list_records' => 'Pagine non trovate',
|
||||
'new' => 'Nuova pagina',
|
||||
'invalid_url' => 'Formato URL non valido. L\'URL deve iniziare con una barra e può contenere numeri, lettere e i seguenti simboli: _-[]:?|/+*',
|
||||
'delete_confirm_multiple' => 'Sei sicuro di voler eliminare le pagine selezionate?',
|
||||
'delete_confirm_single' => 'Sei sicuro di voler eliminare questa pagina?',
|
||||
'no_layout' => '-- nessun layout --'
|
||||
],
|
||||
'layout' => [
|
||||
'not_found' => "Il layout ':name' non è stato trovato",
|
||||
'menu_label' => 'Layouts',
|
||||
'no_list_records' => 'Nessun layout trovato',
|
||||
'new' => 'Nuovo layout',
|
||||
'delete_confirm_multiple' => 'Sei sicuro di voler eliminare i layouts selezionati?',
|
||||
'delete_confirm_single' => 'Sei sicuro di voler eliminare questo layout?'
|
||||
],
|
||||
'partial' => [
|
||||
'invalid_name' => "Nome della vista parziale non valido: :name.",
|
||||
'not_found' => "La vista parziale ':name' non è stata trovata.",
|
||||
'menu_label' => 'Viste parziali',
|
||||
'no_list_records' => 'Nessuna vista parziale trovata',
|
||||
'delete_confirm_multiple' => 'Sei sicuro di voler eliminare le viste parziali selezionate?',
|
||||
'delete_confirm_single' => 'Sei sicuro di voler eliminare questa vista parziale?',
|
||||
'new' => 'Nuova vista parziale'
|
||||
],
|
||||
'content' => [
|
||||
'not_found' => "Il file di contenuto ':name' non è stato trovato.",
|
||||
'menu_label' => 'Contenuti',
|
||||
'no_list_records' => 'Nessun file di contenuto trovato',
|
||||
'delete_confirm_multiple' => 'Sei sicuro di voler eliminare i file o le cartelle di contenuti selezionate?',
|
||||
'delete_confirm_single' => 'Sei sicuro di voler eliminare questo file di contenuti?',
|
||||
'new' => 'Nuovo file di contenuti'
|
||||
],
|
||||
'ajax_handler' => [
|
||||
'invalid_name' => "Nome del gestore AJAX non valido: :name.",
|
||||
'not_found' => "Il gestore AJAX ':name' non è stato trovato.",
|
||||
],
|
||||
'combiner' => [
|
||||
'not_found' => "Il file combinatore ':name' non è stato trovato.",
|
||||
],
|
||||
'cms' => [
|
||||
'menu_label' => "CMS"
|
||||
],
|
||||
'sidebar' => [
|
||||
'add' => 'Aggiungi',
|
||||
'search' => 'Cerca...'
|
||||
],
|
||||
'editor' => [
|
||||
'settings' => 'Impostazioni',
|
||||
'title' => 'Titolo',
|
||||
'new_title' => 'Titolo nuova pagina',
|
||||
'url' => 'URL',
|
||||
'filename' => 'Nome file',
|
||||
'layout' => 'Layout',
|
||||
'description' => 'Descrizione',
|
||||
'preview' => 'Anteprima',
|
||||
'meta' => 'Metadati',
|
||||
'meta_title' => 'Meta Titolo',
|
||||
'meta_description' => 'Meta Descrizione',
|
||||
'markup' => 'Marcatore',
|
||||
'code' => 'Codice',
|
||||
'content' => 'Contenuto',
|
||||
'hidden' => 'Nascosto',
|
||||
'hidden_comment' => 'Le pagine nascoste sono accessibili sono dagli utenti registrati.',
|
||||
'enter_fullscreen' => 'Visualizza a schermo intero',
|
||||
'exit_fullscreen' => 'Esci dalla visualizzazione a schermo intero'
|
||||
],
|
||||
'asset' => [
|
||||
'menu_label' => "Assets",
|
||||
'drop_down_add_title' => 'Agiungi...',
|
||||
'drop_down_operation_title' => 'Azioni...',
|
||||
'upload_files' => 'Carica file(s)',
|
||||
'create_file' => 'Crea file',
|
||||
'create_directory' => 'Crea cartella',
|
||||
'rename' => 'Rinomina',
|
||||
'delete' => 'Elimina',
|
||||
'move' => 'Sposta',
|
||||
'new' => 'Nuovo file',
|
||||
'rename_popup_title' => 'Rinomina',
|
||||
'rename_new_name' => 'Nuovo nome',
|
||||
'invalid_path' => 'Il percorso può contenere solo numeri, lettere, spazi e i simboli seguenti: ._-/',
|
||||
'error_deleting_file' => 'Errore durante l\'eliminazione del file :name.',
|
||||
'error_deleting_dir_not_empty' => 'Errore durante l\'eliminazione della cartella :name. La cartella non è vuota.',
|
||||
'error_deleting_dir' => 'Errore durante l\'eliminazinoe della cartella :name.',
|
||||
'invalid_name' => 'Il nome può contenere solo numeri, lettere, spazi e i simboli seguenti: ._-',
|
||||
'original_not_found' => 'Il file o la cartella originali non sono stati trovati',
|
||||
'already_exists' => 'Un file o cartella con questo nome è già esistente',
|
||||
'error_renaming' => 'Errore nella rinominazione del file o della cartella',
|
||||
'name_cant_be_empty' => 'Il nome non può essere vuoto',
|
||||
'too_large' => 'Il file caricato è troppo grande. La dimensione massima consentita è :max_size',
|
||||
'type_not_allowed' => 'Solo i seguenti tipi di file sono consentiti: :allowed_types',
|
||||
'file_not_valid' => 'File non valido',
|
||||
'error_uploading_file' => 'Errore durante il caricamento del file ":name": :error',
|
||||
'move_please_select' => 'Seleziona',
|
||||
'move_destination' => 'Cartella di destinazione',
|
||||
'move_popup_title' => 'Sposta assets',
|
||||
'move_button' => 'Sposta',
|
||||
'selected_files_not_found' => 'Files selezionati non trovati.',
|
||||
'select_destination_dir' => 'Seleziona una cartella di destinazione',
|
||||
'destination_not_found' => 'Cartella di destinazione non trovata',
|
||||
'error_moving_file' => 'Errore durante lo spostamento del file :file',
|
||||
'error_moving_directory' => 'Errore durante lo spostamento della cartella :dir',
|
||||
'error_deleting_directory' => 'Errore durante l\'eliminazione della cartella originale :dir',
|
||||
'path' => 'Percorso'
|
||||
],
|
||||
'component' => [
|
||||
'menu_label' => "Componenti",
|
||||
'unnamed' => "Senza nome",
|
||||
'no_description' => "Nessuna descrizione fornita",
|
||||
'alias' => "Alias",
|
||||
'alias_description' => "Un nome univoco fornito a questo componente quando utilizzato nella pagina o nel layout.",
|
||||
'validation_message' => "L'alias del componente è obbligatorio e può contenere solo lettere, numeri e underscores. L'alias deve iniziare con una lettera.",
|
||||
'invalid_request' => "Il modello non può essere salvato a causa di dati dei componenti non validi.",
|
||||
'no_records' => 'Nessun componente trovato',
|
||||
'not_found' => "Il componente ':name' non è stato trovato.",
|
||||
'method_not_found' => "Il componente ':name' non contiene il metodo ':method'.",
|
||||
],
|
||||
'template' => [
|
||||
'invalid_type' => "Tipo di modello non valido.",
|
||||
'not_found' => "Il modello richiesto non è stato trovato.",
|
||||
'saved'=> "Il modello è stato salvato con successo."
|
||||
],
|
||||
'permissions' => [
|
||||
'manage_content' => 'Gestisci contenuti',
|
||||
'manage_assets' => 'Gestisci assets',
|
||||
'manage_pages' => 'Gestisci pagine',
|
||||
'manage_layouts' => 'Gesstisci layouts',
|
||||
'manage_partials' => 'Gestisci viste parziali',
|
||||
'manage_themes' => 'Gestisci temi'
|
||||
]
|
||||
];
|
||||
|
|
@ -5,10 +5,10 @@ return [
|
|||
'invalid_file' => "Ошибка в имени файла: :name. Имена файлов могут содержать только латинские буквы, цифры, знаки подчеркивания и точки. Пример правильных имен файлов: page.htm, page, subdirectory/page",
|
||||
'invalid_property' => 'Параметр ":name" нельзя изменить.',
|
||||
'file_already_exists' => 'Файл ":name" уже существует.',
|
||||
'error_saving' => 'Ошибка сохранения файла ":name".',
|
||||
'error_creating_directory' => 'Ошибка создания директории :name',
|
||||
'error_saving' => 'Ошибка сохранения файла ":name". Пожалуйста, проверьте права на запись.',
|
||||
'error_creating_directory' => 'Ошибка создания директории :name. Пожалуйста, проверьте права на запись.',
|
||||
'invalid_file_extension'=>'Указано неправильное расширение файла: :invalid. Разрешенные расширения: :allowed.',
|
||||
'error_deleting' => 'Невозможно удалить файл шаблона :name.',
|
||||
'error_deleting' => 'Невозможно удалить файл шаблона :name. Пожалуйста, проверьте права на запись.',
|
||||
'delete_success' => 'Шаблоны были успешно удалены: :count.',
|
||||
'file_name_required' => 'Пожалуйста, укажите имя файла шаблона.'
|
||||
],
|
||||
|
|
|
|||
|
|
@ -640,7 +640,7 @@ class AssetList extends WidgetBase
|
|||
if ($this->pathMatchesSearch($words, $path)) {
|
||||
$result[] = (object)[
|
||||
'type'=>'file',
|
||||
'path'=>$path,
|
||||
'path'=>File::normalizePath($path),
|
||||
'name'=>$item->getFilename(),
|
||||
'editable'=>in_array(strtolower($item->getExtension()), $editableAssetTypes)
|
||||
];
|
||||
|
|
@ -664,4 +664,4 @@ class AssetList extends WidgetBase
|
|||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
<?php
|
||||
$searchMode = $this->isSearchMode();
|
||||
|
||||
if (($upPath = $this->getUpPath()) !== null && !$searchMode):
|
||||
if (($upPath = $this->getUpPath()) !== null && !$searchMode):
|
||||
?>
|
||||
<p class="parent">
|
||||
<a href="<?= $upPath ?>" data-path="<?= $upPath ?>" class="link"><?= $this->getCurrentRelativePath() ?></a>
|
||||
|
|
@ -25,34 +25,34 @@
|
|||
</a>
|
||||
|
||||
<div class="controls">
|
||||
<a
|
||||
<a
|
||||
href="javascript:;"
|
||||
class="control icon btn-primary oc-icon-terminal"
|
||||
title="Rename"
|
||||
title="Rename"
|
||||
data-control="popup"
|
||||
data-request-data="renamePath: '<?= e($item->path) ?>'"
|
||||
data-handler="<?= $this->getEventHandler('onLoadRenamePopup') ?>"
|
||||
>Rename</a>
|
||||
><?= e(trans('cms::lang.asset.rename')) ?></a>
|
||||
</div>
|
||||
|
||||
<input type="hidden" name="file[<?= e($item->path) ?>]" value="0"/>
|
||||
<div class="checkbox custom-checkbox nolabel">
|
||||
<?php $cbId = 'cb'.md5($item->path) ?>
|
||||
<input
|
||||
id="<?= $cbId ?>"
|
||||
id="<?= $cbId ?>"
|
||||
type="checkbox"
|
||||
name="file[<?= e($item->path) ?>]"
|
||||
name="file[<?= e($item->path) ?>]"
|
||||
<?= $this->isFileSelected($item) ? 'checked' : null ?>
|
||||
data-request="<?= $this->getEventHandler('onSelect') ?>"
|
||||
value="1">
|
||||
<label for="<?= $cbId ?>">Select</label>
|
||||
<label for="<?= $cbId ?>"><?= e(trans('cms::lang.asset.select')) ?></label>
|
||||
</div>
|
||||
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
<?php else: ?>
|
||||
<p class="no-data"><?= trans($this->noRecordsMessage) ?></p>
|
||||
<p class="no-data"><?= e(trans($this->noRecordsMessage)) ?></p>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -6,12 +6,15 @@
|
|||
]) ?>
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="popup">×</button>
|
||||
<h4 class="modal-title"><?= trans('cms::lang.asset.move_popup_title') ?></h4>
|
||||
<h4 class="modal-title"><?= e(trans('cms::lang.asset.move_popup_title')) ?></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="form-group">
|
||||
<label><?= trans('cms::lang.asset.move_destination') ?></label>
|
||||
<select class="form-control custom-select" name="dest" data-placeholder="<?= trans('cms::lang.asset.move_please_select') ?>">
|
||||
<label><?= e(trans('cms::lang.asset.move_destination')) ?></label>
|
||||
<select
|
||||
class="form-control custom-select"
|
||||
name="dest"
|
||||
data-placeholder="<?= e(trans('cms::lang.asset.move_please_select')) ?>">
|
||||
<option></option>
|
||||
<?php foreach ($directories as $path=>$directory):?>
|
||||
<option value="<?= e($path) ?>"><?= e($directory) ?></option>
|
||||
|
|
@ -23,17 +26,16 @@
|
|||
<input type="hidden" name="selectedList" value="<?= e($selectedList) ?>">
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button
|
||||
<button
|
||||
type="submit"
|
||||
class="btn btn-primary"
|
||||
>
|
||||
<?= trans('cms::lang.asset.move_button') ?>
|
||||
class="btn btn-primary">
|
||||
<?= e(trans('cms::lang.asset.move_button')) ?>
|
||||
</button>
|
||||
<button
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-default"
|
||||
data-dismiss="popup">
|
||||
<?= trans('backend::lang.form.cancel') ?>
|
||||
<?= e(trans('backend::lang.form.cancel')) ?>
|
||||
</button>
|
||||
</div>
|
||||
<?= Form::close() ?>
|
||||
|
|
@ -6,28 +6,27 @@
|
|||
]) ?>
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="popup">×</button>
|
||||
<h4 class="modal-title">New directory</h4>
|
||||
<h4 class="modal-title"><?= e(trans('cms::lang.asset.directory_popup_title')) ?></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="form-group">
|
||||
<label>Directory name</label>
|
||||
<label><?= e(trans('cms::lang.asset.directory_name')) ?></label>
|
||||
<input type="text" class="form-control" name="name" value=""/>
|
||||
</div>
|
||||
|
||||
<input type="hidden" name="theme" value="<?= e($this->theme->getDirName()) ?>">
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button
|
||||
<button
|
||||
type="submit"
|
||||
class="btn btn-primary"
|
||||
>
|
||||
Create
|
||||
class="btn btn-primary">
|
||||
<?= e(trans('backend::lang.form.create')) ?>
|
||||
</button>
|
||||
<button
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-default"
|
||||
data-dismiss="popup">
|
||||
Cancel
|
||||
<?= e(trans('backend::lang.form.cancel')) ?>
|
||||
</button>
|
||||
</div>
|
||||
<script>
|
||||
|
|
|
|||
|
|
@ -5,11 +5,11 @@
|
|||
]) ?>
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="popup">×</button>
|
||||
<h4 class="modal-title"><?= trans('cms::lang.asset.rename_popup_title') ?></h4>
|
||||
<h4 class="modal-title"><?= e(trans('cms::lang.asset.rename_popup_title')) ?></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="form-group">
|
||||
<label><?= trans('cms::lang.asset.rename_new_name') ?></label>
|
||||
<label><?= e(trans('cms::lang.asset.rename_new_name')) ?></label>
|
||||
<input type="text" class="form-control" name="name" value="<?= $name ?>" />
|
||||
</div>
|
||||
|
||||
|
|
@ -19,15 +19,14 @@
|
|||
<div class="modal-footer">
|
||||
<button
|
||||
type="submit"
|
||||
class="btn btn-primary"
|
||||
>
|
||||
<?= trans('backend::lang.form.apply') ?>
|
||||
class="btn btn-primary">
|
||||
<?= e(trans('backend::lang.form.apply')) ?>
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-default"
|
||||
data-dismiss="popup">
|
||||
<?= trans('backend::lang.form.cancel') ?>
|
||||
<?= e(trans('backend::lang.form.cancel')) ?>
|
||||
</button>
|
||||
</div>
|
||||
<script>
|
||||
|
|
|
|||
|
|
@ -12,5 +12,5 @@
|
|||
<?php endforeach ?>
|
||||
</ul>
|
||||
<?php else: ?>
|
||||
<p class="no-data"><?= trans('cms::lang.component.no_records') ?></p>
|
||||
<p class="no-data"><?= e(trans('cms::lang.component.no_records')) ?></p>
|
||||
<?php endif ?>
|
||||
|
|
@ -42,7 +42,7 @@
|
|||
<?php endforeach ?>
|
||||
</ul>
|
||||
<?php else: ?>
|
||||
<p class="no-data"><?= trans($this->noRecordsMessage) ?></p>
|
||||
<p class="no-data"><?= e(trans($this->noRecordsMessage)) ?></p>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if (!isset($nested)): ?>
|
||||
|
|
|
|||
|
|
@ -154,7 +154,7 @@ class ServiceProvider extends ModuleServiceProvider
|
|||
*/
|
||||
WidgetManager::instance()->registerReportWidgets(function($manager){
|
||||
$manager->registerReportWidget('System\ReportWidgets\Status', [
|
||||
'label' => 'System status',
|
||||
'label' => 'backend::lang.dashboard.status.widget_title_default',
|
||||
'context' => 'dashboard'
|
||||
]);
|
||||
});
|
||||
|
|
@ -164,9 +164,9 @@ class ServiceProvider extends ModuleServiceProvider
|
|||
*/
|
||||
BackendAuth::registerCallback(function($manager) {
|
||||
$manager->registerPermissions('October.System', [
|
||||
'system.manage_settings' => ['label' => 'Manage system settings', 'tab' => 'System'],
|
||||
'system.manage_updates' => ['label' => 'Manage software updates', 'tab' => 'System'],
|
||||
'system.manage_mail_templates' => ['label' => 'Manage mail templates', 'tab' => 'System'],
|
||||
'system.manage_settings' => ['label' => 'system::lang.permissions.manage_system_settings', 'tab' => 'System'],
|
||||
'system.manage_updates' => ['label' => 'system::lang.permissions.manage_software_updates', 'tab' => 'System'],
|
||||
'system.manage_mail_templates' => ['label' => 'system::lang.permissions.manage_mail_templates', 'tab' => 'System'],
|
||||
]);
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
<?php foreach ($items as $category => $items): ?>
|
||||
|
||||
<div class="settings-category">
|
||||
<h3><?= $category ?></h3>
|
||||
<h3><?= e(trans($category)) ?></h3>
|
||||
</div>
|
||||
|
||||
<div class="settings-items row">
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@
|
|||
type="submit"
|
||||
class="btn btn-primary"
|
||||
data-request="onDisablePlugins"
|
||||
data-request-confirm="Are you sure?"
|
||||
data-request-confirm="<?= e(trans('backend::lang.form.plugins.disable_confirm')) ?>"
|
||||
data-stripe-load-indicator>
|
||||
<?= e(trans('backend::lang.form.apply')) ?>
|
||||
</button>
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
checked: $('.control-list').listWidget('getChecked')
|
||||
})"
|
||||
data-request="onRefreshPlugins"
|
||||
data-request-confirm="Are you sure?"
|
||||
data-request-confirm="<?= e(trans('system::lang.plugins.refresh_confirm')) ?>"
|
||||
data-trigger-type="enable"
|
||||
data-trigger=".control-list input[type=checkbox]"
|
||||
data-trigger-condition="checked"
|
||||
|
|
@ -37,7 +37,7 @@
|
|||
checked: $('.control-list').listWidget('getChecked')
|
||||
})"
|
||||
data-request="onRemovePlugins"
|
||||
data-request-confirm="Are you sure?"
|
||||
data-request-confirm="<?= e(trans('system::lang.plugins.remove_confirm')) ?>"
|
||||
data-trigger-type="enable"
|
||||
data-trigger=".control-list input[type=checkbox]"
|
||||
data-trigger-condition="checked"
|
||||
|
|
|
|||
|
|
@ -9,11 +9,13 @@ return [
|
|||
'en' => 'English',
|
||||
'nl' => 'Dutch',
|
||||
'ja' => 'Japanese',
|
||||
'sv' => 'Swedish',
|
||||
'se' => 'Swedish',
|
||||
'tr' => 'Turkish',
|
||||
'br' => 'Brazilian Portuguese',
|
||||
'de' => 'German',
|
||||
'ru' => 'Russian',
|
||||
'fr' => 'French',
|
||||
'it' => 'Italian',
|
||||
],
|
||||
'directory' => [
|
||||
'create_fail' => "Cannot create directory: :name",
|
||||
|
|
@ -55,8 +57,11 @@ return [
|
|||
'disabled_label' => 'Disabled',
|
||||
'disabled_help' => 'Plugins that are disabled are ignored by the application.',
|
||||
'selected_amount' => 'Plugins selected: :amount',
|
||||
'remove_confirm' => 'Are you sure?',
|
||||
'remove_success' => "Successfully removed those plugins from the system.",
|
||||
'refresh_confirm' => 'Are you sure?',
|
||||
'refresh_success' => "Successfully refreshed those plugins in the system.",
|
||||
'disable_confirm' => 'Are you sure?',
|
||||
'disable_success' => "Successfully disabled those plugins.",
|
||||
'enable_success' => "Successfully enabled those plugins.",
|
||||
'unknown_plugin' => "Plugin has been removed from the file system.",
|
||||
|
|
@ -220,4 +225,11 @@ return [
|
|||
'url' => 'URL',
|
||||
'status_code' => 'Status',
|
||||
],
|
||||
'permissions' => [
|
||||
'manage_system_settings' => 'Manage system settings',
|
||||
'manage_software_updates' => 'Manage software updates',
|
||||
'manage_mail_templates' => 'Manage mail templates',
|
||||
'manage_other_administrators' => 'Manage other administrators',
|
||||
'view_the_dashboard' => 'View the dashboard'
|
||||
]
|
||||
];
|
||||
|
|
|
|||
|
|
@ -6,25 +6,39 @@ return [
|
|||
'motto' => 'Getting back to basics',
|
||||
],
|
||||
'locale' => [
|
||||
'en' => 'English',
|
||||
'nl' => 'Dutch',
|
||||
'ja' => 'Japanese',
|
||||
'sv' => 'Swedish',
|
||||
'tr' => 'Turkish',
|
||||
'br' => 'Brazilian Portuguese',
|
||||
'de' => 'German',
|
||||
'ru' => 'Russian',
|
||||
'fr' => 'French',
|
||||
'en' => 'Anglais',
|
||||
'nl' => 'Néerlandais',
|
||||
'ja' => 'Japonais',
|
||||
'se' => 'Suédois',
|
||||
'tr' => 'Turque',
|
||||
'br' => 'Portugais-Brésilien',
|
||||
'de' => 'Allemand',
|
||||
'ru' => 'Russe',
|
||||
'fr' => 'Français',
|
||||
],
|
||||
'directory' => [
|
||||
'create_fail' => "Impossible de créer le répertoire: :name",
|
||||
'create_fail' => "Impossible de créer le répertoire : :name",
|
||||
],
|
||||
'file' => [
|
||||
'create_fail' => "Impossible de créer le fichier: :name",
|
||||
'create_fail' => "Impossible de créer le fichier : :name",
|
||||
],
|
||||
'system' => [
|
||||
'name' => 'Système',
|
||||
'menu_label' => 'Système',
|
||||
'categories' => [
|
||||
'cms' => 'CMS',
|
||||
'misc' => 'Divers',
|
||||
'logs' => 'Logs',
|
||||
'mail' => 'Email',
|
||||
'shop' => 'Boutique',
|
||||
'team' => 'Equipe',
|
||||
'users' => 'Utilisateurs',
|
||||
'system' => 'Système',
|
||||
'social' => 'Social',
|
||||
'events' => 'Evénement',
|
||||
'customers' => 'Clients',
|
||||
'my_settings' => 'Mes réglages',
|
||||
],
|
||||
],
|
||||
'plugin' => [
|
||||
'unnamed' => 'Plugin sans nom',
|
||||
|
|
@ -37,34 +51,34 @@ return [
|
|||
'manage' => 'Gérer les plugins',
|
||||
'enable_or_disable' => 'Activer ou désactiver',
|
||||
'enable_or_disable_title' => 'Activer ou désactiver les plugins',
|
||||
'remove' => 'Supprimé',
|
||||
'refresh' => 'Actualisé',
|
||||
'remove' => 'Supprimer',
|
||||
'refresh' => 'Actualiser',
|
||||
'disabled_label' => 'Désactivé',
|
||||
'disabled_help' => 'Les plugins désactivés sont ignoré par l\'application.',
|
||||
'selected_amount' => 'Plugins selectioné: :amount',
|
||||
'remove_success' => "Successfully removed those plugins from the system.",
|
||||
'refresh_success' => "Successfully refreshed those plugins in the system.",
|
||||
'disable_success' => "Successfully disabled those plugins.",
|
||||
'enable_success' => "Successfully enabled those plugins.",
|
||||
'selected_amount' => 'Plugins selectionés : :amount',
|
||||
'remove_success' => "Les plugins ont été supprimés avec succès.",
|
||||
'refresh_success' => "Les plugins ont été actualisés avec succès.",
|
||||
'disable_success' => "Les plugins ont été désactivés avec succès.",
|
||||
'enable_success' => "Les plugins ont correctement été activés avec succès.",
|
||||
],
|
||||
'project' => [
|
||||
'name' => 'Projet',
|
||||
'owner_label' => 'Autheur',
|
||||
'attach' => 'Attaché un project',
|
||||
'detach' => 'Detaché le Project',
|
||||
'owner_label' => 'Auteur',
|
||||
'attach' => 'Attacher un projet',
|
||||
'detach' => 'Détacher le Projet',
|
||||
'none' => 'Aucun',
|
||||
'id' => [
|
||||
'label' => 'Projet ID',
|
||||
'help' => 'Comment trouver votre project ID',
|
||||
'missing' => 'Spécifier un ID de project.',
|
||||
],
|
||||
'detach_confirm' => 'Êtes-vous sûr de vouloir detaché ce projet?',
|
||||
'detach_confirm' => 'Êtes-vous sûr de vouloir detacher ce projet?',
|
||||
'unbind_success' => 'Le projet a été detaché avec succès.',
|
||||
],
|
||||
'settings' => [
|
||||
'menu_label' => 'Réglages',
|
||||
'missing_model' => 'The settings page is missing a Model definition.',
|
||||
'update_success' => 'Settings for :name have been updated successfully.',
|
||||
'missing_model' => 'La page de réglages nécéssite une définition de modèle.',
|
||||
'update_success' => 'Les réglages pour :name ont étés correctement mis à jour.',
|
||||
'return' => 'Retourner a la page des reglages système',
|
||||
'search' => 'Rechercher'
|
||||
],
|
||||
|
|
@ -72,37 +86,37 @@ return [
|
|||
'menu_label' => 'Configuration des emails',
|
||||
'menu_description' => 'Gérer la configuration des emails.',
|
||||
'general' => 'Generale',
|
||||
'method' => 'Mail Method',
|
||||
'method' => 'Méthode d\'envoi',
|
||||
'sender_name' => 'Nom de l\'expéditeur',
|
||||
'sender_email' => 'Email de l\'expéditeur',
|
||||
'smtp' => 'SMTP',
|
||||
'smtp_address' => 'Adresse SMTP',
|
||||
'smtp_authorization' => 'Authorisation SMTP requise',
|
||||
'smtp_authorization_comment' => 'Use this checkbox if your SMTP server requires authorization.',
|
||||
'smtp_authorization' => 'Authentification SMTP requise',
|
||||
'smtp_authorization_comment' => 'Cochez cette case si votre serveur SMTP nécéssite une authentification.',
|
||||
'smtp_username' => 'Identifiant',
|
||||
'smtp_password' => 'Mot de passe',
|
||||
'smtp_port' => 'Port SMTP',
|
||||
'smtp_ssl' => 'Connection SSL requise',
|
||||
'sendmail' => 'Sendmail',
|
||||
'sendmail_path' => 'Sendmail chemin',
|
||||
'sendmail_path_comment' => 'Spécifié le chemin du programme sendmail.',
|
||||
'sendmail_path' => 'Chemin vers Sendmail',
|
||||
'sendmail_path_comment' => 'Spécifiez le chemin du programme sendmail.',
|
||||
],
|
||||
'mail_templates' => [
|
||||
'menu_label' => 'Email modèles',
|
||||
'menu_description' => 'Gérer les modèles et layouts d\'Email envoyés par l\'administration.',
|
||||
'menu_label' => 'Modèles des emails',
|
||||
'menu_description' => 'Gérer les modèles et layouts des emails envoyés par l\'administration.',
|
||||
'new_template' => 'Nouveau modèle',
|
||||
'new_layout' => 'Nouveau Layout',
|
||||
'template' => 'Modèle',
|
||||
'templates' => 'Modèles',
|
||||
'menu_layouts_label' => 'Email Layouts',
|
||||
'menu_layouts_label' => 'Layouts des emails',
|
||||
'layout' => 'Layout',
|
||||
'layouts' => 'Layouts',
|
||||
'name' => 'Nom',
|
||||
'name_comment' => 'Unique name used to refer to this template',
|
||||
'name_comment' => 'Nom unique utilisé pour identifier ce modèle',
|
||||
'code' => 'Code',
|
||||
'code_comment' => 'Unique code used to refer to this template',
|
||||
'code_comment' => 'Code unique utilisé pour identifier ce modèle',
|
||||
'subject' => 'Sujet',
|
||||
'subject_comment' => 'Email message subject',
|
||||
'subject_comment' => 'Sujet de l\'Email',
|
||||
'description' => 'Description',
|
||||
'content_html' => 'HTML',
|
||||
'content_css' => 'CSS',
|
||||
|
|
@ -114,45 +128,45 @@ return [
|
|||
'install' => [
|
||||
'project_label' => 'Attacher un project',
|
||||
'plugin_label' => 'Installer un plugin',
|
||||
'missing_plugin_name' => 'Please specify a Plugin name to install.',
|
||||
'install_completing' => 'Finishing installation process',
|
||||
'install_success' => 'The plugin has been installed successfully.',
|
||||
'missing_plugin_name' => 'Merci de spécifier le nom d\'un Plugin à installer.',
|
||||
'install_completing' => 'Fin du processus d\'installation',
|
||||
'install_success' => 'Le plugin a été installé avec succès.',
|
||||
],
|
||||
'updates' => [
|
||||
'title' => 'Gérer les mises à jour',
|
||||
'name' => 'Software update',
|
||||
'name' => 'Mise à jour',
|
||||
'menu_label' => 'Mise à jour',
|
||||
'menu_description' => 'Mise à jour du système, gestion et installation des plugins et thèmes.',
|
||||
'check_label' => 'Vérifier les mises à jour',
|
||||
'retry_label' => 'Try again',
|
||||
'retry_label' => 'Réessayer',
|
||||
'plugin_name' => 'Nom',
|
||||
'plugin_description' => 'Description',
|
||||
'plugin_version' => 'Version',
|
||||
'plugin_author' => 'Auteur',
|
||||
'core_build' => 'Current build',
|
||||
'core_build_old' => 'Current build :build',
|
||||
'core_build_new' => 'Build :build',
|
||||
'core_build_new_help' => 'Latest build is available.',
|
||||
'core_downloading' => 'Downloading application files',
|
||||
'core_extracting' => 'Unpacking application files',
|
||||
'plugin_downloading' => 'Downloading plugin: :name',
|
||||
'plugin_extracting' => 'Unpacking plugin: :name',
|
||||
'plugin_version_none' => 'New plugin',
|
||||
'core_build' => 'Version actuelle',
|
||||
'core_build_old' => 'Version actuelle :build',
|
||||
'core_build_new' => 'Version :build',
|
||||
'core_build_new_help' => 'Une nouvelle version est disponible.',
|
||||
'core_downloading' => 'Téléchargement des ficiers de l\'application',
|
||||
'core_extracting' => 'Décompression des fichiers de l\'application',
|
||||
'plugin_downloading' => 'Téléchargement du plugin : :name',
|
||||
'plugin_extracting' => 'Décompression du plugin : :name',
|
||||
'plugin_version_none' => 'Nouveau plugin',
|
||||
'plugin_version_old' => 'Actuelle v:version',
|
||||
'plugin_version_new' => 'v:version',
|
||||
'theme_label' => 'Thème',
|
||||
'theme_new_install' => 'Installation du nouveau thème.',
|
||||
'theme_downloading' => 'Téléchargement du thème: :name',
|
||||
'theme_extracting' => 'Décompression du thème: :name',
|
||||
'update_label' => 'Update software',
|
||||
'theme_downloading' => 'Téléchargement du thème : :name',
|
||||
'theme_extracting' => 'Décompression du thème : :name',
|
||||
'update_label' => 'Mettre à jour',
|
||||
'update_completing' => 'Finalisation du processus de mise à jour',
|
||||
'update_loading' => 'Loading available updates...',
|
||||
'update_loading' => 'Chargement des mises à jour disponibles...',
|
||||
'update_success' => 'Mise à jour terminée avec succès.',
|
||||
'update_failed_label' => 'Echec de la mise à jour',
|
||||
'force_label' => 'Forcé la mise à jour',
|
||||
'force_label' => 'Forcer la mise à jour',
|
||||
'found' => [
|
||||
'label' => 'Nouvelle mise à jour disponible!',
|
||||
'help' => 'Click Update software to begin the update process.',
|
||||
'help' => 'Cliquez sur Mettre à jour pour démarrer le processus.',
|
||||
],
|
||||
'none' => [
|
||||
'label' => 'Aucune mise à jour disponible.',
|
||||
|
|
@ -178,13 +192,13 @@ return [
|
|||
'extract_failed' => "Impossible de décompresser le fichier ':file'.",
|
||||
],
|
||||
'event_log' => [
|
||||
'hint' => 'This log displays a list of potential errors that occur in the application, such as exceptions and debugging information.',
|
||||
'menu_label' => 'Log des événements',
|
||||
'hint' => 'Ce journal affiche une liste des erreurs potentielles dans l\'application, telle que des exceptions et des informations de déboggage.',
|
||||
'menu_label' => 'Journal des événements',
|
||||
'menu_description' => 'Affiche les événements du système avec la date et details.',
|
||||
'empty_link' => 'Purger le log des événements',
|
||||
'empty_loading' => 'Emptying event log...',
|
||||
'empty_success' => 'Successfully emptied the event log.',
|
||||
'return_link' => 'Retour au log événements',
|
||||
'empty_link' => 'Vider le journal des événements',
|
||||
'empty_loading' => 'Vidage du journal des évènements...',
|
||||
'empty_success' => 'Le journal des évènement a été vidé avec succès.',
|
||||
'return_link' => 'Retour au journal des événements',
|
||||
'id' => 'ID',
|
||||
'id_label' => 'événement ID',
|
||||
'created_at' => 'Date & heure',
|
||||
|
|
@ -192,13 +206,13 @@ return [
|
|||
'level' => 'Level',
|
||||
],
|
||||
'request_log' => [
|
||||
'hint' => 'This log displays a list of browser requests that may require attention. For example, if a visitor opens a CMS page that cannot be found, a record is created with the status code 404.',
|
||||
'menu_label' => 'Log des requêtes',
|
||||
'menu_description' => 'Affiche les redirections et mauvaises requêtes, comme Page non trouvée(404).',
|
||||
'empty_link' => 'Purger le log des requêtes',
|
||||
'empty_loading' => 'Emptying request log...',
|
||||
'empty_success' => 'Successfully emptied the request log.',
|
||||
'return_link' => 'Retour au log des requêtes',
|
||||
'hint' => 'Ce journal affiche une liste de requêtes potentiellement suspectes. par exemple, si un visiteur ouvre une page de CMS introuvable, une ligne avec le status code 404 est alors crée.',
|
||||
'menu_label' => 'Journal des requêtes',
|
||||
'menu_description' => 'Affiche les requêtes erronées ou redirigées, comme les erreurs 404.',
|
||||
'empty_link' => 'Vider le journal des requêtes',
|
||||
'empty_loading' => 'Vidage du journal des requêtes...',
|
||||
'empty_success' => 'Le journal des requêtes a été vidé avec succès.',
|
||||
'return_link' => 'Retour au journal des requêtes',
|
||||
'id' => 'ID',
|
||||
'id_label' => 'Log ID',
|
||||
'count' => 'Compteur',
|
||||
|
|
|
|||
|
|
@ -13,61 +13,61 @@ return array(
|
|||
|
|
||||
*/
|
||||
|
||||
"accepted" => "The :attribute must be accepted.",
|
||||
"active_url" => "The :attribute is not a valid URL.",
|
||||
"after" => "The :attribute must be a date after :date.",
|
||||
"alpha" => "The :attribute may only contain letters.",
|
||||
"alpha_dash" => "The :attribute may only contain letters, numbers, and dashes.",
|
||||
"alpha_num" => "The :attribute may only contain letters and numbers.",
|
||||
"array" => "The :attribute must be an array.",
|
||||
"before" => "The :attribute must be a date before :date.",
|
||||
"accepted" => "Le :attribute doit être accepté.",
|
||||
"active_url" => "Le :attribute n'est pas une URL valide.",
|
||||
"after" => "Le :attribute doit être une date après le :date.",
|
||||
"alpha" => "Le :attribute ne peut contenir que des lettres.",
|
||||
"alpha_dash" => "Le :attribute ne peut contenir que des lettres, des chiffres et des tirets.",
|
||||
"alpha_num" => "Le :attribute ne peut contenir que des lettres et des chiffres.",
|
||||
"array" => "Le :attribute doit être un groupe.",
|
||||
"before" => "Le :attribute doit être une date avant le :date.",
|
||||
"between" => array(
|
||||
"numeric" => "The :attribute must be between :min - :max.",
|
||||
"file" => "The :attribute must be between :min - :max kilobytes.",
|
||||
"string" => "The :attribute must be between :min - :max characters.",
|
||||
"array" => "The :attribute must have between :min - :max items.",
|
||||
"numeric" => "Le :attribute doit être compris entre :min - :max.",
|
||||
"file" => "Le :attribute doit être compris entre :min - :max kilobytes.",
|
||||
"string" => "Le :attribute doit être compris entre :min - :max caractères.",
|
||||
"array" => "Le :attribute doit être compris entre :min - :max objets.",
|
||||
),
|
||||
"confirmed" => "The :attribute confirmation does not match.",
|
||||
"date" => "The :attribute is not a valid date.",
|
||||
"date_format" => "The :attribute does not match the format :format.",
|
||||
"different" => "The :attribute and :other must be different.",
|
||||
"digits" => "The :attribute must be :digits digits.",
|
||||
"digits_between" => "The :attribute must be between :min and :max digits.",
|
||||
"email" => "The :attribute format is invalid.",
|
||||
"exists" => "The selected :attribute is invalid.",
|
||||
"image" => "The :attribute must be an image.",
|
||||
"in" => "The selected :attribute is invalid.",
|
||||
"integer" => "The :attribute must be an integer.",
|
||||
"ip" => "The :attribute must be a valid IP address.",
|
||||
"confirmed" => "Le :attribute de confirmation ne correspond pas.",
|
||||
"date" => "Le :attribute n'est pas une date valide.",
|
||||
"date_format" => "Le :attribute ne correspond pas au format :format.",
|
||||
"different" => "Le :attribute et :other doivent être différents.",
|
||||
"digits" => "Le :attribute doit être de :digits chiffres.",
|
||||
"digits_between" => "Le :attribute doit être compris entre :min et :max chiffres.",
|
||||
"email" => "Le format de l':attribute n'est pas valide.",
|
||||
"exists" => "Le :attribute sélectionné n'est pas valide.",
|
||||
"image" => "Le :attribute doit être une image.",
|
||||
"in" => "Le :attribute sélectionné n'est pas valide.",
|
||||
"integer" => "Le :attribute doit être un entier.",
|
||||
"ip" => "Le :attribute doit être une adresse IP valide.",
|
||||
"max" => array(
|
||||
"numeric" => "The :attribute may not be greater than :max.",
|
||||
"file" => "The :attribute may not be greater than :max kilobytes.",
|
||||
"string" => "The :attribute may not be greater than :max characters.",
|
||||
"array" => "The :attribute may not have more than :max items.",
|
||||
"numeric" => "Le :attribute ne peut pas être supérieure à :max.",
|
||||
"file" => "Le :attribute ne peut pas être supérieure à :max kilobytes.",
|
||||
"string" => "Le :attribute ne peut pas être supérieure à :max caractères.",
|
||||
"array" => "Le :attribute ne peut pas être supérieure à :max objets.",
|
||||
),
|
||||
"mimes" => "The :attribute must be a file of type: :values.",
|
||||
"mimes" => "Le :attribute doit être un fichier de type: :values.",
|
||||
"min" => array(
|
||||
"numeric" => "The :attribute must be at least :min.",
|
||||
"file" => "The :attribute must be at least :min kilobytes.",
|
||||
"string" => "The :attribute must be at least :min characters.",
|
||||
"array" => "The :attribute must have at least :min items.",
|
||||
"numeric" => "Le :attribute doit être au minimum de :min.",
|
||||
"file" => "Le :attribute doit être au minimum de :min kilobytes.",
|
||||
"string" => "Le :attribute doit être au minimum de :min caractères.",
|
||||
"array" => "Le :attribute doit être au minimum de :min objets.",
|
||||
),
|
||||
"not_in" => "The selected :attribute is invalid.",
|
||||
"numeric" => "The :attribute must be a number.",
|
||||
"regex" => "The :attribute format is invalid.",
|
||||
"required" => "The :attribute field is required.",
|
||||
"required_if" => "The :attribute field is required when :other is :value.",
|
||||
"required_with" => "The :attribute field is required when :values is present.",
|
||||
"required_without" => "The :attribute field is required when :values is not present.",
|
||||
"same" => "The :attribute and :other must match.",
|
||||
"not_in" => "Le :attribute sélectionné n'est pas valide.",
|
||||
"numeric" => "Le :attribute doit être un nombre.",
|
||||
"regex" => "Le format de l':attribute n'est pas valide.",
|
||||
"required" => "Le champ: :attribute est obligatoire.",
|
||||
"required_if" => "Le champ: :attribute est obligatoire quand :other est :value.",
|
||||
"required_with" => "Le champ: :attribute est obligatoire quand :values est présent.",
|
||||
"required_without" => "Le champ: :attribute est obligatoire quand :values est absent.",
|
||||
"same" => "Le :attribute et :other doivent correspondre.",
|
||||
"size" => array(
|
||||
"numeric" => "The :attribute must be :size.",
|
||||
"file" => "The :attribute must be :size kilobytes.",
|
||||
"string" => "The :attribute must be :size characters.",
|
||||
"array" => "The :attribute must contain :size items.",
|
||||
"numeric" => "Le :attribute doit être de :size.",
|
||||
"file" => "Le :attribute doit être de :size kilobytes.",
|
||||
"string" => "Le :attribute doit être de :size caractères.",
|
||||
"array" => "Le :attribute doit contenir :size objets.",
|
||||
),
|
||||
"unique" => "The :attribute has already been taken.",
|
||||
"url" => "The :attribute format is invalid.",
|
||||
"unique" => "Le :attribute a déjà été pris.",
|
||||
"url" => "Le format de l':attribute n'est pas valide.",
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -0,0 +1,233 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
'app' => [
|
||||
'name' => 'October CMS',
|
||||
'motto' => 'Getting back to basics',
|
||||
],
|
||||
'locale' => [
|
||||
'en' => 'Inglese',
|
||||
'nl' => 'Olandese',
|
||||
'ja' => 'Giapponese',
|
||||
'se' => 'Svedese',
|
||||
'tr' => 'Turco',
|
||||
'br' => 'Portoghese (Brasile)',
|
||||
'de' => 'Tedesco',
|
||||
'ru' => 'Russo',
|
||||
'fr' => 'Francese',
|
||||
'it' => 'Italiano',
|
||||
],
|
||||
'directory' => [
|
||||
'create_fail' => "Impossibile creare la cartella: :name",
|
||||
],
|
||||
'file' => [
|
||||
'create_fail' => "Impossibile creare il file: :name",
|
||||
],
|
||||
'system' => [
|
||||
'name' => 'Sistema',
|
||||
'menu_label' => 'Sistema',
|
||||
'categories' => [
|
||||
'cms' => 'CMS',
|
||||
'misc' => 'Varie',
|
||||
'logs' => 'Log',
|
||||
'mail' => 'Mail',
|
||||
'shop' => 'Negozio',
|
||||
'team' => 'Team',
|
||||
'users' => 'Utenti',
|
||||
'system' => 'Sistema',
|
||||
'social' => 'Social',
|
||||
'events' => 'Eventi',
|
||||
'customers' => 'Clienti',
|
||||
'my_settings' => 'Impostazioni personali',
|
||||
],
|
||||
],
|
||||
'plugin' => [
|
||||
'unnamed' => 'Plugin senza nome',
|
||||
'name' => [
|
||||
'label' => 'Nome del plugin',
|
||||
'help' => 'Nominare il plugin con il suo codice. Ad esempio, RainLab.Blog',
|
||||
],
|
||||
],
|
||||
'plugins' => [
|
||||
'manage' => 'Gestisci plugin',
|
||||
'enable_or_disable' => 'Abilita o disabilita',
|
||||
'enable_or_disable_title' => 'Abilita o disabilita plugin',
|
||||
'remove' => 'Rimuovi',
|
||||
'refresh' => 'Aggiorna',
|
||||
'disabled_label' => 'Disabilitato',
|
||||
'disabled_help' => 'I plugin disabilitati sono ignorati dall\'applicazione.',
|
||||
'selected_amount' => 'Plugin selezionati: :amount',
|
||||
'remove_success' => "Rimozione dei plugin dal sistema eseguita con successo.",
|
||||
'refresh_success' => "Aggiornamento dei plugin nel sistema eseguito con successo.",
|
||||
'disable_success' => "Disabilitazione dei plugin eseguita con successo.",
|
||||
'enable_success' => "Abilitazione dei plugin eseguita con successo.",
|
||||
'unknown_plugin' => "Il plugin è stato rimosso con successo dal file system.",
|
||||
],
|
||||
'project' => [
|
||||
'name' => 'Progetto',
|
||||
'owner_label' => 'Proprietario',
|
||||
'attach' => 'Colleca progetto',
|
||||
'detach' => 'Scollega progetto',
|
||||
'none' => 'Nessuno',
|
||||
'id' => [
|
||||
'label' => 'ID del progetto',
|
||||
'help' => 'Come trovare l\'ID del tuo progetto',
|
||||
'missing' => 'Inserisci un ID di progetto da utilizzare.',
|
||||
],
|
||||
'detach_confirm' => 'Sei sicuro di voler scollegare questo progetto?',
|
||||
'unbind_success' => 'Il progetto è stato scollegato con successo.',
|
||||
],
|
||||
'settings' => [
|
||||
'menu_label' => 'Impostazioni',
|
||||
'missing_model' => 'La pagine delle impostazioni non ha nessun modello associato.',
|
||||
'update_success' => 'Le impostazioni per :name sono state aggiornate con successo.',
|
||||
'return' => 'Ritorna alle impostazioni di sistema',
|
||||
'search' => 'Cerca'
|
||||
],
|
||||
'mail' => [
|
||||
'menu_label' => 'Configurazione e-mail',
|
||||
'menu_description' => 'Gestisci la configurazione delle e-mail.',
|
||||
'general' => 'Generale',
|
||||
'method' => 'Metodo di invio',
|
||||
'sender_name' => 'Nome del mittente',
|
||||
'sender_email' => 'Indirizzo e-mail del mittente',
|
||||
'smtp' => 'SMTP',
|
||||
'smtp_address' => 'Indirizzo SMTP',
|
||||
'smtp_authorization' => 'Il server SMTP richiede l\'autenticazione',
|
||||
'smtp_authorization_comment' => 'Seleziona se il tuo server SMTP richieste l\'autenticazione.',
|
||||
'smtp_username' => 'Username',
|
||||
'smtp_password' => 'Password',
|
||||
'smtp_port' => 'Porta SMTP',
|
||||
'smtp_ssl' => 'Connessione SSL richiesta',
|
||||
'sendmail' => 'Sendmail',
|
||||
'sendmail_path' => 'Percorso Sendmail',
|
||||
'sendmail_path_comment' => 'Inserisci il percorso al servizio sendmail.',
|
||||
],
|
||||
'mail_templates' => [
|
||||
'menu_label' => 'Modelli di e-mail',
|
||||
'menu_description' => 'Modifica i modelli di e-mail inviati agli utenti ed amministratori, gestisci il layout delle e-mail.',
|
||||
'new_template' => 'Nuovo modello',
|
||||
'new_layout' => 'Nuovo layout',
|
||||
'template' => 'Modello',
|
||||
'templates' => 'Modelli',
|
||||
'menu_layouts_label' => 'Layouts delle e-mail',
|
||||
'layout' => 'Layout',
|
||||
'layouts' => 'Layouts',
|
||||
'name' => 'Nome',
|
||||
'name_comment' => 'Nome univoco utilizzato come riferimento a questo modello.',
|
||||
'code' => 'Codice',
|
||||
'code_comment' => 'Codice univoco utilizzato come riferimento a questo modello',
|
||||
'subject' => 'Oggetto',
|
||||
'subject_comment' => 'Oggetto del messaggio di posta',
|
||||
'description' => 'Descrizione',
|
||||
'content_html' => 'HTML',
|
||||
'content_css' => 'CSS',
|
||||
'content_text' => 'Testo',
|
||||
'test_send' => 'Invia un messaggio di prova',
|
||||
'test_success' => 'Il messaggio di prova è stato inviato con successo.',
|
||||
'return' => 'Ritorna all\'elenco dei modelli',
|
||||
],
|
||||
'install' => [
|
||||
'project_label' => 'Collega al progetto',
|
||||
'plugin_label' => 'Installa plugin',
|
||||
'missing_plugin_name' => 'Specifica il nome del plugin da installare.',
|
||||
'install_completing' => 'Sto terminando il processo di installazione',
|
||||
'install_success' => 'Il plugin è stato installato con successo.',
|
||||
],
|
||||
'updates' => [
|
||||
'title' => 'Gestisci aggiornamenti',
|
||||
'name' => 'Aggiornamento del software',
|
||||
'menu_label' => 'Aggiornamenti',
|
||||
'menu_description' => 'Aggiorna il sistema, gestisci ed installa plugin e temi.',
|
||||
'check_label' => 'Verifica gli aggiornamenti',
|
||||
'retry_label' => 'Riprova',
|
||||
'plugin_name' => 'Nome',
|
||||
'plugin_description' => 'Descrizione',
|
||||
'plugin_version' => 'Versione',
|
||||
'plugin_author' => 'Autore',
|
||||
'core_build' => 'Build corrent',
|
||||
'core_build_old' => 'Build corrente :build',
|
||||
'core_build_new' => 'Build :build',
|
||||
'core_build_new_help' => 'Una nuova build è disponibile.',
|
||||
'core_downloading' => 'Scaricamento dei file in corso',
|
||||
'core_extracting' => 'Estrazione dei file in corso',
|
||||
'plugin_downloading' => 'Scaricamento plugin: :name',
|
||||
'plugin_extracting' => 'Estrazione plugin: :name',
|
||||
'plugin_version_none' => 'Nuovo plugin',
|
||||
'plugin_version_old' => 'Versione corrente: :version',
|
||||
'plugin_version_new' => 'Nuova versione: :version',
|
||||
'theme_label' => 'Tema',
|
||||
'theme_new_install' => 'Installa nuovo tema.',
|
||||
'theme_downloading' => 'Scaricamento tema: :name',
|
||||
'theme_extracting' => 'Estrazione tema: :name',
|
||||
'update_label' => 'Aggiorna il software',
|
||||
'update_completing' => 'Completamento del processo di aggiornamento',
|
||||
'update_loading' => 'Caricamento degli aggiornamenti disponibili...',
|
||||
'update_success' => 'L\'aggiornamento è stato eseguito con successo.',
|
||||
'update_failed_label' => 'Aggiornamento fallito',
|
||||
'force_label' => 'Forza aggiornamento',
|
||||
'found' => [
|
||||
'label' => 'Trovati nuovi aggiornamenti!',
|
||||
'help' => 'Clicca Aggiorna il software per iniziare il processo di aggiornamento.',
|
||||
],
|
||||
'none' => [
|
||||
'label' => 'Nessun aggiornamento',
|
||||
'help' => 'Nessun aggiornamento trovato.',
|
||||
],
|
||||
],
|
||||
'server' => [
|
||||
'connect_error' => 'Errore nella connessione al server.',
|
||||
'response_not_found' => 'Il server degli aggiornamento non è stato trovato.',
|
||||
'response_invalid' => 'Il server ha fornito una risposta non valida.',
|
||||
'response_empty' => 'Il server ha fornito una risposta vuota.',
|
||||
'file_error' => 'Il server non è riuscito a consegnare il pacchetto.',
|
||||
'file_corrupt' => 'Il file è corrotto.',
|
||||
],
|
||||
'behavior' => [
|
||||
'missing_property' => 'La classe :class deve definire la proprietà $:property utilizzata dalla funzione :behavior.',
|
||||
],
|
||||
'config' => [
|
||||
'not_found' => 'Il file di configurazione :file definito per :location non è stato trovato.',
|
||||
'required' => "La configurazione utilizzata in :location deve fornire un valore ':property'.",
|
||||
],
|
||||
'zip' => [
|
||||
'extract_failed' => "Estrazione del file sistema ':file' non riuscita.",
|
||||
],
|
||||
'event_log' => [
|
||||
'hint' => 'Questo registro visualizza un elenco dei potenziali errori occorsi nell\'applicazione, come eccezioni e informazioni di debug.',
|
||||
'menu_label' => 'Registro eventi',
|
||||
'menu_description' => 'VIsualizza i messaggi del registro di sistema con i relativi orari di registrazione e dettagli.',
|
||||
'empty_link' => 'Svuota il registro eventi',
|
||||
'empty_loading' => 'Svuotamento del registro eventi...',
|
||||
'empty_success' => 'Il registro eventi è stato svuotato con successo.',
|
||||
'return_link' => 'Ritorna al registro eventi',
|
||||
'id' => 'ID',
|
||||
'id_label' => 'ID evento',
|
||||
'created_at' => 'Data e ora',
|
||||
'message' => 'Messaggio',
|
||||
'level' => 'Livello',
|
||||
],
|
||||
'request_log' => [
|
||||
'hint' => 'Questo registro visualizza un elenco delle richieste del browser che possono richiedere attenzione. Ad esempio, se un visitatore apre una pagina del CMS che non può essere trovata, viene creato un record con il codice di errore 404.',
|
||||
'menu_label' => 'Registro richieste',
|
||||
'menu_description' => 'Visualizza richieste errate o reindirizzate, come Pagina non trovata (404).',
|
||||
'empty_link' => 'Svuota il registro richieste',
|
||||
'empty_loading' => 'Svuotamento del registro richieste...',
|
||||
'empty_success' => 'Il registro richieste è stato svuotato con successo.',
|
||||
'return_link' => 'Ritorna al registro richieste',
|
||||
'id' => 'ID',
|
||||
'id_label' => 'ID Registro',
|
||||
'count' => 'Contatore',
|
||||
'referer' => 'Provenienza',
|
||||
'url' => 'URL',
|
||||
'status_code' => 'Stato',
|
||||
],
|
||||
'permissions' => [
|
||||
'manage_system_settings' => 'Gestisci impostazioni di sistema',
|
||||
'manage_software_updates' => 'Gestisci gli aggiornamenti',
|
||||
'manage_mail_templates' => 'Gestisci i modelli e-mail',
|
||||
'manage_other_administrators' => 'Gestisci altri amministratori',
|
||||
'view_the_dashboard' => 'Visualizza la dashboard
|
||||
'
|
||||
]
|
||||
];
|
||||
|
|
@ -0,0 +1,98 @@
|
|||
<?php
|
||||
|
||||
return array(
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Validation Language Lines
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The following language lines contain the default error messages used by
|
||||
| the validator class. Some of these rules have multiple versions such
|
||||
| such as the size rules. Feel free to tweak each of these messages.
|
||||
|
|
||||
*/
|
||||
|
||||
"accepted" => ":attribute deve essere accettato.",
|
||||
"active_url" => ":attribute non è un URL valido.",
|
||||
"after" => ":attribute deve essere una data maggiore di :date.",
|
||||
"alpha" => ":attribute può contenere solo lettere.",
|
||||
"alpha_dash" => ":attribute può contenere solo lettere, numeri e trattini.",
|
||||
"alpha_num" => ":attribute può contenere solo lettere e numeri.",
|
||||
"array" => ":attribute deve essere un array.",
|
||||
"before" => ":attribute deve essere una data minore di :date.",
|
||||
"between" => array(
|
||||
"numeric" => ":attribute deve essere compreso tra :min e :max.",
|
||||
"file" => ":attribute deve essere compreso tra :min e :max kilobytes.",
|
||||
"string" => ":attribute deve essere compreso tra :min e :max caratteri.",
|
||||
"array" => ":attribute deve avere tra :min e :max elementi.",
|
||||
),
|
||||
"confirmed" => "La conferma :attribute non corrisponde.",
|
||||
"date" => ":attribute non è una data valida.",
|
||||
"date_format" => ":attribute non corrisponde al formato :format.",
|
||||
"different" => ":attribute e :other devono essere diversi.",
|
||||
"digits" => ":attribute deve essere di :digits cifre.",
|
||||
"digits_between" => ":attribute deve essere tra :min e :max cifre.",
|
||||
"email" => "Il formato di :attribute non è valido.",
|
||||
"exists" => "Il valore di :attribute non è valido.",
|
||||
"image" => ":attribute deve essere un'immagine.",
|
||||
"in" => "Il valore di :attribute non è valido.",
|
||||
"integer" => ":attribute deve essere un numero interno.",
|
||||
"ip" => ":attribute deve essere un indirizzo IP valido.",
|
||||
"max" => array(
|
||||
"numeric" => ":attribute non può essere maggiore di :max.",
|
||||
"file" => ":attribute non può essere maggiore di :max kilobytes.",
|
||||
"string" => ":attribute non può essere maggiore di :max caratteri.",
|
||||
"array" => ":attribute non può avere più di :max elementi.",
|
||||
),
|
||||
"mimes" => ":attribute deve essere un file di tipo: :values.",
|
||||
"min" => array(
|
||||
"numeric" => ":attribute deve essere almeno :min.",
|
||||
"file" => ":attribute deve essere almeno :min kilobytes.",
|
||||
"string" => ":attribute deve essere almeno :min caratteri.",
|
||||
"array" => ":attribute deve avere almeno :min elementi.",
|
||||
),
|
||||
"not_in" => "Il valore di :attribute non è valido.",
|
||||
"numeric" => ":attribute deve essere un numero.",
|
||||
"regex" => "Il formato di :attribute non è valido.",
|
||||
"required" => "Il campo :attribute è obbligatorio.",
|
||||
"required_if" => "Il campo :attribute è obbligatorio quando :other è :value.",
|
||||
"required_with" => "Il campo :attribute è obbligatorio quando :values è presente.",
|
||||
"required_without" => "Il campo :attribute è obbligatorio quando :values non è presente.",
|
||||
"same" => ":attribute e :other devono corrispondere.",
|
||||
"size" => array(
|
||||
"numeric" => ":attribute deve essere :size.",
|
||||
"file" => ":attribute deve essere :size kilobytes.",
|
||||
"string" => ":attribute deve essere :size caratteri.",
|
||||
"array" => ":attribute deve contenere :size elementi.",
|
||||
),
|
||||
"unique" => ":attribute è già presente.",
|
||||
"url" => "Il formato di :attribute non è valido.",
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Custom Validation Language Lines
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may specify custom validation messages for attributes using the
|
||||
| convention "attribute.rule" to name the lines. This makes it quick to
|
||||
| specify a specific custom language line for a given attribute rule.
|
||||
|
|
||||
*/
|
||||
|
||||
'custom' => array(),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Custom Validation Attributes
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The following language lines are used to swap attribute place-holders
|
||||
| with something more reader friendly such as E-Mail Address instead
|
||||
| of "email". This simply helps us make messages a little cleaner.
|
||||
|
|
||||
*/
|
||||
|
||||
'attributes' => array(),
|
||||
|
||||
);
|
||||
|
|
@ -9,11 +9,12 @@ return [
|
|||
'en' => 'English',
|
||||
'nl' => 'Dutch',
|
||||
'ja' => 'Japanese',
|
||||
'sv' => 'Swedish',
|
||||
'se' => 'Swedish',
|
||||
'tr' => 'Turkish',
|
||||
'br' => 'Brazilian Portuguese',
|
||||
'de' => 'German',
|
||||
'ru' => 'Russian',
|
||||
'fr' => 'French',
|
||||
],
|
||||
'directory' => [
|
||||
'create_fail' => "Невозможно создать директорию: :name",
|
||||
|
|
@ -45,6 +46,7 @@ return [
|
|||
'refresh_success' => "Выбранные плагины успешно обновлены.",
|
||||
'disable_success' => "Плагин успешно отключен.",
|
||||
'enable_success' => "Плагин успешно включен.",
|
||||
'unknown_plugin' => "Плагин был удален из файловой системы.",
|
||||
],
|
||||
'project' => [
|
||||
'name' => 'Проект',
|
||||
|
|
@ -176,4 +178,33 @@ return [
|
|||
'zip' => [
|
||||
'extract_failed' => "Невозможно извлечь файл ':file'.",
|
||||
],
|
||||
'event_log' => [
|
||||
'hint' => 'В этом журнале отображается список возможных ошибок, которые возникают в работе приложения, таких как исключения и отладочная информация.',
|
||||
'menu_label' => 'Журнал событий',
|
||||
'menu_description' => 'Просмотр системного журнала событий.',
|
||||
'empty_link' => 'Очистить журнал событий',
|
||||
'empty_loading' => 'Очищение журнала событий...',
|
||||
'empty_success' => 'Успешное очищение журнала событий.',
|
||||
'return_link' => 'Вернуться в журнал событий',
|
||||
'id' => 'ID',
|
||||
'id_label' => 'ID события',
|
||||
'created_at' => 'Дата & Время',
|
||||
'message' => 'Сообщение',
|
||||
'level' => 'Уровень',
|
||||
],
|
||||
'request_log' => [
|
||||
'hint' => 'В этом журнале отображается список запросов браузера, которые могут потребовать внимания. Например, если посетитель открывает несуществующую страницу, то в журнале создается запись с кодом статуса 404.',
|
||||
'menu_label' => 'Журнал запросов',
|
||||
'menu_description' => 'Просмотр неудачных или перенаправленных запросов.',
|
||||
'empty_link' => 'Очистить журнал запросов',
|
||||
'empty_loading' => 'Очищение журнала запросов...',
|
||||
'empty_success' => 'Успешное очищение журнала запросов.',
|
||||
'return_link' => 'Вернуться к журналу запросов',
|
||||
'id' => 'ID',
|
||||
'id_label' => 'ID записи',
|
||||
'count' => 'Счетчик',
|
||||
'referer' => 'Иточник запроса',
|
||||
'url' => 'Адрес',
|
||||
'status_code' => 'Статус',
|
||||
],
|
||||
];
|
||||
|
|
|
|||
|
|
@ -5,9 +5,9 @@
|
|||
columns:
|
||||
|
||||
name:
|
||||
label: Name
|
||||
label: system::lang.mail_templates.name
|
||||
searchable: true
|
||||
|
||||
code:
|
||||
label: Code
|
||||
label: system::lang.mail_templates.code
|
||||
searchable: true
|
||||
|
|
|
|||
|
|
@ -5,17 +5,18 @@
|
|||
columns:
|
||||
|
||||
code:
|
||||
label: Code
|
||||
label: system::lang.mail_templates.code
|
||||
searchable: true
|
||||
|
||||
subject:
|
||||
label: Subject
|
||||
label: system::lang.mail_templates.subject
|
||||
searchable: true
|
||||
|
||||
description:
|
||||
label: Description
|
||||
label: system::lang.mail_templates.description
|
||||
searchable: true
|
||||
|
||||
layout:
|
||||
label: system::lang.mail_templates.layout
|
||||
relation: layout
|
||||
select: @name
|
||||
|
|
@ -32,11 +32,11 @@ class Status extends ReportWidgetBase
|
|||
{
|
||||
return [
|
||||
'title' => [
|
||||
'title' => 'Widget title',
|
||||
'default' => 'System status',
|
||||
'title' => 'backend::lang.dashboard.widget_title_label',
|
||||
'default' => 'backend::lang.dashboard.status.widget_title_default',
|
||||
'type' => 'string',
|
||||
'validationPattern' => '^.+$',
|
||||
'validationMessage' => 'The Widget Title is required.'
|
||||
'validationMessage' => 'backend::lang.dashboard.widget_title_error',
|
||||
]
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,14 +1,16 @@
|
|||
<div class="report-widget">
|
||||
<h3><?= e($this->property('title')) ?></h3>
|
||||
<h3><?= e(trans($this->property('title'))) ?></h3>
|
||||
|
||||
<?php if (!isset($error)): ?>
|
||||
<ul class="status-list">
|
||||
<li>
|
||||
<span class="status circle success"></span> online
|
||||
<span class="status circle success"></span>
|
||||
<?= e(trans('backend::lang.dashboard.status.online')) ?>
|
||||
</li>
|
||||
<li>
|
||||
<a href="<?= Backend::url('system/updates') ?>">
|
||||
<span class="status primary"><?= $updates ?></span> <?= Str::plural('update', $updates) ?> available!
|
||||
<span class="status primary"><?= $updates ?></span>
|
||||
<?= e(trans_choice('backend::lang.dashboard.status.update_available', $updates)) ?>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
|
|
|||
Loading…
Reference in New Issue