<commit_before>{* Тема оформления Experience v.1.0  для Alto CMS      *}
{* @licence     CC Attribution-ShareAlike  http://site.creatime.org/experience/*}

<div class="topic-photoset">
    {$aPhotos=$oTopic->getPhotosetPhotos(0, Config::Get('module.topic.photoset.per_page'))}
    {if count($aPhotos)<$oTopic->getPhotosetCount()}
        <h4 class="accent">{$oTopic->getPhotosetCount()} {$oTopic->getPhotosetCount()|declension:$aLang.topic_photoset_count_images}</h4>
    {/if}
    <a name="photoset"></a>

    {include file="snippets/snippet.photoset.tpl" aPhotos=$aPhotos sClass='clearfix'}

    <div class="clearfix">
        {if count($aPhotos)<$oTopic->getPhotosetCount()}
            {$oLastResource = end($aPhotos)}
            <script type="text/javascript">
                $(function(){
                    ls.photoset.idLast='{$oLastResource->getMresourceId()+1}';
                    ls.photoset.nextImagesContainerSelecter='.js-topic-photoset-list';
                    ls.photoset.itemSelecter='#js-topic-photoset-item';
                    ls.photoset.thumbSize='x240';
                    $('body').on('ls_photoset_update', function() {
                        var $currentContainer = $('.js-topic-photoset-list').last();
                        ls.photoset.prepareLastImages($currentContainer);
                        var $nextContainer = $('<div class="js-topic-photoset-list clearfix"></div>');
                        $nextContainer.insertAfter($currentContainer.last());
                    });
                });
            </script>
            <div class="js-topic-photoset-list clearfix"></div>
            <script id="js-topic-photoset-item" type="text/template">
                <a href="#" class="topic-photoset-item"><img data-rel="prettyPhoto[pp_gal_]" src="" alt=""/></a>
            </script>
            <a href="#" id="topic-photo-more" class="btn btn-blue btn-large btn-block topic-photo-more" onclick="ls.photoset.getMore('{$oTopic->getId()}'); return false;">
                {$aLang.topic_photoset_show_more}&nbsp;<i class="fa fa-chevron-down"></i>
            </a>
        {/if}
    </div>
</div>
<commit_msg>Добавлена проверка на количество фото в фотосете, #431<commit_after>{* Тема оформления Experience v.1.0  для Alto CMS      *}
{* @licence     CC Attribution-ShareAlike  http://site.creatime.org/experience/*}

<div class="topic-photoset">
    {$aPhotos=$oTopic->getPhotosetPhotos(0, Config::Get('module.topic.photoset.per_page'))}
    {if count($aPhotos)<$oTopic->getPhotosetCount()}
        <h4 class="accent">{$oTopic->getPhotosetCount()} {$oTopic->getPhotosetCount()|declension:$aLang.topic_photoset_count_images}</h4>
    {/if}
    <a name="photoset"></a>

    {include file="snippets/snippet.photoset.tpl" aPhotos=$aPhotos sClass='clearfix'}

    <div class="clearfix">
        {if count($aPhotos)<$oTopic->getPhotosetCount() && count($aPhotos) > 0}
            {$oLastResource = end($aPhotos)}
            <script type="text/javascript">
                $(function(){
                    ls.photoset.idLast='{$oLastResource->getMresourceId()+1}';
                    ls.photoset.nextImagesContainerSelecter='.js-topic-photoset-list';
                    ls.photoset.itemSelecter='#js-topic-photoset-item';
                    ls.photoset.thumbSize='x240';
                    $('body').on('ls_photoset_update', function() {
                        var $currentContainer = $('.js-topic-photoset-list').last();
                        ls.photoset.prepareLastImages($currentContainer);
                        var $nextContainer = $('<div class="js-topic-photoset-list clearfix"></div>');
                        $nextContainer.insertAfter($currentContainer.last());
                    });
                });
            </script>
            <div class="js-topic-photoset-list clearfix"></div>
            <script id="js-topic-photoset-item" type="text/template">
                <a href="#" class="topic-photoset-item"><img data-rel="prettyPhoto[pp_gal_]" src="" alt=""/></a>
            </script>
            <a href="#" id="topic-photo-more" class="btn btn-blue btn-large btn-block topic-photo-more" onclick="ls.photoset.getMore('{$oTopic->getId()}'); return false;">
                {$aLang.topic_photoset_show_more}&nbsp;<i class="fa fa-chevron-down"></i>
            </a>
        {/if}
    </div>
</div>

{'fraction_non_alphanumeric': 0.17269812185066422, 'fraction_numerical': 0.005038937242327073, 'mean_word_length': 2.465873015873016, 'pattern_counts': {'":': 0, '<': 53, '<?xml version=': 0, '>': 64, 'https://': 0, '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': '3142830', 'n_tokens_mistral': 1434, 'n_tokens_neox': 1312, 'n_words': 179}