Tag list: added info when there are no tags

This commit is contained in:
Marcin Kurczewski 2013-11-23 16:01:21 +01:00
parent d274f1c044
commit ee224b84db

View file

@ -25,6 +25,9 @@
</ul>
</nav>
<?php if (empty($this->context->transport->tags)): ?>
<p class="alert alert-warning">No tags to show.</p>
<?php else: ?>
<?php $max = max([0]+array_map(function($x) { return $x['post_count']; }, $this->context->transport->tags)); ?>
<?php $add = 0. ?>
<?php $mul = 10. / max(1, log(max(1, $max))) ?>
@ -42,3 +45,4 @@
<?php endforeach ?>
</ul>
</div>
<?php endif ?>