More flexbox implementations

This commit is contained in:
Dennis Eichhorn 2017-01-29 12:35:25 +01:00
parent cd036ca540
commit d0b0b614a2
4 changed files with 117 additions and 102 deletions

View File

@ -23,23 +23,28 @@ $footerView->setPages(20);
$footerView->setPage(1); $footerView->setPage(1);
echo $this->getData('nav')->render(); ?> echo $this->getData('nav')->render(); ?>
<div class="box w-100">
<table class="table"> <div class="row">
<caption><?= $this->getText('Archive') ?></caption> <div class="col-xs-12">
<thead> <div class="box wf-100">
<tr> <table class="table">
<td><?= $this->getText('Type'); ?> <caption><?= $this->getText('Archive') ?></caption>
<td class="wf-100"><?= $this->getText('Title'); ?> <thead>
<td><?= $this->getText('Author'); ?> <tr>
<td><?= $this->getText('Date'); ?> <td><?= $this->getText('Type'); ?>
<tfoot> <td class="wf-100"><?= $this->getText('Title'); ?>
<tr> <td><?= $this->getText('Author'); ?>
<td colspan="4"><?= $footerView->render(); ?> <td><?= $this->getText('Date'); ?>
<tbody> <tfoot>
<?php $count = 0; foreach([] as $key => $value) : $count++; ?> <tr>
<?php endforeach; ?> <td colspan="4"><?= $footerView->render(); ?>
<?php if($count === 0) : ?> <tbody>
<tr><td colspan="4" class="empty"><?= $this->getText('Empty', 0, 0); ?> <?php $count = 0; foreach([] as $key => $value) : $count++; ?>
<?php endif; ?> <?php endforeach; ?>
</table> <?php if($count === 0) : ?>
<tr><td colspan="4" class="empty"><?= $this->getText('Empty', 0, 0); ?>
<?php endif; ?>
</table>
</div>
</div>
</div> </div>

View File

@ -18,51 +18,54 @@
*/ */
echo $this->getData('nav')->render(); ?> echo $this->getData('nav')->render(); ?>
<section class="wf-75 floatLeft"> <div class="row">
<?php include __DIR__ . '/../../../Editor/Theme/Backend/editor.tpl.php'; ?> <div class="col-xs-12 col-md-9">
</section> <?php include __DIR__ . '/../../../Editor/Theme/Backend/editor.tpl.php'; ?>
<section class="wf-25 floatLeft"> </div>
<section class="box w-100">
<div class="inner"> <div class="col-xs-12 col-md-3">
<form id="docForm" method="POST" action="<?= \phpOMS\Uri\UriFactory::build('/{/lang}/api/news?csrf={$CSRF}'); ?>"> <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"> <table class="layout wf-100">
<tr><td colspan="2"><label for="publish"><?= $this->getText('Status') ?></label> <tr><td colspan="2"><label><?= $this->getText('Type') ?></label>
<tr><td colspan="2"><select name="status"> <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>
<option value="<?= Modules\News\Models\NewsStatus::DRAFT; ?>" selected><?= $this->getText('Draft') ?> <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>
<option value="<?= Modules\News\Models\NewsStatus::VISIBLE; ?>"><?= $this->getText('Visible') ?> <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>
<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> </table>
</form> </div>
</div> </section>
</section> <section class="box wf-100">
<section class="box w-100"> <div class="inner">
<div class="inner"> <table class="layout wf-100">
<table class="layout wf-100"> <tr><td><label for="permission"><?= $this->getText('Permissions') ?></label>
<tr><td colspan="2"><label><?= $this->getText('Type') ?></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 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><button><?= $this->getText('Add', 0, 0) ?></button>
<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> </table>
<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> </div>
</table> </section>
</div> <section class="box wf-100">
</section> <div class="inner">
<section class="box w-100"> <table class="layout wf-100">
<div class="inner"> <tr><td colspan="2"><label for="groups"><?= $this->getText('Groups') ?></label>
<table class="layout wf-100"> <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><label for="permission"><?= $this->getText('Permissions') ?></label> <tr><td><button><?= $this->getText('Add', 0, 0) ?></button>
<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> </table>
<tr><td><button><?= $this->getText('Add', 0, 0) ?></button> </div>
</table> </section>
</div> </div>
</section> </div>
<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>

View File

@ -21,33 +21,37 @@ $newsList = $this->getData('news');
echo $this->getData('nav')->render(); ?> echo $this->getData('nav')->render(); ?>
<div class="box w-100 floatLeft"> <div class="row">
<table class="table"> <div class="col-xs-12">
<caption><?= $this->getText('News') ?></caption> <div class="box wf-100">
<thead> <table class="table">
<tr> <caption><?= $this->getText('News') ?></caption>
<td> <thead>
<td><?= $this->getText('Type'); ?> <tr>
<td class="wf-100"><?= $this->getText('Title'); ?> <td>
<td><?= $this->getText('Author'); ?> <td><?= $this->getText('Type'); ?>
<td><?= $this->getText('Date'); ?> <td class="wf-100"><?= $this->getText('Title'); ?>
<tbody> <td><?= $this->getText('Author'); ?>
<?php $count = 0; foreach($newsList as $key => $news) : $count++; <td><?= $this->getText('Date'); ?>
$url = \phpOMS\Uri\UriFactory::build('/{/lang}/backend/news/article?id=' . $news->getId()); <tbody>
$color = 'darkred'; <?php $count = 0; foreach($newsList as $key => $news) : $count++;
if($news->getType() === \Modules\News\Models\NewsType::ARTICLE) { $color = 'green'; } $url = \phpOMS\Uri\UriFactory::build('/{/lang}/backend/news/article?id=' . $news->getId());
elseif($news->getType() === \Modules\News\Models\NewsType::HEADLINE) { $color = 'purple'; } $color = 'darkred';
elseif($news->getType() === \Modules\News\Models\NewsType::LINK) { $color = 'yellow'; } if($news->getType() === \Modules\News\Models\NewsType::ARTICLE) { $color = 'green'; }
?> elseif($news->getType() === \Modules\News\Models\NewsType::HEADLINE) { $color = 'purple'; }
<tr> elseif($news->getType() === \Modules\News\Models\NewsType::LINK) { $color = 'yellow'; }
<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> <tr>
<td data-label="<?= $this->getText('Title'); ?>"><a href="<?= $url; ?>"><?= $news->getTitle(); ?></a> <td data-label=""><a href="<?= $url; ?>"><?= $news->isFeatured() ? '<i class="fa fa-star favorite"></i>' : ''; ?></a>
<td data-label="<?= $this->getText('Author'); ?>"><a href="<?= $url; ?>"><?= $news->getCreatedBy(); ?></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('Date'); ?>"><a href="<?= $url; ?>"><?= $news->getPublish()->format('Y-m-d'); ?></a> <td data-label="<?= $this->getText('Title'); ?>"><a href="<?= $url; ?>"><?= $news->getTitle(); ?></a>
<?php endforeach; ?> <td data-label="<?= $this->getText('Author'); ?>"><a href="<?= $url; ?>"><?= $news->getCreatedBy(); ?></a>
<?php if($count === 0) : ?> <td data-label="<?= $this->getText('Date'); ?>"><a href="<?= $url; ?>"><?= $news->getPublish()->format('Y-m-d'); ?></a>
<tr><td colspan="5" class="empty"><?= $this->getText('Empty', 0, 0); ?> <?php endforeach; ?>
<?php endif; ?> <?php if($count === 0) : ?>
</table> <tr><td colspan="5" class="empty"><?= $this->getText('Empty', 0, 0); ?>
<?php endif; ?>
</table>
</div>
</div>
</div> </div>

View File

@ -20,12 +20,15 @@
$news = $this->getData('news'); $news = $this->getData('news');
echo $this->getData('nav')->render(); ?> echo $this->getData('nav')->render(); ?>
<div class="row">
<section class="box w-100"> <div class="col-xs-12">
<header><h1><?= $news->getTitle(); ?></h1></header> <section class="box wf-100">
<div class="inner"> <header><h1><?= $news->getTitle(); ?></h1></header>
<article> <div class="inner">
<?= $news->getContent(); ?> <article>
</article> <?= $news->getContent(); ?>
</article>
</div>
</section>
</div> </div>
</section> </div>