mirror of
https://github.com/Oreolek/ifhub.club.git
synced 2024-06-16 23:00:51 +03:00
Доработка компонентов
This commit is contained in:
parent
a382f29eb7
commit
2bd4ac36ba
|
@ -154,11 +154,11 @@ class ActionAjax extends Action
|
|||
$aUsersFriend = $this->User_GetUsersFriend($this->oUserCurrent->getId());
|
||||
|
||||
if ($aUsersFriend['collection']) {
|
||||
$oViewer->Assign('aUserList', $aUsersFriend['collection']);
|
||||
$oViewer->Assign('users', $aUsersFriend['collection'], true);
|
||||
}
|
||||
|
||||
$oViewer->Assign('bSelectable', $bSelectable);
|
||||
$oViewer->Assign('sTarget', $sTarget);
|
||||
$oViewer->Assign('selectable', $bSelectable, true);
|
||||
$oViewer->Assign('target', $sTarget, true);
|
||||
|
||||
$this->Viewer_AssignAjax('sText', $oViewer->Fetch("components/user/modals/modal.user-list.tpl"));
|
||||
}
|
||||
|
@ -1001,7 +1001,7 @@ class ActionAjax extends Action
|
|||
|
||||
$oViewer = $this->Viewer_GetLocalViewer();
|
||||
|
||||
$oViewer->Assign('oObject', $oTopic);
|
||||
$oViewer->Assign('target', $oTopic, true);
|
||||
$oViewer->Assign('oUserCurrent', $this->oUserCurrent);
|
||||
|
||||
$this->Viewer_AssignAjax('sText', $oViewer->Fetch("components/vote/vote.info.tpl"));
|
||||
|
|
|
@ -558,7 +558,7 @@ class ActionBlog extends Action
|
|||
$aBlogUsersInvited = $this->Blog_GetBlogUsersByBlogId($oBlog->getId(), ModuleBlog::BLOG_USER_ROLE_INVITE,
|
||||
null);
|
||||
$this->Viewer_Assign('aBlogUsersInvited', $aBlogUsersInvited['collection']);
|
||||
$this->Viewer_AddBlock('right', 'blocks/block.blogInvite.tpl');
|
||||
$this->Viewer_AddBlock('right', 'components/blog/blocks/block.blog-invite.tpl');
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1490,8 +1490,8 @@ class ActionBlog extends Action
|
|||
|
||||
if ($this->Blog_AddRelationBlogUser($oBlogUserNew)) {
|
||||
$oViewer = $this->Viewer_GetLocalViewer();
|
||||
$oViewer->Assign('oUser', $oUser);
|
||||
$oViewer->Assign('bUserListSmallShowActions', true);
|
||||
$oViewer->Assign('user', $oUser, true);
|
||||
$oViewer->Assign('showActions', true, true);
|
||||
|
||||
$aResult[] = array(
|
||||
'bStateError' => false,
|
||||
|
@ -1502,7 +1502,7 @@ class ActionBlog extends Action
|
|||
'sUserWebPath' => $oUser->getUserWebPath(),
|
||||
'sUserAvatar48' => $oUser->getProfileAvatarPath(48),
|
||||
'iUserId' => $oUser->getId(),
|
||||
'sHtml' => $oViewer->Fetch("components/user/user-list-small-item.blog_invite.tpl")
|
||||
'sHtml' => $oViewer->Fetch("components/blog/invite/invite-item.tpl")
|
||||
);
|
||||
$this->SendBlogInvite($oBlog, $oUser);
|
||||
} else {
|
||||
|
|
|
@ -146,12 +146,12 @@ class ActionPeople extends Action
|
|||
* Формируем ответ
|
||||
*/
|
||||
$oViewer = $this->Viewer_GetLocalViewer();
|
||||
$oViewer->Assign('aUsersList', $aResult['collection']);
|
||||
$oViewer->Assign('usersList', $aResult['collection'], true);
|
||||
$oViewer->Assign('oUserCurrent', $this->User_GetUserCurrent());
|
||||
$oViewer->Assign('sUserListEmpty', $this->Lang_Get('search.alerts.empty'));
|
||||
$oViewer->Assign('bUseMore', true);
|
||||
$oViewer->Assign('bHideMore', $bHideMore);
|
||||
$oViewer->Assign('iSearchCount', $aResult['count']);
|
||||
$oViewer->Assign('userListEmpty', $this->Lang_Get('search.alerts.empty'), true);
|
||||
$oViewer->Assign('useMore', true, true);
|
||||
$oViewer->Assign('hideMore', $bHideMore, true);
|
||||
$oViewer->Assign('searchCount', $aResult['count'], true);
|
||||
$this->Viewer_AssignAjax('sText', $oViewer->Fetch("components/user/user-list.tpl"));
|
||||
/**
|
||||
* Для подгрузки
|
||||
|
|
|
@ -282,8 +282,8 @@ class ActionStream extends Action
|
|||
if ($oUser = $this->User_GetUserByLogin($sUser) and $oUser->getActivate() == 1) {
|
||||
$this->Stream_subscribeUser($this->oUserCurrent->getId(), $oUser->getId());
|
||||
$oViewer = $this->Viewer_GetLocalViewer();
|
||||
$oViewer->Assign('oUser', $oUser);
|
||||
$oViewer->Assign('bUserListSmallShowActions', true);
|
||||
$oViewer->Assign('user', $oUser, true);
|
||||
$oViewer->Assign('showActions', true, true);
|
||||
|
||||
$aResult[] = array(
|
||||
'bStateError' => false,
|
||||
|
@ -294,7 +294,7 @@ class ActionStream extends Action
|
|||
'sUserLogin' => htmlspecialchars($sUser),
|
||||
'sUserWebPath' => $oUser->getUserWebPath(),
|
||||
'sUserAvatar48' => $oUser->getProfileAvatarPath(48),
|
||||
'sHtml' => $oViewer->Fetch("components/user/user-list-small-item.tpl")
|
||||
'sHtml' => $oViewer->Fetch("components/user-list-add/item.tpl")
|
||||
);
|
||||
} else {
|
||||
$aResult[] = array(
|
||||
|
|
|
@ -823,8 +823,8 @@ class ActionTalk extends Action
|
|||
if (!isset($aUserBlacklist[$oUser->getId()])) {
|
||||
if ($this->Talk_AddUserToBlackList($oUser->getId(), $this->oUserCurrent->getId())) {
|
||||
$oViewer = $this->Viewer_GetLocalViewer();
|
||||
$oViewer->Assign('oUser', $oUser);
|
||||
$oViewer->Assign('bUserListSmallShowActions', true);
|
||||
$oViewer->Assign('user', $oUser, true);
|
||||
$oViewer->Assign('showActions', true, true);
|
||||
|
||||
$aResult[] = array(
|
||||
'bStateError' => false,
|
||||
|
@ -835,7 +835,7 @@ class ActionTalk extends Action
|
|||
'sUserLogin' => htmlspecialchars($sUser),
|
||||
'sUserWebPath' => $oUser->getUserWebPath(),
|
||||
'sUserAvatar48' => $oUser->getProfileAvatarPath(48),
|
||||
'sHtml' => $oViewer->Fetch("components/user/user-list-small-item.tpl")
|
||||
'sHtml' => $oViewer->Fetch("components/user/user-list-add/item.tpl")
|
||||
);
|
||||
} else {
|
||||
$aResult[] = array(
|
||||
|
@ -1114,8 +1114,8 @@ class ActionTalk extends Action
|
|||
$this->Notify_SendTalkNew($oUser, $this->oUserCurrent, $oTalk);
|
||||
|
||||
$oViewer = $this->Viewer_GetLocalViewer();
|
||||
$oViewer->Assign('oUser', $oUser);
|
||||
$oViewer->Assign('bUserListSmallShowActions', true);
|
||||
$oViewer->Assign('user', $oUser, true);
|
||||
$oViewer->Assign('showActions', true, true);
|
||||
|
||||
$aResult[] = array(
|
||||
'bStateError' => false,
|
||||
|
@ -1127,7 +1127,7 @@ class ActionTalk extends Action
|
|||
'sUserLink' => $oUser->getUserWebPath(),
|
||||
'sUserWebPath' => $oUser->getUserWebPath(),
|
||||
'sUserAvatar48' => $oUser->getProfileAvatarPath(48),
|
||||
'sHtml' => $oViewer->Fetch("components/talk/talk-users-item.tpl")
|
||||
'sHtml' => $oViewer->Fetch("components/talk/participants/participants-item.tpl")
|
||||
);
|
||||
$bState = true;
|
||||
} else {
|
||||
|
@ -1183,8 +1183,8 @@ class ActionTalk extends Action
|
|||
$this->Notify_SendTalkNew($oUser, $this->oUserCurrent, $oTalk);
|
||||
|
||||
$oViewer = $this->Viewer_GetLocalViewer();
|
||||
$oViewer->Assign('oUser', $oUser);
|
||||
$oViewer->Assign('bUserListSmallShowActions', true);
|
||||
$oViewer->Assign('user', $oUser, true);
|
||||
$oViewer->Assign('showActions', true, true);
|
||||
|
||||
$aResult[] = array(
|
||||
'bStateError' => false,
|
||||
|
@ -1192,7 +1192,7 @@ class ActionTalk extends Action
|
|||
'sMsg' => $this->Lang_Get('user_list_add.notices.success_add',
|
||||
array('login', htmlspecialchars($sUser))),
|
||||
'iUserId' => $oUser->getId(),
|
||||
'sHtml' => $oViewer->Fetch("components/talk/talk-users-item.tpl")
|
||||
'sHtml' => $oViewer->Fetch("components/talk/participants/participants-item.tpl")
|
||||
);
|
||||
$bState = true;
|
||||
} else {
|
||||
|
|
|
@ -223,8 +223,8 @@ class ActionUserfeed extends Action
|
|||
$oUser->getId());
|
||||
|
||||
$oViewer = $this->Viewer_GetLocalViewer();
|
||||
$oViewer->Assign('oUser', $oUser);
|
||||
$oViewer->Assign('bUserListSmallShowActions', true);
|
||||
$oViewer->Assign('user', $oUser, true);
|
||||
$oViewer->Assign('showActions', true, true);
|
||||
|
||||
$aResult[] = array(
|
||||
'bStateError' => false,
|
||||
|
@ -235,7 +235,7 @@ class ActionUserfeed extends Action
|
|||
'sUserLogin' => htmlspecialchars($sUser),
|
||||
'sUserWebPath' => $oUser->getUserWebPath(),
|
||||
'sUserAvatar48' => $oUser->getProfileAvatarPath(48),
|
||||
'sHtml' => $oViewer->Fetch("components/user/user-list-small-item.tpl")
|
||||
'sHtml' => $oViewer->Fetch("components/user-list-add/item.tpl")
|
||||
);
|
||||
} else {
|
||||
$aResult[] = array(
|
||||
|
|
|
@ -60,6 +60,6 @@ class BlockUserfeedBlogs extends Block
|
|||
$this->Viewer_Assign('blogsJoined', $aBlogs);
|
||||
}
|
||||
|
||||
$this->SetTemplate('components/userfeed/blocks/block.userfeed-blogs.tpl');
|
||||
$this->SetTemplate('components/feed/blocks/block.userfeed-blogs.tpl');
|
||||
}
|
||||
}
|
|
@ -43,6 +43,6 @@ class BlockUserfeedUsers extends Block
|
|||
$this->Viewer_Assign('users', $aResult['users']);
|
||||
}
|
||||
|
||||
$this->SetTemplate('components/userfeed/blocks/block.userfeed-users.tpl');
|
||||
$this->SetTemplate('components/feed/blocks/block.userfeed-users.tpl');
|
||||
}
|
||||
}
|
|
@ -14,5 +14,5 @@
|
|||
{/block}
|
||||
|
||||
{block 'layout_content'}
|
||||
{include 'components/user/user-list.tpl' aUsersList=$aBlogUsers bUsersUseOrder=true sUsersRootPage=$sUsersRootPage}
|
||||
{include 'components/user/user-list.tpl' users=$aBlogUsers pagination=$aPaging}
|
||||
{/block}
|
|
@ -17,5 +17,5 @@
|
|||
{/block}
|
||||
|
||||
{block 'layout_content'}
|
||||
{include 'components/user/user-list.tpl' aUsersList=$aUsersCity}
|
||||
{include 'components/user/user-list.tpl' users=$aUsersCity pagination=$aPaging}
|
||||
{/block}
|
|
@ -17,5 +17,5 @@
|
|||
{/block}
|
||||
|
||||
{block 'layout_content'}
|
||||
{include 'components/user/user-list.tpl' aUsersList=$aUsersCountry}
|
||||
{include 'components/user/user-list.tpl' users=$aUsersCountry pagination=$aPaging}
|
||||
{/block}
|
|
@ -23,6 +23,6 @@
|
|||
]}
|
||||
|
||||
<div class="js-search-ajax-users">
|
||||
{include 'components/user/user-list.tpl' aUsersList=$aUsers bUseMore=true}
|
||||
{include 'components/user/user-list.tpl' users=$aUsers useMore=true}
|
||||
</div>
|
||||
{/block}
|
|
@ -5,10 +5,10 @@
|
|||
{extends 'layouts/layout.user.tpl'}
|
||||
|
||||
{block 'layout_user_page_title'}
|
||||
{lang name='user.publications.title'}
|
||||
{lang 'user.publications.title'}
|
||||
{/block}
|
||||
|
||||
{block 'layout_content' append}
|
||||
{include 'navs/nav.user.created.tpl'}
|
||||
{include 'components/user/user-list.tpl'}
|
||||
{include 'navs/nav.user.created.tpl'}
|
||||
{include 'components/user/user-list.tpl' users=$aUsersList pagination=$aPaging}
|
||||
{/block}
|
|
@ -9,5 +9,5 @@
|
|||
{/block}
|
||||
|
||||
{block 'layout_content' append}
|
||||
{include 'components/user/user-list.tpl' aUsersList=$aFriends}
|
||||
{include 'components/user/user-list.tpl' users=$aFriends pagination=$aPaging}
|
||||
{/block}
|
|
@ -5,6 +5,6 @@
|
|||
*}
|
||||
|
||||
{include 'components/user-list-add/user-list-add.tpl'
|
||||
sUserListAddClasses = 'js-activity-users'
|
||||
aUserList = $smarty.local.users
|
||||
sUserListNote = $aLang.activity.users.note}
|
||||
users = $smarty.local.users
|
||||
classes = 'js-activity-users'
|
||||
note = $aLang.activity.users.note}
|
|
@ -105,7 +105,7 @@
|
|||
{block 'article_footer_info_items'}
|
||||
{* Автор топика *}
|
||||
<li class="{$component}-info-item {$component}-info-item--author">
|
||||
{include 'components/user/user-item.tpl' oUser=$user iUserItemAvatarSize=48 sUserItemStyle='rounded'}
|
||||
{include 'components/user/user-item.tpl' user=$user avatarSize=48 mods='rounded'}
|
||||
</li>
|
||||
|
||||
{* Ссылка на комментарии *}
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
<tr>
|
||||
<td class="cell-name">
|
||||
{include 'components/user/user-item.tpl' oUser=$user}
|
||||
{include 'components/user/user-item.tpl' user=$user}
|
||||
</td>
|
||||
|
||||
{if $user->getId() == $oUserCurrent->getId()}
|
||||
|
|
|
@ -16,15 +16,15 @@
|
|||
|
||||
{block 'block_content'}
|
||||
{* Создатель *}
|
||||
{include 'components/user/user-list-small.tpl' aUserList=[ $oBlog->getOwner() ] sUserListSmallTitle=$aLang.blog.owner}
|
||||
{include 'components/user/user-list-small.tpl' users=[ $oBlog->getOwner() ] title=$aLang.blog.owner}
|
||||
|
||||
{* Администраторы *}
|
||||
{if count($aBlogAdministrators)}
|
||||
{include 'components/user/user-list-small.tpl' aUserList=$aBlogAdministrators sUserListSmallTitle="{$aLang.blog.administrators} ({count($aBlogAdministrators)})"}
|
||||
{include 'components/user/user-list-small.tpl' users=$aBlogAdministrators title="{$aLang.blog.administrators} ({count($aBlogAdministrators)})"}
|
||||
{/if}
|
||||
|
||||
{* Модераторы *}
|
||||
{if count($aBlogModerators)}
|
||||
{include 'components/user/user-list-small.tpl' aUserList=$aBlogModerators sUserListSmallTitle="{$aLang.blog.moderators} ({count($aBlogModerators)})"}
|
||||
{include 'components/user/user-list-small.tpl' users=$aBlogModerators title="{$aLang.blog.moderators} ({count($aBlogModerators)})"}
|
||||
{/if}
|
||||
{/block}
|
|
@ -1,24 +1,21 @@
|
|||
{**
|
||||
* Приглашение пользователей в закрытый блог.
|
||||
* Выводится на странице администрирования пользователей закрытого блога.
|
||||
*
|
||||
* @styles css/blocks.css
|
||||
*}
|
||||
|
||||
{extends 'components/block/block.tpl'}
|
||||
|
||||
{block 'block_title'}
|
||||
{$aLang.blog.invite.invite_users}
|
||||
{$aLang.blog.invite.invite_users}
|
||||
{/block}
|
||||
|
||||
{block 'block_options' append}
|
||||
{$mods = "{$mods} blog-invite"}
|
||||
{$mods = "{$mods} blog-invite"}
|
||||
{/block}
|
||||
|
||||
{block 'block_content'}
|
||||
{include 'components/user-list-add/user-list-add.tpl'
|
||||
sUserListAddClasses = "js-user-list-add-blog-invite"
|
||||
sUserListAddAttributes = "data-param-i-target-id=\"{$oBlogEdit->getId()}\""
|
||||
aUserList = $aBlogUsersInvited
|
||||
sUserListSmallItemPath = 'components/blog/user-list-small-item.blog-invite.tpl'}
|
||||
{include 'components/blog/invite/invite.tpl'
|
||||
users = $aBlogUsersInvited
|
||||
classes = 'js-user-list-add-blog-invite'
|
||||
attributes = [ 'data-param-i-target-id' => $oBlogEdit->getId() ]}
|
||||
{/block}
|
|
@ -23,7 +23,6 @@
|
|||
'text' => {lang 'blog.blocks.search.categories.all'},
|
||||
'url' => {router page='blogs'},
|
||||
'attributes' => "data-value=\"0\"",
|
||||
'classes' => 'js-search-ajax-option',
|
||||
'count' => $iCountBlogsAll
|
||||
]]}
|
||||
|
||||
|
@ -34,7 +33,6 @@
|
|||
'text' => ($oCategory->getTitle()),
|
||||
'url' => '#',
|
||||
'attributes' => "data-value=\"{$oCategory->getId()}\" style=\"margin-left: {$category.level * 20}px;\"",
|
||||
'classes' => 'js-search-ajax-option',
|
||||
'count' => $oCategory->getCountTargetOfDescendants()
|
||||
]}
|
||||
{/foreach}
|
||||
|
|
|
@ -9,9 +9,8 @@
|
|||
* @param string $textEmpty
|
||||
*}
|
||||
|
||||
|
||||
{* Список блогов *}
|
||||
{if $smarty.local.blogs}
|
||||
{* Заголовок *}
|
||||
{if $smarty.local.searchCount}
|
||||
<h3 class="h3">{lang name='blog.search.result_title' count=$smarty.local.searchCount plural=true}</h3>
|
||||
{/if}
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
{**
|
||||
*
|
||||
*}
|
||||
|
||||
{extends 'components/user-list-add/item.tpl'}
|
||||
|
||||
{block 'user_list_add_item_actions' prepend}
|
||||
<li class="icon-repeat js-blog-invite-user-repeat" title="{$aLang.blog.invite.repeat}" data-user-id="{$userId}"></li>
|
||||
{/block}
|
|
@ -3,10 +3,8 @@
|
|||
* Расширяет основной шаблон с пользователем добавляя кнопку "Повторно отправить приглашение" в блоке "Пригласить пользователей в блог"
|
||||
*}
|
||||
|
||||
{extends 'components/user/user-list-small-item.tpl'}
|
||||
{extends 'components/user-list-add/list.tpl'}
|
||||
|
||||
{block 'user_list_small_item_actions'}
|
||||
<li class="icon-repeat js-blog-invite-user-repeat" title="{$aLang.blog.invite.repeat}" data-user-id="{$iUserId}"></li>
|
||||
|
||||
{$smarty.block.parent}
|
||||
{block 'user_list_add_item'}
|
||||
{include './invite-item.tpl' user=$user showActions=true}
|
||||
{/block}
|
|
@ -0,0 +1,16 @@
|
|||
{**
|
||||
* Список пользователей с элементами управления / Пользователь
|
||||
* Расширяет основной шаблон с пользователем добавляя кнопку "Повторно отправить приглашение" в блоке "Пригласить пользователей в блог"
|
||||
*}
|
||||
|
||||
{extends 'components/user-list-add/user-list-add.tpl'}
|
||||
|
||||
{block 'user_list_add_list'}
|
||||
{include './invite-list.tpl'
|
||||
hideableEmptyAlert = true
|
||||
users = $smarty.local.users
|
||||
showActions = true
|
||||
show = !! $smarty.local.users
|
||||
classes = "js-$component-users"
|
||||
itemClasses = "js-$component-user"}
|
||||
{/block}
|
|
@ -6,8 +6,6 @@
|
|||
name = 'blog'
|
||||
method = 'post'
|
||||
placeholder = $aLang.blog.search.placeholder
|
||||
classes = 'js-tag-search-form'
|
||||
inputClasses = 'js-search-ajax-option js-search-text-main'
|
||||
inputAttributes = 'data-type="blogs"'
|
||||
inputClasses = 'js-search-text-main'
|
||||
inputName = 'blog_title'
|
||||
noSubmitButton = true}
|
|
@ -5,7 +5,7 @@
|
|||
*}
|
||||
|
||||
{include 'components/user-list-add/user-list-add.tpl'
|
||||
sUserListAddClasses = 'js-feed-users'
|
||||
aUserList = $smarty.local.users
|
||||
sUserListAddAttributes = 'data-param-type="users"'
|
||||
sUserListNote = $aLang.feed.users.note}
|
||||
users = $smarty.local.users
|
||||
classes = 'js-feed-users'
|
||||
attributes = [ 'data-param-type' => 'users' ]
|
||||
note = $aLang.feed.users.note}
|
|
@ -5,8 +5,7 @@
|
|||
*}
|
||||
|
||||
{include 'components/user-list-add/user-list-add.tpl'
|
||||
sUserListTitle = $aLang.talk.blacklist.title
|
||||
sUserListNote = $aLang.talk.blacklist.note
|
||||
sUserListAddClasses = 'js-user-list-add-blacklist'
|
||||
iUserListId = $oUserCurrent->getId()
|
||||
aUserList = $smarty.local.users}
|
||||
users = $smarty.local.users
|
||||
title = $aLang.talk.blacklist.title
|
||||
note = $aLang.talk.blacklist.note
|
||||
classes = 'js-user-list-add-blacklist'}
|
|
@ -0,0 +1,19 @@
|
|||
{**
|
||||
*
|
||||
*}
|
||||
|
||||
{extends 'components/user-list-add/item.tpl'}
|
||||
|
||||
{block 'user_list_add_item_options' append}
|
||||
{if $userContainer && $userContainer->getUserActive() != $TALK_USER_ACTIVE}
|
||||
{$classes = "$classes inactive"}
|
||||
{$attributes = [ 'title' => 'Пользователь не участвует в разговоре' ]}
|
||||
{/if}
|
||||
{/block}
|
||||
|
||||
{block 'user_list_add_item_actions'}
|
||||
{if $smarty.local.editable|default:true}
|
||||
<li class="icon-minus js-message-users-user-inactivate" title="{$aLang.common.remove}" data-user-id="{$userId}"></li>
|
||||
<li class="icon-plus js-message-users-user-activate" title="{$aLang.common.add}" data-user-id="{$userId}" data-user-login="{$user->getLogin()}"></li>
|
||||
{/if}
|
||||
{/block}
|
|
@ -0,0 +1,9 @@
|
|||
{**
|
||||
*
|
||||
*}
|
||||
|
||||
{extends 'components/user-list-add/list.tpl'}
|
||||
|
||||
{block 'user_list_add_item'}
|
||||
{include './participants-item.tpl' user=$user showActions=true}
|
||||
{/block}
|
|
@ -0,0 +1,15 @@
|
|||
{**
|
||||
*
|
||||
*}
|
||||
|
||||
{extends 'components/user-list-add/user-list-add.tpl'}
|
||||
|
||||
{block 'user_list_add_list'}
|
||||
{include './participants-list.tpl'
|
||||
hideableEmptyAlert = true
|
||||
users = $smarty.local.users
|
||||
showActions = true
|
||||
show = !! $smarty.local.users
|
||||
classes = "js-$component-users"
|
||||
itemClasses = "js-$component-user"}
|
||||
{/block}
|
|
@ -1,22 +0,0 @@
|
|||
{**
|
||||
* Список пользователей с элементами управления / Пользователь
|
||||
* Расширяет основной шаблон с пользователем добавляя кнопку "Повторно отправить приглашение" в блоке "Пригласить пользователей в блог"
|
||||
*}
|
||||
|
||||
{extends 'components/user/user-list-small-item.tpl'}
|
||||
|
||||
{block 'components/user_list_small/user_list_small_item_classes'}
|
||||
{if $oUserContainer && $oUserContainer->getUserActive() != $TALK_USER_ACTIVE}inactive{/if}
|
||||
{/block}
|
||||
|
||||
{block 'components/user_list_small/user_list_small_item_attributes'}
|
||||
{if $oUserContainer && $oUserContainer->getUserActive() != $TALK_USER_ACTIVE}title="Пользователь не участвует в разговоре"{/if}
|
||||
{/block}
|
||||
|
||||
{block 'components/user_list_small/user_list_small_item_actions'}
|
||||
{* TODO: Add local var allowManage *}
|
||||
{if $allowManage|default:true}
|
||||
<li class="icon-minus js-message-users-user-inactivate" title="{$aLang.common.remove}" data-user-id="{$iUserId}"></li>
|
||||
<li class="icon-plus js-message-users-user-activate" title="{$aLang.common.add}" data-user-id="{$iUserId}" data-user-login="{$oUser->getLogin()}"></li>
|
||||
{/if}
|
||||
{/block}
|
|
@ -1,13 +0,0 @@
|
|||
{**
|
||||
* Участники личного сообщения
|
||||
*}
|
||||
|
||||
{include 'components/user-list-add/user-list-add.tpl'
|
||||
sUserListAddClasses = "message-users js-message-users"
|
||||
sUserListAddAttributes = "data-param-i-target-id=\"{$oTalk->getId()}\""
|
||||
aUserList = $oTalk->getTalkUsers()
|
||||
allowManage = $oTalk->getUserId() == $oUserCurrent->getId() || $oUserCurrent->isAdministrator()
|
||||
sUserListTitle = $aLang.talk.users.title
|
||||
aUserListSmallExcludeRemove = [ $oUserCurrent->getId() ]
|
||||
sUserItemInactiveTitle = $aLang.talk.users.user_not_found
|
||||
sUserListSmallItemPath = 'components/talk/talk-users-item.tpl'}
|
|
@ -12,7 +12,13 @@
|
|||
|
||||
{if ! $bNoComments}
|
||||
{* Участники личного сообщения *}
|
||||
{include './talk-users.tpl'}
|
||||
{include './participants/participants.tpl'
|
||||
users = $talk->getTalkUsers()
|
||||
classes = 'message-users js-message-users'
|
||||
attributes = [ 'data-param-i-target-id' => $talk->getId() ]
|
||||
editable = $talk->getUserId() == $oUserCurrent->getId() || $oUserCurrent->isAdministrator()
|
||||
title = $aLang.talk.users.title
|
||||
excludeRemove = [ $oUserCurrent->getId() ]}
|
||||
|
||||
{* Вывод комментариев к сообщению *}
|
||||
{include 'components/comment/comments.tpl'
|
||||
|
|
|
@ -1,11 +1,25 @@
|
|||
/**
|
||||
* Список пользователей
|
||||
*/
|
||||
.user-list-add { margin-bottom: 15px; }
|
||||
.user-list-add:last-child { margin-bottom: 0; }
|
||||
|
||||
.user-list-add-title { font-size: 18px; margin-bottom: 15px; }
|
||||
|
||||
.user-list-add-form { padding: 20px; margin-bottom: 5px; background: #f7f7f7; border: 1px solid #eee; }
|
||||
|
||||
.user-list-add-note { margin-bottom: 20px; color: #aaa; font-size: 13px; }
|
||||
.user-list-add {
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
.user-list-add:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.user-list-add-title {
|
||||
font-size: 18px;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
.user-list-add-form {
|
||||
padding: 20px;
|
||||
margin-bottom: 5px;
|
||||
background: #f7f7f7;
|
||||
border: 1px solid #eee;
|
||||
}
|
||||
.user-list-add-note {
|
||||
margin-bottom: 20px;
|
||||
color: #aaa;
|
||||
font-size: 13px;
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
{extends 'components/user/user-list-small-item.tpl'}
|
||||
|
||||
{block 'user_list_small_item_options' append}
|
||||
{block 'user_list_add_item_options'}{/block}
|
||||
{/block}
|
||||
|
||||
{block 'user_list_small_item_content' append}
|
||||
{block 'user_list_add_item_content'}
|
||||
{* Действия *}
|
||||
{if $smarty.local.showActions}
|
||||
<ul class="{$component}-actions js-user-list-small-actions">
|
||||
{block 'user_list_add_item_actions'}
|
||||
{if $smarty.local.showRemove|default:true}
|
||||
<li class="icon-remove js-user-list-add-user-remove" title="{$aLang.common.remove}" data-user-id="{$userId}"></li>
|
||||
{/if}
|
||||
{/block}
|
||||
</ul>
|
||||
{/if}
|
||||
{/block}
|
||||
{/block}
|
|
@ -0,0 +1,17 @@
|
|||
{**
|
||||
* Список пользователей
|
||||
*
|
||||
* @param object $users
|
||||
* @param string $title
|
||||
* @param boolean $hideableEmptyAlert
|
||||
* @param boolean $show
|
||||
* @param array $exclude
|
||||
*}
|
||||
|
||||
{extends 'components/user/user-list-small.tpl'}
|
||||
|
||||
{block 'user_list_small_item'}
|
||||
{block 'user_list_add_item'}
|
||||
{include 'components/user-list-add/item.tpl' user=$user showActions=true}
|
||||
{/block}
|
||||
{/block}
|
|
@ -1,44 +1,57 @@
|
|||
{**
|
||||
* Пополняемый список пользователей
|
||||
*
|
||||
* @param array $users
|
||||
* @param string $title
|
||||
* @param string $note
|
||||
* @param boolean $editable
|
||||
*
|
||||
* @param string $classes
|
||||
* @param array $attributes
|
||||
* @param array $mods
|
||||
*}
|
||||
|
||||
{* Название компонента *}
|
||||
{$component = 'user-list-add'}
|
||||
|
||||
{* Форма добавления *}
|
||||
<div class="{$component} {mod name=$component mods=$sUserListAddMods} js-{$component} {$sUserListAddClasses}" {$sUserListAddAttributes}>
|
||||
{* Заголовок *}
|
||||
{if $sUserListTitle}
|
||||
<h3 class="{$component}-title">{$sUserListTitle}</h3>
|
||||
{/if}
|
||||
<div class="{$component} {mod name=$component mods=$smarty.local.mods} {$smarty.local.classes}"
|
||||
{foreach $smarty.local.attributes as $attr}{$attr@key}="{$attr@value}" {/foreach}>
|
||||
|
||||
{* Описание *}
|
||||
{if $sUserListNote}
|
||||
<p class="{$component}-note">{$sUserListNote}</p>
|
||||
{/if}
|
||||
{* Заголовок *}
|
||||
{if $smarty.local.title}
|
||||
<h3 class="{$component}-title">{$smarty.local.title}</h3>
|
||||
{/if}
|
||||
|
||||
{* Форма добавления *}
|
||||
{if $smarty.local.allowManage|default:true}
|
||||
<form class="{$component}-form js-{$component}-form">
|
||||
{$sClass = "js-$component-form-users-"|cat:rand(0, 9999)}
|
||||
{* Описание *}
|
||||
{if $smarty.local.note}
|
||||
<p class="{$component}-note">{$smarty.local.note}</p>
|
||||
{/if}
|
||||
|
||||
{include 'components/field/field.text.tpl'
|
||||
name = 'add'
|
||||
inputClasses = "autocomplete-users-sep {$sClass}"
|
||||
label = $aLang.user_list_add.form.fields.add.label
|
||||
note = "<a href=\"#\" class=\"link-dotted\" data-type=\"modal-toggle\" data-modal-url=\"{router page='ajax/modal-friend-list'}\" data-param-selectable=\"true\" data-param-target=\".{$sClass}\">Выбрать из списка друзей</a>"}
|
||||
{* Форма добавления *}
|
||||
{if $smarty.local.editable|default:true}
|
||||
<form class="{$component}-form js-{$component}-form">
|
||||
{$uid = "js-$component-form-users-"|cat:rand(0, 10e10)}
|
||||
|
||||
{include 'components/button/button.tpl' text=$aLang.common.add mods='primary' classes="js-$component-form-submit"}
|
||||
</form>
|
||||
{/if}
|
||||
{include 'components/field/field.text.tpl'
|
||||
name = 'add'
|
||||
inputClasses = "autocomplete-users-sep {$uid}"
|
||||
label = $aLang.user_list_add.form.fields.add.label
|
||||
note = "<a href=\"#\" class=\"link-dotted\" data-type=\"modal-toggle\" data-modal-url=\"{router page='ajax/modal-friend-list'}\" data-param-selectable=\"true\" data-param-target=\".{$uid}\">Выбрать из списка друзей</a>"}
|
||||
|
||||
{* Список пользователей *}
|
||||
{* TODO: Изменить порядок вывода - сначало новые *}
|
||||
{include 'components/user/user-list-small.tpl'
|
||||
bHideableEmptyAlert = true
|
||||
aUserList = $aUserList
|
||||
bUserListSmallShowActions = true
|
||||
bUserListDisplay = !! $aUserList
|
||||
sUserListSmallClasses = "js-$component-users"
|
||||
sUserListSmallItemClasses = "js-$component-user"}
|
||||
{include 'components/button/button.tpl' text=$aLang.common.add mods='primary' classes="js-$component-form-submit"}
|
||||
</form>
|
||||
{/if}
|
||||
|
||||
{* Список пользователей *}
|
||||
{* TODO: Изменить порядок вывода - сначало новые *}
|
||||
{block 'user_list_add_list'}
|
||||
{include 'components/user-list-add/list.tpl'
|
||||
hideableEmptyAlert = true
|
||||
users = $smarty.local.users
|
||||
showActions = true
|
||||
show = !! $smarty.local.users
|
||||
classes = "js-$component-users"
|
||||
itemClasses = "js-$component-user"}
|
||||
{/block}
|
||||
</div>
|
|
@ -0,0 +1 @@
|
|||
# Компонент user
|
|
@ -1,12 +1,22 @@
|
|||
/**
|
||||
* Блок с аватарой и логином пользователя
|
||||
*
|
||||
* @template user_item.tpl
|
||||
* @template user-item.tpl
|
||||
*/
|
||||
.user-item { display: inline-block; }
|
||||
.user-item-avatar { vertical-align: middle; margin-right: 2px; }
|
||||
.user-item-name { font-weight: bold; }
|
||||
|
||||
.user-item-rounded .user-item-avatar { border-radius: 50%; }
|
||||
|
||||
.user-item.inactive { opacity: .5; }
|
||||
.user-item {
|
||||
display: inline-block;
|
||||
}
|
||||
.user-item-avatar {
|
||||
vertical-align: middle;
|
||||
margin-right: 2px;
|
||||
}
|
||||
.user-item-name {
|
||||
font-weight: bold;
|
||||
}
|
||||
.user-item--rounded .user-item-avatar {
|
||||
border-radius: 50%;
|
||||
}
|
||||
.user-item.inactive {
|
||||
opacity: .5;
|
||||
}
|
|
@ -118,7 +118,7 @@ ls.user = (function ($) {
|
|||
|
||||
// Мержим логины
|
||||
oInput.val( $.richArray.unique($.merge(aLoginsOld, aLoginsAdd)).join(', ') );
|
||||
|
||||
console.log($('#modal-users-select'))
|
||||
$('#modal-users-select').lsModal('hide');
|
||||
});
|
||||
|
||||
|
|
|
@ -1,40 +1,51 @@
|
|||
{**
|
||||
* Список пользователей
|
||||
*
|
||||
* @param array $users
|
||||
* @param boolean $selectable
|
||||
* @param string $target
|
||||
* @param string $titleText
|
||||
*}
|
||||
|
||||
{extends 'components/modal/modal.tpl'}
|
||||
|
||||
{block 'modal_id'}modal-users-select{/block}
|
||||
{block 'modal_class'}modal-users-select js-modal-default{/block}
|
||||
{block 'modal_title'}{$aLang.user.users}{/block}
|
||||
|
||||
{block 'modal_class'}
|
||||
modal-users-select js-modal-default
|
||||
{/block}
|
||||
|
||||
{block 'modal_title'}
|
||||
{$smarty.local.titleText|default:$aLang.user.users}
|
||||
{/block}
|
||||
|
||||
{block 'modal_content'}
|
||||
{* Экшнбар *}
|
||||
{if $aUserList && $bSelectable}
|
||||
{include 'components/actionbar/actionbar-item.select.tpl'
|
||||
classes = 'js-user-list-modal-actionbar'
|
||||
target = '.js-user-list-select .js-user-list-small-item'
|
||||
assign = users}
|
||||
{* Экшнбар *}
|
||||
{if $smarty.local.users && $smarty.local.selectable}
|
||||
{include 'components/actionbar/actionbar-item.select.tpl'
|
||||
classes = 'js-user-list-modal-actionbar'
|
||||
target = '.js-user-list-select .js-user-list-small-item'
|
||||
assign = users}
|
||||
|
||||
{include 'components/actionbar/actionbar.tpl' items=[
|
||||
[ 'html' => $users ]
|
||||
]}
|
||||
{/if}
|
||||
{include 'components/actionbar/actionbar.tpl' items=[
|
||||
[ 'html' => $users ]
|
||||
]}
|
||||
{/if}
|
||||
|
||||
{* Список *}
|
||||
{include 'components/user/user-list-small.tpl'
|
||||
aUserList = $aUserList
|
||||
bUserListSmallSelectable = $bSelectable
|
||||
bUserListSmallShowEmpty = true
|
||||
sUserListSmallClasses = 'js-user-list-select'}
|
||||
{* Список *}
|
||||
{include 'components/user/user-list-small.tpl'
|
||||
users = $smarty.local.users
|
||||
selectable = $smarty.local.selectable
|
||||
showEmpty = true
|
||||
classes = 'js-user-list-select'}
|
||||
{/block}
|
||||
|
||||
{block 'modal_footer_begin'}
|
||||
{if $aUserList && $bSelectable}
|
||||
{include 'components/button/button.tpl'
|
||||
text = $aLang.common.add
|
||||
mods = 'primary'
|
||||
classes = 'js-user-list-select-add'
|
||||
attributes = "data-target=\"{$sTarget}\""}
|
||||
{/if}
|
||||
{if $smarty.local.users && $smarty.local.selectable}
|
||||
{include 'components/button/button.tpl'
|
||||
text = $aLang.common.add
|
||||
mods = 'primary'
|
||||
classes = 'js-user-list-select-add'
|
||||
attributes = "data-target=\"{$smarty.local.target}\""}
|
||||
{/if}
|
||||
{/block}
|
|
@ -1,15 +1,12 @@
|
|||
{**
|
||||
* Форма поиска блогов
|
||||
*
|
||||
* @styles css/forms.css
|
||||
*}
|
||||
|
||||
{include 'components/search-form/search-form.tpl'
|
||||
name = 'blog'
|
||||
method = 'post'
|
||||
placeholder = $aLang.user.search.placeholder
|
||||
classes = 'js-tag-search-form'
|
||||
inputClasses = 'js-search-ajax-option js-search-text-main'
|
||||
inputAttributes = 'data-type="users"'
|
||||
inputName = 'user_login'
|
||||
noSubmitButton = true}
|
||||
name = 'blog'
|
||||
method = 'post'
|
||||
placeholder = $aLang.user.search.placeholder
|
||||
classes = 'js-tag-search-form'
|
||||
inputClasses = 'js-search-text-main'
|
||||
inputName = 'user_login'
|
||||
noSubmitButton = true}
|
|
@ -1,11 +1,26 @@
|
|||
{**
|
||||
* Блок с аватаркой и именем пользователя
|
||||
*
|
||||
* @styles css/common.css
|
||||
* @param object $user
|
||||
* @param integer $avatarSize
|
||||
*
|
||||
* @param string $classes
|
||||
* @param array $attributes
|
||||
* @param array $mods
|
||||
*}
|
||||
|
||||
<div class="user-item {if $sUserItemStyle}user-item-{$sUserItemStyle}{/if} {if $bUserItemIsInactive}inactive{/if} {$sUserItemClasses}"
|
||||
{if $bUserItemIsInactive}title="{$sUserItemInactiveTitle}"{/if}>
|
||||
<a href="{$oUser->getUserWebPath()}" class="user-item-avatar-link"><img src="{$oUser->getProfileAvatarPath($iUserItemAvatarSize|default:24)}" alt="{$oUser->getLogin()}" class="user-item-avatar" /></a>
|
||||
<a {* TODO: rel="author" *} href="{$oUser->getUserWebPath()}" class="user-item-name">{$oUser->getDisplayName()}</a>
|
||||
{$component = 'user-item'}
|
||||
|
||||
{$user = $smarty.local.user}
|
||||
|
||||
<div class="{$component} {mod name=$component mods=$smarty.local.mods} {$smarty.local.classes}"
|
||||
{foreach $smarty.local.attributes as $attr}{$attr@key}="{$attr@value}" {/foreach}>
|
||||
|
||||
<a href="{$user->getUserWebPath()}" class="{$component}-avatar-link">
|
||||
<img src="{$user->getProfileAvatarPath( $smarty.local.avatarSize|default:24 )}" alt="{$user->getLogin()}" class="{$component}-avatar" />
|
||||
</a>
|
||||
|
||||
<a href="{$user->getUserWebPath()}" class="{$component}-name">
|
||||
{$user->getDisplayName()}
|
||||
</a>
|
||||
</div>
|
|
@ -11,7 +11,7 @@
|
|||
{* TODO: Костыль для блогов *}
|
||||
{if $oUser->getUser()}{$oUser = $oUser->getUser()}{/if}
|
||||
|
||||
<li>{include 'components/user/user-item.tpl' oUser=$oUser iUserItemAvatarSize=64}</li>
|
||||
<li>{include 'components/user/user-item.tpl' user=$oUser avatarSize=64}</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
{else}
|
||||
|
|
|
@ -1,26 +1,33 @@
|
|||
{**
|
||||
* Список пользователей с элементами управления / Пользователь
|
||||
*
|
||||
* @param object $user
|
||||
* @param string $selectable
|
||||
* @param string $showActions
|
||||
* @param string $showRemove
|
||||
*
|
||||
* @param string $classes
|
||||
* @param array $attributes
|
||||
* @param array $mods
|
||||
*}
|
||||
|
||||
{$iUserId = $oUser->getId()}
|
||||
{$component = 'user-list-small-item'}
|
||||
|
||||
<li class="user-list-small-item js-user-list-small-item {$sUserListSmallItemClasses} {block 'components/user_list_small/user_list_small_item_classes'}{/block}" {block 'components/user_list_small/user_list_small_item_attributes'}{/block} data-user-id="{$iUserId}">
|
||||
{* Чекбокс *}
|
||||
{if $bUserListSmallSelectable}
|
||||
<input type="checkbox" class="js-user-list-small-checkbox" data-user-id="{$iUserId}" data-user-login="{$oUser->getLogin()}" />
|
||||
{/if}
|
||||
{block 'user_list_small_item_options'}
|
||||
{$classes = $smarty.local.classes}
|
||||
{$attributes = $smarty.local.attributes}
|
||||
{$user = $smarty.local.user}
|
||||
{$userId = $user->getId()}
|
||||
{/block}
|
||||
|
||||
{* Пользователь *}
|
||||
{include 'components/user/user-item.tpl' oUser=$oUser}
|
||||
<li class="{$component} js-user-list-small-item {$classes}" data-user-id="{$userId}" {foreach $attributes as $attr}{$attr@key}="{$attr@value}" {/foreach}>
|
||||
{* Чекбокс *}
|
||||
{if $smarty.local.selectable}
|
||||
<input type="checkbox" class="js-user-list-small-checkbox" data-user-id="{$userId}" data-user-login="{$user->getLogin()}" />
|
||||
{/if}
|
||||
|
||||
{* Действия *}
|
||||
{if $bUserListSmallShowActions}
|
||||
<ul class="user-list-small-item-actions js-user-list-small-actions">
|
||||
{block 'user_list_small_item_actions'}
|
||||
{if $bUserListItemShowRemove|default:true}
|
||||
<li class="icon-remove js-user-list-add-user-remove" title="{$aLang.common.remove}" data-user-id="{$iUserId}"></li>
|
||||
{/if}
|
||||
{/block}
|
||||
</ul>
|
||||
{/if}
|
||||
{* Пользователь *}
|
||||
{block 'user_list_small_item_content'}
|
||||
{include 'components/user/user-item.tpl' user=$user}
|
||||
{/block}
|
||||
</li>
|
|
@ -1,32 +1,46 @@
|
|||
{**
|
||||
* Список пользователей с элементами управления
|
||||
*
|
||||
* @param object $users
|
||||
* @param string $title
|
||||
* @param boolean $hideableEmptyAlert
|
||||
* @param boolean $show
|
||||
* @param boolean $selectable
|
||||
* @param array $exclude
|
||||
* @param string $itemTemplate
|
||||
*}
|
||||
|
||||
{$users = $smarty.local.users}
|
||||
|
||||
{* Заголовок *}
|
||||
{if $sUserListSmallTitle}
|
||||
<h3 class="user-list-small-title">{$sUserListSmallTitle}</h3>
|
||||
{if $smarty.local.title}
|
||||
<h3 class="user-list-small-title">{$smarty.local.title}</h3>
|
||||
{/if}
|
||||
|
||||
{* Уведомление о пустом списке *}
|
||||
{if ! $aUserList || $smarty.local.bHideableEmptyAlert}
|
||||
{if ! $users || $smarty.local.hideableEmptyAlert}
|
||||
{include 'components/alert/alert.tpl'
|
||||
text = $aLang.common.empty
|
||||
mods = 'empty'
|
||||
classes = 'js-user-list-small-empty'
|
||||
visible = ! $aUserList}
|
||||
visible = ! $users}
|
||||
{/if}
|
||||
|
||||
{* Список пользователей *}
|
||||
{if $aUserList || ! $bUserListDisplay|default:true}
|
||||
<ul class="user-list-small js-user-list-small {$sUserListSmallClasses}" {if ! $bUserListDisplay|default:true}style="display: none"{/if}>
|
||||
{foreach $aUserList as $oUser}
|
||||
{if $oUser->getUser()}
|
||||
{$oUserContainer = $oUser}
|
||||
{$oUser = $oUser->getUser()}
|
||||
{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()}
|
||||
{/if}
|
||||
|
||||
{if ! $aUserListSmallExclude || ! in_array($oUser->getId(), $aUserListSmallExclude)}
|
||||
{include $sUserListSmallItemPath|default:'./user-list-small-item.tpl' bUserListItemShowRemove=! $aUserListSmallExcludeRemove || ! in_array($iUserId, $aUserListSmallExcludeRemove)}
|
||||
{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}
|
||||
{/if}
|
||||
{/foreach}
|
||||
</ul>
|
||||
|
|
|
@ -1,27 +1,36 @@
|
|||
{**
|
||||
* Список пользователей
|
||||
*
|
||||
* @param array $users
|
||||
* @param array $pagination
|
||||
* @param boolean $useMore
|
||||
* @param boolean $hideMore
|
||||
* @param integer $searchCount
|
||||
* @param string $textEmpty
|
||||
*}
|
||||
|
||||
{if $aUsersList}
|
||||
{if $iSearchCount}
|
||||
<h3 class="h3">{lang name='user.search.result_title' count=$iSearchCount plural=true}</h3>
|
||||
{/if}
|
||||
{if $smarty.local.users}
|
||||
{* Заголовок *}
|
||||
{if $smarty.local.searchCount}
|
||||
<h3 class="h3">{lang name='user.search.result_title' count=$smarty.local.searchCount plural=true}</h3>
|
||||
{/if}
|
||||
|
||||
{* Список пользователей *}
|
||||
<ul class="object-list user-list js-more-users-container">
|
||||
{include './user-list-loop.tpl' users=$aUsersList}
|
||||
</ul>
|
||||
{* Список пользователей *}
|
||||
<ul class="object-list user-list js-more-users-container">
|
||||
{include './user-list-loop.tpl' users=$smarty.local.users}
|
||||
</ul>
|
||||
|
||||
{if $bUseMore}
|
||||
{if ! $bHideMore}
|
||||
{include 'components/more/more.tpl'
|
||||
classes = 'js-more-search'
|
||||
target = '.js-more-users-container'
|
||||
attributes = [ 'data-search-type' => 'users', 'data-proxy-page-next' => '2' ]}
|
||||
{/if}
|
||||
{else}
|
||||
{include 'components/pagination/pagination.tpl' paging=$aPaging}
|
||||
{/if}
|
||||
{* Кнопка подгрузки *}
|
||||
{if $smarty.local.useMore}
|
||||
{if ! $smarty.local.hideMore}
|
||||
{include 'components/more/more.tpl'
|
||||
classes = 'js-more-search'
|
||||
target = '.js-more-users-container'
|
||||
attributes = [ 'data-search-type' => 'users', 'data-proxy-page-next' => '2' ]}
|
||||
{/if}
|
||||
{else}
|
||||
{include 'components/pagination/pagination.tpl' paging=$smarty.local.pagination}
|
||||
{/if}
|
||||
{else}
|
||||
{include 'components/alert/alert.tpl' text=$sUserListEmpty|default:{lang name='user.notices.empty'} mods='empty'}
|
||||
{include 'components/alert/alert.tpl' text=$smarty.local.textEmpty|default:{lang name='user.notices.empty'} mods='empty'}
|
||||
{/if}
|
|
@ -1 +0,0 @@
|
|||
# Компонент userfeed
|
|
@ -1,15 +1,18 @@
|
|||
{**
|
||||
* Информация о голосовании
|
||||
*
|
||||
* @param object $target
|
||||
*}
|
||||
|
||||
{* Название компонента *}
|
||||
{$component = 'vote'}
|
||||
{$component = 'vote-info'}
|
||||
|
||||
<ul class="{$component}-info">
|
||||
<li><i class="icon-plus icon-white"></i> {$oObject->getCountVoteUp()}</li>
|
||||
<li><i class="icon-minus icon-white"></i> {$oObject->getCountVoteDown()}</li>
|
||||
<li><i class="icon-eye-open icon-white"></i> {$oObject->getCountVoteAbstain()}</li>
|
||||
<li><i class="icon-asterisk icon-white"></i> {$oObject->getCountVote()}</li>
|
||||
{$target = $smarty.local.target}
|
||||
|
||||
{hook run='topic_show_vote_stats' topic=$oObject}
|
||||
<ul class="{$component}">
|
||||
<li><i class="icon-plus icon-white"></i> {$target->getCountVoteUp()}</li>
|
||||
<li><i class="icon-minus icon-white"></i> {$target->getCountVoteDown()}</li>
|
||||
<li><i class="icon-eye-open icon-white"></i> {$target->getCountVoteAbstain()}</li>
|
||||
<li><i class="icon-asterisk icon-white"></i> {$target->getCountVote()}</li>
|
||||
|
||||
{hook run='topic_show_vote_stats' topic=$target}
|
||||
</ul>
|
|
@ -5,5 +5,5 @@
|
|||
*}
|
||||
|
||||
{foreach $smarty.local.comments as $comment}
|
||||
{include './wall.entry.tpl' entry=$comment showReply=false classes='wall-comment js-wall-comment' type='comment'}
|
||||
{include './wall.entry.tpl' entry=$comment showReply=false classes='wall-comment js-wall-comment' type='comment'}
|
||||
{/foreach}
|
|
@ -7,7 +7,7 @@
|
|||
*}
|
||||
|
||||
{include 'components/comment/comment.tpl'
|
||||
comment = $smarty.local.entry
|
||||
showReply = $smarty.local.showReply
|
||||
attributes = [ 'data-type' => $smarty.local.type ]
|
||||
classes = "wall-comment js-wall-entry {$smarty.local.classes}"}
|
||||
comment = $smarty.local.entry
|
||||
showReply = $smarty.local.showReply
|
||||
attributes = [ 'data-type' => $smarty.local.type ]
|
||||
classes = "wall-comment js-wall-entry {$smarty.local.classes}"}
|
|
@ -7,17 +7,17 @@
|
|||
*}
|
||||
|
||||
<form class="wall-form js-wall-form {$smarty.local.classes}" data-id="{$smarty.local.id|default:0}" {if ! $smarty.local.display|default:true}style="display: none"{/if}>
|
||||
{* Текст *}
|
||||
{include 'components/field/field.textarea.tpl'
|
||||
placeholder = "{$smarty.local.placeholder|default:$aLang.wall.form.fields.text.placeholder}"
|
||||
inputClasses = 'width-full js-wall-form-text'}
|
||||
{* Текст *}
|
||||
{include 'components/field/field.textarea.tpl'
|
||||
placeholder = "{$smarty.local.placeholder|default:$aLang.wall.form.fields.text.placeholder}"
|
||||
inputClasses = 'width-full js-wall-form-text'}
|
||||
|
||||
{* Подвал формы *}
|
||||
<footer class="wall-form-footer">
|
||||
{include 'components/button/button.tpl'
|
||||
type = 'submit'
|
||||
mods = 'primary'
|
||||
classes = 'js-wall-form-submit'
|
||||
text = $aLang.common.add}
|
||||
</footer>
|
||||
{* Подвал формы *}
|
||||
<footer class="wall-form-footer">
|
||||
{include 'components/button/button.tpl'
|
||||
type = 'submit'
|
||||
mods = 'primary'
|
||||
classes = 'js-wall-form-submit'
|
||||
text = $aLang.common.add}
|
||||
</footer>
|
||||
</form>
|
Loading…
Reference in a new issue