szurubooru/src/Views/post-list.phtml
Marcin Kurczewski 396ea97cad PrivilegesHelper shortened to Access
Methods are shorter, too
2014-04-29 23:53:47 +02:00

31 lines
917 B
PHTML

<?php
Assets::addStylesheet('post-list.css');
Assets::addScript('post-list.js');
?>
<?php if (isset($this->context->source)
and $this->context->source == 'mass-tag'
and Access::check(Privilege::MassTag)): ?>
<?php \Chibi\View::render('tag-mass-tag', $this->context) ?>
<?php endif ?>
<?php if (!empty($this->context->transport->message)): ?>
<?php \Chibi\View::render('message', $this->context) ?>
<?php elseif (empty($this->context->transport->posts)): ?>
<p class="alert alert-warning">No posts to show.</p>
<?php else: ?>
<div class="posts-wrapper">
<div class="posts paginator-content">
<?php foreach ($this->context->transport->posts as $post): ?>
<?php $this->context->post = $post ?>
<?php \Chibi\View::render('post-small', $this->context) ?>
<?php endforeach ?>
</div>
<div class="clear"></div>
</div>
<?php \Chibi\View::render('paginator', $this->context) ?>
<?php endif ?>