diff --git a/application/frontend/skin/developer/actions/ActionTalk/favourites.tpl b/application/frontend/skin/developer/actions/ActionTalk/favourites.tpl index d937d9d2..5a3afa13 100644 --- a/application/frontend/skin/developer/actions/ActionTalk/favourites.tpl +++ b/application/frontend/skin/developer/actions/ActionTalk/favourites.tpl @@ -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} \ No newline at end of file diff --git a/application/frontend/skin/developer/actions/ActionTalk/inbox.tpl b/application/frontend/skin/developer/actions/ActionTalk/inbox.tpl index 8aed27b0..a042a28c 100644 --- a/application/frontend/skin/developer/actions/ActionTalk/inbox.tpl +++ b/application/frontend/skin/developer/actions/ActionTalk/inbox.tpl @@ -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} \ No newline at end of file diff --git a/application/frontend/skin/developer/actions/ActionTalk/message.tpl b/application/frontend/skin/developer/actions/ActionTalk/message.tpl index 892b3fba..4c3cfb7f 100644 --- a/application/frontend/skin/developer/actions/ActionTalk/message.tpl +++ b/application/frontend/skin/developer/actions/ActionTalk/message.tpl @@ -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} diff --git a/application/frontend/skin/developer/actions/ActionTalk/message_list.tpl b/application/frontend/skin/developer/actions/ActionTalk/message_list.tpl index a3ef9167..f3281db1 100644 --- a/application/frontend/skin/developer/actions/ActionTalk/message_list.tpl +++ b/application/frontend/skin/developer/actions/ActionTalk/message_list.tpl @@ -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 ] ]} {* Список сообщений *} - - - - {if $bMessageListCheckboxes} - - {/if} - - - - - - - +
{$aLang.talk_inbox_target}{$aLang.talk_inbox_title}{$aLang.talk_inbox_date}
{foreach $aTalks as $oTalk} - {$oTalkUserAuthor = $oTalk->getTalkUser()} + {* Создатель диалога *} + {$oAuthor = $oTalk->getTalkUser()} - - {if $bMessageListCheckboxes} - - {/if} + {* Все участники диалога *} + {$aUsers = $oTalk->getTalkUsers()} + + {* Кол-во участников диалога *} + {$iUsersCount = count($aUsers)} + + + {* Выделение *} + + + {* Избранное *} - - + + {* Заголовок и текст последнего сообщения *} + - {/foreach} diff --git a/application/frontend/skin/developer/assets/css/messages.css b/application/frontend/skin/developer/assets/css/messages.css index dd4484ae..58431971 100644 --- a/application/frontend/skin/developer/assets/css/messages.css +++ b/application/frontend/skin/developer/assets/css/messages.css @@ -3,7 +3,7 @@ * * @template actions/ActionTalk/message.tpl * @scripts /common/js/talk.js - * + * * @license GNU General Public License, version 2 * @copyright 2013 OOO "ЛС-СОФТ" {@link http://livestreetcms.com} * @author Denis Shakhov @@ -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; } \ No newline at end of file +/** + * 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; } \ No newline at end of file diff --git a/application/frontend/skin/developer/assets/css/tables.css b/application/frontend/skin/developer/assets/css/tables.css index 082fbf49..23392ee6 100644 --- a/application/frontend/skin/developer/assets/css/tables.css +++ b/application/frontend/skin/developer/assets/css/tables.css @@ -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; } \ No newline at end of file +.table.table-profile-info .cell-label { width: 30%; color: #777; } \ No newline at end of file
+ + {include 'favourite.tpl' sFavouriteType='talk' oFavouriteObject=$oTalk} - {strip} - {$aTalkUserOther = []} - {foreach $oTalk->getTalkUsers() as $oTalkUser} - {if $oTalkUser->getUserId() != $oUserCurrent->getId()} - {$aTalkUserOther[] = $oTalkUser} - {/if} - {/foreach} + {* Основная информация о диалоге *} + +
+ {* Участники диалога *} + {if $iUsersCount > 2} + + + - {foreach $aTalkUserOther as $oTalkUser} - {$oUser = $oTalkUser->getUser()} - - {if ! $oTalkUser@first}, {/if}getUserActive()!=$TALK_USER_ACTIVE}title="{$aLang.talk_speaker_not_found}"{/if}>{$oUser->getDisplayName()} - {/foreach} - {/strip} -
-

- - {if $oTalkUserAuthor->getCommentCountNew() or ! $oTalkUserAuthor->getDateLast()} - {$oTalk->getTitle()|escape:'html'} - {else} - {$oTalk->getTitle()|escape:'html'} - {/if} - - - {if $oTalk->getCountComment()} - ({$oTalk->getCountComment()}{if $oTalkUserAuthor->getCommentCountNew()} +{$oTalkUserAuthor->getCommentCountNew()}{/if}) - {/if} - - {if $oUserCurrent->getId()==$oTalk->getUserIdLast()} - → + {$iUsersCount} участника {else} - ← - {/if} -

+ {* Если участников двое, то отображаем только собеседника *} + {foreach $aUsers as $oUser} + {$oUser = $oUser->getUser()} - {$oTalk->getText()|strip_tags|truncate:120:"..."|escape} + {if $oUser->getUserId() != $oUserCurrent->getId()} + + {$oUser->getLogin()} + + + {$oUser->getDisplayName()} + {/if} + {/foreach} + {/if} + + {* Дата *} + + +
+
+ {* Заголовок *} +

+ + {$oTalk->getTitle()|escape:'html'} + +

+ + {* Текст последнего сообщения *} +
+ {$oTalk->getText()|strip_tags|truncate:120:"..."|escape} +
+ + {* Кол-во сообщений *} + {if $oTalk->getCountComment()} +
+ {$oTalk->getCountComment()} + + {if $oAuthor->getCommentCountNew()} + +{$oAuthor->getCommentCountNew()} + {/if} +
+ {/if} +
{date_format date=$oTalk->getDate() format="j F Y, H:i"}