1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
use yii\helpers\Url; |
4
|
|
|
use yii\helpers\Html; |
5
|
|
|
?> |
6
|
|
|
<div class="panel panel-default"> |
7
|
|
|
|
8
|
|
|
<div class="panel-heading"><?= Yii::t('AdminModule.views_module_listOnline', '<strong>Modules</strong> directory'); ?></div> |
9
|
|
|
<?= $this->render('_header'); ?> |
10
|
|
|
|
11
|
|
|
<div class="panel-body"> |
12
|
|
|
<!-- search form --> |
13
|
|
|
<?= Html::beginForm(Url::to(['//admin/module/list-purchases']), 'post', ['class' => 'form-search']); ?> |
14
|
|
|
<div class="row"> |
15
|
|
|
<div class="col-md-3"></div> |
16
|
|
|
<div class="col-md-6"> |
17
|
|
|
<div class="form-group form-group-search"> |
18
|
|
|
<?= Html::textInput("licenceKey", $licenceKey, ["class" => "form-control form-search", "placeholder" => Yii::t('AdminModule.base', 'Add purchased module by licence key')]); ?> |
19
|
|
|
<?= Html::submitButton(Yii::t('AdminModule.module_listOnline', 'Register'), ['class' => 'btn btn-default btn-sm form-button-search', 'data-ui-loader' => ""]); ?> |
20
|
|
|
</div> |
21
|
|
|
<?php if ($message != ""): ?> |
22
|
|
|
<div style="color:<?= ($hasError) ? 'red' : 'green'; ?>"><?= Html::encode($message); ?></div> |
23
|
|
|
<?php endif; ?> |
24
|
|
|
</div> |
25
|
|
|
<div class="col-md-3"></div> |
26
|
|
|
</div> |
27
|
|
|
<?= Html::endForm(); ?> |
28
|
|
|
|
29
|
|
|
<br/> |
30
|
|
|
|
31
|
|
|
<?php if (count($modules) == 0) : ?> |
32
|
|
|
|
33
|
|
|
<div class="text-center"> |
34
|
|
|
<em><?= Yii::t('AdminModule.module_listOnline', 'No purchased modules found!'); ?></em> |
35
|
|
|
<br><br> |
36
|
|
|
</div> |
37
|
|
|
|
38
|
|
|
<?php else: ?> |
39
|
|
|
|
40
|
|
|
|
41
|
|
|
<?php foreach ($modules as $module): ?> |
42
|
|
|
<hr> |
43
|
|
|
<div class="media "> |
44
|
|
|
|
45
|
|
|
<?php |
46
|
|
|
$moduleImageUrl = Yii::getAlias('@web-static/img/default_module.jpg'); |
47
|
|
|
} |
|
|
|
|
48
|
|
|
if (isset($module['moduleImageUrl']) && $module['moduleImageUrl'] != "") { |
49
|
|
|
$moduleImageUrl = $module['moduleImageUrl']; |
50
|
|
|
} |
51
|
|
|
?> |
52
|
|
|
|
53
|
|
|
<img class="media-object img-rounded pull-left" data-src="holder.js/64x64" alt="64x64" style="width: 64px; height: 64px;" src="<?= $moduleImageUrl; ?>"> |
54
|
|
|
|
55
|
|
|
<div class="media-body"> |
56
|
|
|
<h4 class="media-heading"><?= $module['name']; ?> |
57
|
|
|
<?php if (Yii::$app->moduleManager->hasModule($module['id'])): ?> |
58
|
|
|
<small><span |
59
|
|
|
class="label label-info"><?= Yii::t('AdminModule.module_listOnline', 'Installed'); ?> |
60
|
|
|
</small></span> |
61
|
|
|
<?php endif; ?> |
62
|
|
|
</h4> |
63
|
|
|
<p><?= $module['description']; ?></p> |
64
|
|
|
|
65
|
|
|
<div class="module-controls"> |
66
|
|
|
<?php if (!Yii::$app->moduleManager->hasModule($module['id'])): ?> |
67
|
|
|
<?= Html::a(Yii::t('AdminModule.views_module_listOnline', 'Install'), Url::to(['install', 'moduleId' => $module['id']]), ['style' => 'font-weight:bold', 'data-loader' => "modal", 'data-message' => Yii::t('AdminModule.views_module_listOnline', 'Installing module...'), 'data-method' => 'POST']); ?> |
68
|
|
|
· |
69
|
|
|
<?php endif; ?> |
70
|
|
|
<?= Html::a(Yii::t('AdminModule.views_module_listOnline', 'More info'), $module['marketplaceUrl'], ['target' => '_blank']); ?> |
71
|
|
|
· <?= Yii::t('AdminModule.views_module_listOnline', 'Latest version:'); ?> <?= $module['latestVersion']; ?> |
72
|
|
|
· <?= Yii::t('AdminModule.views_module_listOnline', 'Licence Key:'); ?> <?= $module['licence_key']; ?> |
73
|
|
|
</div> |
74
|
|
|
</div> |
75
|
|
|
</div> |
76
|
|
|
<?php endforeach; ?> |
77
|
|
|
<?php endif; ?> |
78
|
|
|
</div> |
79
|
|
|
</div> |
80
|
|
|
|
81
|
|
|
<small class="pull-right">Installation Id: <?= Yii::$app->getModule('admin')->settings->get('installationId'); ?></small> |
82
|
|
|
|