mirror of
https://github.com/Karaka-Management/oms-News.git
synced 2026-02-15 16:08:42 +00:00
new form layout and other tpl fixes
This commit is contained in:
parent
7febcfe07a
commit
fdc4e95471
|
|
@ -28,7 +28,7 @@ echo $this->getData('nav')->render(); ?>
|
||||||
<div class="col-xs-12">
|
<div class="col-xs-12">
|
||||||
<section class="portlet">
|
<section class="portlet">
|
||||||
<div class="portlet-head"><?= $this->getHtml('Archive'); ?><i class="fa fa-download floatRight download btn"></i></div>
|
<div class="portlet-head"><?= $this->getHtml('Archive'); ?><i class="fa fa-download floatRight download btn"></i></div>
|
||||||
<table id="newsArchiveList" class="default">
|
<table id="newsArchiveList" class="default sticky">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?= $this->getHtml('Type'); ?>
|
<td><?= $this->getHtml('Type'); ?>
|
||||||
|
|
|
||||||
|
|
@ -48,33 +48,39 @@ echo $this->getData('nav')->render(); ?>
|
||||||
|
|
||||||
<div class="col-xs-12 col-md-3">
|
<div class="col-xs-12 col-md-3">
|
||||||
<section class="portlet">
|
<section class="portlet">
|
||||||
<form id="docForm" method="<?= $isNewArticle ? 'PUT' : 'POST'; ?>" action="<?= UriFactory::build('{/api}news?' . ($isNewArticle ? '' : 'id={?id}&') . 'csrf={$CSRF}'); ?>">
|
<form id="docForm"
|
||||||
|
method="<?= $isNewArticle ? 'PUT' : 'POST'; ?>"
|
||||||
|
action="<?= UriFactory::build('{/api}news?' . ($isNewArticle ? '' : 'id={?id}&') . 'csrf={$CSRF}'); ?>">
|
||||||
<div class="portlet-head"><?= $this->getHtml('Status'); ?></div>
|
<div class="portlet-head"><?= $this->getHtml('Status'); ?></div>
|
||||||
<div class="portlet-body">
|
<div class="portlet-body">
|
||||||
<table class="layout wf-100">
|
<div class="form-group">
|
||||||
<tr><td>
|
<select name="status" id="iStatus">
|
||||||
<select name="status" id="iStatus">
|
<option value="<?= NewsStatus::DRAFT; ?>"<?= $news->getStatus() === NewsStatus::DRAFT ? ' selected' : ''; ?>><?= $this->getHtml('Draft'); ?>
|
||||||
<option value="<?= NewsStatus::DRAFT; ?>"<?= $news->getStatus() === NewsStatus::DRAFT ? ' selected' : ''; ?>><?= $this->getHtml('Draft'); ?>
|
<option value="<?= NewsStatus::VISIBLE; ?>"<?= $news->getStatus() === NewsStatus::VISIBLE ? ' selected' : ''; ?>><?= $this->getHtml('Visible'); ?>
|
||||||
<option value="<?= NewsStatus::VISIBLE; ?>"<?= $news->getStatus() === NewsStatus::VISIBLE ? ' selected' : ''; ?>><?= $this->getHtml('Visible'); ?>
|
</select>
|
||||||
</select>
|
</div>
|
||||||
<tr><td>
|
|
||||||
<label for="iPublish"><?= $this->getHtml('Publish'); ?></label>
|
<div class="form-group">
|
||||||
<tr><td>
|
<label for="iPublish"><?= $this->getHtml('Publish'); ?></label>
|
||||||
<input type="datetime-local" name="publish" id="iPublish" value="<?= $this->printHtml($news->getPublish()->format('Y-m-d\TH:i:s')); ?>">
|
<input type="datetime-local" name="publish" id="iPublish" value="<?= $this->printHtml($news->getPublish()->format('Y-m-d\TH:i:s')); ?>">
|
||||||
<tr><td><label for="iLanguages"><?= $this->getHtml('Language'); ?></label>
|
</div>
|
||||||
<tr><td>
|
|
||||||
<select id="iLanguages" name="lang">
|
<div class="form-group">
|
||||||
<?php foreach ($languages as $code => $language) : $code = \strtolower(\substr($code, 1)); ?>
|
<label for="iLanguages"><?= $this->getHtml('Language'); ?></label>
|
||||||
<option value="<?= $this->printHtml($code); ?>"<?= $this->printHtml($code === $news->getLanguage() ? ' selected' : ''); ?>><?= $this->printHtml($language); ?>
|
<select id="iLanguages" name="lang">
|
||||||
<?php endforeach; ?>
|
<?php foreach ($languages as $code => $language) : $code = \strtolower(\substr($code, 1)); ?>
|
||||||
</select>
|
<option value="<?= $this->printHtml($code); ?>"<?= $this->printHtml($code === $news->getLanguage() ? ' selected' : ''); ?>><?= $this->printHtml($language); ?>
|
||||||
<tr><td>
|
<?php endforeach; ?>
|
||||||
<label class="checkbox" for="iComment">
|
</select>
|
||||||
<input id="iComment" type="checkbox" name="allow_comments" value="1">
|
</div>
|
||||||
<span class="checkmark"></span>
|
|
||||||
<?= $this->getHtml('AllowComments'); ?>
|
<div class="form-group">
|
||||||
</label>
|
<label class="checkbox" for="iComment">
|
||||||
</table>
|
<input id="iComment" type="checkbox" name="allow_comments" value="1">
|
||||||
|
<span class="checkmark"></span>
|
||||||
|
<?= $this->getHtml('AllowComments'); ?>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="portlet-foot">
|
<div class="portlet-foot">
|
||||||
<table class="layout wf-100">
|
<table class="layout wf-100">
|
||||||
|
|
@ -94,40 +100,45 @@ echo $this->getData('nav')->render(); ?>
|
||||||
<section class="portlet">
|
<section class="portlet">
|
||||||
<div class="portlet-head"><?= $this->getHtml('Categories'); ?></div>
|
<div class="portlet-head"><?= $this->getHtml('Categories'); ?></div>
|
||||||
<div class="portlet-body">
|
<div class="portlet-body">
|
||||||
<table class="layout wf-100">
|
<div class="form-group">
|
||||||
<tr><td><?= $this->getHtml('Type'); ?>
|
<label class="radio" for="iNewsTypeArticle">
|
||||||
<tr><td>
|
<input type="radio" name="type" id="iNewsTypeArticle" form="docForm" value="<?= NewsType::ARTICLE; ?>"<?= $news->getType() === NewsType::ARTICLE ? ' checked' : ''; ?>>
|
||||||
<label class="radio" for="iNewsTypeArticle">
|
<span class="checkmark"></span>
|
||||||
<input type="radio" name="type" id="iNewsTypeArticle" form="docForm" value="<?= NewsType::ARTICLE; ?>"<?= $news->getType() === NewsType::ARTICLE ? ' checked' : ''; ?>>
|
<?= $this->getHtml('News'); ?>
|
||||||
<span class="checkmark"></span>
|
</label>
|
||||||
<?= $this->getHtml('News'); ?>
|
</div>
|
||||||
</label>
|
|
||||||
<tr><td>
|
<div class="form-group">
|
||||||
<label class="radio" for="iNewsTypeHeadline">
|
<label class="radio" for="iNewsTypeHeadline">
|
||||||
<input type="radio" name="type" id="iNewsTypeHeadline" form="docForm" value="<?= NewsType::HEADLINE; ?>"<?= $news->getType() === NewsType::HEADLINE ? ' checked' : ''; ?>>
|
<input type="radio" name="type" id="iNewsTypeHeadline" form="docForm" value="<?= NewsType::HEADLINE; ?>"<?= $news->getType() === NewsType::HEADLINE ? ' checked' : ''; ?>>
|
||||||
<span class="checkmark"></span>
|
<span class="checkmark"></span>
|
||||||
<?= $this->getHtml('Headline'); ?>
|
<?= $this->getHtml('Headline'); ?>
|
||||||
</label>
|
</label>
|
||||||
<tr><td>
|
</div>
|
||||||
<label class="radio" for="iNewsTypeLink">
|
|
||||||
<input type="radio" name="type" id="iNewsTypeLink" form="docForm" value="<?= NewsType::LINK; ?>"<?= $news->getType() === NewsType::LINK ? ' checked' : ''; ?>>
|
<div class="form-group">
|
||||||
<span class="checkmark"></span>
|
<label class="radio" for="iNewsTypeLink">
|
||||||
<?= $this->getHtml('Link'); ?>
|
<input type="radio" name="type" id="iNewsTypeLink" form="docForm" value="<?= NewsType::LINK; ?>"<?= $news->getType() === NewsType::LINK ? ' checked' : ''; ?>>
|
||||||
</label>
|
<span class="checkmark"></span>
|
||||||
<tr><td><?= $this->getHtml('Tags', 'Tag'); ?>
|
<?= $this->getHtml('Link'); ?>
|
||||||
<tr><td><?= $this->getData('tagSelector')->render('iTag', 'tag', 'fEditor', false); ?>
|
</label>
|
||||||
</table>
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<?= $this->getHtml('Tags', 'Tag'); ?>
|
||||||
|
<?= $this->getData('tagSelector')->render('iTag', 'tag', 'fEditor', false); ?>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
<section class="portlet">
|
<section class="portlet">
|
||||||
<div class="portlet-head"><?= $this->getHtml('Accounts/Groups'); ?></div>
|
<div class="portlet-head"><?= $this->getHtml('Accounts/Groups'); ?></div>
|
||||||
<div class="portlet-body">
|
<div class="portlet-body">
|
||||||
<table class="layout wf-100">
|
<div class="form-group">
|
||||||
<!-- @todo add form this belongs to -->
|
<!-- @todo add form this belongs to -->
|
||||||
<!-- @todo make auto save on change for already created news article -->
|
<!-- @todo make auto save on change for already created news article -->
|
||||||
<!-- @todo add default values (some can be removed/overwritten and some not?) -->
|
<!-- @todo add default values (some can be removed/overwritten and some not?) -->
|
||||||
<tr><td><?= $this->getData('accGrpSelector')->render('iReceiver', 'receiver', false); ?>
|
<?= $this->getData('accGrpSelector')->render('iReceiver', 'receiver', false); ?>
|
||||||
</table>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Orange Management
|
* Orange Management
|
||||||
*
|
*
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user