mirror of
https://github.com/Karaka-Management/oms-Help.git
synced 2026-01-22 09:48: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;
|
||||
|
||||
use Modules\Admin\Models\SettingsEnum;
|
||||
use Modules\Media\Models\MediaMapper;
|
||||
use phpOMS\Contract\RenderableInterface;
|
||||
use phpOMS\Message\RequestAbstract;
|
||||
use phpOMS\Message\ResponseAbstract;
|
||||
use phpOMS\Utils\Parser\Markdown\Markdown;
|
||||
use phpOMS\Views\View;
|
||||
use Web\Backend\Views\TableView;
|
||||
|
||||
/**
|
||||
* Help class.
|
||||
|
|
@ -125,6 +128,39 @@ final class BackendController extends Controller
|
|||
|
||||
$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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -20,32 +20,31 @@ use phpOMS\Uri\UriFactory;
|
|||
*/
|
||||
$modules = $this->getData('modules');
|
||||
|
||||
/*
|
||||
$previous = empty($modules) ? '{/prefix}help/module/list' : '{/prefix}help/module/list?{?}&id=' . \reset($modules)->getId() . '&ptype=p';
|
||||
$next = empty($modules) ? '{/prefix}help/module/list' : '{/prefix}help/module/list?{?}&id=' . \end($modules)->getId() . '&ptype=n';
|
||||
*/
|
||||
$tableView = $this->getData('tableView');
|
||||
$tableView->id = 'helpModuleList';
|
||||
$tableView->baseUri = '{/prefix}help/module/list';
|
||||
$tableView->exportUri = '{/api}admin/module/list/export';
|
||||
$tableView->setObjects($modules);
|
||||
?>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<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">
|
||||
<table id="moduleList" class="default sticky">
|
||||
<table id="<?= $tableView->id; ?>" class="default sticky">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="wf-100"><?= $this->getHtml('Name'); ?>
|
||||
<label for="moduleList-sort-1">
|
||||
<input type="radio" name="moduleList-sort" id="moduleList-sort-1">
|
||||
<i class="sort-asc fa fa-chevron-up"></i>
|
||||
</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>
|
||||
<td class="wf-100"><?= $tableView->renderHeaderElement(
|
||||
'module',
|
||||
$this->getHtml('Name'),
|
||||
'text'
|
||||
); ?>
|
||||
<tbody>
|
||||
<?php
|
||||
$count = 0;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user