|
|
@ -4,9 +4,9 @@ |
|
|
|
* Date: 17.08.2018 |
|
|
|
* Date: 17.08.2018 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
use core\entities\ModuleRecord; |
|
|
|
|
|
|
|
use yii\helpers\Html; |
|
|
|
use yii\helpers\Html; |
|
|
|
use core\helpers\ModuleHelper; |
|
|
|
use core\helpers\ModuleHelper; |
|
|
|
|
|
|
|
use kartik\dialog\Dialog; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* @var $this \yii\web\View |
|
|
|
* @var $this \yii\web\View |
|
|
@ -15,6 +15,20 @@ use core\helpers\ModuleHelper; |
|
|
|
|
|
|
|
|
|
|
|
$this->title = Yii::t('main', 'Modules'); |
|
|
|
$this->title = Yii::t('main', 'Modules'); |
|
|
|
$this->params['breadcrumbs'][] = $this->title; |
|
|
|
$this->params['breadcrumbs'][] = $this->title; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$message = Yii::t('main', 'To remove the module, use the following command in the SSH console:'); |
|
|
|
|
|
|
|
$js = <<<JS |
|
|
|
|
|
|
|
$(".delete-button").on('click', function () { |
|
|
|
|
|
|
|
var name = $(this).data('name'); |
|
|
|
|
|
|
|
krajeeDialog.alert('{$message}' + "\\n" + '<pre><code>php yii module/remove ' + name + '</code></pre>'); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
JS; |
|
|
|
|
|
|
|
$this->registerJs($js, $this::POS_READY); |
|
|
|
|
|
|
|
?> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<?= Dialog::widget([ |
|
|
|
|
|
|
|
'options' => [], |
|
|
|
|
|
|
|
]); |
|
|
|
?> |
|
|
|
?> |
|
|
|
|
|
|
|
|
|
|
|
<div class="row"> |
|
|
|
<div class="row"> |
|
|
@ -22,7 +36,6 @@ $this->params['breadcrumbs'][] = $this->title; |
|
|
|
<?php foreach ($modules as $module) : ?> |
|
|
|
<?php foreach ($modules as $module) : ?> |
|
|
|
|
|
|
|
|
|
|
|
<?php |
|
|
|
<?php |
|
|
|
|
|
|
|
|
|
|
|
$color = $module->isEnabled() ? '#00aced' : '#cccccc'; |
|
|
|
$color = $module->isEnabled() ? '#00aced' : '#cccccc'; |
|
|
|
if ($module->isDisabled()) { |
|
|
|
if ($module->isDisabled()) { |
|
|
|
ModuleHelper::addModuleAdminTranslation($module->name); |
|
|
|
ModuleHelper::addModuleAdminTranslation($module->name); |
|
|
@ -36,7 +49,8 @@ $this->params['breadcrumbs'][] = $this->title; |
|
|
|
|
|
|
|
|
|
|
|
<div class="box"> |
|
|
|
<div class="box"> |
|
|
|
<div class="box-header with-border"> |
|
|
|
<div class="box-header with-border"> |
|
|
|
<h3 class="box-title"><i class="fa fa-power-off" aria-hidden="true" style="color: <?= $color ?>"></i> <?= $module_name ?></h3>
|
|
|
|
<h3 class="box-title"><i class="fa fa-power-off" aria-hidden="true" |
|
|
|
|
|
|
|
style="color: <?= $color ?>"></i> <?= $module_name ?></h3>
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="box-body"> |
|
|
|
<div class="box-body"> |
|
|
|
<?= $module_description ?> |
|
|
|
<?= $module_description ?> |
|
|
@ -58,12 +72,9 @@ $this->params['breadcrumbs'][] = $this->title; |
|
|
|
]) ?> |
|
|
|
]) ?> |
|
|
|
<?php endif; ?> |
|
|
|
<?php endif; ?> |
|
|
|
|
|
|
|
|
|
|
|
<?= Html::a(Yii::t('buttons', 'Delete'), ['module/delete', 'id' => $module->id], [ |
|
|
|
<?= Html::button(Yii::t('buttons', 'Delete'), [ |
|
|
|
'class' => 'btn btn-danger btn-sm', |
|
|
|
'class' => 'btn btn-danger btn-sm delete-button', |
|
|
|
'data' => [ |
|
|
|
'data-name' => $module->name, |
|
|
|
'confirm' => Yii::t('buttons', 'Are you sure you want to delete this item?'), |
|
|
|
|
|
|
|
'method' => 'post', |
|
|
|
|
|
|
|
], |
|
|
|
|
|
|
|
]) ?> |
|
|
|
]) ?> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|