mirror of
https://github.com/Karaka-Management/oms-Editor.git
synced 2026-02-15 09:48:41 +00:00
Editor template drafts
This commit is contained in:
parent
707ec504b1
commit
5864ec0c97
|
|
@ -112,6 +112,9 @@ class Controller extends ModuleAbstract implements WebInterface
|
||||||
$view->setTemplate('/Modules/Editor/Theme/Backend/editor-create');
|
$view->setTemplate('/Modules/Editor/Theme/Backend/editor-create');
|
||||||
$view->addData('nav', $this->app->moduleManager->get('Navigation')->createNavigationMid(1005301001, $request, $response));
|
$view->addData('nav', $this->app->moduleManager->get('Navigation')->createNavigationMid(1005301001, $request, $response));
|
||||||
|
|
||||||
|
$editor = new \Modules\Editor\Theme\Backend\Components\Editor\BaseView($this->app, $request, $response);
|
||||||
|
$view->addData('editor', $editor);
|
||||||
|
|
||||||
return $view;
|
return $view;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
46
Theme/Backend/Components/Editor/BaseView.php
Normal file
46
Theme/Backend/Components/Editor/BaseView.php
Normal file
|
|
@ -0,0 +1,46 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Orange Management
|
||||||
|
*
|
||||||
|
* PHP Version 7.1
|
||||||
|
*
|
||||||
|
* @category TBD
|
||||||
|
* @package TBD
|
||||||
|
* @copyright Dennis Eichhorn
|
||||||
|
* @license OMS License 1.0
|
||||||
|
* @version 1.0.0
|
||||||
|
* @link http://orange-management.com
|
||||||
|
*/
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Modules\Editor\Theme\Backend\Components\Editor;
|
||||||
|
|
||||||
|
use phpOMS\Views\View;
|
||||||
|
use phpOMS\ApplicationAbstract;
|
||||||
|
use phpOMS\Message\RequestAbstract;
|
||||||
|
use phpOMS\Message\ResponseAbstract;
|
||||||
|
|
||||||
|
class BaseView extends View
|
||||||
|
{
|
||||||
|
private $id = '';
|
||||||
|
|
||||||
|
public function __construct(ApplicationAbstract $app, RequestAbstract $request, ResponseAbstract $response)
|
||||||
|
{
|
||||||
|
parent::__construct($app, $request, $response);
|
||||||
|
$this->setTemplate('/Modules/Editor/Theme/Backend/Components/Editor/inline-editor-tools');
|
||||||
|
|
||||||
|
$view = new TextView($app, $request, $response);
|
||||||
|
$this->addData('text', $view);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getId() : string
|
||||||
|
{
|
||||||
|
return $this->id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function render(...$data) : string
|
||||||
|
{
|
||||||
|
$this->id = $data[0];
|
||||||
|
return parent::render();
|
||||||
|
}
|
||||||
|
}
|
||||||
43
Theme/Backend/Components/Editor/TextView.php
Normal file
43
Theme/Backend/Components/Editor/TextView.php
Normal file
|
|
@ -0,0 +1,43 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Orange Management
|
||||||
|
*
|
||||||
|
* PHP Version 7.1
|
||||||
|
*
|
||||||
|
* @category TBD
|
||||||
|
* @package TBD
|
||||||
|
* @copyright Dennis Eichhorn
|
||||||
|
* @license OMS License 1.0
|
||||||
|
* @version 1.0.0
|
||||||
|
* @link http://orange-management.com
|
||||||
|
*/
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Modules\Editor\Theme\Backend\Components\Editor;
|
||||||
|
|
||||||
|
use phpOMS\Views\View;
|
||||||
|
use phpOMS\ApplicationAbstract;
|
||||||
|
use phpOMS\Message\RequestAbstract;
|
||||||
|
use phpOMS\Message\ResponseAbstract;
|
||||||
|
|
||||||
|
class TextView extends View
|
||||||
|
{
|
||||||
|
private $id = '';
|
||||||
|
|
||||||
|
public function __construct(ApplicationAbstract $app, RequestAbstract $request, ResponseAbstract $response)
|
||||||
|
{
|
||||||
|
parent::__construct($app, $request, $response);
|
||||||
|
$this->setTemplate('/Modules/Editor/Theme/Backend/Components/Editor/inline-editor');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getId() : string
|
||||||
|
{
|
||||||
|
return $this->id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function render(...$data) : string
|
||||||
|
{
|
||||||
|
$this->id = $data[0];
|
||||||
|
return parent::render();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -32,86 +32,17 @@ echo $this->getData('nav')->render(); ?>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xs-12">
|
<div class="col-xs-12">
|
||||||
<div class="box wf-100">
|
<section class="box wf-100">
|
||||||
<div class="tabular">
|
<div class="inner">
|
||||||
<ul class="tab-links">
|
<?= $this->getData('editor')->render('editor-tools'); ?>
|
||||||
<li><label for="c-tab-1"><?= $this->getHtml('Start'); ?></label>
|
|
||||||
<li><label for="c-tab-2"><?= $this->getHtml('Insert'); ?></label>
|
|
||||||
<li><label for="c-tab-3"><?= $this->getHtml('Layout'); ?></label>
|
|
||||||
</ul>
|
|
||||||
<div class="tab-content">
|
|
||||||
<input type="radio" id="c-tab-1" name="tabular-1" checked>
|
|
||||||
<div class="tab">
|
|
||||||
<ul class="h-list">
|
|
||||||
<li><i class="fa fa-lg fa-floppy-o"></i>
|
|
||||||
<li><i class="fa fa-lg fa-cloud-download"></i>
|
|
||||||
<li><i class="fa fa-lg fa-undo"></i>
|
|
||||||
<li><i class="fa fa-lg fa-repeat"></i>
|
|
||||||
<li><i class="fa fa-lg fa-copy"></i>
|
|
||||||
<li><i class="fa fa-lg fa-paste"></i>
|
|
||||||
<li><i class="fa fa-lg fa-cut"></i>
|
|
||||||
<li><i class="fa fa-lg fa-bold"></i>
|
|
||||||
<li><i class="fa fa-lg fa-italic"></i>
|
|
||||||
<li><i class="fa fa-lg fa-underline"></i>
|
|
||||||
<li><i class="fa fa-lg fa-strikethrough"></i>
|
|
||||||
<li><i class="fa fa-lg fa-font"></i>
|
|
||||||
<li><i class="fa fa-lg fa-subscript"></i>
|
|
||||||
<li><i class="fa fa-lg fa-superscript"></i>
|
|
||||||
<li><i class="fa fa-lg fa-paint-brush"></i>
|
|
||||||
<li><i class="fa fa-lg fa-pencil"></i>
|
|
||||||
<li><i class="fa fa-lg fa-list-ul"></i>
|
|
||||||
<li><i class="fa fa-lg fa-list-ol"></i>
|
|
||||||
<li><i class="fa fa-lg fa-indent"></i>
|
|
||||||
<li><i class="fa fa-lg fa-dedent"></i>
|
|
||||||
<li><i class="fa fa-lg fa-align-left"></i>
|
|
||||||
<li><i class="fa fa-lg fa-align-justify"></i>
|
|
||||||
<li><i class="fa fa-lg fa-align-right"></i>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<input type="radio" id="c-tab-2" name="tabular-1">
|
|
||||||
<div class="tab">
|
|
||||||
<ul class="h-list">
|
|
||||||
<li><i class="fa fa-lg fa-table"></i>
|
|
||||||
<li><i class="fa fa-lg fa-image"></i>
|
|
||||||
<li><i class="fa fa-lg fa-camera"></i>
|
|
||||||
<li><i class="fa fa-lg fa-paint-brush"></i>
|
|
||||||
<li><i class="fa fa-lg fa-bar-chart"></i>
|
|
||||||
<li><i class="fa fa-lg fa-link"></i>
|
|
||||||
<li><i class="fa fa-lg fa-unlink"></i>
|
|
||||||
<li><i class="fa fa-lg fa-code"></i>
|
|
||||||
<li><i class="fa fa-lg fa-quote-right"></i>
|
|
||||||
<li><i class="fa fa-lg fa-calendar"></i>
|
|
||||||
<li><i class="fa fa-lg fa-clock"></i>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<input type="radio" id="c-tab-3" name="tabular-1">
|
|
||||||
<div class="tab">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xs-12">
|
<div class="col-xs-12">
|
||||||
<div class="box wf-100">
|
<?= $this->getData('editor')->getData('text')->render('editor-text'); ?>
|
||||||
<div class="tabular">
|
|
||||||
<ul class="tab-links">
|
|
||||||
<li><label for="c-tab2-1"><?= $this->getHtml('Text'); ?></label>
|
|
||||||
<li><label for="c-tab2-2"><?= $this->getHtml('Preview'); ?></label>
|
|
||||||
</ul>
|
|
||||||
<div class="tab-content">
|
|
||||||
<input type="radio" id="c-tab2-1" name="tabular-2" checked>
|
|
||||||
<div class="tab">
|
|
||||||
<textarea name="plain" class="wf-100" form="fEditor"></textarea>
|
|
||||||
</div>
|
|
||||||
<input type="radio" id="c-tab2-2" name="tabular-2">
|
|
||||||
<div class="tab">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,36 +0,0 @@
|
||||||
<?php
|
|
||||||
/**
|
|
||||||
* Orange Management
|
|
||||||
*
|
|
||||||
* PHP Version 7.1
|
|
||||||
*
|
|
||||||
* @category TBD
|
|
||||||
* @package TBD
|
|
||||||
* @copyright Dennis Eichhorn
|
|
||||||
* @license OMS License 1.0
|
|
||||||
* @version 1.0.0
|
|
||||||
* @link http://orange-management.com
|
|
||||||
*/
|
|
||||||
/**
|
|
||||||
* @var \phpOMS\Views\View $this
|
|
||||||
*/
|
|
||||||
|
|
||||||
$doc = $this->getData('doc') ?? null;
|
|
||||||
?>
|
|
||||||
<div id="testEditor" class="m-editor">
|
|
||||||
<section class="box wf-100">
|
|
||||||
<div class="inner">
|
|
||||||
<input type="text" name="title" form="docForm">
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section class="box wf-100">
|
|
||||||
<div class="inner">
|
|
||||||
<?php include __DIR__ . '/inline-editor-tools.tpl.php'; ?>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<div class="box wf-100">
|
|
||||||
<?php include __DIR__ . '/inline-editor.tpl.php'; ?>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
Loading…
Reference in New Issue
Block a user