Post edit: added custom thumbnail indicator
This commit is contained in:
parent
f8e19779a0
commit
c5292580ce
2 changed files with 12 additions and 1 deletions
|
@ -160,6 +160,12 @@ class Model_Post extends AbstractModel
|
|||
return false;
|
||||
}
|
||||
|
||||
public function hasCustomThumb($width = null, $height = null)
|
||||
{
|
||||
$thumbPath = self::getThumbCustomPath($this->name, $width, $height);
|
||||
return file_exists($thumbPath);
|
||||
}
|
||||
|
||||
|
||||
|
||||
public function setHidden($hidden)
|
||||
|
|
|
@ -49,7 +49,12 @@
|
|||
<?php if (PrivilegesHelper::confirm(Privilege::EditPostThumb, PrivilegesHelper::getIdentitySubPrivilege($this->context->transport->post->uploader))): ?>
|
||||
<div class="thumb">
|
||||
<label class="left" for="thumb">Thumb:</label>
|
||||
<div class="input-wrapper"><input type="file" name="thumb" id="thumb"/></div>
|
||||
<div class="input-wrapper">
|
||||
<input type="file" name="thumb" id="thumb"/>
|
||||
<?php if ($this->context->transport->post->hasCustomThumb()): ?>
|
||||
<small>(Currently using custom thumb)</small>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
|
||||
|
|
Loading…
Reference in a new issue