Big update

This commit is contained in:
Yukimi Kazari 2017-01-25 05:30:59 -05:00
parent da8177e024
commit c3732fffba
4 changed files with 68 additions and 85 deletions

View File

@ -135,24 +135,66 @@ container
<?= $this->partial('layouts/news') ?> <?= $this->partial('layouts/news') ?>
<div id="header"> <div id="header">
<div id="title"><h2 id="site-title"><?= $this->linkTo($this->imageTag('images/logo_small.png', array('alt' => CONFIG()->app_name, 'size' => '146x30', 'id' => 'logo')), CONFIG()->url_base) ?><div style="margin-right: 0.0em;"> <div id="title"><h2 id="site-title"><?= $this->linkTo($this->imageTag('images/logo_small.png', array('alt' => CONFIG()->app_name, 'size' => '146x30', 'id' => 'logo')), CONFIG()->url_base) ?><div style="margin-right: 0.0em;">
<?= $this->formTag('post#index', array('method' => 'get', 'accept-charset' => 'UTF-8'), function(){ ?> <?php if ($this->request()->controller() == 'post') : ?>
<div style="margin:0;padding:0;display:inline"></div> <?= $this->formTag('post#index', array('method' => 'get', 'accept-charset' => 'UTF-8'), function(){ ?>
<div> <div style="margin:0;padding:0;display:inline"></div>
<?php <div>
if ($this->request()->controller() == 'post') : ?> <?= $this->textFieldTag("tags", $this->h($this->params()->tags), array('size' => '60', 'autocomplete' => 'off', 'placeholder' => 'Search Posts...', 'style' => 'font-size: 14pt; padding: 0 0 1px 4px; margin: 4px 0 0 8px; border-style: dotted; background: #2b0000;')) ?>
<?= $this->textFieldTag("tags", $this->h($this->params()->tags), array('size' => '60', 'autocomplete' => 'off', 'placeholder' => 'Search Posts...', 'style' => 'font-size: 14pt; padding: 0 0 1px 4px; margin: 4px 0 0 8px; border-style: dotted; background: #2b0000;')) ?> <?= $this->tag_completion_box('$("tags")', ['$("tags").up("form")', '$("tags")', null], true) ?>
<?= $this->tag_completion_box('$("tags")', ['$("tags").up("form")', '$("tags")', null], true) ?> <?php if ($this->request()->action() == 'index') : ?>
<?php endif ?> <div style="display: inline-block; margin: 0 0 0 -8px;" id="mode-box" class="advanced-editing">
</div> <form onsubmit="return false;" action="">
<?php }) ?> <div>
<select name="mode" id="mode" onchange="PostModeMenu.change()" onkeyup="PostModeMenu.change()" style="font-size: 14pt; padding: 0 0 1px 4px; margin: 4px 0 0 0; border-style: dotted; background: #2b0000; border-color: darkred; border-width: 0 0 1px; color: #7d3030;">
<option value="view">View</option>
<option value="edit">Edit</option>
<option value="rating-s">Rate:S</option>
<option value="rating-q">Rate:Q</option>
<option value="rating-e">Rate:E</option>
<?php if (current_user()->is_privileged_or_higher()) : ?>
<option value="lock-rating">Lock rating</option>
<option value="lock-note">Lock notes</option>
<?php endif ?>
<?php if (current_user()->is_mod_or_higher()) : ?>
<option value="approve">Approve</option>
<?php endif ?>
<option value="flag">Flag</option>
<option value="apply-tag-script">Script</option>
<option value="reparent-quick">Reparent</option>
<?php if ($this->searching_pool) : ?>
<option value="remove-from-pool">Remove from Pool</option>
<?php endif ?>
<?php if (CONFIG()->delete_post_mode && current_user()->is_admin()) : ?>
<option value="destroy">Delete posts</option>
<?php endif ?>
</select>
</div>
</form>
</div>
<?php endif ?>
</div>
<?php }) ?>
<?php endif ?>
<?php if ($this->request()->controller() == 'tag') : ?>
<?= $this->formTag(array('action' => 'index'), array('method' => 'get'), function(){ ?>
<table class="form">
<?= $this->textFieldTag("name", $this->h($this->params()->name), array('size' => '40', 'autocomplete' => 'off', 'placeholder' => 'Search Tags...', 'style' => 'font-size: 14pt; padding: 0 0 1px 4px; margin: 4px 0 0 8px; border-style: dotted; background: #2b0000;')) ?> <?= $this->selectTag('type', array(array_merge(array('Any' => 'any'), array_unique(CONFIG()->tag_types)), $this->params()->type), array('style' => 'font-size: 14pt; padding: 0 0 1px 4px; margin: 4px 0 0 0; border-style: dotted; background: #2b0000; border-color: darkred; border-width: 0 0 1px; color: #7d3030;')) ?> <?= $this->selectTag('order', array(array('Name' => 'name', 'Count' => 'count', 'Date' => 'date'), $this->params()->order), array('style' => 'font-size: 14pt; padding: 0 0 1px 4px; margin: 4px 0 0 0; border-style: dotted; background: #2b0000; border-color: darkred; border-width: 0 0 1px; color: #7d3030;')) ?>
</table>
<?php }) ?>
<?php endif ?>
<?php if ($this->request()->controller() == 'artist') : ?>
<?= $this->formTag([], ['method' => 'get'], function(){ ?>
<?= $this->textFieldTag('name', $this->params()->name, array('size' => '40', 'autocomplete' => 'off', 'placeholder' => 'Search Artists...', 'style' => 'font-size: 14pt; padding: 0 0 1px 4px; margin: 4px 0 0 8px; border-style: dotted; background: #2b0000;')) ?> <?= $this->selectTag('order', [['Name' => 'name', 'Date' => 'date'], ($this->params()->order ?: '')], ['style' => 'font-size: 14pt; padding: 0 0 1px 4px; margin: 4px 0 0 -8px; border-style: dotted; background: #2b0000; border-color: darkred; border-width: 0 0 1px; color: #7d3030;']) ?>
<?php }) ?>
<?php endif ?>
</div> </div>
</h2></div> </h2></div>
<?= $this->partial('layouts/menu') ?> <?= $this->partial('layouts/menu') ?>
</div> </div>
<?= $this->partial('layouts/login') ?> <?= $this->partial('layouts/login') ?>
<?php if (CONFIG()->server_host == "yande.re") : ?> <?php if (CONFIG()->server_host == "sequenzia.moe") : ?>
<div style="display: none;">Danbooru-based image board with a specialization in high-quality images.</div> <div style="display: none;">The global image database!</div>
<?php endif ?> <?php endif ?>
<!--[if lt IE 7]> <!--[if lt IE 7]>

View File

@ -17,44 +17,9 @@
endif endif
?> ?>
<div class="sidebar"> <div class="sidebar" style="display: none;">
<?php /* <?= $this->partial('search') ?> */ ?>
<?php if (current_user()->is_privileged_or_higher()) : ?> <?php if (current_user()->is_privileged_or_higher()) : ?>
<div style="margin-bottom: 0.5em;" id="mode-box" class="advanced-editing"> <?= $this->partial('tag_script') ?>
<form onsubmit="return false;" action="">
<div>
<select name="mode" id="mode" onchange="PostModeMenu.change()" onkeyup="PostModeMenu.change()" style="width: 13em; padding: 0 0 .2em 0; background: black; color: #BF5E65; border-style: solid; border-width: 0px 0px 1px 0px; border-color: darkred;">
<option value="view"><?= $this->t('.mode_form.view') ?></option>
<option value="edit"><?= $this->t('.mode_form.edit') ?></option>
<!-- <option value="rating-s">Rate safe</option>
<option value="rating-q">Rate questionable</option>
<option value="rating-e">Rate explicit</option>
<?php if (current_user()->is_privileged_or_higher()) : ?>
<option value="lock-rating">Lock rating</option>
<option value="lock-note">Lock notes</option>
<?php endif ?> -->
<?php if (current_user()->is_mod_or_higher()) : ?>
<option value="approve"><?= $this->t('.mode_form.approve') ?></option>
<?php endif ?>
<option value="flag"><?= $this->t('.mode_form.flag') ?></option>
<option value="apply-tag-script"><?= $this->t('.mode_form.script') ?></option>
<option value="reparent-quick"><?= $this->t('.mode_form.reparent') ?></option>
<?php if ($this->searching_pool) : ?>
<option value="remove-from-pool"><?= $this->t('.mode_form.pool_remove') ?></option>
<?php endif ?>
<?php if (CONFIG()->delete_post_mode && current_user()->is_admin()) : ?>
<option value="destroy">Delete posts</option>
<?php endif ?>
</select>
</div>
</form>
</div>
<?= $this->partial('tag_script') ?>
<?php endif ?>
<?php if ($this->searching_pool) : ?>
<?= $this->t(['.pool_view_html', 'pool' => $this->linkTo($this->h($this->searching_pool->pretty_name()), array('pool#show', 'id' => $this->searching_pool->id))]) ?>
<?php endif ?> <?php endif ?>
<?php if ($this->showing_holds_only) : ?> <?php if ($this->showing_holds_only) : ?>
@ -68,15 +33,21 @@
<?php endif ?> <?php endif ?>
<?= $this->partial('blacklists') ?> <?= $this->partial('blacklists') ?>
<?= $this->partial('tags', array('include_tag_hover_highlight' => 'true')) ?>
<br />
<?php if (CONFIG()->can_show_ad('post#index-sidebar', current_user())) : ?>
<?= $this->partial('vertical') ?> <?= $this->partial('vertical') ?>
<?php endif ?> <?php endif ?>
</div> </div>
<div class="content"> <div class="content">
<?php if (current_user()->is_member_or_lower()) : ?>
<div class="status-notice">Youre 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 ?>
<?php if (!empty($this->ambiguous_tags)) : ?> <?php if (!empty($this->ambiguous_tags)) : ?>
<div class="status-notice"> <div class="status-notice">
<?= $this->t('.ambiguous') ?>: <?= implode(', ', array_map(function($x){ return $this->linkTo($this->h($x), ['wiki#show', 'title' => $x]); }, $this->ambiguous_tags)) ?> <?= $this->t('.ambiguous') ?>: <?= implode(', ', array_map(function($x){ return $this->linkTo($this->h($x), ['wiki#show', 'title' => $x]); }, $this->ambiguous_tags)) ?>

View File

@ -1,33 +1,3 @@
<div>
<?= $this->formTag(array('action' => 'index'), array('method' => 'get'), function(){ ?>
<table class="form">
<tbody>
<tr>
<th width="15%">
<label for="name"><?= $this->t('tag_name') ?></label>
<p><?= $this->t('tag_wild') ?></p>
</th>
<td width="85%"><?= $this->textFieldTag("name", $this->h($this->params()->name), array('size' => '40')) ?></td>
</tr>
<tr>
<th><label for="type"><?= $this->t('tag_type') ?></label></th>
<td><?= $this->selectTag('type', array(array_merge(array('Any' => 'any'), array_unique(CONFIG()->tag_types)), $this->params()->type)) ?></td>
</tr>
<tr>
<th><label for="order"><?= $this->t('tag_order') ?></label></th>
<td><?= $this->selectTag('order', array(array('Name' => 'name', 'Count' => 'count', 'Date' => 'date'), $this->params()->order)) ?></td>
</tr>
</tbody>
<tfoot>
<tr>
<td><?= $this->submitTag($this->t('tag_search')) ?></td>
<td></td>
</tr>
</tfoot>
</table>
<?php }) ?>
</div>
<table width="100%" class="highlightable"> <table width="100%" class="highlightable">
<thead> <thead>
<tr> <tr>

View File

@ -565,7 +565,7 @@ ul.link-page>li{list-style-type:none;margin:0;padding:0}
.tag-completion-box ul{list-style-type:none;margin:.5em} .tag-completion-box ul{list-style-type:none;margin:.5em}
.tag-completion-box .completed-tag{cursor:default;margin:0;position:relative} .tag-completion-box .completed-tag{cursor:default;margin:0;position:relative}
.tag-completion-box .completed-tag-alias{float:right;margin-left:1em} .tag-completion-box .completed-tag-alias{float:right;margin-left:1em}
.tag-completion-box .completed-tag.focused{background-color:#52003} .tag-completion-box .completed-tag.focused{background-color:#880005}
.tag-completion-box .completed-tag.recent-tag{font-weight:bold} .tag-completion-box .completed-tag.recent-tag{font-weight:bold}
.tag-completion-box .remove-recent-tag{background-color:#002;left:-1.5em;padding-left:.25em;padding-right:.5em;position:absolute} .tag-completion-box .remove-recent-tag{background-color:#002;left:-1.5em;padding-left:.25em;padding-right:.5em;position:absolute}
.added{color:#0c0} .added{color:#0c0}