1
0
Fork 0
mirror of https://github.com/Oreolek/ifhub.club.git synced 2024-05-19 17:28:23 +03:00
ifhub.club/application/frontend/skin/synio/components/blog/blocks/block.blogs-search.tpl
2016-09-03 09:39:46 +07:00

67 lines
2.7 KiB
Smarty
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{**
* Фильтр блогов
*}
{capture 'block_content'}
<h3>{lang 'blog.blocks.search.categories.title'}</h3>
{* Категории *}
{if $aBlogCategories}
{$items = [[
'name' => 'all',
'text' => {lang 'blog.blocks.search.categories.all'},
'url' => {router page='blogs'},
'attributes' => [ 'data-value' => '0' ],
'count' => $iCountBlogsAll
]]}
{foreach $aBlogCategories as $category}
{$oCategory = $category.entity}
{$items[] = [
'text' => ($oCategory->getTitle()),
'url' => '#',
'attributes' => [ 'data-value' => $oCategory->getId(), 'style' => "margin-left: {$category.level * 20}px;" ],
'count' => $oCategory->getCountTargetOfDescendants()
]}
{/foreach}
{component 'nav'
name = 'blogs_categories'
classes = 'actionbar-item-link'
attributes = [ 'id' => 'js-search-ajax-blog-category' ]
activeItem = 'all'
mods = 'stacked pills'
items = $items}
{else}
{component 'blankslate' text=$aLang.blog.categories.empty}
{/if}
<br>
{* Тип блога *}
<h3>{lang 'blog.blocks.search.type.title'}</h3>
<div class="ls-field-checkbox-group">
{component 'field' template='radio' inputClasses='js-search-ajax-blog-type' name='blog_search_type' value='' label='Любой' checked=true}
{component 'field' template='radio' inputClasses='js-search-ajax-blog-type' name='blog_search_type' value='open' label='Открытый'}
{component 'field' template='radio' inputClasses='js-search-ajax-blog-type' name='blog_search_type' value='close' label='Закрытый'}
</div>
{* Тип принадлежности блога *}
{if $oUserCurrent}
<h3>{lang 'blog.blocks.search.relation.title'}</h3>
<div class="ls-field-checkbox-group">
{component 'field' template='radio' inputClasses='js-search-ajax-blog-relation' name='blog_search_relation' value='all' label='Все' checked=true}
{component 'field' template='radio' inputClasses='js-search-ajax-blog-relation' name='blog_search_relation' value='my' label='Мои'}
{component 'field' template='radio' inputClasses='js-search-ajax-blog-relation' name='blog_search_relation' value='join' label='Читаю'}
</div>
{/if}
{/capture}
{component 'block'
mods = 'blogs-search'
title = {lang 'blog.blocks.search.title'}
content = $smarty.capture.block_content}