PhotoLinks

This commit is contained in:
Krivchikov Dmitry 2015-06-25 21:36:55 +03:00
parent 7f825feb8f
commit ce178ddea9
3 changed files with 4 additions and 1 deletions

View File

@ -7,6 +7,7 @@ class Photo extends Model
$this->_tableName_ = 'photos';
parent::__construct($fromArray);
$this->setRelation('point', 'pointId', 'Point', 'id', self::TO_ONE);
$this->setRelation('link', 'name', 'PhotoLinks', 'photo', self::TO_ONE);
}
static function model()

View File

@ -45,7 +45,7 @@
<?php endif; ?>
<?php if ($photos): ?>
<?php foreach ($photos as $photo): ?>
<img data-thumb="/photos/small/<?= $photo->name ?>" src="/photos/middle/<?= $photo->name ?>">
<img data-thumb="/photos/small/<?= $photo->name ?>" src="/photos/middle/<?= $photo->name ?>" data-caption="<?= $photo->link->url?>">
<?php endforeach; ?>
<?php endif; ?>
<span data-thumb="/img/mapThumb.png">

View File

@ -23,6 +23,8 @@ div.header img {height: 89px;}
div.add {cursor: pointer;}
.fotorama {display: inline-block;}
div.fotorama__caption {text-align: left;font-size: 9px;margin-bottom: 5px;opacity: 0.6;}
div.fotorama__caption div.fotorama__caption__wrap {padding: 0px 5px;}
#addPointModal .extraImage .button {cursor: pointer; background-color: #eeeeee;}
#addPointModal .extraImage .remove:hover {background-color: #f4bfbf;}