mirror of
https://github.com/Karaka-Management/oms-Script.git
synced 2026-02-11 18:58:40 +00:00
many fixes and expands and module expansions
This commit is contained in:
parent
fa0305b87d
commit
d62c0ddbe9
|
|
@ -346,6 +346,7 @@ final class ApiController extends Controller
|
||||||
$this->app->orgId,
|
$this->app->orgId,
|
||||||
$this->app->appName,
|
$this->app->appName,
|
||||||
self::MODULE_NAME,
|
self::MODULE_NAME,
|
||||||
|
self::MODULE_NAME,
|
||||||
PermissionState::TEMPLATE,
|
PermissionState::TEMPLATE,
|
||||||
$template->getId(),
|
$template->getId(),
|
||||||
null,
|
null,
|
||||||
|
|
@ -456,6 +457,7 @@ final class ApiController extends Controller
|
||||||
$this->app->orgId,
|
$this->app->orgId,
|
||||||
$this->app->appName,
|
$this->app->appName,
|
||||||
self::MODULE_NAME,
|
self::MODULE_NAME,
|
||||||
|
self::MODULE_NAME,
|
||||||
PermissionState::REPORT,
|
PermissionState::REPORT,
|
||||||
$report->getId(),
|
$report->getId(),
|
||||||
null,
|
null,
|
||||||
|
|
|
||||||
|
|
@ -66,6 +66,7 @@ final class BackendController extends Controller
|
||||||
$view->addData('collections', $collection);
|
$view->addData('collections', $collection);
|
||||||
$view->addData('path', $path);
|
$view->addData('path', $path);
|
||||||
$view->addData('reports', $templates);
|
$view->addData('reports', $templates);
|
||||||
|
$view->addData('account', $this->app->accountManager->get($request->header->account));
|
||||||
|
|
||||||
return $view;
|
return $view;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@ echo $this->getData('nav')->render(); ?>
|
||||||
<tr><td><label for="iTemplate"><?= $this->getHtml('Template'); ?></label>
|
<tr><td><label for="iTemplate"><?= $this->getHtml('Template'); ?></label>
|
||||||
<tr><td><select id="iTemplate" name="template">
|
<tr><td><select id="iTemplate" name="template">
|
||||||
<?php foreach ($templateList as $key => $value) : ?>
|
<?php foreach ($templateList as $key => $value) : ?>
|
||||||
<option value="<?= $this->printHtml($key); ?>"><?= $this->printHtml($value->name); ?>
|
<option value="<?= (int) $key; ?>"><?= $this->printHtml($value->name); ?>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
</select>
|
</select>
|
||||||
</table>
|
</table>
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,9 @@ use phpOMS\Uri\UriFactory;
|
||||||
* @var \Modules\Helper\Models\Template[] $templates
|
* @var \Modules\Helper\Models\Template[] $templates
|
||||||
*/
|
*/
|
||||||
$templates = $this->getData('reports');
|
$templates = $this->getData('reports');
|
||||||
|
$account = $this->getData('account');
|
||||||
|
|
||||||
|
$accountDir = $account->getId() . ' ' . $account->login;
|
||||||
|
|
||||||
/** @var \Modules\Media\Models\Collection[] */
|
/** @var \Modules\Media\Models\Collection[] */
|
||||||
$collections = $this->getData('collections');
|
$collections = $this->getData('collections');
|
||||||
|
|
@ -32,17 +35,23 @@ echo $this->getData('nav')->render(); ?>
|
||||||
<div class="col-xs-12">
|
<div class="col-xs-12">
|
||||||
<div class="box">
|
<div class="box">
|
||||||
<ul class="crumbs-2">
|
<ul class="crumbs-2">
|
||||||
|
<li data-href="<?= UriFactory::build('{/prefix}helper/list?path=/Accounts/' . $accountDir); ?>"><a href="<?= UriFactory::build('{/prefix}helper/list?path=/Accounts/' . $accountDir); ?>"><i class="fa fa-home"></i></a>
|
||||||
<li data-href="<?= UriFactory::build('{/prefix}helper/list?path=/'); ?>"><a href="<?= UriFactory::build('{/prefix}helper/list?path=/'); ?>">/</a></li>
|
<li data-href="<?= UriFactory::build('{/prefix}helper/list?path=/'); ?>"><a href="<?= UriFactory::build('{/prefix}helper/list?path=/'); ?>">/</a></li>
|
||||||
<?php
|
<?php
|
||||||
$subPath = '';
|
$subPath = '';
|
||||||
$paths = \explode('/', \ltrim($mediaPath, '/'));
|
$paths = \explode('/', \ltrim($mediaPath, '/'));
|
||||||
$length = \count($paths);
|
$length = \count($paths);
|
||||||
|
$parentPath = '';
|
||||||
|
|
||||||
for ($i = 0; $i < $length; ++$i) :
|
for ($i = 0; $i < $length; ++$i) :
|
||||||
if ($paths[$i] === '') {
|
if ($paths[$i] === '') {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($i === $length - 1) {
|
||||||
|
$parentPath = $subPath === '' ? '/' : $subPath;
|
||||||
|
}
|
||||||
|
|
||||||
$subPath .= '/' . $paths[$i];
|
$subPath .= '/' . $paths[$i];
|
||||||
|
|
||||||
$url = UriFactory::build('{/prefix}helper/list?path=' . $subPath);
|
$url = UriFactory::build('{/prefix}helper/list?path=' . $subPath);
|
||||||
|
|
@ -61,6 +70,10 @@ echo $this->getData('nav')->render(); ?>
|
||||||
<table id="helperList" class="default">
|
<table id="helperList" class="default">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
<td><label class="checkbox" for="helperList-0">
|
||||||
|
<input type="checkbox" id="helperList-0" name="helperselect">
|
||||||
|
<span class="checkmark"></span>
|
||||||
|
</label>
|
||||||
<td>
|
<td>
|
||||||
<td class="wf-100"><?= $this->getHtml('Name'); ?>
|
<td class="wf-100"><?= $this->getHtml('Name'); ?>
|
||||||
<label for="helperList-sort-1">
|
<label for="helperList-sort-1">
|
||||||
|
|
@ -111,10 +124,25 @@ echo $this->getData('nav')->render(); ?>
|
||||||
<i class="filter fa fa-filter"></i>
|
<i class="filter fa fa-filter"></i>
|
||||||
</label>
|
</label>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
<?php if (!empty($parentPath)) : $url = UriFactory::build('{/prefix}helper/list?path=' . $parentPath); ?>
|
||||||
|
<tr tabindex="0" data-href="<?= $url; ?>">
|
||||||
|
<td>
|
||||||
|
<td data-label="<?= $this->getHtml('Type'); ?>"><a href="<?= $url; ?>"><i class="fa fa-folder-open-o"></i></a>
|
||||||
|
<td data-label="<?= $this->getHtml('Name'); ?>"><a href="<?= $url; ?>">..
|
||||||
|
</a>
|
||||||
|
<td>
|
||||||
|
<td>
|
||||||
|
<td>
|
||||||
|
<td>
|
||||||
|
<?php endif; ?>
|
||||||
<?php $count = 0; foreach ($collections as $key => $value) : ++$count;
|
<?php $count = 0; foreach ($collections as $key => $value) : ++$count;
|
||||||
$url = UriFactory::build('{/prefix}helper/list?path=' . \rtrim($value->getVirtualPath(), '/') . '/' . $value->name);
|
$url = UriFactory::build('{/prefix}helper/list?path=' . \rtrim($value->getVirtualPath(), '/') . '/' . $value->name);
|
||||||
?>
|
?>
|
||||||
<tr data-href="<?= $url; ?>">
|
<tr data-href="<?= $url; ?>">
|
||||||
|
<td><label class="checkbox" for="helperList-<?= $key; ?>">
|
||||||
|
<input type="checkbox" id="helperList-<?= $key; ?>" name="helperselect">
|
||||||
|
<span class="checkmark"></span>
|
||||||
|
</label>
|
||||||
<td><a href="<?= $url; ?>"><i class="fa fa-folder-open-o"></i></a>
|
<td><a href="<?= $url; ?>"><i class="fa fa-folder-open-o"></i></a>
|
||||||
<td><a href="<?= $url; ?>"><?= $this->printHtml($value->name); ?></a>
|
<td><a href="<?= $url; ?>"><?= $this->printHtml($value->name); ?></a>
|
||||||
<td>
|
<td>
|
||||||
|
|
@ -124,6 +152,10 @@ echo $this->getData('nav')->render(); ?>
|
||||||
<?php foreach ($templates as $key => $template) : ++$count;
|
<?php foreach ($templates as $key => $template) : ++$count;
|
||||||
$url = UriFactory::build('{/prefix}helper/report/view?{?}&id=' . $template->getId()); ?>
|
$url = UriFactory::build('{/prefix}helper/report/view?{?}&id=' . $template->getId()); ?>
|
||||||
<tr tabindex="0" data-href="<?= $url; ?>">
|
<tr tabindex="0" data-href="<?= $url; ?>">
|
||||||
|
<td><label class="checkbox" for="helperList-<?= $key; ?>">
|
||||||
|
<input type="checkbox" id="helperList-<?= $key; ?>" name="helperselect">
|
||||||
|
<span class="checkmark"></span>
|
||||||
|
</label>
|
||||||
<td>
|
<td>
|
||||||
<td data-label="<?= $this->getHtml('Name'); ?>"><a href="<?= $url; ?>"><?= $this->printHtml($template->name); ?></a>
|
<td data-label="<?= $this->getHtml('Name'); ?>"><a href="<?= $url; ?>"><?= $this->printHtml($template->name); ?></a>
|
||||||
<td data-label="<?= $this->getHtml('Tag'); ?>">
|
<td data-label="<?= $this->getHtml('Tag'); ?>">
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user