Move trans from logic-less array to inside business logic. Convert tabs to spaces.
This commit is contained in:
parent
5a36debecf
commit
13587f155c
|
|
@ -85,7 +85,7 @@
|
||||||
'an hidden input element with the data-inspector-values property.')
|
'an hidden input element with the data-inspector-values property.')
|
||||||
}
|
}
|
||||||
|
|
||||||
Inspector.prototype.getPopoverTemplate = function() {
|
Inspector.prototype.getPopoverTemplate = function() {
|
||||||
return ' \
|
return ' \
|
||||||
<div class="popover-head"> \
|
<div class="popover-head"> \
|
||||||
<h3>{{title}}</h3> \
|
<h3>{{title}}</h3> \
|
||||||
|
|
|
||||||
|
|
@ -56,12 +56,12 @@ return [
|
||||||
'columns' => '{1} column|[2,Inf] columns',
|
'columns' => '{1} column|[2,Inf] columns',
|
||||||
'widget_new_row_label' => 'Force new row',
|
'widget_new_row_label' => 'Force new row',
|
||||||
'widget_new_row_description' => 'Put the widget in a new row.',
|
'widget_new_row_description' => 'Put the widget in a new row.',
|
||||||
'widget_title_label' => 'Widget title',
|
'widget_title_label' => 'Widget title',
|
||||||
'widget_title_error' => 'The Widget Title is required.',
|
'widget_title_error' => 'The Widget Title is required.',
|
||||||
'status' => [
|
'status' => [
|
||||||
'widget_title_default' => 'System status',
|
'widget_title_default' => 'System status',
|
||||||
'online' => 'online',
|
'online' => 'online',
|
||||||
'update_available' => '{0} updates available!|{1} update available!|[2,Inf] updates available!',
|
'update_available' => '{0} updates available!|{1} update available!|[2,Inf] updates available!',
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
'user' => [
|
'user' => [
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,12 @@
|
||||||
<?php namespace Backend\Widgets;
|
<?php namespace Backend\Widgets;
|
||||||
|
|
||||||
use Backend\Classes\WidgetBase;
|
|
||||||
use System\Classes\ApplicationException;
|
|
||||||
use Request;
|
|
||||||
use Backend\Classes\WidgetManager;
|
|
||||||
use Backend\Models\UserPreferences;
|
|
||||||
use File;
|
use File;
|
||||||
use Lang;
|
use Lang;
|
||||||
|
use Request;
|
||||||
|
use Backend\Classes\WidgetBase;
|
||||||
|
use Backend\Classes\WidgetManager;
|
||||||
|
use Backend\Models\UserPreferences;
|
||||||
|
use System\Classes\ApplicationException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Report Container Widget
|
* Report Container Widget
|
||||||
|
|
@ -315,13 +315,13 @@ class ReportContainer extends WidgetBase
|
||||||
|
|
||||||
$property = [
|
$property = [
|
||||||
'property' => $name,
|
'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'
|
'type' => isset($params['type']) ? $params['type'] : 'string'
|
||||||
];
|
];
|
||||||
|
|
||||||
foreach ($params as $name => $value) {
|
foreach ($params as $name => $value) {
|
||||||
if (isset($property[$name])) continue;
|
if (isset($property[$name])) continue;
|
||||||
$property[$name] = $value;
|
$property[$name] = Lang::get($value);
|
||||||
}
|
}
|
||||||
|
|
||||||
$result[] = $property;
|
$result[] = $property;
|
||||||
|
|
@ -335,8 +335,9 @@ class ReportContainer extends WidgetBase
|
||||||
$result = [];
|
$result = [];
|
||||||
|
|
||||||
$properties = $widget->defineProperties();
|
$properties = $widget->defineProperties();
|
||||||
foreach ($properties as $name=>$params)
|
foreach ($properties as $name=>$params) {
|
||||||
$result[$name] = $widget->property($name);
|
$result[$name] = $widget->property($name);
|
||||||
|
}
|
||||||
|
|
||||||
$result['ocWidgetWidth'] = $widget->property('ocWidgetWidth');
|
$result['ocWidgetWidth'] = $widget->property('ocWidgetWidth');
|
||||||
$result['ocWidgetNewRow'] = $widget->property('ocWidgetNewRow');
|
$result['ocWidgetNewRow'] = $widget->property('ocWidgetNewRow');
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<div class="loading-indicator-container size-small pull-right">
|
<div class="loading-indicator-container size-small pull-right">
|
||||||
<div class="control-pagination">
|
<div class="control-pagination">
|
||||||
<span class="page-iteration">
|
<span class="page-iteration">
|
||||||
<?= e(trans('backend::lang.list.pagination', ['from' => $pageFrom, 'to' => $pageTo, 'total' => $recordTotal])) ?>
|
<?= e(trans('backend::lang.list.pagination', ['from' => $pageFrom, 'to' => $pageTo, 'total' => $recordTotal])) ?>
|
||||||
</span>
|
</span>
|
||||||
<?php if ($pageCurrent > 1): ?>
|
<?php if ($pageCurrent > 1): ?>
|
||||||
<a
|
<a
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label><?= e(trans('backend::lang.list.records_per_page')) ?></label>
|
<label><?= e(trans('backend::lang.list.records_per_page')) ?></label>
|
||||||
<p class="help-block">
|
<p class="help-block">
|
||||||
<?= e(trans('backend::lang.list.records_per_page_help')) ?>
|
<?= e(trans('backend::lang.list.records_per_page_help')) ?>
|
||||||
</p>
|
</p>
|
||||||
<select class="form-control custom-select" name="records_per_page">
|
<select class="form-control custom-select" name="records_per_page">
|
||||||
<?php foreach ($perPageOptions as $optionValue): ?>
|
<?php foreach ($perPageOptions as $optionValue): ?>
|
||||||
|
|
|
||||||
|
|
@ -160,11 +160,11 @@ return [
|
||||||
'saved'=> "The template has been successfully saved."
|
'saved'=> "The template has been successfully saved."
|
||||||
],
|
],
|
||||||
'permissions' => [
|
'permissions' => [
|
||||||
'manage_content' => 'Manage content',
|
'manage_content' => 'Manage content',
|
||||||
'manage_assets' => 'Manage assets',
|
'manage_assets' => 'Manage assets',
|
||||||
'manage_pages' => 'Manage pages',
|
'manage_pages' => 'Manage pages',
|
||||||
'manage_layouts' => 'Manage layouts',
|
'manage_layouts' => 'Manage layouts',
|
||||||
'manage_partials' => 'Manage partials',
|
'manage_partials' => 'Manage partials',
|
||||||
'manage_themes' => 'Manage themes'
|
'manage_themes' => 'Manage themes'
|
||||||
]
|
]
|
||||||
];
|
];
|
||||||
|
|
@ -222,10 +222,10 @@ return [
|
||||||
'status_code' => 'Status',
|
'status_code' => 'Status',
|
||||||
],
|
],
|
||||||
'permissions' => [
|
'permissions' => [
|
||||||
'manage_system_settings' => 'Manage system settings',
|
'manage_system_settings' => 'Manage system settings',
|
||||||
'manage_software_updates' => 'Manage software updates',
|
'manage_software_updates' => 'Manage software updates',
|
||||||
'manage_mail_templates' => 'Manage mail templates',
|
'manage_mail_templates' => 'Manage mail templates',
|
||||||
'manage_other_administrators' => 'Manage other administrators',
|
'manage_other_administrators' => 'Manage other administrators',
|
||||||
'view_the_dashboard' => 'View the dashboard'
|
'view_the_dashboard' => 'View the dashboard'
|
||||||
]
|
]
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,6 @@ use System\Models\Parameters;
|
||||||
use System\Classes\UpdateManager;
|
use System\Classes\UpdateManager;
|
||||||
use Backend\Classes\ReportWidgetBase;
|
use Backend\Classes\ReportWidgetBase;
|
||||||
use Exception;
|
use Exception;
|
||||||
use Lang;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* System status report widget.
|
* System status report widget.
|
||||||
|
|
@ -33,11 +32,11 @@ class Status extends ReportWidgetBase
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'title' => [
|
'title' => [
|
||||||
'title' => Lang::get('backend::lang.dashboard.widget_title_label'),
|
'title' => 'backend::lang.dashboard.widget_title_label',
|
||||||
'default' => Lang::get('backend::lang.dashboard.status.widget_title_default'),
|
'default' => 'backend::lang.dashboard.status.widget_title_default',
|
||||||
'type' => 'string',
|
'type' => 'string',
|
||||||
'validationPattern' => '^.+$',
|
'validationPattern' => '^.+$',
|
||||||
'validationMessage' => Lang::get('backend::lang.dashboard.widget_title_error')
|
'validationMessage' => 'backend::lang.dashboard.widget_title_error',
|
||||||
]
|
]
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue