mirror of
https://github.com/Karaka-Management/oms-Help.git
synced 2026-02-12 19:28:40 +00:00
add css version
This commit is contained in:
parent
9611c3e9ac
commit
ac341fc65f
|
|
@ -14,11 +14,14 @@ declare(strict_types=1);
|
||||||
|
|
||||||
namespace Modules\Help\Controller;
|
namespace Modules\Help\Controller;
|
||||||
|
|
||||||
|
use Modules\Admin\Models\SettingsEnum;
|
||||||
|
use Modules\Media\Models\MediaMapper;
|
||||||
use phpOMS\Contract\RenderableInterface;
|
use phpOMS\Contract\RenderableInterface;
|
||||||
use phpOMS\Message\RequestAbstract;
|
use phpOMS\Message\RequestAbstract;
|
||||||
use phpOMS\Message\ResponseAbstract;
|
use phpOMS\Message\ResponseAbstract;
|
||||||
use phpOMS\Utils\Parser\Markdown\Markdown;
|
use phpOMS\Utils\Parser\Markdown\Markdown;
|
||||||
use phpOMS\Views\View;
|
use phpOMS\Views\View;
|
||||||
|
use Web\Backend\Views\TableView;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Help class.
|
* Help class.
|
||||||
|
|
@ -125,6 +128,39 @@ final class BackendController extends Controller
|
||||||
|
|
||||||
$view->setData('modules', $this->app->moduleManager->getInstalledModules());
|
$view->setData('modules', $this->app->moduleManager->getInstalledModules());
|
||||||
|
|
||||||
|
/** @var \Model\Setting[] $exportTemplates */
|
||||||
|
$exportTemplates = $this->app->appSettings->get(
|
||||||
|
names: [
|
||||||
|
SettingsEnum::DEFAULT_PDF_EXPORT_TEMPLATE,
|
||||||
|
SettingsEnum::DEFAULT_EXCEL_EXPORT_TEMPLATE,
|
||||||
|
SettingsEnum::DEFAULT_CSV_EXPORT_TEMPLATE,
|
||||||
|
SettingsEnum::DEFAULT_WORD_EXPORT_TEMPLATE,
|
||||||
|
SettingsEnum::DEFAULT_EMAIL_EXPORT_TEMPLATE,
|
||||||
|
],
|
||||||
|
module: 'Admin'
|
||||||
|
);
|
||||||
|
|
||||||
|
$templateIds = [];
|
||||||
|
foreach ($exportTemplates as $template) {
|
||||||
|
$templateIds[] = (int) $template->content;
|
||||||
|
}
|
||||||
|
|
||||||
|
$mediaTemplates = MediaMapper::getAll()
|
||||||
|
->where('id', $templateIds, 'in')
|
||||||
|
->execute();
|
||||||
|
|
||||||
|
$tableView = new TableView($this->app->l11nManager, $request, $response);
|
||||||
|
$tableView->module = 'Help';
|
||||||
|
$tableView->theme = 'Backend';
|
||||||
|
$tableView->setTitleTemplate('/Web/Backend/Themes/table-title');
|
||||||
|
$tableView->setExportTemplate('/Web/Backend/Themes/popup-export-data');
|
||||||
|
$tableView->setExportTemplates($mediaTemplates);
|
||||||
|
$tableView->setColumnHeaderElementTemplate('/Web/Backend/Themes/header-element-table');
|
||||||
|
$tableView->setFilterTemplate('/Web/Backend/Themes/popup-filter-table');
|
||||||
|
$tableView->setSortTemplate('/Web/Backend/Themes/sort-table');
|
||||||
|
|
||||||
|
$view->addData('tableView', $tableView);
|
||||||
|
|
||||||
return $view;
|
return $view;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -20,32 +20,31 @@ use phpOMS\Uri\UriFactory;
|
||||||
*/
|
*/
|
||||||
$modules = $this->getData('modules');
|
$modules = $this->getData('modules');
|
||||||
|
|
||||||
/*
|
$tableView = $this->getData('tableView');
|
||||||
$previous = empty($modules) ? '{/prefix}help/module/list' : '{/prefix}help/module/list?{?}&id=' . \reset($modules)->getId() . '&ptype=p';
|
$tableView->id = 'helpModuleList';
|
||||||
$next = empty($modules) ? '{/prefix}help/module/list' : '{/prefix}help/module/list?{?}&id=' . \end($modules)->getId() . '&ptype=n';
|
$tableView->baseUri = '{/prefix}help/module/list';
|
||||||
*/
|
$tableView->exportUri = '{/api}admin/module/list/export';
|
||||||
|
$tableView->setObjects($modules);
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xs-12">
|
<div class="col-xs-12">
|
||||||
<div class="portlet">
|
<div class="portlet">
|
||||||
<div class="portlet-head"><?= $this->getHtml('Modules'); ?><i class="fa fa-download floatRight download btn"></i></div>
|
<div class="portlet-head">
|
||||||
|
<?= $tableView->renderTitle(
|
||||||
|
$this->getHtml('Modules'),
|
||||||
|
false
|
||||||
|
); ?>
|
||||||
|
</div>
|
||||||
<div class="slider">
|
<div class="slider">
|
||||||
<table id="moduleList" class="default sticky">
|
<table id="<?= $tableView->id; ?>" class="default sticky">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="wf-100"><?= $this->getHtml('Name'); ?>
|
<td class="wf-100"><?= $tableView->renderHeaderElement(
|
||||||
<label for="moduleList-sort-1">
|
'module',
|
||||||
<input type="radio" name="moduleList-sort" id="moduleList-sort-1">
|
$this->getHtml('Name'),
|
||||||
<i class="sort-asc fa fa-chevron-up"></i>
|
'text'
|
||||||
</label>
|
); ?>
|
||||||
<label for="moduleList-sort-2">
|
|
||||||
<input type="radio" name="moduleList-sort" id="moduleList-sort-2">
|
|
||||||
<i class="sort-desc fa fa-chevron-down"></i>
|
|
||||||
</label>
|
|
||||||
<label>
|
|
||||||
<i class="filter fa fa-filter"></i>
|
|
||||||
</label>
|
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php
|
<?php
|
||||||
$count = 0;
|
$count = 0;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user