You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
69 lines
2.1 KiB
69 lines
2.1 KiB
6 years ago
|
<?php
|
||
|
/**
|
||
|
* Created by Error202
|
||
|
* Date: 17.08.2018
|
||
|
*/
|
||
|
|
||
|
use yii\helpers\Html;
|
||
|
|
||
|
/**
|
||
|
* @var $this \yii\web\View
|
||
|
* @var $modules array
|
||
|
* @var $message string
|
||
|
*/
|
||
|
|
||
|
$this->title = Yii::t('main', 'Available Modules');
|
||
|
$this->params['breadcrumbs'][] = $this->title;
|
||
|
?>
|
||
|
|
||
|
<?php if ($message) : ?>
|
||
|
|
||
|
<?php endif; ?>
|
||
|
|
||
|
|
||
|
<div class="row">
|
||
|
|
||
|
<?php foreach ($modules as $module) : ?>
|
||
|
|
||
|
<?php
|
||
|
|
||
|
/*$color = $module->isEnabled() ? '#00aced' : '#cccccc';
|
||
|
if ($module->isDisabled()) {
|
||
|
ModuleHelper::addModuleAdminTranslation($module->name);
|
||
|
}*/
|
||
|
|
||
|
//$module_name = in_array($module->name, array_keys(Yii::$app->getI18n()->translations)) ? Yii::t($module->name, $module->name) : $module->name;
|
||
|
//$module_description = in_array($module->name, array_keys(Yii::$app->getI18n()->translations)) ? Yii::t($module->name, $module->description) : $module->description;
|
||
|
|
||
|
$color = '#00aced';
|
||
|
|
||
|
$module_name = $module['locale_name'];
|
||
|
$module_description = $module['locale_description'];
|
||
|
?>
|
||
|
|
||
|
<div class="col-md-4">
|
||
|
|
||
|
<div class="box">
|
||
|
<div class="box-header with-border">
|
||
|
<h3 class="box-title"><?= $module_name ?></h3>
|
||
|
</div>
|
||
|
<div class="box-body">
|
||
|
<?= $module_description ?>
|
||
|
</div>
|
||
|
<div class="box-footer" style="text-align: right">
|
||
|
<?php if (Yii::$app->moduleManager->isExists($module['name'])) : ?>
|
||
|
<span class="text-bold text-green"><?= Yii::t('main', 'Installed') ?></span>
|
||
|
<?php else : ?>
|
||
|
<?= Html::a(Yii::t('main', 'Enable'), ['module/enable', 'id' => $module['name']], [
|
||
|
'class' => 'btn btn-default btn-sm',
|
||
|
'data' => [
|
||
|
'method' => 'post',
|
||
|
],
|
||
|
]) ?>
|
||
|
<?php endif; ?>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
<?php endforeach; ?>
|
||
|
</div>
|