mirror of
https://github.com/Oreolek/ifhub.club.git
synced 2024-06-17 07:10:48 +03:00
Шаблон Synio
This commit is contained in:
parent
0d09fee0d3
commit
5b2d765027
|
@ -15,7 +15,7 @@
|
|||
'small' => 64,
|
||||
'xsmall' => 48,
|
||||
'xxsmall' => 24,
|
||||
'text' => 18
|
||||
'text' => 24
|
||||
]}
|
||||
|
||||
{component 'avatar'
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 3.9 KiB |
Binary file not shown.
After Width: | Height: | Size: 2.8 KiB |
|
@ -0,0 +1,70 @@
|
|||
/**
|
||||
* Details
|
||||
*
|
||||
* @license GNU General Public License, version 2
|
||||
* @copyright 2013 OOO "ЛС-СОФТ" {@link http://livestreetcms.com}
|
||||
* @author Denis Shakhov <denis.shakhov@gmail.com>
|
||||
*/
|
||||
|
||||
.ls-details {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.ls-details:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
/* Заголовок */
|
||||
.ls-details-title {
|
||||
position: relative;
|
||||
padding: 10px 15px 10px 32px;
|
||||
margin-bottom: 0;
|
||||
font-size: 16px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
.ls-details-title:hover {
|
||||
background: #f8fbfe;
|
||||
cursor: pointer;
|
||||
}
|
||||
.ls-details.is-open > .ls-details-title {
|
||||
background: #eff6fd;
|
||||
border-radius: 5px 5px 0 0;
|
||||
}
|
||||
.ls-details-title-text {
|
||||
border-bottom: 1px dashed;
|
||||
color: #275ec2;
|
||||
}
|
||||
|
||||
/* Стрелка */
|
||||
.ls-details-title:before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 17px;
|
||||
left: 15px;
|
||||
height: 0;
|
||||
width: 0;
|
||||
margin-top: -1px;
|
||||
border: 4px solid transparent;
|
||||
border-left-color: #275ec2;
|
||||
}
|
||||
.ls-details.is-open > .ls-details-title:before {
|
||||
top: 19px;
|
||||
left: 13px;
|
||||
border-left-color: transparent;
|
||||
border-top-color: #275ec2;
|
||||
}
|
||||
|
||||
/* Основной контейнер */
|
||||
.ls-details-body {
|
||||
display: none;
|
||||
}
|
||||
.ls-details.is-open > .ls-details-body {
|
||||
display: block;
|
||||
}
|
||||
|
||||
/* Содержимое */
|
||||
.ls-details-content {
|
||||
padding: 20px 20px;
|
||||
border: 1px solid #eff6fd;
|
||||
border-top: none;
|
||||
border-radius: 0 0 5px 5px;
|
||||
}
|
|
@ -0,0 +1,43 @@
|
|||
{**
|
||||
* Сворачиваемый блок
|
||||
*
|
||||
* @param string $title
|
||||
* @param string $content
|
||||
* @param string $body
|
||||
* @param boolean $open
|
||||
* @param string $mods
|
||||
* @param string $classes
|
||||
* @param array $attributes
|
||||
*}
|
||||
|
||||
{* Название компонента *}
|
||||
{$component = 'ls-details'}
|
||||
{$jsprefix = 'js-details'}
|
||||
{component_define_params params=[ 'title', 'content', 'body', 'open', 'mods', 'classes', 'attributes' ]}
|
||||
|
||||
{* Проверяем нужно разворачивать блок или нет *}
|
||||
{if $open}
|
||||
{$classes = "$classes is-open"}
|
||||
{/if}
|
||||
|
||||
{block 'details_options'}{/block}
|
||||
|
||||
{* Item *}
|
||||
<div class="{$component} {cmods name=$component mods=$mods} {$classes}" {cattr list=$attributes}>
|
||||
{* Заголовок *}
|
||||
<h3 class="{$component}-title {$jsprefix}-title">
|
||||
<span class="{$component}-title-text">{$title}</span>
|
||||
</h3>
|
||||
|
||||
{* Основной блок *}
|
||||
<div class="{$component}-body {$jsprefix}-body">
|
||||
{* Содержимое *}
|
||||
{if $content}
|
||||
<div class="{$component}-content">
|
||||
{$content}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{$body}
|
||||
</div>
|
||||
</div>
|
|
@ -8,7 +8,7 @@
|
|||
{capture 'syn_create'}
|
||||
{$_menu = [
|
||||
[ 'name' => 'blog', 'text' => {lang 'modal_create.items.blog'}, 'url' => {router page='blog'} ],
|
||||
[ 'name' => 'message', 'text' => {lang 'modal_create.items.talk'}, 'url' => {router page='talk'} ]
|
||||
[ 'name' => 'message', 'text' => {lang 'modal_create.items.talk'}, 'url' => "{router page='talk'}add" ]
|
||||
]}
|
||||
|
||||
<div class="syn-create-items ls-clearfix">
|
||||
|
|
|
@ -31,9 +31,6 @@ th {
|
|||
.ls-table td {
|
||||
vertical-align: middle;
|
||||
}
|
||||
.ls-table tr:hover td {
|
||||
background: #f5fdff;
|
||||
}
|
||||
.ls-table th {
|
||||
vertical-align: bottom;
|
||||
border-bottom: 1px solid #c3d4dc;
|
||||
|
|
|
@ -0,0 +1,32 @@
|
|||
/**
|
||||
* Первое сообщение в диалоге
|
||||
*
|
||||
* @license GNU General Public License, version 2
|
||||
* @copyright 2013 OOO "ЛС-СОФТ" {@link http://livestreetcms.com}
|
||||
* @author Denis Shakhov <denis.shakhov@gmail.com>
|
||||
*/
|
||||
|
||||
.ls-talk-message-root-info,
|
||||
.ls-talk-message-root-actionbar,
|
||||
.ls-talk-message-root-text {
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
.ls-talk-message-root {
|
||||
margin-bottom: 50px;
|
||||
}
|
||||
|
||||
.ls-talk-message-root-info {
|
||||
border-top: 1px solid #eff6fd;
|
||||
padding-top: 5px;
|
||||
font-size: 11px;
|
||||
color: #7b848d;
|
||||
}
|
||||
.ls-talk-message-root-info-item {
|
||||
float: left;
|
||||
padding-top: 5px;
|
||||
margin-right: 15px;
|
||||
}
|
||||
.ls-talk-message-root-info-item--author {
|
||||
padding-top: 3px;
|
||||
}
|
|
@ -0,0 +1,96 @@
|
|||
/**
|
||||
* Список личных сообщений
|
||||
*
|
||||
* @license GNU General Public License, version 2
|
||||
* @copyright 2013 OOO "ЛС-СОФТ" {@link http://livestreetcms.com}
|
||||
* @author Denis Shakhov <denis.shakhov@gmail.com>
|
||||
*/
|
||||
|
||||
/* Экшнбар */
|
||||
.ls-actionbar.talk-list-actionbar {
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
/* Список */
|
||||
.talk-list.ls-table td {
|
||||
vertical-align: top;
|
||||
}
|
||||
.talk-list.ls-table .cell-checkbox,
|
||||
.talk-list.ls-table .cell-favourite {
|
||||
width: 14px;
|
||||
line-height: 1em;
|
||||
padding-left: 5px;
|
||||
padding-right: 5px;
|
||||
}
|
||||
.talk-list.ls-table .cell-info {
|
||||
width: 150px;
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
/* Сообщение */
|
||||
.talk-list-item:first-child td {
|
||||
border-top: 1px solid #f1f1f1;
|
||||
}
|
||||
.talk-list-item {
|
||||
background: #fff;
|
||||
}
|
||||
.talk-list-item.talk-unread {
|
||||
background: #f8fbfe;
|
||||
}
|
||||
.talk-list-item.selected {
|
||||
background: #FFC;
|
||||
}
|
||||
|
||||
/* Информация об отправителе */
|
||||
.talk-list-item-info {
|
||||
width: 150px;
|
||||
position: relative;
|
||||
padding-left: 75px;
|
||||
min-height: 64px;
|
||||
}
|
||||
.talk-list-item-info-avatar {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
.talk-list-item-info-date {
|
||||
display: block;
|
||||
font-size: 11px;
|
||||
color: #aaa;
|
||||
}
|
||||
.talk-list-item .ls-favourite {
|
||||
margin-top: 1px;
|
||||
}
|
||||
.talk-list-item-extra {
|
||||
position: relative;
|
||||
padding-right: 60px;
|
||||
}
|
||||
.talk-list-item-title {
|
||||
font-size: 15px;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
.talk-list-item-title a {
|
||||
text-decoration: underline;
|
||||
}
|
||||
.talk-list-item-text {
|
||||
font-size: 11px;
|
||||
line-height: 16px;
|
||||
}
|
||||
.talk-list-item-count {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
background: #b7ffe7;
|
||||
color: #555;
|
||||
padding: 1px 7px 2px;
|
||||
border-radius: 3px;
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
.talk-list-item.talk-unread .talk-list-item-count {
|
||||
background: #8961e4;
|
||||
color: #fff;
|
||||
}
|
||||
.talk-list-item.talk-unread .talk-list-item-count strong {
|
||||
color: rgba(255, 255, 255, .7);
|
||||
}
|
47
application/frontend/skin/synio/components/talk/css/talk.css
Normal file
47
application/frontend/skin/synio/components/talk/css/talk.css
Normal file
|
@ -0,0 +1,47 @@
|
|||
/**
|
||||
* Личные сообщения
|
||||
*
|
||||
* @license GNU General Public License, version 2
|
||||
* @copyright 2013 OOO "ЛС-СОФТ" {@link http://livestreetcms.com}
|
||||
* @author Denis Shakhov <denis.shakhov@gmail.com>
|
||||
*/
|
||||
|
||||
.talk {
|
||||
background: #fafafa;
|
||||
padding: 20px;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.ls-talk-participants-details {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.ls-talk-participants-details > .ls-details-title {
|
||||
background: #f8fbfe;
|
||||
border-radius: 0;
|
||||
}
|
||||
.ls-talk-participants-details .ls-details-content {
|
||||
padding: 20px 20px;
|
||||
border: 1px solid #eff6fd;
|
||||
border-top: none;
|
||||
border-bottom: none;
|
||||
border-radius: 0;
|
||||
}
|
||||
.ls-talk-participants-details.is-open > .ls-details-title {
|
||||
background: #eff6fd;
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Список участников диалога
|
||||
*/
|
||||
.message-users .user-list-small-item.inactive {
|
||||
opacity: .5;
|
||||
cursor: help;
|
||||
}
|
||||
.message-users .user-list-small-item.inactive .ls-talk-participants-item-inactivate,
|
||||
.message-users .user-list-small-item .ls-talk-participants-item-activate {
|
||||
display: none;
|
||||
}
|
||||
.message-users .user-list-small-item.inactive .ls-talk-participants-item-activate {
|
||||
display: inline-block;
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
{**
|
||||
*
|
||||
*}
|
||||
|
||||
{extends 'component@user-list-add.item'}
|
||||
|
||||
{block 'user_list_add_item_options' append}
|
||||
{component_define_params params=[ 'editable' ]}
|
||||
|
||||
{if $userContainer && $userContainer->getUserActive() != $TALK_USER_ACTIVE}
|
||||
{$classes = "$classes inactive"}
|
||||
{$attributes = [ 'title' => {lang 'talk.users.inactive'} ]}
|
||||
{/if}
|
||||
{/block}
|
||||
|
||||
{block 'user_list_add_item_actions'}
|
||||
{if $editable|default:true && $user->getId() != $oUserCurrent->getId()}
|
||||
<li class="js-message-users-user-inactivate ls-talk-participants-item-inactivate" title="{$aLang.common.remove}" data-user-id="{$userId}">
|
||||
{component 'icon' icon='minus'}
|
||||
</li>
|
||||
|
||||
<li class="js-message-users-user-activate ls-talk-participants-item-activate" title="{$aLang.common.add}" data-user-id="{$userId}" data-user-login="{$user->getLogin()}">
|
||||
{component 'icon' icon='plus'}
|
||||
</li>
|
||||
{/if}
|
||||
{/block}
|
137
application/frontend/skin/synio/components/talk/talk-list.tpl
Normal file
137
application/frontend/skin/synio/components/talk/talk-list.tpl
Normal file
|
@ -0,0 +1,137 @@
|
|||
{**
|
||||
* Список диалогов
|
||||
*
|
||||
* @param array $talks
|
||||
* @param boolean $selectable
|
||||
* @param boolean $paging
|
||||
*}
|
||||
|
||||
{component_define_params params=[ 'talks', 'selectable' ]}
|
||||
|
||||
<div class="js-talk-list">
|
||||
{if $talks}
|
||||
<form action="{router page='talk'}" method="post" id="talk-form">
|
||||
{* Скрытые поля *}
|
||||
{component 'field' template='hidden.security-key'}
|
||||
{component 'field' template='hidden' name='form_action' id='talk-form-action'}
|
||||
|
||||
{* Экшнбар *}
|
||||
{if $selectable}
|
||||
{component 'actionbar' template='item.select'
|
||||
classes = 'js-talk-actionbar-select'
|
||||
target = '.js-talk-list-item'
|
||||
assign = select
|
||||
items = [
|
||||
[ 'text' => $aLang.talk.actionbar.read, 'filter' => ":not('.talk-unread')" ],
|
||||
[ 'text' => $aLang.talk.actionbar.unread, 'filter' => ".talk-unread" ]
|
||||
]}
|
||||
|
||||
{component 'actionbar'
|
||||
classes='talk-list-actionbar'
|
||||
items=[
|
||||
[ 'buttons' => [ 'html' => $select ] ],
|
||||
[
|
||||
'buttons' => [
|
||||
[ 'icon' => 'check', 'classes' => 'js-talk-form-button', 'attributes' => [ 'data-action' => 'mark_as_read', 'title' => $aLang.talk.actionbar.mark_as_read ], 'mods' => 'icon' ],
|
||||
[ 'icon' => 'trash', 'classes' => 'js-talk-form-button', 'attributes' => [ 'data-action' => 'remove' , 'title' => $aLang.common.remove ], 'mods' => 'icon' ]
|
||||
]
|
||||
]
|
||||
]}
|
||||
{/if}
|
||||
|
||||
{* Список сообщений *}
|
||||
<table class="ls-table talk-list">
|
||||
<tbody>
|
||||
{foreach $talks as $talk}
|
||||
{* Создатель диалога *}
|
||||
{$author = $talk->getTalkUser()}
|
||||
|
||||
{* Все участники диалога *}
|
||||
{$users = $talk->getTalkUsers()}
|
||||
|
||||
{* Кол-во участников диалога *}
|
||||
{$usersCount = count($users)}
|
||||
|
||||
<tr class="talk-list-item {if $author->getCommentCountNew() or ! $author->getDateLast()}talk-unread{/if} js-talk-list-item" data-id="{$talk->getId()}">
|
||||
{* Выделение *}
|
||||
{if $selectable}
|
||||
<td class="cell-checkbox">
|
||||
<input type="checkbox" name="talk_select[{$talk->getId()}]" data-id="{$talk->getId()}" />
|
||||
</td>
|
||||
{/if}
|
||||
|
||||
{* Избранное *}
|
||||
<td class="cell-favourite">
|
||||
{component 'favourite' classes='js-favourite-talk' target=$talk}
|
||||
</td>
|
||||
|
||||
{* Основная информация о диалоге *}
|
||||
<td class="cell-info">
|
||||
<div class="talk-list-item-info">
|
||||
{* Участники диалога *}
|
||||
{if $usersCount > 2}
|
||||
<a href="{router page='talk'}read/{$talk->getId()}/" class="talk-list-item-info-avatar">
|
||||
<img src="{Config::Get('path.skin.web')}/assets/images/avatars/group_64x64.png" />
|
||||
</a>
|
||||
|
||||
{lang name='talk.participants' count=$usersCount plural=true}
|
||||
{else}
|
||||
{* Если участников двое, то отображаем только собеседника *}
|
||||
{foreach $users as $user}
|
||||
{$user = $user->getUser()}
|
||||
|
||||
{if $user->getUserId() != $oUserCurrent->getId()}
|
||||
<a href="{$user->getUserWebPath()}" class="talk-list-item-info-avatar">
|
||||
<img src="{$user->getProfileAvatarPath(64)}" alt="{$user->getLogin()}" />
|
||||
</a>
|
||||
|
||||
<a href="{$user->getUserWebPath()}" class="ls-word-wrap">{$user->getDisplayName()}</a>
|
||||
{/if}
|
||||
{/foreach}
|
||||
{/if}
|
||||
|
||||
{* Дата *}
|
||||
<time class="talk-list-item-info-date" datetime="{date_format date=$talk->getDate() format='c'}" title="{date_format date=$talk->getDate() format='j F Y, H:i'}">
|
||||
{date_format date=$talk->getDate() hours_back="12" minutes_back="60" now="60" day="day H:i" format="j F Y, H:i"}
|
||||
</time>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
{* Заголовок и текст последнего сообщения *}
|
||||
<td>
|
||||
<div class="talk-list-item-extra">
|
||||
{* Заголовок *}
|
||||
<h2 class="talk-list-item-title">
|
||||
<a href="{router page='talk'}read/{$talk->getId()}/">
|
||||
{$talk->getTitle()|escape}
|
||||
</a>
|
||||
</h2>
|
||||
|
||||
{* Текст последнего сообщения *}
|
||||
<div class="talk-list-item-text">
|
||||
{(($talk->getCommentLast()) ? $talk->getCommentLast()->getText() : $talk->getText())|strip_tags|truncate:120:"..."|escape}
|
||||
</div>
|
||||
|
||||
{* Кол-во сообщений *}
|
||||
{if $talk->getCountComment()}
|
||||
<div class="talk-list-item-count">
|
||||
{$talk->getCountComment()}
|
||||
|
||||
{if $author->getCommentCountNew()}
|
||||
<strong>+{$author->getCommentCountNew()}</strong>
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
{else}
|
||||
{component 'blankslate' text=$aLang.talk.notices.empty}
|
||||
{/if}
|
||||
|
||||
{component 'pagination' total=+$paging.iCountPage current=+$paging.iCurrentPage url="{$paging.sBaseUrl}/page__page__/{$paging.sGetParams}"}
|
||||
</div>
|
|
@ -0,0 +1,58 @@
|
|||
{**
|
||||
* Первое сообщение в диалоге
|
||||
*}
|
||||
|
||||
{$component = 'ls-talk-message-root'}
|
||||
{component_define_params params=[ 'talk', 'mods', 'classes', 'attributes' ]}
|
||||
|
||||
|
||||
<div class="{$component} {cmods name=$component mods=$mods} {$classes}" {cattr list=$attributes}>
|
||||
{* Заголовок *}
|
||||
<h2 class="{$component}-title">
|
||||
{$talk->getTitle()}
|
||||
</h2>
|
||||
|
||||
{* Содержимое *}
|
||||
<div class="{$component}-text ls-text">
|
||||
{$talk->getText()}
|
||||
</div>
|
||||
|
||||
{* Участники личного сообщения *}
|
||||
{capture 'talk_message_root_participants'}
|
||||
{component 'talk' template='participants'
|
||||
users = $talk->getTalkUsers()
|
||||
classes = 'message-users js-message-users'
|
||||
attributes = [ 'data-param-target_id' => $talk->getId() ]
|
||||
editable = $talk->getUserId() == $oUserCurrent->getId() || $oUserCurrent->isAdministrator()
|
||||
excludeRemove = [ $oUserCurrent->getId() ]}
|
||||
{/capture}
|
||||
|
||||
{component 'details'
|
||||
classes = 'js-details-default ls-talk-participants-details'
|
||||
title = "{lang 'talk.users.title'} ({count($talk->getTalkUsers())})"
|
||||
content = $smarty.capture.talk_message_root_participants}
|
||||
|
||||
{* Информация *}
|
||||
<ul class="{$component}-info ls-clearfix">
|
||||
{* Автор *}
|
||||
<li class="{$component}-info-item {$component}-info-item--author">
|
||||
{component 'user' template='avatar' user=$talk->getUser() size='text' mods='inline'}
|
||||
</li>
|
||||
|
||||
<li class="{$component}-info-item {$component}-info-item--date">
|
||||
<time datetime="{date_format date=$talk->getDate() format='c'}" title="{date_format date=$talk->getDate() format='j F Y, H:i'}">
|
||||
{date_format date=$talk->getDate() hours_back="12" minutes_back="60" now="60" day="day H:i" format="j F Y, H:i"}
|
||||
</time>
|
||||
</li>
|
||||
|
||||
<li class="{$component}-info-item {$component}-info-item--favourite">
|
||||
{component 'favourite' classes="js-favourite-talk" target=$talk}
|
||||
</li>
|
||||
|
||||
{if $oUserCurrent->getId() == $talk->getUser()->getId() || $oUserCurrent->isAdministrator()}
|
||||
<li class="{$component}-info-item {$component}-info-item--remove">
|
||||
<a href="{$talk->getUrlDelete()}?security_ls_key={$LIVESTREET_SECURITY_KEY}" class="js-confirm-remove-default">{lang 'common.remove'}</a>
|
||||
</li>
|
||||
{/if}
|
||||
</ul>
|
||||
</div>
|
26
application/frontend/skin/synio/components/talk/talk.tpl
Normal file
26
application/frontend/skin/synio/components/talk/talk.tpl
Normal file
|
@ -0,0 +1,26 @@
|
|||
{**
|
||||
* Диалог
|
||||
*
|
||||
* @param object $talk
|
||||
* @param array $comments
|
||||
* @param array $lastCommentId
|
||||
*}
|
||||
|
||||
{component_define_params params=[ 'talk', 'comments', 'lastCommentId' ]}
|
||||
|
||||
{* Первое сообщение *}
|
||||
{component 'talk' template='message-root' talk=$talk}
|
||||
|
||||
{if $activeParticipantsCount || $comments}
|
||||
{* Вывод комментариев к сообщению *}
|
||||
{component 'comment' template='comments'
|
||||
comments = $comments
|
||||
classes = 'js-comments-talk'
|
||||
attributes = [ 'id' => 'comments' ]
|
||||
targetId = $talk->getId()
|
||||
targetType = 'talk'
|
||||
count = $talk->getCountComment()
|
||||
dateReadLast = $talk->getTalkUser()->getDateLast()
|
||||
lastCommentId = $lastCommentId
|
||||
forbidText = $aLang.talk.notices.deleted}
|
||||
{/if}
|
Loading…
Reference in a new issue