mirror of
https://github.com/Oreolek/ifhub.club.git
synced 2024-06-30 21:45:01 +03:00
Доработка личных сообщений
This commit is contained in:
parent
4a0a5c88e1
commit
40abb7aa97
|
@ -5,6 +5,6 @@
|
|||
{extends file='layouts/layout.user.messages.tpl'}
|
||||
|
||||
{block name='layout_content'}
|
||||
{include file='actions/ActionTalk/message_list.tpl'}
|
||||
{include file='./message_list.tpl'}
|
||||
{include file='pagination.tpl' aPaging=$aPaging}
|
||||
{/block}
|
|
@ -10,9 +10,9 @@
|
|||
|
||||
{block name='layout_content'}
|
||||
{if $aTalks}
|
||||
{include 'actions/ActionTalk/search.tpl'}
|
||||
{include './search.tpl'}
|
||||
{/if}
|
||||
|
||||
{include file='actions/ActionTalk/message_list.tpl' bMessageListCheckboxes=true}
|
||||
|
||||
{include file='./message_list.tpl' bMessageListCheckboxes=true}
|
||||
{include file='pagination.tpl' aPaging=$aPaging}
|
||||
{/block}
|
|
@ -6,17 +6,15 @@
|
|||
|
||||
{block name='layout_content'}
|
||||
{* Сообщение *}
|
||||
{include 'actions/ActionTalk/message_entry.tpl'}
|
||||
{include './message_entry.tpl'}
|
||||
|
||||
{* Вывод комментариев к сообщению *}
|
||||
{$oTalkUser = $oTalk->getTalkUser()}
|
||||
|
||||
{if ! $bNoComments}
|
||||
{include 'comments/comment_tree.tpl'
|
||||
iTargetId = $oTalk->getId()
|
||||
sTargetType = 'talk'
|
||||
iCountComment = $oTalk->getCountComment()
|
||||
sDateReadLast = $oTalkUser->getDateLast()
|
||||
sDateReadLast = $oTalk->getTalkUser()->getDateLast()
|
||||
sNoticeCommentAdd = $aLang.topic_comment_add
|
||||
bNoCommentFavourites = true}
|
||||
{else}
|
||||
|
|
|
@ -4,77 +4,100 @@
|
|||
|
||||
{if $aTalks}
|
||||
{* Экшнбар *}
|
||||
{include 'actionbar.item.select.tpl' sName='asdfsdf' sItemSelector='.js-message-list-item' assign=sMessagesSelect aItems=[
|
||||
[ 'text' => 'Прочитанные', 'filter' => ":not('.message-unread')" ],
|
||||
[ 'text' => 'Не прочитанные', 'filter' => ".message-unread" ]
|
||||
]}
|
||||
|
||||
{include 'actionbar.tpl' aActionbarItems=[
|
||||
[ 'html' => $sMessagesSelect ],
|
||||
[ 'icon' => 'icon-ok', 'classes' => 'js-temp', 'text' => $aLang.talk_inbox_make_read ],
|
||||
[ 'icon' => 'icon-remove', 'classes' => 'js-temp', 'text' => $aLang.talk_inbox_delete ]
|
||||
[ 'icon' => 'icon-remove', 'classes' => 'js-temp', 'text' => $aLang.common.remove ]
|
||||
]}
|
||||
|
||||
{* Список сообщений *}
|
||||
<table class="table table-talk">
|
||||
<thead>
|
||||
<tr>
|
||||
{if $bMessageListCheckboxes}
|
||||
<th class="cell-checkbox"><input type="checkbox" name="" class="input-checkbox" onclick="ls.tools.checkAll('form_talks_checkbox', this, true);"></th>
|
||||
{/if}
|
||||
<th class="cell-favourite"></th>
|
||||
<th class="cell-recipients">{$aLang.talk_inbox_target}</th>
|
||||
<th class="cell-title">{$aLang.talk_inbox_title}</th>
|
||||
<th class="cell-date ta-r">{$aLang.talk_inbox_date}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<table class="table table-talk message-list">
|
||||
<tbody>
|
||||
{foreach $aTalks as $oTalk}
|
||||
{$oTalkUserAuthor = $oTalk->getTalkUser()}
|
||||
{* Создатель диалога *}
|
||||
{$oAuthor = $oTalk->getTalkUser()}
|
||||
|
||||
<tr>
|
||||
{if $bMessageListCheckboxes}
|
||||
<td class="cell-checkbox"><input type="checkbox" name="talk_select[{$oTalk->getId()}]" class="form_talks_checkbox input-checkbox" /></td>
|
||||
{/if}
|
||||
{* Все участники диалога *}
|
||||
{$aUsers = $oTalk->getTalkUsers()}
|
||||
|
||||
{* Кол-во участников диалога *}
|
||||
{$iUsersCount = count($aUsers)}
|
||||
|
||||
<tr class="message-list-item {if $oAuthor->getCommentCountNew() or ! $oAuthor->getDateLast()}message-unread{/if} js-message-list-item" data-id="{$oTalk->getId()}">
|
||||
{* Выделение *}
|
||||
<td class="cell-checkbox">
|
||||
<input type="checkbox" name="talk_select[{$oTalk->getId()}]" data-id="{$oTalk->getId()}" />
|
||||
</td>
|
||||
|
||||
{* Избранное *}
|
||||
<td class="cell-favourite">
|
||||
{include 'favourite.tpl' sFavouriteType='talk' oFavouriteObject=$oTalk}
|
||||
</td>
|
||||
<td>
|
||||
{strip}
|
||||
{$aTalkUserOther = []}
|
||||
|
||||
{foreach $oTalk->getTalkUsers() as $oTalkUser}
|
||||
{if $oTalkUser->getUserId() != $oUserCurrent->getId()}
|
||||
{$aTalkUserOther[] = $oTalkUser}
|
||||
{/if}
|
||||
{/foreach}
|
||||
{* Основная информация о диалоге *}
|
||||
<td width=200>
|
||||
<div class="message-list-info">
|
||||
{* Участники диалога *}
|
||||
{if $iUsersCount > 2}
|
||||
<a href="{router page='talk'}read/{$oTalk->getId()}/" class="message-list-info-avatar">
|
||||
<img src="{cfg name="path.skin.web"}/assets/images/avatars/avatar_male_64x64.png" />
|
||||
</a>
|
||||
|
||||
{foreach $aTalkUserOther as $oTalkUser}
|
||||
{$oUser = $oTalkUser->getUser()}
|
||||
|
||||
{if ! $oTalkUser@first}, {/if}<a href="{$oUser->getUserWebPath()}" class="user {if $oTalkUser->getUserActive()!=$TALK_USER_ACTIVE}inactive{/if}" {if $oTalkUser->getUserActive()!=$TALK_USER_ACTIVE}title="{$aLang.talk_speaker_not_found}"{/if}>{$oUser->getDisplayName()}</a>
|
||||
{/foreach}
|
||||
{/strip}
|
||||
</td>
|
||||
<td>
|
||||
<h2>
|
||||
<a href="{router page='talk'}read/{$oTalk->getId()}/">
|
||||
{if $oTalkUserAuthor->getCommentCountNew() or ! $oTalkUserAuthor->getDateLast()}
|
||||
<strong>{$oTalk->getTitle()|escape:'html'}</strong>
|
||||
{else}
|
||||
{$oTalk->getTitle()|escape:'html'}
|
||||
{/if}
|
||||
</a>
|
||||
|
||||
{if $oTalk->getCountComment()}
|
||||
({$oTalk->getCountComment()}{if $oTalkUserAuthor->getCommentCountNew()} +{$oTalkUserAuthor->getCommentCountNew()}{/if})
|
||||
{/if}
|
||||
|
||||
{if $oUserCurrent->getId()==$oTalk->getUserIdLast()}
|
||||
→
|
||||
{$iUsersCount} участника
|
||||
{else}
|
||||
←
|
||||
{/if}
|
||||
</h2>
|
||||
{* Если участников двое, то отображаем только собеседника *}
|
||||
{foreach $aUsers as $oUser}
|
||||
{$oUser = $oUser->getUser()}
|
||||
|
||||
{$oTalk->getText()|strip_tags|truncate:120:"..."|escape}
|
||||
{if $oUser->getUserId() != $oUserCurrent->getId()}
|
||||
<a href="{$oUser->getUserWebPath()}" class="message-list-info-avatar">
|
||||
<img src="{$oUser->getProfileAvatarPath(64)}" alt="{$oUser->getLogin()}" />
|
||||
</a>
|
||||
|
||||
<a href="{$oUser->getUserWebPath()}">{$oUser->getDisplayName()}</a>
|
||||
{/if}
|
||||
{/foreach}
|
||||
{/if}
|
||||
|
||||
{* Дата *}
|
||||
<time class="message-list-info-date" datetime="{date_format date=$oTalk->getDate() format='c'}" title="{date_format date=$oTalk->getDate() format='j F Y, H:i'}">
|
||||
{date_format date=$oTalk->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="message-list-item-extra">
|
||||
{* Заголовок *}
|
||||
<h2 class="message-list-item-title">
|
||||
<a href="{router page='talk'}read/{$oTalk->getId()}/">
|
||||
{$oTalk->getTitle()|escape:'html'}
|
||||
</a>
|
||||
</h2>
|
||||
|
||||
{* Текст последнего сообщения *}
|
||||
<div class="message-list-item-text">
|
||||
{$oTalk->getText()|strip_tags|truncate:120:"..."|escape}
|
||||
</div>
|
||||
|
||||
{* Кол-во сообщений *}
|
||||
{if $oTalk->getCountComment()}
|
||||
<div class="message-list-item-count">
|
||||
{$oTalk->getCountComment()}
|
||||
|
||||
{if $oAuthor->getCommentCountNew()}
|
||||
<strong>+{$oAuthor->getCommentCountNew()}</strong>
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
</td>
|
||||
<td class="cell-date ta-r">{date_format date=$oTalk->getDate() format="j F Y, H:i"}</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* @template actions/ActionTalk/message.tpl
|
||||
* @scripts <frontend>/common/js/talk.js
|
||||
*
|
||||
*
|
||||
* @license GNU General Public License, version 2
|
||||
* @copyright 2013 OOO "ЛС-СОФТ" {@link http://livestreetcms.com}
|
||||
* @author Denis Shakhov <denis.shakhov@gmail.com>
|
||||
|
@ -11,4 +11,41 @@
|
|||
|
||||
.topic-type-talk { background: #fafafa; padding: 20px; margin-bottom: 0; }
|
||||
|
||||
.message-user-list { background: #fafafa; padding: 20px; border-top: 1px solid #eee; }
|
||||
/**
|
||||
* Message user list
|
||||
*/
|
||||
.message-users .user-list-small-item.inactive { opacity: .5; cursor: help; }
|
||||
.message-users .user-list-small-item.inactive .icon-minus { display: none; }
|
||||
.message-users .user-list-small-item .icon-plus { display: none; }
|
||||
.message-users .user-list-small-item.inactive .icon-plus { display: inline-block; }
|
||||
|
||||
/**
|
||||
* Message list
|
||||
*/
|
||||
.table.message-list td { vertical-align: top; }
|
||||
.table .message-list-item:first-child td { border-top: 1px solid #f1f1f1; }
|
||||
|
||||
.message-list-item { background: #fff; }
|
||||
.message-list-item.message-unread { background: #f7f7f7; }
|
||||
.message-list-item.selected { background: #FFC; }
|
||||
|
||||
.message-list-info { position: relative; padding-left: 75px; min-height: 64px; }
|
||||
.message-list-info-avatar { position: absolute; top: 0; left: 0; }
|
||||
.message-list-info-date { display: block; font-size: 11px; color: #aaa; }
|
||||
|
||||
.message-list-item-extra { position: relative; padding-right: 50px; }
|
||||
.message-list-item-title { font-size: 15px; margin-bottom: 5px; }
|
||||
.message-list-item-text { color: #999; }
|
||||
.message-list-item-count {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
background: #f0f0f0;
|
||||
color: #aaa;
|
||||
padding: 3px 7px;
|
||||
border-radius: 3px;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
.message-list-item.message-unread .message-list-item-count { background: #2891D3; color: #ADDBF8; }
|
||||
.message-list-item.message-unread .message-list-item-count strong { color: #fff; }
|
|
@ -22,15 +22,4 @@
|
|||
*/
|
||||
.table.table-profile-info { margin-bottom: 40px; }
|
||||
.table.table-profile-info td { vertical-align: top; }
|
||||
.table.table-profile-info .cell-label { width: 30%; color: #777; }
|
||||
|
||||
|
||||
/**
|
||||
* Список сообщений
|
||||
*/
|
||||
.table.table-talk .cell-checkbox { width: 20px; padding: 12px 0 10px 10px; }
|
||||
.table.table-talk thead .cell-checkbox { padding: 10px 0 10px 10px; }
|
||||
.table.table-talk .cell-favourite { width: 20px; padding: 10px 0; text-align: center; }
|
||||
.table.table-talk .cell-recipients { width: 100px; }
|
||||
.table.table-talk tbody .cell-date { font-size: 11px; width: 130px; }
|
||||
.table.table-talk tbody td { vertical-align: top; }
|
||||
.table.table-profile-info .cell-label { width: 30%; color: #777; }
|
Loading…
Reference in a new issue