1
0
Fork 0
mirror of https://github.com/Oreolek/ifhub.club.git synced 2024-05-19 17:28:23 +03:00

Доработка комментариев

This commit is contained in:
Denis Shakhov 2015-10-23 23:15:33 +07:00
parent b1afc7acb0
commit 0a0594ee2e
3 changed files with 31 additions and 12 deletions

View file

@ -2,8 +2,6 @@
* Список комментариев
*
* @param array comments Комментарии
*
* TODO: Добавить путь до комментария
*}
{$component = 'ls-comment-list'}
@ -17,6 +15,7 @@
useFavourite => true,
useEdit => false,
useVote => false,
useScroll => false
useScroll => false,
showPath => true
]}
</div>

View file

@ -72,6 +72,19 @@
{* @hook Начало комментария *}
{hook run='comment_comment_begin' params=$smarty.local.params}
{* Путь до комментария *}
{* TODO: Вынести в компонент topic, сделать универсальным *}
{if $smarty.local.showPath}
<div class="{$component}-path">
{$topic = $comment->getTarget()}
{$blog = $topic->getBlog()}
<a href="{$blog->getUrlFull()}" class="{$component}-path-blog">{$blog->getTitle()|escape}</a> &rarr;
<a href="{$topic->getUrl()}" class="{$component}-path-topic">{$topic->getTitle()|escape}</a>
<a href="{$topic->getUrl()}#comments" class="{$component}-path-comments">({$topic->getCountComment()})</a>
</div>
{/if}
{* Показываем удаленные комментарии только администраторам *}
{if ! $isDeleted || ( $oUserCurrent && $oUserCurrent->isAdministrator() )}
{* Аватар пользователя *}
@ -79,6 +92,11 @@
<img src="{$user->getProfileAvatarPath(64)}" alt="{$user->getDisplayName()}" />
</a>
{* Избранное *}
{if $oUserCurrent && $smarty.local.useFavourite}
{component 'favourite' classes="{$component}-favourite js-comment-favourite" target=$comment}
{/if}
{* Информация *}
<ul class="{$component}-info clearfix">
{* @hook Начало блока с информацией *}
@ -124,13 +142,6 @@
</li>
{/if}
{* Избранное *}
{if $oUserCurrent && $smarty.local.useFavourite}
<li>
{component 'favourite' classes="{$component}-favourite js-comment-favourite" target=$comment}
</li>
{/if}
{* @hook Конец блока с информацией *}
{hook run='comment_info_end' params=$smarty.local.params}
</ul>

View file

@ -94,8 +94,8 @@
display: none;
position: absolute;
width: 50px;
top: 65px;
left: -65px;
top: 80px;
left: 15px;
text-align: center;
}
@ -153,4 +153,13 @@
margin-top: 10px;
font-size: 11px;
opacity: .5;
}
/* Путь до комментария */
.ls-comment-path {
background: #fff;
color: #aaa;
border-radius: 3px;
padding: 3px 5px 2px;
margin-bottom: 10px;
}