fix templates

This commit is contained in:
Dennis Eichhorn 2024-04-17 17:45:07 +00:00
parent 78f4add84a
commit b5c0e681b9
5 changed files with 51 additions and 38 deletions

View File

@ -94,7 +94,6 @@ final class BackendController extends Controller
$view->setTemplate('/Modules/Helper/Theme/Backend/helper-template-create');
$view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1002701001, $request, $response);
$view->data['media-upload'] = new \Modules\Media\Theme\Backend\Components\Upload\BaseView($this->app->l11nManager, $request, $response);
$editor = new \Modules\Editor\Theme\Backend\Components\Editor\BaseView($this->app->l11nManager, $request, $response);
$view->data['editor'] = $editor;
@ -120,7 +119,6 @@ final class BackendController extends Controller
$view->setTemplate('/Modules/Helper/Theme/Backend/helper-create');
$view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1002701001, $request, $response);
$view->data['media-upload'] = new \Modules\Media\Theme\Backend\Components\Upload\BaseView($this->app->l11nManager, $request, $response);
$editor = new \Modules\Editor\Theme\Backend\Components\Editor\BaseView($this->app->l11nManager, $request, $response);
$view->data['editor'] = $editor;

View File

@ -23,30 +23,33 @@ echo $this->data['nav']->render(); ?>
<div class="row">
<div class="col-xs-12 col-md-6">
<div class="portlet">
<section class="portlet">
<form id="helper-report-create" action="<?= UriFactory::build('{/api}helper/report/report?csrf={$CSRF}'); ?>" method="post">
<div class="portlet-head"><?= $this->getHtml('Report'); ?></div>
<div class="portlet-body">
<table class="layout wf-100">
<tbody>
<tr><td><label for="iTitle"><?= $this->getHtml('Title'); ?></label>
<tr><td><input id="iTitle" name="name" type="text" required>
<tr><td><label for="iTemplate"><?= $this->getHtml('Template'); ?></label>
<tr><td><select id="iTemplate" name="template">
<?php foreach ($templateList as $key => $value) : ?>
<option value="<?= (int) $key; ?>"><?= $this->printHtml($value->name); ?>
<?php endforeach; ?>
</select>
</table>
<div class="form-group">
<label for="iTitle"><?= $this->getHtml('Title'); ?></label>
<input id="iTitle" name="name" type="text" required>
</div>
<div class="form-group">
<label for="iFiles"><?= $this->getHtml('Files'); ?></label>
<input type="file" id="iFiles" name="files">
</div>
<div class="form-group">
<label for="iTemplate"><?= $this->getHtml('Template'); ?></label>
<select id="iTemplate" name="template">
<?php foreach ($templateList as $key => $value) : ?>
<option value="<?= (int) $key; ?>"><?= $this->printHtml($value->name); ?>
<?php endforeach; ?>
</select>
</div>
</div>
<div class="portlet-foot">
<input type="submit" id="iReportCreateButton" name="reportCreateButton" value="<?= $this->getHtml('Create', '0', '0'); ?>">
</div>
</form>
</div>
</div>
<div class="col-xs-12 col-md-6">
<?= $this->data['media-upload']->render('helper-report-create'); ?>
</section>
</div>
</div>

View File

@ -35,7 +35,7 @@ $next = empty($templates) ? '{/base}/helper/list' : 'helper/list?{?}&offset=
echo $this->data['nav']->render(); ?>
<div class="row">
<div class="col-xs-12">
<div class="portlet">
<section class="portlet">
<div class="portlet-head"><?= $this->getHtml('Helpers'); ?><i class="g-icon download btn end-xs">download</i></div>
<div class="slider">
<table id="helperList" class="default sticky">
@ -129,6 +129,6 @@ echo $this->data['nav']->render(); ?>
<a tabindex="0" class="button" href="<?= UriFactory::build($next); ?>"><?= $this->getHtml('Next', '0', '0'); ?></a>
</div>
-->
</div>
</section>
</div>
</div>

View File

@ -17,7 +17,7 @@ echo $this->data['nav']->render(); ?>
<div class="row">
<div class="col-xs-12 col-md-6">
<div class="portlet">
<section class="portlet">
<form id="helper-template-create" action="<?= \phpOMS\Uri\UriFactory::build('{/api}helper/report/template?csrf={$CSRF}'); ?>" method="post">
<div class="portlet-head"><?= $this->getHtml('Template'); ?></div>
<div class="portlet-body">
@ -50,15 +50,16 @@ echo $this->data['nav']->render(); ?>
<div class="ipt-second"><button><?= $this->getHtml('Add', '0', '0'); ?></button></div>
</div>
</div>
<div class="form-group">
<label for="iFiles"><?= $this->getHtml('Files'); ?></label>
<input type="file" id="iFiles" name="files">
</div>
</div>
<div class="portlet-foot">
<input type="submit" id="iReportTemplateCreateButton" name="reportTemplateCreateButton" value="<?= $this->getHtml('Create', '0', '0'); ?>">
</div>
</form>
</div>
</section>
</div>
<div class="col-xs-12 col-md-6">
<?= $this->getData('media-upload')->render('helper-template-create', '/Modules/Helper'); ?>
</div>
</div>
</div>

View File

@ -57,12 +57,12 @@ echo $this->data['nav']->render(); ?>
<div class="col-xs-12 col-md-9 col-simple">
<div class="portlet col-simple">
<div class="portlet-body col-simple">
<iframe class="col-simple" data-form="iUiSettings" data-name="iframeHelper" id="iHelperFrame" src="<?= UriFactory::build('{/api}helper/report/export/?{?}&id=' . $template->id); ?>&u=<?= $this->data['unit']; ?>" allowfullscreen></iframe>
<iframe class="col-simple" data-form="iUiSettings" data-name="iframeHelper" id="iHelperFrame" src="<?= UriFactory::build('{/api}helper/report/export/?{?}&id=' . $template->id . '&csrf={$CSRF}'); ?>&u=<?= $this->data['unit']; ?>" allowfullscreen></iframe>
</div>
</div>
</div>
<div class="col-xs-12 col-md-3">
<div class="portlet">
<section class="portlet">
<div class="portlet-head"><?= $this->getHtml('Reports'); ?></div>
<div class="portlet-body">
<form action="<?= UriFactory::build('{/api}helper/template?csrf={$CSRF}'); ?>" method="post">
@ -85,9 +85,9 @@ echo $this->data['nav']->render(); ?>
</table>
</form>
</div>
</div>
</section>
<div class="portlet">
<section class="portlet">
<div class="portlet-head"><?= $this->getHtml('Export'); ?></div>
<div class="portlet-body">
<form>
@ -111,10 +111,10 @@ echo $this->data['nav']->render(); ?>
</table>
</form>
</div>
</div>
</section>
<?php if (!empty($settings)) : ?>
<div class="portlet">
<section class="portlet">
<form id="iUiSettings">
<div class="portlet-head"><?= $this->getHtml('Settings'); ?></div>
<div class="portlet-body">
@ -128,10 +128,10 @@ echo $this->data['nav']->render(); ?>
</div>
<div class="portlet-foot"><a tabindex="0" class="button" href="<?= UriFactory::build('{%}'); ?>&lang={#iLang}{#iUiSettings}"><?= $this->getHtml('Load'); ?></a></div>
</form>
</div>
</section>
<?php endif; ?>
<div class="portlet">
<section class="portlet">
<div class="portlet-head"><?= $this->getHtml('Info'); ?></div>
<div class="portlet-body">
<table class="list wf-100">
@ -164,5 +164,16 @@ echo $this->data['nav']->render(); ?>
<td><?= $template->createdAt->format('Y-m-d'); ?>
<tr>
<td><?= $this->getHtml('Tags'); ?>
<td>
<div
<td><div class="tag-list"><?php
foreach ($template->tags as $tag) : ?>
<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; ?>
</div>
</table>
</div>
</section>
</div>
</div>