From c5292580ce850a919f85e8ed2c4a44586a84b2a5 Mon Sep 17 00:00:00 2001 From: Marcin Kurczewski Date: Sat, 23 Nov 2013 17:28:48 +0100 Subject: [PATCH] Post edit: added custom thumbnail indicator --- src/Models/Model_Post.php | 6 ++++++ src/Views/post-edit.phtml | 7 ++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/Models/Model_Post.php b/src/Models/Model_Post.php index 38ac1b6e..d3b9fc42 100644 --- a/src/Models/Model_Post.php +++ b/src/Models/Model_Post.php @@ -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) diff --git a/src/Views/post-edit.phtml b/src/Views/post-edit.phtml index ab9860b5..ac797ae3 100644 --- a/src/Views/post-edit.phtml +++ b/src/Views/post-edit.phtml @@ -49,7 +49,12 @@ context->transport->post->uploader))): ?>
-
+
+ + context->transport->post->hasCustomThumb()): ?> + (Currently using custom thumb) + +