2013-06-19 16:32:58 +03:00
|
|
|
{**
|
|
|
|
* Список блогов
|
|
|
|
*
|
2014-11-05 17:45:27 +02:00
|
|
|
* @param array $blogs
|
|
|
|
* @param array $pagination
|
|
|
|
* @param boolean $useMore
|
|
|
|
* @param boolean $hideMore
|
|
|
|
* @param integer $searchCount
|
|
|
|
* @param string $textEmpty
|
2013-06-19 16:32:58 +03:00
|
|
|
*}
|
|
|
|
|
2014-11-05 17:45:27 +02:00
|
|
|
{if $smarty.local.blogs}
|
2015-02-10 03:41:16 +02:00
|
|
|
{$paging = $smarty.local.pagination}
|
|
|
|
|
2014-11-09 16:19:58 +02:00
|
|
|
{* Заголовок *}
|
2014-11-05 17:45:27 +02:00
|
|
|
{if $smarty.local.searchCount}
|
|
|
|
<h3 class="h3">{lang name='blog.search.result_title' count=$smarty.local.searchCount plural=true}</h3>
|
2014-10-28 14:08:03 +02:00
|
|
|
{/if}
|
|
|
|
|
|
|
|
{* Список блогов *}
|
2015-02-10 03:41:16 +02:00
|
|
|
{capture 'blog_list'}
|
2014-11-05 17:45:27 +02:00
|
|
|
{foreach $smarty.local.blogs as $blog}
|
2014-10-28 14:08:03 +02:00
|
|
|
{include './blog-list-item.tpl' blog=$blog}
|
|
|
|
{/foreach}
|
2015-02-10 03:41:16 +02:00
|
|
|
{/capture}
|
|
|
|
|
|
|
|
{component 'item' template='group' classes='js-more-blogs-container' items=$smarty.capture.blog_list}
|
2014-10-28 14:08:03 +02:00
|
|
|
|
|
|
|
{* Кнопка подгрузки *}
|
2014-11-05 17:45:27 +02:00
|
|
|
{if $smarty.local.useMore}
|
|
|
|
{if ! $smarty.local.hideMore}
|
2015-01-03 10:19:49 +02:00
|
|
|
{component 'more'
|
2014-10-28 14:08:03 +02:00
|
|
|
classes = 'js-more-search'
|
|
|
|
target = '.js-more-blogs-container'
|
2015-01-27 15:48:47 +02:00
|
|
|
ajaxParams = [ 'next_page' => 2 ]}
|
2014-10-28 14:08:03 +02:00
|
|
|
{/if}
|
|
|
|
{else}
|
2015-02-10 03:41:16 +02:00
|
|
|
{component 'pagination' total=+$paging.iCountPage current=+$paging.iCurrentPage url="{$paging.sBaseUrl}/page__page__/{$paging.sGetParams}"}
|
2014-10-28 14:08:03 +02:00
|
|
|
{/if}
|
2014-01-25 14:39:19 +02:00
|
|
|
{else}
|
2015-01-03 10:19:49 +02:00
|
|
|
{component 'alert' text=(($smarty.local.textEmpty) ? $smarty.local.textEmpty : $aLang.blog.alerts.empty) mods='empty'}
|
2014-01-25 14:39:19 +02:00
|
|
|
{/if}
|