2014-02-06 11:33:41 +02:00
|
|
|
|
{**
|
|
|
|
|
* Список пользователей с элементами управления
|
2014-11-09 16:19:58 +02:00
|
|
|
|
*
|
|
|
|
|
* @param object $users
|
|
|
|
|
* @param string $title
|
|
|
|
|
* @param boolean $hideableEmptyAlert
|
|
|
|
|
* @param boolean $show
|
|
|
|
|
* @param boolean $selectable
|
|
|
|
|
* @param array $exclude
|
|
|
|
|
* @param string $itemTemplate
|
2015-01-03 10:19:49 +02:00
|
|
|
|
* @param string $classes
|
2014-02-06 11:33:41 +02:00
|
|
|
|
*}
|
|
|
|
|
|
2014-11-09 16:19:58 +02:00
|
|
|
|
{$users = $smarty.local.users}
|
2015-01-03 10:19:49 +02:00
|
|
|
|
{$classes = $smarty.local.classes}
|
2014-11-09 16:19:58 +02:00
|
|
|
|
|
2014-02-06 11:33:41 +02:00
|
|
|
|
{* Заголовок *}
|
2014-11-09 16:19:58 +02:00
|
|
|
|
{if $smarty.local.title}
|
|
|
|
|
<h3 class="user-list-small-title">{$smarty.local.title}</h3>
|
2014-02-06 11:33:41 +02:00
|
|
|
|
{/if}
|
|
|
|
|
|
2014-07-16 19:30:25 +03:00
|
|
|
|
{* Уведомление о пустом списке *}
|
2014-11-09 16:19:58 +02:00
|
|
|
|
{if ! $users || $smarty.local.hideableEmptyAlert}
|
2015-04-08 14:41:06 +03:00
|
|
|
|
{component 'blankslate'
|
2014-10-10 19:29:24 +03:00
|
|
|
|
text = $aLang.common.empty
|
|
|
|
|
classes = 'js-user-list-small-empty'
|
2014-11-09 16:19:58 +02:00
|
|
|
|
visible = ! $users}
|
2014-07-16 19:30:25 +03:00
|
|
|
|
{/if}
|
|
|
|
|
|
2014-02-06 11:33:41 +02:00
|
|
|
|
{* Список пользователей *}
|
2014-11-09 16:19:58 +02:00
|
|
|
|
{if $users || ! $smarty.local.show|default:true}
|
|
|
|
|
<ul class="user-list-small js-user-list-small {$classes}" {if ! $smarty.local.show|default:true}style="display: none"{/if}>
|
|
|
|
|
{foreach $users as $user}
|
|
|
|
|
{$userContainer = $user}
|
|
|
|
|
|
|
|
|
|
{if $user->getUser()}
|
|
|
|
|
{$user = $user->getUser()}
|
2014-04-03 10:36:30 +03:00
|
|
|
|
{/if}
|
2014-02-12 10:54:18 +02:00
|
|
|
|
|
2014-11-09 16:19:58 +02:00
|
|
|
|
{if ! $smarty.local.exclude || ! in_array( $user->getId(), $smarty.local.exclude )}
|
|
|
|
|
{block 'user_list_small_item'}
|
|
|
|
|
{*include $itemTemplate|default:'./user-list-small-item.tpl' showRemove=! $excludeRemove || ! in_array( $user->getId(), $aUserListSmallExcludeRemove )*}
|
|
|
|
|
{include './user-list-small-item.tpl' user=$user selectable=$smarty.local.selectable}
|
|
|
|
|
{/block}
|
2014-02-06 11:33:41 +02:00
|
|
|
|
{/if}
|
|
|
|
|
{/foreach}
|
|
|
|
|
</ul>
|
|
|
|
|
{/if}
|