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

View File

@ -29,16 +29,16 @@ $accountDir = $account->getId() . ' ' . $account->login;
$collections = $this->getData('collections'); $collections = $this->getData('collections');
$mediaPath = \urldecode($this->getData('path') ?? '/'); $mediaPath = \urldecode($this->getData('path') ?? '/');
$previous = empty($templates) ? 'helper/list' : 'helper/list?{?}&id=' . \reset($templates)->getId() . '&ptype=p'; $previous = empty($templates) ? '{/lang}/{/app}/helper/list' : '{/lang}/{/app}/helper/list?{?}&id=' . \reset($templates)->getId() . '&ptype=p';
$next = empty($templates) ? 'helper/list' : 'helper/list?{?}&id=' . \end($templates)->getId() . '&ptype=n'; $next = empty($templates) ? '{/lang}/{/app}/helper/list' : 'helper/list?{?}&id=' . \end($templates)->getId() . '&ptype=n';
echo $this->getData('nav')->render(); ?> echo $this->getData('nav')->render(); ?>
<div class="row"> <div class="row">
<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('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('{/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('helper/list?path=/'); ?>"><a href="<?= UriFactory::build('helper/list?path=/'); ?>">/</a></li> <li data-href="<?= UriFactory::build('{/lang}/{/app}/helper/list?path=/'); ?>"><a href="<?= UriFactory::build('{/lang}/{/app}/helper/list?path=/'); ?>">/</a></li>
<?php <?php
$subPath = ''; $subPath = '';
$paths = \explode('/', \ltrim($mediaPath, '/')); $paths = \explode('/', \ltrim($mediaPath, '/'));
@ -56,7 +56,7 @@ echo $this->getData('nav')->render(); ?>
$subPath .= '/' . $paths[$i]; $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> <li data-href="<?= $url; ?>"<?= $i === $length - 1 ? 'class="active"' : ''; ?>><a href="<?= $url; ?>"><?= $this->printHtml($paths[$i]); ?></a></li>
<?php endfor; ?> <?php endfor; ?>
@ -127,7 +127,7 @@ 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('helper/list?path=' . $parentPath); ?> <?php if (!empty($parentPath)) : $url = UriFactory::build('{/lang}/{/app}/helper/list?path=' . $parentPath); ?>
<tr tabindex="0" data-href="<?= $url; ?>"> <tr tabindex="0" data-href="<?= $url; ?>">
<td> <td>
<td data-label="<?= $this->getHtml('Type'); ?>"><a href="<?= $url; ?>"><i class="fa fa-folder-open-o"></i></a> <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> <td>
<?php endif; ?> <?php endif; ?>
<?php $count = 0; foreach ($collections as $key => $value) : ++$count; <?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; ?>"> <tr data-href="<?= $url; ?>">
<td><label class="checkbox" for="helperList-<?= $key; ?>"> <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; ?>"><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>
<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> <td><a href="<?= $url; ?>"><?= $this->printHtml($value->createdAt->format('Y-m-d')); ?></a>
<?php endforeach; ?> <?php endforeach; ?>
<?php foreach ($templates as $key => $template) : ++$count; <?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; ?>"> <tr tabindex="0" data-href="<?= $url; ?>">
<td><label class="checkbox" for="helperList-<?= $key; ?>"> <td><label class="checkbox" for="helperList-<?= $key; ?>">
<input type="checkbox" id="helperList-<?= $key; ?>" name="helperselect"> <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) : ?> <?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> <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; ?> <?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> <td data-label="<?= $this->getHtml('Updated'); ?>"><a href="<?= $url; ?>"><?= $this->printHtml($template->createdAt->format('Y-m-d')); ?></a>
<?php endforeach; ?> <?php endforeach; ?>
<?php if ($count === 0) : ?> <?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 <option value="json"<?= $this->printHtml((!isset($tcoll['json'])) ? ' disabled' : ''); ?>>Json
</select> </select>
<tr> <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> </table>
</form> </form>
</div> </div>
@ -116,7 +116,7 @@ echo $this->getData('nav')->render(); ?>
<?php endforeach; ?> <?php endforeach; ?>
</table> </table>
</div> </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> </form>
</div> </div>
<?php endif; ?> <?php endif; ?>
@ -146,7 +146,7 @@ echo $this->getData('nav')->render(); ?>
<td><?= $this->printHtml($template->name); ?> <td><?= $this->printHtml($template->name); ?>
<tr> <tr>
<td><?= $this->getHtml('Creator'); ?> <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> <tr>
<td><?= $this->getHtml('Created'); ?> <td><?= $this->getHtml('Created'); ?>
<td><?= $template->createdAt->format('Y-m-d'); ?> <td><?= $template->createdAt->format('Y-m-d'); ?>

View File

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

View File

@ -38,7 +38,7 @@ $duration = (int) ($this->request->getData('duration') ?? 10);
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1"> <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> </head>
<body> <body>
<table> <table>