From 035c442a8c68ddeffb43e155c4187d1b674cc345 Mon Sep 17 00:00:00 2001 From: Krivchikov Dmitry Date: Sun, 31 May 2015 15:26:21 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9F=D0=BE=D0=B4=D0=BF=D0=B8=D1=81=D1=8C=20?= =?UTF-8?q?=D0=BA=20=D0=BA=D0=B0=D0=BA=D1=80=D1=82=D0=B8=D0=BD=D0=BA=D0=B5?= =?UTF-8?q?=20-=20=D0=B8=D1=81=D1=82=D0=BE=D1=87=D0=BD=D0=B8=D0=BA.=20?= =?UTF-8?q?=D0=A3=D0=BF=D1=80=D0=B0=D0=B2=D0=BB=D0=B5=D0=BD=D0=B8=D0=B5=20?= =?UTF-8?q?=D1=84=D0=BE=D1=82=D0=BE=D1=80=D0=B0=D0=BC=D0=BE=D0=B9=20=D1=81?= =?UTF-8?q?=20=D0=BA=D0=BB=D0=B0=D0=B2=D0=B8=D0=B0=D1=82=D1=83=D1=80=D1=8B?= =?UTF-8?q?.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ground/models/PhotoLinks.php | 11 +++++++++++ ground/views/modals/image.php | 2 +- ground/views/point.php | 4 ++-- public/css/style.css | 1 + 4 files changed, 15 insertions(+), 3 deletions(-) diff --git a/ground/models/PhotoLinks.php b/ground/models/PhotoLinks.php index ea06b81..5348434 100644 --- a/ground/models/PhotoLinks.php +++ b/ground/models/PhotoLinks.php @@ -18,5 +18,16 @@ class PhotoLinks extends Model $parsedUrl = parse_url($url); App::DB()->query('INSERT INTO photoLinks VALUES ("'.$photo.'","'.$url.'","'.$parsedUrl['host'].'") ON DUPLICATE KEY UPDATE url=url;'); } + + static function getCaption($photo) + { + $photolink = self::model()->getOne('photo', $photo); + + if (!$photolink) { + return 'не определён'; + } + + return $photolink->host ? $photolink->host : $photolink->url; + } } diff --git a/ground/views/modals/image.php b/ground/views/modals/image.php index 3b3f31a..19203ff 100644 --- a/ground/views/modals/image.php +++ b/ground/views/modals/image.php @@ -6,7 +6,7 @@ diff --git a/ground/views/point.php b/ground/views/point.php index 16f2635..e7c61c1 100644 --- a/ground/views/point.php +++ b/ground/views/point.php @@ -39,13 +39,13 @@ img): ?>

-
+
img): ?> - + diff --git a/public/css/style.css b/public/css/style.css index 48c06a9..24bbf86 100644 --- a/public/css/style.css +++ b/public/css/style.css @@ -23,6 +23,7 @@ div.header img {height: 89px;} div.add {cursor: pointer;} .fotorama {display: inline-block;} +.fotorama .fotorama__caption{text-align: left; font-size: 9px; margin-bottom: 17px; opacity: 0.7;} #addPointModal .extraImage .button {cursor: pointer; background-color: #eeeeee;} #addPointModal .extraImage .remove:hover {background-color: #f4bfbf;}