Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bundles/TranslateManagerAsset.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ class TranslateManagerAsset extends AssetBundle
*/
public $depends = [
'yii\web\YiiAsset',
'yii\bootstrap\BootstrapAsset',
'yii\bootstrap5\BootstrapAsset',
];
}
11 changes: 4 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "lajax/yii2-translate-manager",
"description": "Translation management extension for Yii 2",
"description": "Translation management extension for Yii 2 with Bootstrap 5",
"type": "yii2-extension",
"keywords": ["yii2", "extension", "translate", "language", "module"],
"license": "MIT",
Expand All @@ -15,13 +15,10 @@
}
],
"require": {
"yiisoft/yii2": "~2.0.0",
"yiisoft/yii2": "~2.0.45",
"yiisoft/yii2-jui": "~2.0.0",
"yiisoft/yii2-bootstrap": "~2.0.0"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^2.1"
},
"yiisoft/yii2-bootstrap5": "~2.0.2"
},
"autoload": {
"psr-4": {
"lajax\\translatemanager\\": ""
Expand Down
2 changes: 1 addition & 1 deletion views/language/dialog.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*
* @since 1.2
*/
use yii\bootstrap\ActiveForm;
use yii\bootstrap5\ActiveForm;
use yii\helpers\Html;

/* @var $this yii\web\View */
Expand Down
4 changes: 2 additions & 2 deletions views/language/import.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

use lajax\translatemanager\models\ImportForm;
use yii\bootstrap\ActiveForm;
use yii\bootstrap5\ActiveForm;
use yii\helpers\Html;

/* @var $this yii\web\View */
Expand All @@ -27,4 +27,4 @@

<?php ActiveForm::end(); ?>

</div>
</div>
16 changes: 11 additions & 5 deletions views/language/list.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,21 @@
'template' => '{view} {update} {translate} {delete}',
'buttons' => [
'translate' => function ($url, $model, $key) {
return Html::a('<span class="glyphicon glyphicon-list-alt"></span>', ['language/translate', 'language_id' => $model->language_id], [
'title' => Yii::t('language', 'Translate'),
'data-pjax' => '0',
]);
return Html::a('
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-list-alt" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M3 6h10v2H3V6zm0 4h10v2H3v-2zM0 2.5A.5.5 0 0 1 .5 2h15a.5.5 0 0 1 .5.5v11a.5.5 0 0 1-.5.5H.5a.5.5 0 0 1-.5-.5v-11zM1 3v10h14V3H1z"/>
</svg>',
['language/translate', 'language_id' => $model->language_id], [
'title' => Yii::t('language', 'Translate'),
'data-pjax' => '0',
]
);

},
],
],
],
]);
Pjax::end();
?>
</div>
</div>
4 changes: 2 additions & 2 deletions views/layouts/language.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
* @since 1.0
*/
use yii\helpers\Html;
use yii\bootstrap\Nav;
use yii\bootstrap\NavBar;
use yii\bootstrap5\Nav;
use yii\bootstrap5\NavBar;
use yii\widgets\Breadcrumbs;
use lajax\translatemanager\bundles\TranslateManagerAsset;

Expand Down