mirror of
https://github.com/Karaka-Management/oms-Admin.git
synced 2026-01-20 17:28:40 +00:00
123 lines
5.5 KiB
PHP
123 lines
5.5 KiB
PHP
<?php
|
|
/**
|
|
* Orange Management
|
|
*
|
|
* PHP Version 7.1
|
|
*
|
|
* @package Modules\Admin\Template\Backend
|
|
* @copyright Dennis Eichhorn
|
|
* @license OMS License 1.0
|
|
* @version 1.0.0
|
|
* @link http://website.orange-management.de
|
|
*/
|
|
|
|
/**
|
|
* @var \phpOMS\Views\View $this
|
|
*/
|
|
$modules = $this->app->moduleManager->getAllModules();
|
|
$active = $this->app->moduleManager->getActiveModules();
|
|
$installed = $this->app->moduleManager->getInstalledModules();
|
|
|
|
$id = (string) $this->request->getData('id') ?? 1;
|
|
?>
|
|
|
|
<div class="row">
|
|
<div class="col-xs-12 col-md-4">
|
|
<section class="box wf-100">
|
|
<header><h1><?= $this->printHtml($modules[$id]['name']['external'] ); ?></h1></header>
|
|
|
|
<div class="inner">
|
|
<table class="list wf-100">
|
|
<tbody>
|
|
<tr>
|
|
<td><?= $this->getHtml('Name'); ?>
|
|
<td><?= $this->printHtml($modules[$id]['name']['external']); ?>
|
|
<tr>
|
|
<td><?= $this->getHtml('Version'); ?>
|
|
<td><?= $this->printHtml($modules[$id]['version'] ); ?>
|
|
<tr>
|
|
<td><?= $this->getHtml('CreatedBy'); ?>
|
|
<td><?= $this->printHtml($modules[$id]['creator']['name'] ); ?>
|
|
<tr>
|
|
<td><?= $this->getHtml('Website'); ?>
|
|
<td><?= $this->printHtml($modules[$id]['creator']['website'] ); ?>
|
|
<tr>
|
|
<td><?= $this->getHtml('Description'); ?>
|
|
<td><?= $this->printHtml($modules[$id]['description'] ); ?>
|
|
<tr>
|
|
<td colspan="2">
|
|
<?php if (in_array($id, $active)) : ?>
|
|
<button data-action='[
|
|
{
|
|
"listener": "click", "action": [
|
|
{"key": 1, "type": "message.request", "uri": "<?= \phpOMS\Uri\UriFactory::build('/{/lang}/api/admin/module/status?status=deactivate&module=' . $id); ?>", "method": "POST", "request_type": "json"}
|
|
]
|
|
}
|
|
]'><?= $this->getHtml('Deactivate'); ?></button>
|
|
<?php elseif (in_array($id, $installed)) : ?>
|
|
<button data-action='[
|
|
{
|
|
"listener": "click", "action": [
|
|
{"key": 1, "type": "message.request", "uri": "<?= \phpOMS\Uri\UriFactory::build('/{/lang}/api/admin/module/status?status=uninstall&module=' . $id); ?>", "method": "POST", "request_type": "json"}
|
|
]
|
|
}
|
|
]'>><?= $this->getHtml('Uninstall'); ?></button>
|
|
<button data-action='[
|
|
{
|
|
"listener": "click", "action": [
|
|
{"key": 1, "type": "message.request", "uri": "<?= \phpOMS\Uri\UriFactory::build('/{/lang}/api/admin/module/status?status=activate&module=' . $id); ?>", "method": "POST", "request_type": "json"}
|
|
]
|
|
}
|
|
]'><?= $this->getHtml('Activate'); ?></button>
|
|
<?php elseif (isset($modules[$id])) : ?>
|
|
<button data-action='[
|
|
{
|
|
"listener": "click", "action": [
|
|
{"key": 1, "type": "message.request", "uri": "<?= \phpOMS\Uri\UriFactory::build('/{/lang}/api/admin/module/status?status=install&module=' . $id); ?>", "method": "POST", "request_type": "json"}
|
|
]
|
|
}
|
|
]'><?= $this->getHtml('Install'); ?></button>
|
|
<button data-action='[
|
|
{
|
|
"listener": "click", "action": [
|
|
{"key": 1, "type": "message.request", "uri": "<?= \phpOMS\Uri\UriFactory::build('/{/lang}/api/admin/module/status?status=delete&module=' . $id); ?>", "method": "POST", "request_type": "json"}
|
|
]
|
|
}
|
|
]'><?= $this->getHtml('Delete', 0); ?></button>
|
|
<?php endif; ?>
|
|
</table>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
|
|
<div class="col-xs-12 col-md-4">
|
|
<section class="box wf-100">
|
|
<header><h1><?= $this->getHtml('Settings'); ?></h1></header>
|
|
|
|
<div class="inner">
|
|
|
|
</div>
|
|
</section>
|
|
</div>
|
|
|
|
<div class="col-xs-12 col-md-4">
|
|
<section class="box wf-100">
|
|
<header><h1><?= $this->getHtml('Groups'); ?></h1></header>
|
|
|
|
<div class="inner">
|
|
|
|
</div>
|
|
</section>
|
|
</div>
|
|
|
|
<div class="col-xs-12 col-md-4">
|
|
<section class="box wf-100">
|
|
<header><h1><?= $this->getHtml('Permissions'); ?></h1></header>
|
|
|
|
<div class="inner">
|
|
|
|
</div>
|
|
</section>
|
|
</div>
|
|
</div>
|