2013-10-27 01:06:58 +02:00
|
|
|
|
<?php $this->provide('title', '/' . str_replace('_', ' ', $this->params()->tags)) ?>
|
|
|
|
|
<div id="post-list">
|
|
|
|
|
<?php
|
|
|
|
|
if ($this->tag_suggestions) :
|
|
|
|
|
$total = count($this->tag_suggestions);
|
|
|
|
|
$count = 0;
|
|
|
|
|
?>
|
|
|
|
|
<div class="status-notice">
|
|
|
|
|
<?= $this->t('.maybe_you_meant') ?>: <?= implode(', ', array_map(function($x)use($total, &$count){
|
|
|
|
|
$count++;
|
|
|
|
|
$or = $count == $total && $total > 1 ? 'or ' : '';
|
|
|
|
|
return $or.$this->tag_link($x);
|
|
|
|
|
}, $this->tag_suggestions)) ?>
|
|
|
|
|
</div>
|
|
|
|
|
<?php
|
|
|
|
|
unset($total, $count);
|
|
|
|
|
endif
|
|
|
|
|
?>
|
2016-09-19 09:31:58 +02:00
|
|
|
|
|
2017-01-25 11:30:59 +01:00
|
|
|
|
<div class="sidebar" style="display: none;">
|
2016-09-25 08:08:31 +02:00
|
|
|
|
<?php if (current_user()->is_privileged_or_higher()) : ?>
|
2017-01-25 11:30:59 +01:00
|
|
|
|
<?= $this->partial('tag_script') ?>
|
2013-10-27 01:06:58 +02:00
|
|
|
|
<?php endif ?>
|
|
|
|
|
|
|
|
|
|
<?php if ($this->showing_holds_only) : ?>
|
|
|
|
|
<?php if (!$this->posts->blank()) : ?>
|
|
|
|
|
<div style="margin-bottom: .5em;">
|
|
|
|
|
<?= $this->linkToFunction($this->t('.activate'), "Post.activate_all_posts()") ?>
|
|
|
|
|
</div>
|
|
|
|
|
<?php endif ?>
|
|
|
|
|
<?php else: ?>
|
|
|
|
|
<div id="held-posts" style="display: none; margin-bottom: .5em;"><?= $this->t(['.held_html', 'count' => $this->contentTag('span', '', ['id' => 'held-posts-count'])]) ?> (<a href="#"><?= $this->t('.held_view') ?></a>).</div>
|
|
|
|
|
<?php endif ?>
|
|
|
|
|
|
|
|
|
|
<?= $this->partial('blacklists') ?>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="content">
|
2017-01-25 11:30:59 +01:00
|
|
|
|
<?php if (current_user()->is_member_or_lower()) : ?>
|
|
|
|
|
<div class="status-notice">You’re not logged in! You are required to have an account to access <a href="/wiki/show?title=restricted_content">restricted content</a>! <a href="/user/login">Login</a>
|
|
|
|
|
</div>
|
|
|
|
|
<?php endif ?>
|
|
|
|
|
<?php if ($this->searching_pool) : ?>
|
|
|
|
|
<div class="status-notice">
|
|
|
|
|
<?= $this->t(['.pool_view_html', 'pool' => $this->linkTo($this->h($this->searching_pool->pretty_name()), array('pool#show', 'id' => $this->searching_pool->id))]) ?>
|
|
|
|
|
</div>
|
|
|
|
|
<?php endif ?>
|
|
|
|
|
|
2016-09-19 09:31:58 +02:00
|
|
|
|
<?php if (!empty($this->ambiguous_tags)) : ?>
|
2013-10-27 01:06:58 +02:00
|
|
|
|
<div class="status-notice">
|
2014-01-17 14:43:34 +01:00
|
|
|
|
<?= $this->t('.ambiguous') ?>: <?= implode(', ', array_map(function($x){ return $this->linkTo($this->h($x), ['wiki#show', 'title' => $x]); }, $this->ambiguous_tags)) ?>
|
2013-10-27 01:06:58 +02:00
|
|
|
|
</div>
|
|
|
|
|
<?php endif ?>
|
2013-12-04 21:19:11 +01:00
|
|
|
|
<?php if (CONFIG()->can_show_ad('post#index-top', current_user())) : ?>
|
2013-12-05 20:56:41 +01:00
|
|
|
|
<?= $this->partial('horizontal', ['position' => 'top']) ?>
|
2013-10-27 01:06:58 +02:00
|
|
|
|
<?php endif ?>
|
|
|
|
|
|
|
|
|
|
<div id="quick-edit" style="display: none;" class="top-corner-float">
|
|
|
|
|
<?= $this->formTag('#update', function(){ ?>
|
|
|
|
|
<?= $this->textAreaTag("post[tags]", "", array('size' => '60x2', 'id' => 'post_tags')) ?>
|
|
|
|
|
<?= $this->submitTag($this->t('buttons.update')) ?>
|
|
|
|
|
<?= $this->tag('input', array('type' => 'button', 'value' => $this->t('buttons.cancel'), 'class' => 'cancel')) ?>
|
|
|
|
|
<h4 style="float: right;"><?= $this->t('.edit_tags') ?></h4>
|
|
|
|
|
<?php }) ?>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<?= $this->partial("hover") ?>
|
|
|
|
|
<?= $this->partial('posts', array('posts' => $this->posts)) ?>
|
|
|
|
|
|
|
|
|
|
<div id="paginator">
|
|
|
|
|
<?= $this->willPaginate($this->posts) ?>
|
|
|
|
|
</div>
|
2013-12-05 15:28:37 +01:00
|
|
|
|
|
|
|
|
|
<?php if (CONFIG()->can_show_ad('post#index-bottom', current_user())) : ?>
|
2013-12-05 20:56:41 +01:00
|
|
|
|
<?= $this->partial('horizontal', ['position' => 'bottom', 'center' => true]) ?>
|
2013-12-05 15:28:37 +01:00
|
|
|
|
<?php endif ?>
|
2013-10-27 01:06:58 +02:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<?= $this->contentFor('post_cookie_javascripts', function() { ?>
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
|
post_quick_edit = new PostQuickEdit($("quick-edit"));
|
|
|
|
|
|
|
|
|
|
PostModeMenu.init(<?= $this->searching_pool && $this->searching_pool->id ?>)
|
|
|
|
|
<?php foreach ($this->preload as $post) : ?>
|
|
|
|
|
Preload.preload('<?= $post->preview_url() ?>');
|
|
|
|
|
<?php endforeach ?>
|
|
|
|
|
|
|
|
|
|
var held_posts = Cookie.get("held_post_count");
|
|
|
|
|
if(held_posts && held_posts > 0)
|
|
|
|
|
{
|
|
|
|
|
var e = $("held-posts");
|
|
|
|
|
if(e)
|
|
|
|
|
{
|
|
|
|
|
var a = e.down("A");
|
|
|
|
|
var cnt = e.down("#held-posts-count");
|
|
|
|
|
cnt.update("" + held_posts + " " + (held_posts == 1? "post":"posts"));
|
|
|
|
|
a.href = "/post/index?tags=holds%3Aonly%20user%3A" + Cookie.get("login") + "%20limit%3A100"
|
|
|
|
|
e.show();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
Post.cache_sample_urls();
|
|
|
|
|
<?= $this->tag_completion_box('$("post_tags")') ?>
|
|
|
|
|
if($("tag-script")) {<?= $this->tag_completion_box('$("tag-script")') ?>}
|
|
|
|
|
</script>
|
|
|
|
|
<?php }) ?>
|
|
|
|
|
|
|
|
|
|
<?= $this->contentFor('html_header', function() { ?>
|
|
|
|
|
<?= $this->auto_discovery_link_tag_with_id('rss', array('post#piclens', 'tags' => $this->params()->tags, 'page' => $this->params()->page), array('id' => 'pl')) ?>
|
|
|
|
|
<?= $this->navigation_links($this->posts) ?>
|
|
|
|
|
<?php }) ?>
|
|
|
|
|
|
|
|
|
|
<?= $this->partial('footer') ?>
|
|
|
|
|
|
|
|
|
|
<?php if ($this->contentFor('subnavbar')) : ?>
|
|
|
|
|
<!-- Align the links to the content, not the window. -->
|
|
|
|
|
<div style="clear: both;">
|
|
|
|
|
<div class="sidebar"> </div>
|
|
|
|
|
<div class="footer" style="clear: none;">
|
|
|
|
|
<ul class="flat-list" id="subnavbar">
|
|
|
|
|
<?= $this->content('subnavbar') ?>
|
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<?php $this->clear_content_for('subnavbar') ?>
|
|
|
|
|
<?php endif ?>
|