prepare for better frontend interaction

This commit is contained in:
Dennis Eichhorn 2019-12-29 23:17:02 +01:00
parent 0565141f37
commit 626d90d610
3 changed files with 33 additions and 45 deletions

View File

@ -163,6 +163,9 @@ final class BackendController extends Controller
$editor = new \Modules\Editor\Theme\Backend\Components\Editor\BaseView($this->app, $request, $response); $editor = new \Modules\Editor\Theme\Backend\Components\Editor\BaseView($this->app, $request, $response);
$view->addData('editor', $editor); $view->addData('editor', $editor);
$accGrpSelector = new \Modules\Profile\Theme\Backend\Components\AccountGroupSelector\BaseView($this->app, $request, $response);
$view->addData('accGrpSelector', $accGrpSelector);
return $view; return $view;
} }
} }

View File

@ -13,27 +13,27 @@
declare(strict_types=1); declare(strict_types=1);
return ['News' => [ return ['News' => [
'Additional' => 'Additional', 'Accounts/Groups' => 'Accounts/Groups',
'Archive' => 'Archive', 'Additional' => 'Additional',
'Author' => 'Author', 'Archive' => 'Archive',
'Date' => 'Date', 'Author' => 'Author',
'Draft' => 'Draft', 'Date' => 'Date',
'Featured' => 'Featured', 'Draft' => 'Draft',
'Groups' => 'Groups', 'Featured' => 'Featured',
'Headline' => 'Headline', 'Groups' => 'Groups',
'Headlines' => 'Headlines', 'Headline' => 'Headline',
'Link' => 'Link', 'Headlines' => 'Headlines',
'News' => 'News', 'Link' => 'Link',
'Permissions' => 'Permissions', 'News' => 'News',
'Plain' => 'Plain', 'Plain' => 'Plain',
'Preview' => 'Preview', 'Preview' => 'Preview',
'Publish' => 'Publish', 'Publish' => 'Publish',
'Settings' => 'Settings', 'Settings' => 'Settings',
'Status' => 'Status', 'Status' => 'Status',
'Title' => 'Title', 'Title' => 'Title',
'Type' => 'Type', 'Type' => 'Type',
'TYPE0' => 'Article', 'TYPE0' => 'Article',
'TYPE1' => 'Link', 'TYPE1' => 'Link',
'TYPE2' => 'Headline', 'TYPE2' => 'Headline',
'Visible' => 'Visible', 'Visible' => 'Visible',
]]; ]];

View File

@ -22,7 +22,7 @@ echo $this->getData('nav')->render(); ?>
<div id="testEditor" class="m-editor"> <div id="testEditor" class="m-editor">
<section class="box wf-100"> <section class="box wf-100">
<div class="inner"> <div class="inner">
<input type="text" name="title" form="docForm"> <input id="iTitle" type="text" name="title" form="docForm">
</div> </div>
</section> </section>
@ -57,7 +57,7 @@ echo $this->getData('nav')->render(); ?>
<td> <td>
<input type="submit" name="deleteButton" id="iDeleteButton" value="<?= $this->getHtml('Delete', '0', '0'); ?>"> <input type="submit" name="deleteButton" id="iDeleteButton" value="<?= $this->getHtml('Delete', '0', '0'); ?>">
<td class="rightText"> <td class="rightText">
<input type="submit" name="saveButton" id="iSaveButton" value="<?= $this->getHtml('Save', '0', '0'); ?>"> <input type="submit" formaction="<?= \phpOMS\Uri\UriFactory::build('{/api}news?{?}&release=false&csrf={$CSRF}'); ?>" name="saveButton" id="iSaveButton" value="<?= $this->getHtml('Save', '0', '0'); ?>">
<input type="submit" name="publishButton" id="iPublishButton" value="<?= $this->getHtml('Publish'); ?>"> <input type="submit" name="publishButton" id="iPublishButton" value="<?= $this->getHtml('Publish'); ?>">
</table> </table>
</form> </form>
@ -88,26 +88,11 @@ echo $this->getData('nav')->render(); ?>
<section class="box wf-100"> <section class="box wf-100">
<div class="inner"> <div class="inner">
<table class="layout wf-100"> <table class="layout wf-100">
<tr><td><label for="permission"><?= $this->getHtml('Permissions'); ?></label> <tr><td><label for="permission"><?= $this->getHtml('Accounts/Groups'); ?></label>
<tr><td> <!-- @todo: add form this belongs to -->
<span class="input"> <!-- @todo: make auto save on change for already created news article -->
<button type="button" formaction=""><i class="fa fa-book"></i></button> <!-- @todo: add default values (some can be removed/overwritten and some not?) -->
<input type="text" id="permission"><input type="hidden" form="docForm" name="permission"> <tr><td><?= $this->getData('accGrpSelector')->render('iReceiver', 'receiver', false); ?>
</span>
<tr><td><button><?= $this->getHtml('Add', '0', '0'); ?></button>
</table>
</div>
</section>
<section class="box wf-100">
<div class="inner">
<table class="layout wf-100">
<tr><td colspan="2"><label for="groups"><?= $this->getHtml('Groups'); ?></label>
<tr><td>
<span class="input">
<button type="button" formaction=""><i class="fa fa-book"></i></button>
<input type="text" id="groups"><input type="hidden" form="docForm" name="groups">
</span>
<tr><td><button><?= $this->getHtml('Add', '0', '0'); ?></button>
</table> </table>
</div> </div>
</section> </section>