mirror of
https://github.com/Karaka-Management/oms-News.git
synced 2026-02-07 04:28:39 +00:00
More flexbox implementations
This commit is contained in:
parent
cd036ca540
commit
d0b0b614a2
|
|
@ -23,23 +23,28 @@ $footerView->setPages(20);
|
|||
$footerView->setPage(1);
|
||||
|
||||
echo $this->getData('nav')->render(); ?>
|
||||
<div class="box w-100">
|
||||
<table class="table">
|
||||
<caption><?= $this->getText('Archive') ?></caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<td><?= $this->getText('Type'); ?>
|
||||
<td class="wf-100"><?= $this->getText('Title'); ?>
|
||||
<td><?= $this->getText('Author'); ?>
|
||||
<td><?= $this->getText('Date'); ?>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="4"><?= $footerView->render(); ?>
|
||||
<tbody>
|
||||
<?php $count = 0; foreach([] as $key => $value) : $count++; ?>
|
||||
<?php endforeach; ?>
|
||||
<?php if($count === 0) : ?>
|
||||
<tr><td colspan="4" class="empty"><?= $this->getText('Empty', 0, 0); ?>
|
||||
<?php endif; ?>
|
||||
</table>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="box wf-100">
|
||||
<table class="table">
|
||||
<caption><?= $this->getText('Archive') ?></caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<td><?= $this->getText('Type'); ?>
|
||||
<td class="wf-100"><?= $this->getText('Title'); ?>
|
||||
<td><?= $this->getText('Author'); ?>
|
||||
<td><?= $this->getText('Date'); ?>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="4"><?= $footerView->render(); ?>
|
||||
<tbody>
|
||||
<?php $count = 0; foreach([] as $key => $value) : $count++; ?>
|
||||
<?php endforeach; ?>
|
||||
<?php if($count === 0) : ?>
|
||||
<tr><td colspan="4" class="empty"><?= $this->getText('Empty', 0, 0); ?>
|
||||
<?php endif; ?>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -18,51 +18,54 @@
|
|||
*/
|
||||
echo $this->getData('nav')->render(); ?>
|
||||
|
||||
<section class="wf-75 floatLeft">
|
||||
<?php include __DIR__ . '/../../../Editor/Theme/Backend/editor.tpl.php'; ?>
|
||||
</section>
|
||||
<section class="wf-25 floatLeft">
|
||||
<section class="box w-100">
|
||||
<div class="inner">
|
||||
<form id="docForm" method="POST" action="<?= \phpOMS\Uri\UriFactory::build('/{/lang}/api/news?csrf={$CSRF}'); ?>">
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-md-9">
|
||||
<?php include __DIR__ . '/../../../Editor/Theme/Backend/editor.tpl.php'; ?>
|
||||
</div>
|
||||
|
||||
<div class="col-xs-12 col-md-3">
|
||||
<section class="box wf-100">
|
||||
<div class="inner">
|
||||
<form id="docForm" method="POST" action="<?= \phpOMS\Uri\UriFactory::build('/{/lang}/api/news?csrf={$CSRF}'); ?>">
|
||||
<table class="layout wf-100">
|
||||
<tr><td colspan="2"><label for="publish"><?= $this->getText('Status') ?></label>
|
||||
<tr><td colspan="2"><select name="status">
|
||||
<option value="<?= Modules\News\Models\NewsStatus::DRAFT; ?>" selected><?= $this->getText('Draft') ?>
|
||||
<option value="<?= Modules\News\Models\NewsStatus::VISIBLE; ?>"><?= $this->getText('Visible') ?>
|
||||
<tr><td colspan="2"><label for="publish"><?= $this->getText('Publish') ?></label>
|
||||
<tr><td colspan="2"><input type="datetime-local" id="publish" value="<?= (new \DateTime('NOW'))->format('Y-m-d\TH:i:s') ?>">
|
||||
<tr><td><input type="submit" value="<?= $this->getText('Delete', 0) ?>"><td class="rightText"><input type="submit" value="<?= $this->getText('Save', 0) ?>"> <input type="submit" value="<?= $this->getText('Publish') ?>">
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
</section>
|
||||
<section class="box wf-100">
|
||||
<div class="inner">
|
||||
<table class="layout wf-100">
|
||||
<tr><td colspan="2"><label for="publish"><?= $this->getText('Status') ?></label>
|
||||
<tr><td colspan="2"><select name="status">
|
||||
<option value="<?= Modules\News\Models\NewsStatus::DRAFT; ?>" selected><?= $this->getText('Draft') ?>
|
||||
<option value="<?= Modules\News\Models\NewsStatus::VISIBLE; ?>"><?= $this->getText('Visible') ?>
|
||||
<tr><td colspan="2"><label for="publish"><?= $this->getText('Publish') ?></label>
|
||||
<tr><td colspan="2"><input type="datetime-local" id="publish" value="<?= (new \DateTime('NOW'))->format('Y-m-d\TH:i:s') ?>">
|
||||
<tr><td><input type="submit" value="<?= $this->getText('Delete', 0) ?>"><td class="rightText"><input type="submit" value="<?= $this->getText('Save', 0) ?>"> <input type="submit" value="<?= $this->getText('Publish') ?>">
|
||||
<tr><td colspan="2"><label><?= $this->getText('Type') ?></label>
|
||||
<tr><td colspan="2"><span class="radio"><input type="radio" name="type" form="docForm" value="<?= Modules\News\Models\NewsType::ARTICLE; ?>" id="news" checked><label for="news"><?= $this->getText('News') ?></label></span>
|
||||
<tr><td colspan="2"><span class="radio"><input type="radio" name="type" form="docForm" value="<?= Modules\News\Models\NewsType::HEADLINE; ?>" id="headline"><label for="headline"><?= $this->getText('Headline') ?></label></span>
|
||||
<tr><td colspan="2"><span class="radio"><input type="radio" name="type" form="docForm" value="<?= Modules\News\Models\NewsType::LINK; ?>" id="link"><label for="link"><?= $this->getText('Link') ?></label></span>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
</section>
|
||||
<section class="box w-100">
|
||||
<div class="inner">
|
||||
<table class="layout wf-100">
|
||||
<tr><td colspan="2"><label><?= $this->getText('Type') ?></label>
|
||||
<tr><td colspan="2"><span class="radio"><input type="radio" name="type" form="docForm" value="<?= Modules\News\Models\NewsType::ARTICLE; ?>" id="news" checked><label for="news"><?= $this->getText('News') ?></label></span>
|
||||
<tr><td colspan="2"><span class="radio"><input type="radio" name="type" form="docForm" value="<?= Modules\News\Models\NewsType::HEADLINE; ?>" id="headline"><label for="headline"><?= $this->getText('Headline') ?></label></span>
|
||||
<tr><td colspan="2"><span class="radio"><input type="radio" name="type" form="docForm" value="<?= Modules\News\Models\NewsType::LINK; ?>" id="link"><label for="link"><?= $this->getText('Link') ?></label></span>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
<section class="box w-100">
|
||||
<div class="inner">
|
||||
<table class="layout wf-100">
|
||||
<tr><td><label for="permission"><?= $this->getText('Permissions') ?></label>
|
||||
<tr><td><span class="input"><button type="button" formaction=""><i class="fa fa-book"></i></button><input type="text" id="permission"><input type="hidden" form="docForm" name="permission"></span>
|
||||
<tr><td><button><?= $this->getText('Add', 0, 0) ?></button>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
<section class="box w-100">
|
||||
<div class="inner">
|
||||
<table class="layout wf-100">
|
||||
<tr><td colspan="2"><label for="groups"><?= $this->getText('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->getText('Add', 0, 0) ?></button>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
</div>
|
||||
</section>
|
||||
<section class="box wf-100">
|
||||
<div class="inner">
|
||||
<table class="layout wf-100">
|
||||
<tr><td><label for="permission"><?= $this->getText('Permissions') ?></label>
|
||||
<tr><td><span class="input"><button type="button" formaction=""><i class="fa fa-book"></i></button><input type="text" id="permission"><input type="hidden" form="docForm" name="permission"></span>
|
||||
<tr><td><button><?= $this->getText('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->getText('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->getText('Add', 0, 0) ?></button>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -21,33 +21,37 @@ $newsList = $this->getData('news');
|
|||
|
||||
echo $this->getData('nav')->render(); ?>
|
||||
|
||||
<div class="box w-100 floatLeft">
|
||||
<table class="table">
|
||||
<caption><?= $this->getText('News') ?></caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<td>
|
||||
<td><?= $this->getText('Type'); ?>
|
||||
<td class="wf-100"><?= $this->getText('Title'); ?>
|
||||
<td><?= $this->getText('Author'); ?>
|
||||
<td><?= $this->getText('Date'); ?>
|
||||
<tbody>
|
||||
<?php $count = 0; foreach($newsList as $key => $news) : $count++;
|
||||
$url = \phpOMS\Uri\UriFactory::build('/{/lang}/backend/news/article?id=' . $news->getId());
|
||||
$color = 'darkred';
|
||||
if($news->getType() === \Modules\News\Models\NewsType::ARTICLE) { $color = 'green'; }
|
||||
elseif($news->getType() === \Modules\News\Models\NewsType::HEADLINE) { $color = 'purple'; }
|
||||
elseif($news->getType() === \Modules\News\Models\NewsType::LINK) { $color = 'yellow'; }
|
||||
?>
|
||||
<tr>
|
||||
<td data-label=""><a href="<?= $url; ?>"><?= $news->isFeatured() ? '<i class="fa fa-star favorite"></i>' : ''; ?></a>
|
||||
<td data-label="<?= $this->getText('Type'); ?>"><a href="<?= $url; ?>"><span class="tag <?= $color; ?>"><?= $this->getText('TYPE' . $news->getType()); ?></span></a>
|
||||
<td data-label="<?= $this->getText('Title'); ?>"><a href="<?= $url; ?>"><?= $news->getTitle(); ?></a>
|
||||
<td data-label="<?= $this->getText('Author'); ?>"><a href="<?= $url; ?>"><?= $news->getCreatedBy(); ?></a>
|
||||
<td data-label="<?= $this->getText('Date'); ?>"><a href="<?= $url; ?>"><?= $news->getPublish()->format('Y-m-d'); ?></a>
|
||||
<?php endforeach; ?>
|
||||
<?php if($count === 0) : ?>
|
||||
<tr><td colspan="5" class="empty"><?= $this->getText('Empty', 0, 0); ?>
|
||||
<?php endif; ?>
|
||||
</table>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="box wf-100">
|
||||
<table class="table">
|
||||
<caption><?= $this->getText('News') ?></caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<td>
|
||||
<td><?= $this->getText('Type'); ?>
|
||||
<td class="wf-100"><?= $this->getText('Title'); ?>
|
||||
<td><?= $this->getText('Author'); ?>
|
||||
<td><?= $this->getText('Date'); ?>
|
||||
<tbody>
|
||||
<?php $count = 0; foreach($newsList as $key => $news) : $count++;
|
||||
$url = \phpOMS\Uri\UriFactory::build('/{/lang}/backend/news/article?id=' . $news->getId());
|
||||
$color = 'darkred';
|
||||
if($news->getType() === \Modules\News\Models\NewsType::ARTICLE) { $color = 'green'; }
|
||||
elseif($news->getType() === \Modules\News\Models\NewsType::HEADLINE) { $color = 'purple'; }
|
||||
elseif($news->getType() === \Modules\News\Models\NewsType::LINK) { $color = 'yellow'; }
|
||||
?>
|
||||
<tr>
|
||||
<td data-label=""><a href="<?= $url; ?>"><?= $news->isFeatured() ? '<i class="fa fa-star favorite"></i>' : ''; ?></a>
|
||||
<td data-label="<?= $this->getText('Type'); ?>"><a href="<?= $url; ?>"><span class="tag <?= $color; ?>"><?= $this->getText('TYPE' . $news->getType()); ?></span></a>
|
||||
<td data-label="<?= $this->getText('Title'); ?>"><a href="<?= $url; ?>"><?= $news->getTitle(); ?></a>
|
||||
<td data-label="<?= $this->getText('Author'); ?>"><a href="<?= $url; ?>"><?= $news->getCreatedBy(); ?></a>
|
||||
<td data-label="<?= $this->getText('Date'); ?>"><a href="<?= $url; ?>"><?= $news->getPublish()->format('Y-m-d'); ?></a>
|
||||
<?php endforeach; ?>
|
||||
<?php if($count === 0) : ?>
|
||||
<tr><td colspan="5" class="empty"><?= $this->getText('Empty', 0, 0); ?>
|
||||
<?php endif; ?>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -20,12 +20,15 @@
|
|||
$news = $this->getData('news');
|
||||
|
||||
echo $this->getData('nav')->render(); ?>
|
||||
|
||||
<section class="box w-100">
|
||||
<header><h1><?= $news->getTitle(); ?></h1></header>
|
||||
<div class="inner">
|
||||
<article>
|
||||
<?= $news->getContent(); ?>
|
||||
</article>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<section class="box wf-100">
|
||||
<header><h1><?= $news->getTitle(); ?></h1></header>
|
||||
<div class="inner">
|
||||
<article>
|
||||
<?= $news->getContent(); ?>
|
||||
</article>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
Loading…
Reference in New Issue
Block a user