<commit_before><?php
/**
 * Отображение для GalleryWidget/gallerywidget:
 * 
 *   @category YupeView
 *   @package  YupeCMS
 *   @author   <NAME> <<EMAIL>>
 *   @license  https://github.com/yupe/yupe/blob/master/LICENSE BSD
 *   @link     http://yupe.ru
 **/
$this->widget(
    'gallery.extensions.fancybox.FancyBox', array(
        'target' => '.fancybox',
        'config' => array(
            'helpers' => array('title' => array('type' => 'inside'))
        ),
    )
); ?>


<?php
if ($gallery->status == Gallery::STATUS_PRIVAT && $gallery->owner != Yii::app()->user->id)
    echo CHtml::tag(
        'h3', array(), Yii::t('GalleryModule.gallery', 'Это приватная галерея!')
    );
else
    $this->widget(
        'zii.widgets.CListView', array(
            'id' => 'gallery',
            'dataProvider' => $dataProvider,
            'itemView'     => '_image',
            'afterAjaxUpdate' => "function(id, data) { masonry('#gallery .items'); }",
        )
    ); ?>


<script type="text/javascript">
    function masonry(selector) {
        var $container = $(selector);
        $container.imagesLoaded(function(){
            this.isotope({
                masonry: { itemSelector : '.image', columnWidth : $container.width() / 19 }
            });
        });
    };
    <commit_msg>UPD: fix views of widget<commit_after><?php
/**
 * Отображение для GalleryWidget/gallerywidget:
 * 
 *   @category YupeView
 *   @package  YupeCMS
 *   @author   <NAME> <<EMAIL>>
 *   @license  https://github.com/yupe/yupe/blob/master/LICENSE BSD
 *   @link     http://yupe.ru
 **/
$this->widget(
    'gallery.extensions.fancybox.FancyBox', array(
        'target' => '.fancybox',
        'config' => array(
            'helpers' => array('title' => array('type' => 'inside'))
        ),
    )
); ?>


<?php
if ($gallery->status == Gallery::STATUS_PRIVATE && $gallery->owner != Yii::app()->user->id)
    echo CHtml::tag(
        'h3', array(), Yii::t('GalleryModule.gallery', 'Это приватная галерея!')
    );
else
    $this->widget(
        'zii.widgets.CListView', array(
            'id' => 'gallery',
            'dataProvider' => $dataProvider,
            'itemView'     => '_image',
            'afterAjaxUpdate' => "function(id, data) { masonry('#gallery .items'); }",
        )
    ); ?>


<script type="text/javascript">
    function masonry(selector) {
        var $container = $(selector);
        $container.imagesLoaded(function(){
            this.isotope({
                masonry: { itemSelector : '.image', columnWidth : $container.width() / 19 }
            });
        });
    };
    
{'fraction_non_alphanumeric': 0.18619892058596763, 'fraction_numerical': 0.002313030069390902, 'mean_word_length': 2.314176245210728, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 45, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4741243', 'n_tokens_mistral': 863, 'n_tokens_neox': 835, 'n_words': 146}