renderPartial('//snippets/headerGallery'); ?> getBrands(); $models = $this->getModels(); /** @var $works Work[] */ $works = Work::model()->with('i18n')->findAll(array( 'index'=>'id', )); $command = new CDbCommand(Yii::app()->db,<<params[':current_work_id']= $currentWork->id; $command->params[':current_model_id']= $currentWork->work_model_id; foreach($command->queryAll() as $row){ $work = $works[$row['work_id']]; $model = $models[$work->work_model_id]; $brand = $brands[$model->work_brand_id]; $galleryItems[]=array( 'image'=>GalleryPhoto::photoUrl('medium',$row['id']), 'type'=>'image', 'preview'=>GalleryPhoto::photoUrl('small',$row['id']) , 'title'=>$work->i18n->name, 'info'=>CHtml::link($work->i18n->name, array( 'work/view', 'brand' => $brand->link, 'model' => $model->link, 'set' => $work->link, )),//.' '.$currentWork->i18n->name, ); $galleryItem+=1; } $galleryStart = $galleryItem; ?>
getServices(); if (count($services)):?>

  • i18n->name, array( 'work/brand', 'brand' => $currentBrand->link, ));?>→
  • i18n->name, array( 'work/model', 'brand' => $currentBrand->link, 'model' => $currentModel->link, ));?>→

pageName?>

i18n->owner_name)) || (!empty($currentWork->i18n->owner_age)) || (!empty($currentWork->i18n->owner_status)) || (!empty($currentWork->i18n->owner_favorite_author)) || (!empty($currentWork->i18n->owner_hobby)) || (!empty($currentWork->i18n->owner_expectations)) ): ?>
ownerImageBehavior->getFileUrl('medium'));?>
i18n->owner_name)): ?>
:
i18n->owner_name);?>
i18n->owner_age)): ?>
:
i18n->owner_age);?>
i18n->owner_status)): ?>
:
i18n->owner_status);?>
i18n->owner_favorite_author)): ?>
:
i18n->owner_favorite_author);?>
i18n->owner_hobby)): ?>
:
i18n->owner_hobby);?>
i18n->owner_expectations)): ?>
i18n->owner_expectations);?>
i18n->content ?> gallery_id)) { $photos = $currentWork->galleryBehavior->getGalleryPhotos(); if (count($photos) > 0) { ?>

workRoot->i18n->contact_info?>

renderPartial('//snippets/sidebarContacts');?>
db,<< :current_work_id and work_model_id = :current_model_id order by work.id asc, gallery_photo.rank SQL ); $command->params[':current_work_id']= $currentWork->id; $command->params[':current_model_id']= $currentWork->work_model_id; foreach($command->queryAll() as $row){ $work = $works[$row['work_id']]; $model = $models[$work->work_model_id]; $brand = $brands[$model->work_brand_id]; $galleryItems[]=array( 'image'=>GalleryPhoto::photoUrl('medium',$row['id']), 'type'=>'image', 'preview'=>GalleryPhoto::photoUrl('small',$row['id']) , 'title'=>$work->i18n->name, 'info'=>CHtml::link($work->i18n->name, array( 'work/view', 'brand' => $brand->link, 'model' => $model->link, 'set' => $work->link, )),//.' '.$currentWork->i18n->name, ); $galleryItem+=1; } ?> clientScript; $cs->registerCoreScript('jquery'); //$cs->registerScriptFile(Yii::app()->baseUrl . '/js/fancybox/jquery.mousewheel-3.0.4.pack.js'); $cs->registerScriptFile(Yii::app()->baseUrl . '/js/fancybox/jquery.fancybox-1.3.4.pack.js'); $cs->registerCssFile(Yii::app()->baseUrl . '/js/fancybox/jquery.fancybox-1.3.4.css'); $src = << '; if(description.length) r+=description; if(r.length) return ''+r+''; else return ''; } }); if(gallery.length >0){ // $('#view_gallery').click(function(e){ // e.preventDefault(); // $(gallery[0]).click(); // return false; // }); } else $('#view_gallery').hide(); JS; $cs->registerScript('fancybox_gallery', $src); $galleryItems = CJavaScript::encode($galleryItems); $galleryStart = CJavaScript::encode($galleryStart); $title = CJavaScript::encode($this->pageName); $cs->registerScript('bigGallery', <<