This commit is contained in:
Dennis Eichhorn 2022-12-10 22:17:54 +01:00
parent 71fc743988
commit e63d68bd41
5 changed files with 19 additions and 19 deletions

View File

@ -5,7 +5,7 @@
"type": 2,
"subtype": 1,
"name": "Helper",
"uri": "{/prefix}helper/list",
"uri": "{/lang}/{/app}/helper/list",
"target": "self",
"icon": null,
"order": 60,
@ -19,7 +19,7 @@
"type": 3,
"subtype": 1,
"name": "List",
"uri": "{/prefix}helper/list",
"uri": "{/lang}/{/app}/helper/list",
"target": "self",
"icon": null,
"order": 1,
@ -34,7 +34,7 @@
"type": 3,
"subtype": 5,
"name": "CreateReport",
"uri": "{/prefix}helper/report/create?{?}",
"uri": "{/lang}/{/app}/helper/report/create?{?}",
"target": "self",
"icon": null,
"order": 5,
@ -49,7 +49,7 @@
"type": 3,
"subtype": 5,
"name": "CreateTemplate",
"uri": "{/prefix}helper/template/create?{?}",
"uri": "{/lang}/{/app}/helper/template/create?{?}",
"target": "self",
"icon": null,
"order": 10,

View File

@ -29,16 +29,16 @@ $accountDir = $account->getId() . ' ' . $account->login;
$collections = $this->getData('collections');
$mediaPath = \urldecode($this->getData('path') ?? '/');
$previous = empty($templates) ? 'helper/list' : 'helper/list?{?}&id=' . \reset($templates)->getId() . '&ptype=p';
$next = empty($templates) ? 'helper/list' : 'helper/list?{?}&id=' . \end($templates)->getId() . '&ptype=n';
$previous = empty($templates) ? '{/lang}/{/app}/helper/list' : '{/lang}/{/app}/helper/list?{?}&id=' . \reset($templates)->getId() . '&ptype=p';
$next = empty($templates) ? '{/lang}/{/app}/helper/list' : 'helper/list?{?}&id=' . \end($templates)->getId() . '&ptype=n';
echo $this->getData('nav')->render(); ?>
<div class="row">
<div class="col-xs-12">
<div class="box">
<ul class="crumbs-2">
<li data-href="<?= UriFactory::build('helper/list?path=/Accounts/' . $accountDir); ?>"><a href="<?= UriFactory::build('helper/list?path=/Accounts/' . $accountDir); ?>"><i class="fa fa-home"></i></a>
<li data-href="<?= UriFactory::build('helper/list?path=/'); ?>"><a href="<?= UriFactory::build('helper/list?path=/'); ?>">/</a></li>
<li data-href="<?= UriFactory::build('{/lang}/{/app}/helper/list?path=/Accounts/' . $accountDir); ?>"><a href="<?= UriFactory::build('{/lang}/{/app}/helper/list?path=/Accounts/' . $accountDir); ?>"><i class="fa fa-home"></i></a>
<li data-href="<?= UriFactory::build('{/lang}/{/app}/helper/list?path=/'); ?>"><a href="<?= UriFactory::build('{/lang}/{/app}/helper/list?path=/'); ?>">/</a></li>
<?php
$subPath = '';
$paths = \explode('/', \ltrim($mediaPath, '/'));
@ -56,7 +56,7 @@ echo $this->getData('nav')->render(); ?>
$subPath .= '/' . $paths[$i];
$url = UriFactory::build('helper/list?path=' . $subPath);
$url = UriFactory::build('{/lang}/{/app}/helper/list?path=' . $subPath);
?>
<li data-href="<?= $url; ?>"<?= $i === $length - 1 ? 'class="active"' : ''; ?>><a href="<?= $url; ?>"><?= $this->printHtml($paths[$i]); ?></a></li>
<?php endfor; ?>
@ -127,7 +127,7 @@ echo $this->getData('nav')->render(); ?>
<i class="filter fa fa-filter"></i>
</label>
<tbody>
<?php if (!empty($parentPath)) : $url = UriFactory::build('helper/list?path=' . $parentPath); ?>
<?php if (!empty($parentPath)) : $url = UriFactory::build('{/lang}/{/app}/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>
@ -139,7 +139,7 @@ echo $this->getData('nav')->render(); ?>
<td>
<?php endif; ?>
<?php $count = 0; foreach ($collections as $key => $value) : ++$count;
$url = UriFactory::build('helper/list?path=' . \rtrim($value->getVirtualPath(), '/') . '/' . $value->name);
$url = UriFactory::build('{/lang}/{/app}/helper/list?path=' . \rtrim($value->getVirtualPath(), '/') . '/' . $value->name);
?>
<tr data-href="<?= $url; ?>">
<td><label class="checkbox" for="helperList-<?= $key; ?>">
@ -149,11 +149,11 @@ echo $this->getData('nav')->render(); ?>
<td><a href="<?= $url; ?>"><i class="fa fa-folder-open-o"></i></a>
<td><a href="<?= $url; ?>"><?= $this->printHtml($value->name); ?></a>
<td>
<td><a class="content" href="<?= UriFactory::build('profile/single?{?}&for=' . $value->createdBy->getId()); ?>"><?= $this->printHtml($this->renderUserName('%3$s %2$s %1$s', [$value->createdBy->name1, $value->createdBy->name2, $value->createdBy->name3, $value->createdBy->login ?? ''])); ?></a>
<td><a class="content" href="<?= UriFactory::build('{/lang}/{/app}/profile/single?{?}&for=' . $value->createdBy->getId()); ?>"><?= $this->printHtml($this->renderUserName('%3$s %2$s %1$s', [$value->createdBy->name1, $value->createdBy->name2, $value->createdBy->name3, $value->createdBy->login ?? ''])); ?></a>
<td><a href="<?= $url; ?>"><?= $this->printHtml($value->createdAt->format('Y-m-d')); ?></a>
<?php endforeach; ?>
<?php foreach ($templates as $key => $template) : ++$count;
$url = UriFactory::build('helper/report/view?{?}&id=' . $template->getId()); ?>
$url = UriFactory::build('{/lang}/{/app}/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">
@ -165,7 +165,7 @@ echo $this->getData('nav')->render(); ?>
<?php $tags = $template->getTags(); foreach ($tags as $tag) : ?>
<span class="tag" style="background: <?= $this->printHtml($tag->color); ?>"><?= $tag->icon !== null ? '<i class="' . $this->printHtml($tag->icon ?? '') . '"></i>' : ''; ?><?= $this->printHtml($tag->getL11n()); ?></span>
<?php endforeach; ?>
<td data-label="<?= $this->getHtml('Creator'); ?>"><a class="content" href="<?= UriFactory::build('profile/single?{?}&for=' . $template->createdBy->getId()); ?>"><?= $this->printHtml($this->renderUserName('%3$s %2$s %1$s', [$template->createdBy->name1, $template->createdBy->name2, $template->createdBy->name3, $template->createdBy->login ?? ''])); ?></a>
<td data-label="<?= $this->getHtml('Creator'); ?>"><a class="content" href="<?= UriFactory::build('{/lang}/{/app}/profile/single?{?}&for=' . $template->createdBy->getId()); ?>"><?= $this->printHtml($this->renderUserName('%3$s %2$s %1$s', [$template->createdBy->name1, $template->createdBy->name2, $template->createdBy->name3, $template->createdBy->login ?? ''])); ?></a>
<td data-label="<?= $this->getHtml('Updated'); ?>"><a href="<?= $url; ?>"><?= $this->printHtml($template->createdAt->format('Y-m-d')); ?></a>
<?php endforeach; ?>
<?php if ($count === 0) : ?>

View File

@ -97,7 +97,7 @@ echo $this->getData('nav')->render(); ?>
<option value="json"<?= $this->printHtml((!isset($tcoll['json'])) ? ' disabled' : ''); ?>>Json
</select>
<tr>
<td><a tabindex="0" target="_blank" class="button" href="<?= UriFactory::build('{/api}helper/report/export?{?}'); ?>&type={#iExport}&lang={#iLang}{#iUiSettings}"><?= $this->getHtml('Export'); ?></a>
<td><a tabindex="0" target="_blank" class="button" href="<?= UriFactory::build('{/lang}/{/app}/{/api}helper/report/export?{?}'); ?>&type={#iExport}&lang={#iLang}{#iUiSettings}"><?= $this->getHtml('Export'); ?></a>
</table>
</form>
</div>
@ -116,7 +116,7 @@ echo $this->getData('nav')->render(); ?>
<?php endforeach; ?>
</table>
</div>
<div class="portlet-foot"><a tabindex="0" class="button" href="<?= UriFactory::build('{%}'); ?>&lang={#iLang}{#iUiSettings}"><?= $this->getHtml('Load'); ?></a></div>
<div class="portlet-foot"><a tabindex="0" class="button" href="<?= UriFactory::build('{/lang}/{/app}/{%}'); ?>&lang={#iLang}{#iUiSettings}"><?= $this->getHtml('Load'); ?></a></div>
</form>
</div>
<?php endif; ?>
@ -146,7 +146,7 @@ echo $this->getData('nav')->render(); ?>
<td><?= $this->printHtml($template->name); ?>
<tr>
<td><?= $this->getHtml('Creator'); ?>
<td><a href="<?= UriFactory::build('profile/single?for=' . $template->createdBy->getId()); ?>"><?= $this->printHtml($template->createdBy->name1); ?></a>
<td><a href="<?= UriFactory::build('{/lang}/{/app}/profile/single?for=' . $template->createdBy->getId()); ?>"><?= $this->printHtml($template->createdBy->name1); ?></a>
<tr>
<td><?= $this->getHtml('Created'); ?>
<td><?= $template->createdAt->format('Y-m-d'); ?>

View File

@ -12,7 +12,7 @@
},
"creator": {
"name": "Karaka",
"website": "www.spl1nes.com"
"website": "jingga.app"
},
"description": "The helper module supports creating static and dynamic reportings.",
"directory": "Helper",

View File

@ -38,7 +38,7 @@ $duration = (int) ($this->request->getData('duration') ?? 10);
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" href="<?= UriFactory::build('{/base}/' . \ltrim($tcoll['css']['styles.css']->getPath(), '/')); ?>">
<link rel="stylesheet" type="text/css" href="<?= UriFactory::build('{/lang}/{/app}/{/base}/' . \ltrim($tcoll['css']['styles.css']->getPath(), '/')); ?>">
</head>
<body>
<table>