TESTING - Option Menu?

This commit is contained in:
Yuki K 2016-09-15 02:34:56 -04:00
parent 7a1b2d4c26
commit e4e81bf226

View File

@ -8,7 +8,7 @@
'class' => $this->post->has_sample() ? "original-file-changed":"original-file-unchanged", 'class' => $this->post->has_sample() ? "original-file-changed":"original-file-unchanged",
'id' => 'highres')); 'id' => 'highres'));
else: else:
echo $this->linkTo(($this->post->has_sample() ? $this->t('.download.larger') : $this->t('.download.image')) . ' ' . $this->numberToHumanSize($file_jpeg['size']), $file_jpeg['url'], array( echo $this->linkTo(($this->post->has_sample() ? $this->t('.download.larger') : $this->t('.download.image')) . ' (' . $this->numberToHumanSize($file_jpeg['size']) . ')', $file_jpeg['url'], array(
'class' => ($this->post->has_sample() ? "original-file-changed":"original-file-unchanged"), 'class' => ($this->post->has_sample() ? "original-file-changed":"original-file-unchanged"),
'id' => 'highres')); 'id' => 'highres'));
endif endif
@ -31,27 +31,6 @@
<li><?php //echo $this->linkToFunction($this->t('.resize'), "post->resize_image()") ?></li> <li><?php //echo $this->linkToFunction($this->t('.resize'), "post->resize_image()") ?></li>
<?php //endif ?> --> <?php //endif ?> -->
<?php if ($this->post->image() && $this->post->can_be_seen_by(current_user())) : ?> <?php if ($this->post->image() && $this->post->can_be_seen_by(current_user())) : ?>
<?php $file_jpeg = $this->post->get_file_jpeg() ?>
<?php if ($this->post->use_sample(current_user()) or current_user()->always_resize_images) : ?>
<li><?php if (!array_key_exists("dakimakura", $this->post->tags()) || current_user()->is_contributor_or_higher());
echo $this->linkTo($this->t('.view_larger'), $file_jpeg['url'], [
'class' => ($this->post->has_sample() ? "original-file-changed":"original-file-unchanged") . " highres-show",
'id' => 'highres-show', 'large_width' => $this->post->width, 'large_height' => $this->post->height])
?>
</li>
<?php endif ?>
<li><?php if (array_key_exists("dakimakura", $this->post->tags()) && !current_user()->is_contributor_or_higher()) :
$file_sample = $this->post->get_file_sample(current_user());
echo $this->linkTo(($this->post->has_sample() ? $this->t('.download.larger') : $this->t('.download.normal')) . ' (' . $this->numberToHumanSize($file_sample['size']) . ' ' . strtoupper($file_sample['ext']) . ')', $file_sample['url'], array(
'class' => $this->post->has_sample() ? "original-file-changed":"original-file-unchanged",
'id' => 'highres'));
else:
echo $this->linkTo(($this->post->has_sample() ? $this->t('.download.larger') : $this->t('.download.image')) . ' (' . $this->numberToHumanSize($file_jpeg['size']) . ' ' . strtoupper($file_jpeg['ext']) . ')', $file_jpeg['url'], array(
'class' => ($this->post->has_sample() ? "original-file-changed":"original-file-unchanged"),
'id' => 'highres'));
endif
?>
</li>
<?php if ($this->post->has_jpeg()) : ?> <?php if ($this->post->has_jpeg()) : ?>
<?php $file_image = $this->post->get_file_image() ?> <?php $file_image = $this->post->get_file_image() ?>
<?php # If we have a JPEG, the above link was the JPEG. Link to the PNG here. ?> <?php # If we have a JPEG, the above link was the JPEG. Link to the PNG here. ?>
@ -93,9 +72,6 @@
<li id="set-avatar"><?= $this->linkTo($this->t('.set_avatar'), array('user#set_avatar', 'id' => $this->post->id)) ?></li> <li id="set-avatar"><?= $this->linkTo($this->t('.set_avatar'), array('user#set_avatar', 'id' => $this->post->id)) ?></li>
<?php endif ?> <?php endif ?>
<li><?= $this->linkTo($this->t('.history'), array('history#index', 'search' => 'post:'.$this->post->id)) ?></li> <li><?= $this->linkTo($this->t('.history'), array('history#index', 'search' => 'post:'.$this->post->id)) ?></li>
<?php if (CONFIG()->enable_find_external_data && current_user()->is_mod_or_higher()) : ?>
<li><?= $this->linkTo('Search external data', array('post#search_external_data', 'ids' => $this->post->id)) ?></li>
<?php endif ?>
</ul> </ul>
</li> </li>
</ul> </ul>