├── ActionBarAsset.php ├── CHANGELOG.md ├── DOCUMENTATION.md ├── DeleteMultipleAction.php ├── LICENSE.md ├── README.md ├── Widget.php ├── assets └── css │ └── actionbar.css ├── composer.json └── messages ├── ru └── widget.php └── zh-CN └── widget.php /ActionBarAsset.php: -------------------------------------------------------------------------------- 1 | 10 | */ 11 | class ActionBarAsset extends AssetBundle 12 | { 13 | /** 14 | * @inheritdoc 15 | */ 16 | public $sourcePath = '@mickgeek/actionbar/assets'; 17 | /** 18 | * @inheritdoc 19 | */ 20 | public $css = [ 21 | 'css/actionbar.css', 22 | ]; 23 | } 24 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ActionBar Changelog 2 | =================== 3 | 4 | Version 1.0.0 July 15, 2014 5 | --------------------------- 6 | 7 | - Initial release 8 | 9 | Version 1.1.0 December 09, 2016 10 | --------------------------- 11 | 12 | - Update of the `ids` request parameter support 13 | 14 | Version 1.1.1 March 10, 2017 15 | --------------------------- 16 | 17 | - Slight refactoring 18 | -------------------------------------------------------------------------------- /DOCUMENTATION.md: -------------------------------------------------------------------------------- 1 | ActionBar Documentation 2 | ======================= 3 | 4 | The widget allows you to use the following properties and methods. 5 | 6 | Widget Class 7 | --------------- 8 | 9 | ### Public Properties 10 | 11 | - `registerCss`: *boolean*, whether the CSS file should be registered. 12 | 13 | - `options`: *array*, the HTML attributes for the widget container tag. See [renderTagAttributes()] for details on how attributes are being rendered. 14 | 15 | - `renderContainer`: *boolean*, whether the widget content should be included in a div container. 16 | 17 | - `containerOptions`: *array*, the HTML attributes for the content container tag. This is only used when `renderContainer` is true. See [renderTagAttributes()] for details on how attributes are being rendered. 18 | 19 | - `templates`: *array*, templates used to render widget elements, in addition, may be specified the array keys with the HTML attributes for the container tag. Tokens enclosed within curly brackets are treated as controller action IDs (also called *element names* in the context of action column). They will be replaced by the corresponding element rendering values specified in `elements`. For example, the token `{bulk-actions}` will be replaced by the result of the value `elements['bulk-actions']`. If a value cannot be found, the token will be replaced with an empty string. See [renderTagAttributes()] for details on how attributes are being rendered. 20 | 21 | - `elements`: *array*, elements rendering values. The array keys are the element names (without curly brackets), and the values are the corresponding element rendering values. 22 | 23 | - `grid`: *string*, the grid ID. This property must be set if used the Bulk Actions default element. 24 | 25 | - `bulkActionsPrompt`: *string*, the text to the call to action for the Bulk Actions. 26 | 27 | - `bulkActionsItems`: *array*, the option data items for the Bulk Actions. See [dropDownList()] for details on how this is to be rendered. 28 | 29 | - `bulkActionsOptions`: *array*, the Bulk Actions options in terms of name-value pairs. The following attributes for the select option tag are specially handled: 30 | - `url`: string, used to send the array with the selected rows (based on the AJAX request) to the clienton the specified URL. 31 | - `data-confirm`: string, displays a confirm box before deleting selected items. 32 | 33 | See [dropDownList()] for details on how this is to be rendered. 34 | 35 | ### Public Methods 36 | 37 | - `t()`: see [t()] for details on how this is to function. 38 | 39 | DeleteMultipleAction Class 40 | -------------------------- 41 | 42 | ### Public Properties 43 | 44 | - `modelClass`: *string*, the model class name. This property must be set. 45 | 46 | - `beforeDeleteCallback`: *callable*, a callback that will be called after deleting selected items. The signature of the callback should be as `function ($action)`, where `$action` is the current action object. 47 | 48 | - `afterDeleteCallback`: *callable*, a callback that will be called after deleting selected items. The signature of the callback should be as `function ($action)`, where `$action` is the current action object. 49 | 50 | - `redirectUrl`: *string|array*, the URL to be redirected to after deleting. 51 | 52 | ### Public Methods 53 | 54 | - `redirect()`: redirects the browser to the previous page or the specified URL from `redirectUrl`. 55 | 56 | [renderTagAttributes()]:http://www.yiiframework.com/doc-2.0/yii-helpers-basehtml.html#renderTagAttributes()-detail 57 | [dropDownList()]:http://www.yiiframework.com/doc-2.0/yii-helpers-basehtml.html#dropDownList()-detail 58 | [t()]:http://www.yiiframework.com/doc-2.0/yii-baseyii.html#t()-detail 59 | -------------------------------------------------------------------------------- /DeleteMultipleAction.php: -------------------------------------------------------------------------------- 1 | 15 | */ 16 | class DeleteMultipleAction extends Action 17 | { 18 | /** 19 | * @var string the model class name. This property must be set. 20 | */ 21 | public $modelClass; 22 | /** 23 | * @var callable a callback that will be called before deleting selected items. 24 | * 25 | * The signature of the callback should be as follows: 26 | * 27 | * ~~~ 28 | * function ($action) 29 | * ~~~ 30 | * 31 | * where `$action` is the current [[Action]] object. 32 | */ 33 | public $beforeDeleteCallback; 34 | /** 35 | * @var callable a callback that will be called after deleting selected items. 36 | * 37 | * The signature of the callback should be as follows: 38 | * 39 | * ~~~ 40 | * function ($action) 41 | * ~~~ 42 | * 43 | * where `$action` is the current [[Action]] object. 44 | */ 45 | public $afterDeleteCallback; 46 | /** 47 | * @var string|array the URL to be redirected to after deleting. 48 | */ 49 | public $redirectUrl; 50 | 51 | /** 52 | * @inheritdoc 53 | */ 54 | public function init() 55 | { 56 | parent::init(); 57 | 58 | if (empty($this->modelClass)) { 59 | throw new InvalidConfigException('The "modelClass" property must be set.'); 60 | } 61 | } 62 | 63 | /** 64 | * Runs the action. 65 | * 66 | * @throws \yii\base\NotFoundHttpException the models is not found. 67 | */ 68 | public function run() 69 | { 70 | if (isset($this->beforeDeleteCallback)) { 71 | call_user_func($this->beforeDeleteCallback, $this); 72 | } 73 | 74 | /* @var $modelClass \yii\db\ActiveRecord */ 75 | $modelClass = $this->modelClass; 76 | $models = []; 77 | foreach (Yii::$app->request->post('ids') as $id) { 78 | $models = array_merge($models, $modelClass::findAll(Json::decode($id))); 79 | } 80 | if (empty($models)) { 81 | throw new NotFoundHttpException(Yii::t('yii', 'Page not found.')); 82 | } else { 83 | foreach ($models as $model) { 84 | $model->delete(); 85 | } 86 | if (isset($this->afterDeleteCallback)) { 87 | call_user_func($this->afterDeleteCallback, $this); 88 | } 89 | 90 | return $this->redirect(); 91 | } 92 | } 93 | 94 | /** 95 | * Redirects the browser to the previous page or the specified URL from [[redirectUrl]]. 96 | */ 97 | public function redirect() 98 | { 99 | $previous = Url::previous(Widget::RETURN_URL_PARAM); 100 | 101 | return !empty($this->redirectUrl) ? $this->controller->redirect($this->redirectUrl) 102 | : $this->controller->redirect($previous); 103 | } 104 | } 105 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | Copyright © 2014, Oleg Belostotsky 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions 6 | are met: 7 | 8 | - Redistributions of source code must retain the above copyright 9 | notice, this list of conditions and the following disclaimer. 10 | - Redistributions in binary form must reproduce the above copyright 11 | notice, this list of conditions and the following disclaimer in 12 | the documentation and/or other materials provided with the 13 | distribution. 14 | - Neither the name of the copyright holder nor the names of its 15 | contributors may be used to endorse or promote products derived 16 | from this software without specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 21 | FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 22 | COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 23 | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 24 | BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 25 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 26 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27 | LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 28 | ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 29 | POSSIBILITY OF SUCH DAMAGE. 30 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ActionBar 2 | ========= 3 | 4 | ActionBar is a Yii 2 widget that render the drop-down list for manipulation selected the GridView items and control buttons. The widget permits you to fully customize elements. 5 | 6 |  7 | 8 | Installation 9 | ------------ 10 | 11 | You can install the widget using [Composer]. Just run the following command under your application folder: 12 | 13 | ``` 14 | php composer.phar require --prefer-dist mickgeek/yii2-actionbar 15 | ``` 16 | 17 | Usage 18 | ----- 19 | 20 | ```php 21 | use mickgeek\actionbar\Widget as ActionBar; 22 | 23 | = ActionBar::widget([ 24 | 'grid' => 'user-grid', 25 | ]) ?> 26 | ``` 27 | 28 | But first, add the action to your controller: 29 | 30 | ```php 31 | public function actions() 32 | { 33 | return [ 34 | 'delete-multiple' => [ 35 | 'class' => 'mickgeek\actionbar\DeleteMultipleAction', 36 | 'modelClass' => 'app\models\User', 37 | ], 38 | ]; 39 | } 40 | ``` 41 | 42 | > Note: You can write your action without using `DeleteMultipleAction` class. 43 | 44 | > Tip: For information about properties and methods of the widget, see the bundled `DOCUMENTATION.md`. 45 | 46 | Examples 47 | -------- 48 | 49 | Below are two examples showing some features of the widget. 50 | 51 | ### Advanced Bulk Actions 52 | 53 |  54 | 55 | The code in the view: 56 | 57 | ```php 58 | use yii\helpers\Url; 59 | use mickgeek\actionbar\Widget as ActionBar; 60 | 61 | = ActionBar::widget([ 62 | 'grid' => 'user-grid', 63 | 'templates' => [ 64 | '{bulk-actions}' => ['class' => 'col-xs-4'], 65 | '{create}' => ['class' => 'col-xs-8 text-right'], 66 | ], 67 | 'bulkActionsItems' => [ 68 | 'Update Status' => [ 69 | 'status-active' => 'Active', 70 | 'status-blocked' => 'Blocked', 71 | ], 72 | 'General' => ['general-delete' => 'Delete'], 73 | ], 74 | 'bulkActionsOptions' => [ 75 | 'options' => [ 76 | 'status-active' => [ 77 | 'url' => Url::toRoute(['update-status', 'status' => 'active']), 78 | 'disabled' => !Yii::$app->user->can('updateUserStatus'), 79 | ], 80 | 'status-blocked' => [ 81 | 'url' => Url::toRoute(['update-status', 'status' => 'blocked']), 82 | 'disabled' => !Yii::$app->user->can('updateUserStatus'), 83 | ], 84 | 'general-delete' => [ 85 | 'url' => Url::toRoute('delete-multiple'), 86 | 'data-confirm' => 'Are you sure?', 87 | 'disabled' => !Yii::$app->user->can('deleteUser'), 88 | ], 89 | ], 90 | 'class' => 'form-control', 91 | ], 92 | ]) ?> 93 | ``` 94 | 95 | The code in the User controller: 96 | 97 | ```php 98 | public function actions() 99 | { 100 | return [ 101 | 'delete-multiple' => [ 102 | 'class' => 'mickgeek\actionbar\DeleteMultipleAction', 103 | 'modelClass' => 'app\models\User', 104 | 'beforeDeleteCallback' => function ($action) { 105 | if (!Yii::$app->user->can('deleteOwnAccount', Yii::$app->getRequest()->post('ids'))) { 106 | Yii::$app->getSession()->setFlash('error', 'You cannot delete your own account.'); 107 | 108 | $action->redirect(); 109 | Yii::$app->end(); 110 | } 111 | }, 112 | 'afterDeleteCallback' => function ($action) { 113 | Yii::$app->getSession()->setFlash('success', 'The selected users have been deleted successfully.'); 114 | }, 115 | ], 116 | ]; 117 | } 118 | 119 | public function actionUpdateStatus($status) 120 | { 121 | ... 122 | } 123 | ``` 124 | 125 | ### Custom Buttons 126 | 127 |  128 | 129 | The code: 130 | 131 | ```php 132 | use mickgeek\actionbar\Widget as ActionBar; 133 | 134 | /* @var $model app\models\User */ 135 | = ActionBar::widget([ 136 | 'templates' => [ 137 | '{back}' => ['class' => 'col-xs-4'], 138 | '{update} {delete}' => ['class' => 'col-xs-8 text-right'], 139 | ], 140 | 'elements' => [ 141 | 'back' => Html::a( 142 | ' ' . 'Back', 143 | ['/users/index'], 144 | ['class' => 'btn btn-default'] 145 | ), 146 | 'update' => Html::a( 147 | ' ' . 'Update', 148 | ['/users/update', 'id' => $model->id], 149 | ['class' => 'btn btn-default'] 150 | ), 151 | 'delete' => Html::a( 152 | ' ' . 'Delete', 153 | ['/users/delete', 'id' => $model->id], 154 | ['class' => 'btn btn-default'] 155 | ), 156 | ], 157 | ]) ?> 158 | ``` 159 | 160 | License 161 | ------- 162 | 163 | This extension is released under the BSD 3-Clause License. See the bundled `LICENSE.md` for details. 164 | 165 | [Composer]:https://getcomposer.org 166 | -------------------------------------------------------------------------------- /Widget.php: -------------------------------------------------------------------------------- 1 | 14 | */ 15 | class Widget extends \yii\base\Widget 16 | { 17 | /** 18 | * The session variable name associated with the URL to be remembered. 19 | */ 20 | const RETURN_URL_PARAM = '__actionBarUrl'; 21 | 22 | /** 23 | * @var boolean whether the CSS file should be registered. 24 | */ 25 | public $registerCss = true; 26 | /** 27 | * @var array the HTML attributes for the widget container tag. 28 | * @see \yii\helpers\Html::renderTagAttributes() for details on how attributes are being rendered. 29 | */ 30 | public $options = ['class' => 'widget-action-bar']; 31 | /** 32 | * @var boolean whether the widget content should be included in a div container. 33 | */ 34 | public $renderContainer = true; 35 | /** 36 | * @var array the HTML attributes for the content container tag. This is only used when [[renderContainer]] is true. 37 | * @see \yii\helpers\Html::renderTagAttributes() for details on how attributes are being rendered. 38 | */ 39 | public $containerOptions = ['class' => 'row']; 40 | /** 41 | * @var array templates used to render widget elements, in addition, may be specified the array keys with 42 | * the HTML attributes for the container tag. Tokens enclosed within curly brackets are treated as 43 | * controller action IDs (also called *element names* in the context of action column). They will be replaced 44 | * by the corresponding element rendering values specified in [[elements]]. For example, 45 | * the token `{bulk-actions}` will be replaced by the result of the value `elements['bulk-actions']`. 46 | * If a value cannot be found, the token will be replaced with an empty string. 47 | * @see \yii\helpers\Html::renderTagAttributes() for details on how attributes are being rendered. 48 | * @see [[elements]] 49 | */ 50 | public $templates = [ 51 | '{bulk-actions}' => ['class' => 'col-xs-4'], 52 | '{create}' => ['class' => 'col-xs-8 text-right'], 53 | ]; 54 | /** 55 | * @var array elements rendering values. The array keys are the element names (without curly brackets), 56 | * and the values are the corresponding element rendering values. 57 | */ 58 | public $elements = []; 59 | /** 60 | * @var string the grid ID. This property must be set if used the Bulk Actions default element. 61 | */ 62 | public $grid; 63 | /** 64 | * @var string the text to the call to action for the Bulk Actions. 65 | */ 66 | public $bulkActionsPrompt; 67 | /** 68 | * @var array the option data items for the Bulk Actions. 69 | * @see \yii\helpers\Html::dropDownList() for details on how this is to be rendered. 70 | */ 71 | public $bulkActionsItems = []; 72 | /** 73 | * @var array the Bulk Actions options in terms of name-value pairs. The following attributes 74 | * for the select option tag are specially handled: 75 | * 76 | * - `url`: string, used to send the array with the selected rows (based on the AJAX request) to the client 77 | * on the specified URL. 78 | * - `data-confirm`: string, displays a confirm box before deleting selected items. 79 | * 80 | * @see \yii\helpers\Html::dropDownList() for details on how this is to be rendered. 81 | */ 82 | public $bulkActionsOptions = ['class' => 'form-control']; 83 | 84 | /** 85 | * @var string the Bulk Actions ID. 86 | */ 87 | private $_bulkActionsId = 'bulk-actions'; 88 | 89 | /** 90 | * @inheritdoc 91 | */ 92 | public function init() 93 | { 94 | parent::init(); 95 | 96 | if (!isset($this->options['id'])) { 97 | $this->options['id'] = $this->id; 98 | } 99 | $this->registerTranslations(); 100 | $this->initDefaultElements(); 101 | 102 | Url::remember('', self::RETURN_URL_PARAM); 103 | } 104 | 105 | /** 106 | * Registers translation files. 107 | */ 108 | public function registerTranslations() 109 | { 110 | if (!isset(Yii::$app->i18n->translations['mickgeek/actionbar/*'])) { 111 | Yii::$app->i18n->translations['mickgeek/actionbar/*'] = [ 112 | 'class' => PhpMessageSource::className(), 113 | 'sourceLanguage' => 'en-US', 114 | 'basePath' => '@mickgeek/actionbar/messages', 115 | 'fileMap' => [ 116 | 'mickgeek/actionbar/widget' => 'widget.php', 117 | ], 118 | ]; 119 | } 120 | } 121 | 122 | /** 123 | * @see \Yii::t() for details on how this is to function. 124 | */ 125 | public static function t($category, $message, $params = [], $language = null) 126 | { 127 | return Yii::t('mickgeek/actionbar/' . $category, $message, $params, $language); 128 | } 129 | 130 | /** 131 | * Initializes the default elements. 132 | */ 133 | protected function initDefaultElements() 134 | { 135 | if (!isset($this->elements['bulk-actions'])) { 136 | if ($this->bulkActionsPrompt === null) { 137 | $this->bulkActionsPrompt = $this->t('widget', 'Bulk Actions'); 138 | } 139 | if (empty($this->bulkActionsItems)) { 140 | $this->bulkActionsItems = [ 141 | $this->t('widget', 'General') => [ 142 | 'general-delete' => $this->t('widget', 'Delete'), 143 | ], 144 | ]; 145 | } 146 | if (isset($this->bulkActionsOptions['id'])) { 147 | $this->_bulkActionsId = $this->bulkActionsOptions['id']; 148 | } 149 | if (!isset($this->bulkActionsOptions['options'])) { 150 | $this->bulkActionsOptions = ArrayHelper::merge($this->bulkActionsOptions, [ 151 | 'options' => [ 152 | 'general-delete' => [ 153 | 'url' => Url::toRoute('delete-multiple'), 154 | 'data-confirm' => $this->t('widget', 'Are you sure you want to delete these items?'), 155 | ], 156 | ], 157 | ]); 158 | } 159 | 160 | $this->elements['bulk-actions'] = Html::dropDownList('bulkactions', null, $this->bulkActionsItems, 161 | ArrayHelper::merge([ 162 | 'prompt' => $this->bulkActionsPrompt, 163 | 'id' => $this->_bulkActionsId, 164 | 'disabled' => $this->grid === null, 165 | ], $this->bulkActionsOptions) 166 | ); 167 | } 168 | if (!isset($this->elements['create'])) { 169 | $this->elements['create'] = Html::a( 170 | ' ' . $this->t('widget', 'Create New'), 171 | Url::toRoute('create'), 172 | ['class' => 'btn btn-default'] 173 | ); 174 | } 175 | } 176 | 177 | /** 178 | * Renders the widget. 179 | */ 180 | public function run() 181 | { 182 | echo Html::beginTag('div', $this->options) . "\n"; 183 | echo $this->renderContainer ? Html::beginTag('div', $this->containerOptions) . "\n" : ''; 184 | foreach ($this->templates as $template => $options) { 185 | if (!is_array($options)) { 186 | echo $this->renderElements($options); 187 | } else { 188 | echo Html::beginTag('div', $options); 189 | echo $this->renderElements($template, $options); 190 | echo Html::endTag('div'); 191 | } 192 | } 193 | echo $this->renderContainer ? Html::endTag('div') . "\n" : ''; 194 | echo Html::endTag('div') . "\n"; 195 | 196 | if ($this->registerCss) { 197 | ActionBarAsset::register($this->view); 198 | } 199 | } 200 | 201 | /** 202 | * Renders elements. 203 | * 204 | * @param string $template the elements template. 205 | * @return string the rendering result. 206 | */ 207 | protected function renderElements($template) 208 | { 209 | return preg_replace_callback('/\\{([\w\-\/]+)\\}/', function ($matches) { 210 | $name = $matches[1]; 211 | if (isset($this->elements[$name])) { 212 | if ($name === 'bulk-actions' && $this->grid !== null) { 213 | $id = $this->options['id']; 214 | $this->view->registerJs("$('#{$id} #{$this->_bulkActionsId}').change(function() { 215 | if (this.value) { 216 | var ids = $('#{$this->grid}').yiiGridView('getSelectedRows'), 217 | options = this.options[this.selectedIndex], 218 | dataConfirm = options.getAttribute('data-confirm'), 219 | url = options.getAttribute('url'); 220 | 221 | if (!ids.length) { 222 | alert('" . $this->t('widget', 'Please select one or more items from the list.') . "'); 223 | this.value = ''; 224 | } else if (dataConfirm && !confirm(dataConfirm)) { 225 | this.value = ''; 226 | return; 227 | } else if (url) { 228 | var form = $('
'), 229 | csrfParam = $('meta[name=csrf-param]').prop('content'), 230 | csrfToken = $('meta[name=csrf-token]').prop('content'); 231 | 232 | if (csrfParam) { 233 | form.append(''); 234 | } 235 | $.each(ids, function(index, id) { 236 | form.append(''); 237 | }); 238 | form.appendTo('body').submit(); 239 | } 240 | } 241 | });"); 242 | } 243 | 244 | return $this->elements[$name]; 245 | } else { 246 | return ''; 247 | } 248 | }, $template); 249 | } 250 | } 251 | -------------------------------------------------------------------------------- /assets/css/actionbar.css: -------------------------------------------------------------------------------- 1 | .widget-action-bar { 2 | margin-bottom: 20px; 3 | } 4 | 5 | .widget-action-bar .glyphicon { 6 | margin-right: 2px; 7 | } 8 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "mickgeek/yii2-actionbar", 3 | "type": "yii2-extension", 4 | "description": "A control bar with bulk actions for the GridView widget.", 5 | "keywords": ["yii2", "extension", "widget", "grid", "bulk actions"], 6 | "homepage": "https://github.com/mickgeek/yii2-actionbar", 7 | "license": "BSD-3-Clause", 8 | "authors": [ 9 | { 10 | "name": "Oleg Belostotsky", 11 | "email": "olegbelostotsky@gmail.com", 12 | "role": "Developer" 13 | } 14 | ], 15 | "require": { 16 | "yiisoft/yii2": "*" 17 | }, 18 | "autoload": { 19 | "psr-4": { 20 | "mickgeek\\actionbar\\": "" 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /messages/ru/widget.php: -------------------------------------------------------------------------------- 1 | 'Выберите действие', 21 | 'Please select one or more items from the list.' => 'Выберите один или несколько элементов из списка.', 22 | 'General' => 'Общее', 23 | 'Delete' => 'Удалить', 24 | 'Are you sure you want to delete these items?' => 'Вы уверены, что хотите удалить эти элементы?', 25 | 'Create New' => 'Создать', 26 | ]; 27 | -------------------------------------------------------------------------------- /messages/zh-CN/widget.php: -------------------------------------------------------------------------------- 1 | 20 | */ 21 | return [ 22 | 'Bulk Actions' => '批量操作', 23 | 'Please select one or more items from the list.' => '至少选择一项。', 24 | 'General' => '常规', 25 | 'Delete' => '删除', 26 | 'Are you sure you want to delete these items?' => '确认删除?', 27 | 'Create New' => '新增', 28 | ]; 29 | --------------------------------------------------------------------------------