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;}