draft tags and portlets

This commit is contained in:
Dennis Eichhorn 2020-03-01 15:00:33 +01:00
parent f7c8774834
commit 9747c036ab
5 changed files with 47 additions and 51 deletions

View File

@ -75,6 +75,9 @@ final class BackendController extends Controller
$editor = new \Modules\Editor\Theme\Backend\Components\Editor\BaseView($this->app->l11nManager, $request, $response);
$view->addData('editor', $editor);
$tagSelector = new \Modules\Tag\Theme\Backend\Components\TagSelector\BaseView($this->app->l11nManager, $request, $response);
$view->addData('tagSelector', $tagSelector);
return $view;
}
@ -138,6 +141,9 @@ final class BackendController extends Controller
$editor = new \Modules\Editor\Theme\Backend\Components\Editor\BaseView($this->app->l11nManager, $request, $response);
$view->addData('editor', $editor);
$tagSelector = new \Modules\Tag\Theme\Backend\Components\TagSelector\BaseView($this->app->l11nManager, $request, $response);
$view->addData('tagSelector', $tagSelector);
return $view;
}
}

View File

@ -21,8 +21,6 @@
<li><i data-editor-button="a" class="btn editor-button fa fa-lg fa-align-left"></i>
<li><i data-editor-button="a" class="btn editor-button fa fa-lg fa-align-justify"></i>
<li><i data-editor-button="a" class="btn editor-button fa fa-lg fa-align-right"></i>
</ul>
<ul class="h-list">
<li><i data-editor-button="table" class="btn editor-button fa fa-lg fa-table"></i>
<li><i data-editor-button="a" class="btn editor-button fa fa-lg fa-image"></i>
<li><i data-editor-button="a" class="btn editor-button fa fa-lg fa-camera"></i>

View File

@ -9,7 +9,6 @@
<textarea
id="i<?= $this->renderName(); ?>"
style="height: 300px"
placeholder="&#xf040;"
name="<?= $this->renderName(); ?>"
form="<?= $this->renderForm(); ?>"
data-tpl-text="<?= $this->renderTplText(); ?>"
@ -19,9 +18,7 @@
<input type="radio" id="<?= $this->renderId(); ?>-c-tab-2" name="tabular-1">
<div class="tab">
<section class="box wf-100">
<article data-tpl-text="<?= $this->renderTplText(); ?>" data-tpl-value="<?= $this->renderTplValue(); ?>"><?= $this->renderPreview(); ?></article>
</section>
<article data-tpl-text="<?= $this->renderTplText(); ?>" data-tpl-value="<?= $this->renderTplValue(); ?>"><?= $this->renderPreview(); ?></article>
</div>
</div>
</div>

View File

@ -19,9 +19,9 @@ declare(strict_types=1);
echo $this->getData('nav')->render(); ?>
<div class="row">
<div class="col-xs-12">
<section class="box wf-100">
<div class="inner">
<div class="col-xs-12 col-md-8">
<div class="portlet">
<div class="portlet-body">
<form id="fEditor" method="PUT" action="<?= \phpOMS\Uri\UriFactory::build('{/api}editor?{?}&csrf={$CSRF}'); ?>">
<div class="ipt-wrap">
<div class="ipt-first"><input name="title" type="text" class="wf-100"></div>
@ -29,30 +29,28 @@ echo $this->getData('nav')->render(); ?>
</div>
</form>
</div>
</section>
</div>
</div>
</div>
<div class="row">
<div class="col-xs-12">
<section class="box wf-100">
<div class="inner">
<div class="portlet">
<div class="portlet-body">
<?= $this->getData('editor')->render('editor'); ?>
</div>
</section>
</div>
</div>
</div>
<div class="row">
<div class="box col-xs-12">
<?= $this->getData('editor')->getData('text')->render('editor', 'plain', 'fEditor'); ?>
<div class="box">
<?= $this->getData('editor')->getData('text')->render('editor', 'plain', 'fEditor'); ?>
</div>
</div>
</div>
<div class="row">
<div class="col-xs-12">
<section class="box wf-100">
<div class="inner">
<div class="col-xs-12 col-md-4">
<div class="portlet">
<div class="portlet-body">
<?= $this->getData('tagSelector')->render('iTag', 'tag', false); ?>
</div>
</div>
<div class="portlet">
<div class="portlet-body">
<form>
<table class="layout">
<tr><td colspan="2"><label><?= $this->getHtml('Permission'); ?></label>
@ -64,6 +62,6 @@ echo $this->getData('nav')->render(); ?>
</table>
</form>
</div>
</section>
</div>
</div>
</div>

View File

@ -21,29 +21,26 @@ $docs = $this->getData('docs');
echo $this->getData('nav')->render(); ?>
<div class="row">
<div class="col-xs-12">
<div class="box wf-100">
<div class="portlet">
<div class="portlet-head"><?= $this->getHtml('Documents') ?><i class="fa fa-download floatRight download btn"></i></div>
<table class="default">
<caption><?= $this->getHtml('Documents') ?><i class="fa fa-download floatRight download btn"></i></caption>
<thead>
<tr>
<td class="wf-100"><?= $this->getHtml('Title') ?>
<td><?= $this->getHtml('Creator') ?>
<td><?= $this->getHtml('Created') ?>
<tfoot>
<tr>
<td colspan="3">
<tbody>
<?php $count = 0; foreach ($docs as $key => $value) : ++$count;
$url = \phpOMS\Uri\UriFactory::build('{/prefix}editor/single?{?}&id=' . $value->getId()); ?>
<tr data-href="<?= $url; ?>">
<td data-label="<?= $this->getHtml('Title') ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getTitle()); ?></a>
<td data-label="<?= $this->getHtml('Creator') ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getCreatedBy()->getName1()); ?></a>
<td data-label="<?= $this->getHtml('Created') ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getCreatedAt()->format('Y-m-d H:i:s')); ?></a>
<?php endforeach; ?>
<?php if ($count === 0) : ?>
<tr><td colspan="3" class="empty"><?= $this->getHtml('Empty', '0', '0'); ?>
<?php endif; ?>
</table>
</div>
<thead>
<tr>
<td class="wf-100"><?= $this->getHtml('Title') ?>
<td><?= $this->getHtml('Creator') ?>
<td><?= $this->getHtml('Created') ?>
<tbody>
<?php $count = 0; foreach ($docs as $key => $value) : ++$count;
$url = \phpOMS\Uri\UriFactory::build('{/prefix}editor/single?{?}&id=' . $value->getId()); ?>
<tr data-href="<?= $url; ?>">
<td data-label="<?= $this->getHtml('Title') ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getTitle()); ?></a>
<td data-label="<?= $this->getHtml('Creator') ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getCreatedBy()->getName1()); ?></a>
<td data-label="<?= $this->getHtml('Created') ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getCreatedAt()->format('Y-m-d H:i:s')); ?></a>
<?php endforeach; ?>
<?php if ($count === 0) : ?>
<tr><td colspan="3" class="empty"><?= $this->getHtml('Empty', '0', '0'); ?>
<?php endif; ?>
</table>
<div class="portlet-foot"></div>
</div>
</div>