mirror of
https://github.com/Karaka-Management/oms-News.git
synced 2026-02-03 18:58:40 +00:00
More flexbox implementations
This commit is contained in:
parent
d0b0b614a2
commit
bb791ee8c4
|
|
@ -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>
|
||||
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user