mirror of
https://github.com/Karaka-Management/oms-Script.git
synced 2026-01-11 12:28:41 +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->appName,
|
||||
self::MODULE_NAME,
|
||||
self::MODULE_NAME,
|
||||
PermissionState::TEMPLATE,
|
||||
$template->getId(),
|
||||
null,
|
||||
|
|
@ -456,6 +457,7 @@ final class ApiController extends Controller
|
|||
$this->app->orgId,
|
||||
$this->app->appName,
|
||||
self::MODULE_NAME,
|
||||
self::MODULE_NAME,
|
||||
PermissionState::REPORT,
|
||||
$report->getId(),
|
||||
null,
|
||||
|
|
|
|||
|
|
@ -66,6 +66,7 @@ final class BackendController extends Controller
|
|||
$view->addData('collections', $collection);
|
||||
$view->addData('path', $path);
|
||||
$view->addData('reports', $templates);
|
||||
$view->addData('account', $this->app->accountManager->get($request->header->account));
|
||||
|
||||
return $view;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ echo $this->getData('nav')->render(); ?>
|
|||
<tr><td><label for="iTemplate"><?= $this->getHtml('Template'); ?></label>
|
||||
<tr><td><select id="iTemplate" name="template">
|
||||
<?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; ?>
|
||||
</select>
|
||||
</table>
|
||||
|
|
|
|||
|
|
@ -19,6 +19,9 @@ use phpOMS\Uri\UriFactory;
|
|||
* @var \Modules\Helper\Models\Template[] $templates
|
||||
*/
|
||||
$templates = $this->getData('reports');
|
||||
$account = $this->getData('account');
|
||||
|
||||
$accountDir = $account->getId() . ' ' . $account->login;
|
||||
|
||||
/** @var \Modules\Media\Models\Collection[] */
|
||||
$collections = $this->getData('collections');
|
||||
|
|
@ -32,17 +35,23 @@ echo $this->getData('nav')->render(); ?>
|
|||
<div class="col-xs-12">
|
||||
<div class="box">
|
||||
<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>
|
||||
<?php
|
||||
$subPath = '';
|
||||
$paths = \explode('/', \ltrim($mediaPath, '/'));
|
||||
$length = \count($paths);
|
||||
$parentPath = '';
|
||||
|
||||
for ($i = 0; $i < $length; ++$i) :
|
||||
if ($paths[$i] === '') {
|
||||
continue;
|
||||
}
|
||||
|
||||
if ($i === $length - 1) {
|
||||
$parentPath = $subPath === '' ? '/' : $subPath;
|
||||
}
|
||||
|
||||
$subPath .= '/' . $paths[$i];
|
||||
|
||||
$url = UriFactory::build('{/prefix}helper/list?path=' . $subPath);
|
||||
|
|
@ -61,6 +70,10 @@ echo $this->getData('nav')->render(); ?>
|
|||
<table id="helperList" class="default">
|
||||
<thead>
|
||||
<tr>
|
||||
<td><label class="checkbox" for="helperList-0">
|
||||
<input type="checkbox" id="helperList-0" name="helperselect">
|
||||
<span class="checkmark"></span>
|
||||
</label>
|
||||
<td>
|
||||
<td class="wf-100"><?= $this->getHtml('Name'); ?>
|
||||
<label for="helperList-sort-1">
|
||||
|
|
@ -111,10 +124,25 @@ echo $this->getData('nav')->render(); ?>
|
|||
<i class="filter fa fa-filter"></i>
|
||||
</label>
|
||||
<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;
|
||||
$url = UriFactory::build('{/prefix}helper/list?path=' . \rtrim($value->getVirtualPath(), '/') . '/' . $value->name);
|
||||
?>
|
||||
<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; ?>"><?= $this->printHtml($value->name); ?></a>
|
||||
<td>
|
||||
|
|
@ -124,6 +152,10 @@ echo $this->getData('nav')->render(); ?>
|
|||
<?php foreach ($templates as $key => $template) : ++$count;
|
||||
$url = UriFactory::build('{/prefix}helper/report/view?{?}&id=' . $template->getId()); ?>
|
||||
<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 data-label="<?= $this->getHtml('Name'); ?>"><a href="<?= $url; ?>"><?= $this->printHtml($template->name); ?></a>
|
||||
<td data-label="<?= $this->getHtml('Tag'); ?>">
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user