Tag list: added info when there are no tags
This commit is contained in:
parent
d274f1c044
commit
ee224b84db
1 changed files with 21 additions and 17 deletions
|
@ -25,11 +25,14 @@
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
<?php $max = max([0]+array_map(function($x) { return $x['post_count']; }, $this->context->transport->tags)); ?>
|
<?php if (empty($this->context->transport->tags)): ?>
|
||||||
<?php $add = 0. ?>
|
<p class="alert alert-warning">No tags to show.</p>
|
||||||
<?php $mul = 10. / max(1, log(max(1, $max))) ?>
|
<?php else: ?>
|
||||||
<?php $url = \Chibi\UrlHelper::route('post', 'list', ['query' => '_query_']) ?>
|
<?php $max = max([0]+array_map(function($x) { return $x['post_count']; }, $this->context->transport->tags)); ?>
|
||||||
<div class="tags">
|
<?php $add = 0. ?>
|
||||||
|
<?php $mul = 10. / max(1, log(max(1, $max))) ?>
|
||||||
|
<?php $url = \Chibi\UrlHelper::route('post', 'list', ['query' => '_query_']) ?>
|
||||||
|
<div class="tags">
|
||||||
<ul>
|
<ul>
|
||||||
<?php foreach ($this->context->transport->tags as $tag): ?>
|
<?php foreach ($this->context->transport->tags as $tag): ?>
|
||||||
<?php $name = $tag['name'] ?>
|
<?php $name = $tag['name'] ?>
|
||||||
|
@ -41,4 +44,5 @@
|
||||||
</li>
|
</li>
|
||||||
<?php endforeach ?>
|
<?php endforeach ?>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
<?php endif ?>
|
||||||
|
|
Loading…
Reference in a new issue