2013-10-29 09:04:42 +01:00
|
|
|
<?php $classNames = ['post', 'post-type-' . TextHelper::camelCaseToHumanCase(PostType::toString($this->context->post->type))] ?>
|
|
|
|
<?php if (isset($this->context->source) and $this->context->source == 'mass-tag'): ?>
|
|
|
|
<?php $classNames []= 'taggable' ?>
|
|
|
|
<?php if (in_array($this->context->additionalInfo, array_map(function($x) { return $x->name; }, $this->context->post->sharedTag))): ?>
|
|
|
|
<?php $classNames []= 'tagged' ?>
|
|
|
|
<?php endif ?>
|
|
|
|
<?php endif ?>
|
|
|
|
|
|
|
|
<div class="<?php echo implode(' ', $classNames) ?>">
|
|
|
|
<?php if (isset($this->context->source) and $this->context->source == 'mass-tag'): ?>
|
|
|
|
<a class="toggle-tag" href="<?php echo \Chibi\UrlHelper::route('post', 'toggle-tag', ['id' => $this->context->post->id, 'tag' => $this->context->additionalInfo]) ?>" data-text-tagged="Tagged" data-text-untagged="Untagged">
|
|
|
|
<?php echo in_array('tagged', $classNames) ? 'Tagged' : 'Untagged' ?>
|
|
|
|
</a>
|
|
|
|
<?php endif ?>
|
|
|
|
<a class="link" href="<?php echo \Chibi\UrlHelper::route('post', 'view', ['id' => $this->context->post->id]) ?>">
|
2013-10-23 00:16:52 +02:00
|
|
|
<img class="thumb" src="<?php echo \Chibi\UrlHelper::route('post', 'thumb', ['name' => $this->context->post->name]) ?>" alt="@<?php echo $this->context->post->id ?>"/>
|
2013-10-29 09:42:29 +01:00
|
|
|
<div class="info-bar">
|
|
|
|
<i class="icon-comments"></i> <span><?php echo $this->context->post->countOwn('comment') ?></span>
|
|
|
|
<i class="icon-favs"></i> <span><?php echo $this->context->post->countOwn('favoritee') ?></span>
|
|
|
|
</div>
|
2013-10-19 20:05:03 +02:00
|
|
|
</a>
|
|
|
|
</div>
|