This commit is contained in:
Dennis Eichhorn 2024-03-10 02:24:56 +00:00
parent 8ed9b9b7ef
commit 48efd5cdc4
3 changed files with 37 additions and 22 deletions

View File

@ -107,7 +107,10 @@ echo $this->data['nav']->render(); ?>
<td data-label="<?= $this->getHtml('Tag'); ?>">
<?php
foreach ($template->tags as $tag) : ?>
<span class="tag" style="background: <?= $this->printHtml($tag->color); ?>"><?= empty($tag->icon) ? '' : ''; ?><?= $this->printHtml($tag->getL11n()); ?></span>
<span class="tag" style="background: <?= $this->printHtml($tag->color); ?>">
<?= empty($tag->icon) ? '' : '<i class="g-icon">' . $this->printHtml($tag->icon) . '</i>'; ?>
<?= $this->printHtml($tag->getL11n()); ?>
</span>
<?php endforeach; ?>
<td data-label="<?= $this->getHtml('Creator'); ?>"><a class="content" href="<?= UriFactory::build('{/base}/profile/view?{?}&for=' . $template->createdBy->id); ?>"><?= $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>

View File

@ -21,26 +21,35 @@ echo $this->data['nav']->render(); ?>
<form id="helper-template-create" action="<?= \phpOMS\Uri\UriFactory::build('{/api}helper/report/template'); ?>" method="post">
<div class="portlet-head"><?= $this->getHtml('Template'); ?></div>
<div class="portlet-body">
<table class="layout wf-100" style="table-layout: fixed">
<tbody>
<tr><td><label for="iTitle"><?= $this->getHtml('Title'); ?></label>
<tr><td><input id="iTitle" name="name" type="text" placeholder="P&L Reporting" required>
<tr><td><label for="iDescription"><?= $this->getHtml('Description'); ?></label>
<tr><td><?= $this->getData('editor')->render('report-editor'); ?>
<tr><td><?= $this->getData('editor')->getData('text')->render('report-editor', 'description', 'helper-template-create'); ?>
<tr><td>
<label class="checkbox" for="iStandalone">
<input type="checkbox" name="standalone" id="iStandalone" value="1" checked>
<span class="checkmark"></span>
<?= $this->getHtml('Standalone'); ?>
</label>
<tr><td><label for="iExpected"><?= $this->getHtml('Expected'); ?></label>
<tr><td>
<div class="ipt-wrap">
<div class="ipt-first"><input id="iExpected" type="text" placeholder="file.csv"><input name="expected" type="hidden"></div>
<div class="ipt-second"><button><?= $this->getHtml('Add', '0', '0'); ?></button></div>
</div>
</table>
<div class="form-group">
<label for="iTitle"><?= $this->getHtml('Title'); ?></label>
<input id="iTitle" name="name" type="text" placeholder="P&L Reporting" required>
</div>
<div class="form-group">
<label for="iDescription"><?= $this->getHtml('Description'); ?></label>
<?= $this->getData('editor')->render('report-editor'); ?>
</div>
<div class="form-group">
<?= $this->getData('editor')->getData('text')->render('report-editor', 'description', 'helper-template-create'); ?>
</div>
<div class="form-group">
<label class="checkbox" for="iStandalone">
<input type="checkbox" name="standalone" id="iStandalone" value="1" checked>
<span class="checkmark"></span>
<?= $this->getHtml('Standalone'); ?>
</label>
</div>
<div class="form-group">
<label for="iExpected"><?= $this->getHtml('Expected'); ?></label>
<div class="ipt-wrap">
<div class="ipt-first"><input id="iExpected" type="text" placeholder="file.csv"><input name="expected" type="hidden"></div>
<div class="ipt-second"><button><?= $this->getHtml('Add', '0', '0'); ?></button></div>
</div>
</div>
</div>
<div class="portlet-foot">
<input type="submit" id="iReportTemplateCreateButton" name="reportTemplateCreateButton" value="<?= $this->getHtml('Create', '0', '0'); ?>">

View File

@ -162,7 +162,10 @@ echo $this->data['nav']->render(); ?>
<td><?= $this->getHtml('Tags'); ?>
<td><?php
foreach ($template->tags as $tag) : ?>
<span class="tag" style="background: <?= $this->printHtml($tag->color); ?>"><?= empty($tag->icon) ? '' : ''; ?><?= $this->printHtml($tag->getL11n()); ?></span>
<span class="tag" style="background: <?= $this->printHtml($tag->color); ?>">
<?= empty($tag->icon) ? '' : '<i class="g-icon">' . $this->printHtml($tag->icon) . '</i>'; ?>
<?= $this->printHtml($tag->getL11n()); ?>
</span>
<?php endforeach; ?>
</table>
</div>