mirror of
https://github.com/Karaka-Management/oms-Comments.git
synced 2026-01-24 22:38:42 +00:00
adj. frontend uri handling of query/fragment
This commit is contained in:
parent
f5cae0976e
commit
57dbbda112
|
|
@ -8,6 +8,11 @@
|
|||
"null": false,
|
||||
"primary": true,
|
||||
"autoincrement": true
|
||||
},
|
||||
"comments_list_status": {
|
||||
"name": "comments_list_status",
|
||||
"type": "TINYINT",
|
||||
"null": false
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@ final class CommentListMapper extends DataMapperAbstract
|
|||
*/
|
||||
protected static array $columns = [
|
||||
'comments_list_id' => ['name' => 'comments_list_id', 'type' => 'int', 'internal' => 'id'],
|
||||
'comments_list_status' => ['name' => 'comments_list_status', 'type' => 'bool', 'internal' => 'isActive'],
|
||||
];
|
||||
|
||||
/**
|
||||
|
|
|
|||
59
Theme/Backend/Components/Comment/CreateView.php
Normal file
59
Theme/Backend/Components/Comment/CreateView.php
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
<?php
|
||||
/**
|
||||
* Orange Management
|
||||
*
|
||||
* PHP Version 7.4
|
||||
*
|
||||
* @package Modules\Comments
|
||||
* @copyright Dennis Eichhorn
|
||||
* @license OMS License 1.0
|
||||
* @version 1.0.0
|
||||
* @link https://orange-management.org
|
||||
*/
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Modules\Comments\Theme\Backend\Components\Comment;
|
||||
|
||||
use phpOMS\Localization\L11nManager;
|
||||
use phpOMS\Message\RequestAbstract;
|
||||
use phpOMS\Message\ResponseAbstract;
|
||||
use phpOMS\Views\View;
|
||||
|
||||
/**
|
||||
* Component view.
|
||||
*
|
||||
* @package Modules\Comments
|
||||
* @license OMS License 1.0
|
||||
* @link https://orange-management.org
|
||||
* @since 1.0.0
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
class CreateView extends View
|
||||
{
|
||||
/**
|
||||
* Comment list
|
||||
*
|
||||
* @var int
|
||||
* @since 1.0.0
|
||||
*/
|
||||
protected $list = 0;
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function __construct(L11nManager $l11n = null, RequestAbstract $request, ResponseAbstract $response)
|
||||
{
|
||||
parent::__construct($l11n, $request, $response);
|
||||
$this->setTemplate('/Modules/Comments/Theme/Backend/Components/Comment/create');
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function render(...$data) : string
|
||||
{
|
||||
$this->list = $data[0];
|
||||
|
||||
return parent::render();
|
||||
}
|
||||
}
|
||||
59
Theme/Backend/Components/Comment/ListView.php
Normal file
59
Theme/Backend/Components/Comment/ListView.php
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
<?php
|
||||
/**
|
||||
* Orange Management
|
||||
*
|
||||
* PHP Version 7.4
|
||||
*
|
||||
* @package Modules\Comments
|
||||
* @copyright Dennis Eichhorn
|
||||
* @license OMS License 1.0
|
||||
* @version 1.0.0
|
||||
* @link https://orange-management.org
|
||||
*/
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Modules\Comments\Theme\Backend\Components\Comment;
|
||||
|
||||
use phpOMS\Localization\L11nManager;
|
||||
use phpOMS\Message\RequestAbstract;
|
||||
use phpOMS\Message\ResponseAbstract;
|
||||
use phpOMS\Views\View;
|
||||
|
||||
/**
|
||||
* Component view.
|
||||
*
|
||||
* @package Modules\Comments
|
||||
* @license OMS License 1.0
|
||||
* @link https://orange-management.org
|
||||
* @since 1.0.0
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
class ListView extends View
|
||||
{
|
||||
/**
|
||||
* Comment list
|
||||
*
|
||||
* @var null|CommentList
|
||||
* @since 1.0.0
|
||||
*/
|
||||
protected $commentList = null;
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function __construct(L11nManager $l11n = null, RequestAbstract $request, ResponseAbstract $response)
|
||||
{
|
||||
parent::__construct($l11n, $request, $response);
|
||||
$this->setTemplate('/Modules/Comments/Theme/Backend/Components/Comment/list');
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function render(...$data) : string
|
||||
{
|
||||
$this->list = $data[0];
|
||||
|
||||
return parent::render();
|
||||
}
|
||||
}
|
||||
17
Theme/Backend/Components/Comment/create.tpl.php
Normal file
17
Theme/Backend/Components/Comment/create.tpl.php
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
<?php
|
||||
|
||||
use phpOMS\Uri\UriFactory;
|
||||
?>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<section class="portlet">
|
||||
<form id="commentCreate" method="PUT" action="<?= UriFactory::build('{/api}comment/list?id={!#commentCreate [name=comment]}&csrf={$CSRF}'); ?>">
|
||||
<div class="portlet-head">Create Comment</div>
|
||||
<div class="portlet-body">
|
||||
<textarea name="comment">For writing a new comment... of course this is just a placeholder</textarea>
|
||||
</div>
|
||||
<div class="portlet-foot"><input type="submit" name="createButton" id="iCreateButton" value="<?= $this->getHtml('Create', '0', '0'); ?>"></div>
|
||||
</form>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
14
Theme/Backend/Components/Comment/list.tpl.php
Normal file
14
Theme/Backend/Components/Comment/list.tpl.php
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<?php
|
||||
/** @var \Modules\Comments\Models\Comment[] $comments */
|
||||
$comments = $this->commentList->getComments();
|
||||
foreach ($comments as $comment) : ?>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<section class="portlet">
|
||||
<article>
|
||||
<?= $comment->getContent(); ?>
|
||||
</article>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
|
|
@ -1,119 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* Orange Management
|
||||
*
|
||||
* PHP Version 7.4
|
||||
*
|
||||
* @package Modules\Comments
|
||||
* @copyright Dennis Eichhorn
|
||||
* @license OMS License 1.0
|
||||
* @version 1.0.0
|
||||
* @link https://orange-management.org
|
||||
*/
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* @var \phpOMS\Views\View $this
|
||||
*/
|
||||
|
||||
echo $this->getData('nav')->render(); ?>
|
||||
|
||||
<section class="box w-100">
|
||||
<div class="inner">
|
||||
<form>
|
||||
<input type="text" class="wf-100">
|
||||
</form>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<div class="box w-100">
|
||||
<div class="tabview tab-1">
|
||||
<ul class="tab-links">
|
||||
<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 class="box w-100">
|
||||
<div class="tabview tab-1">
|
||||
<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 class="wf-100"></textarea>
|
||||
</div>
|
||||
<input type="radio" id="c-tab2-2" name="tabular-2">
|
||||
<div class="tab">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<section class="box w-100">
|
||||
<div class="inner">
|
||||
<form>
|
||||
<table class="layout">
|
||||
<tr><td colspan="2"><label><?= $this->getHtml('Permission'); ?></label>
|
||||
<tr><td><select>
|
||||
<option>
|
||||
</select>
|
||||
<tr><td colspan="2"><label><?= $this->getHtml('GroupUser'); ?></label>
|
||||
<tr><td><input id="iPermission" name="group" type="text" placeholder=""><td><button><?= $this->getHtml('Add'); ?></button>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
</section>
|
||||
|
|
@ -1,43 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* Orange Management
|
||||
*
|
||||
* PHP Version 7.4
|
||||
*
|
||||
* @package Modules\Comments
|
||||
* @copyright Dennis Eichhorn
|
||||
* @license OMS License 1.0
|
||||
* @version 1.0.0
|
||||
* @link https://orange-management.org
|
||||
*/
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* @var \phpOMS\Views\View $this
|
||||
*/
|
||||
|
||||
$footerView = new \phpOMS\Views\PaginationView($this->l11nManager, $this->request, $this->response);
|
||||
$footerView->setTemplate('/Web/Templates/Lists/Footer/PaginationBig');
|
||||
$footerView->setPages(20);
|
||||
$footerView->setPage(1);
|
||||
|
||||
echo $this->getData('nav')->render(); ?>
|
||||
<div class="box">
|
||||
<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('Name') ?>
|
||||
<td><?= $this->getHtml('Creator') ?>
|
||||
<td><?= $this->getHtml('Created') ?>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
<tbody>
|
||||
<?php $count = 0; foreach ([] as $key => $value) : ++$count; ?>
|
||||
<?php endforeach; ?>
|
||||
<?php if ($count === 0) : ?>
|
||||
<tr><td colspan="5" class="empty"><?= $this->getHtml('Empty', '0', '0'); ?>
|
||||
<?php endif; ?>
|
||||
</table>
|
||||
</div>
|
||||
Loading…
Reference in New Issue
Block a user