mirror of
https://github.com/Oreolek/ifhub.club.git
synced 2024-05-19 17:28:23 +03:00
Доработка комментариев
This commit is contained in:
parent
b1afc7acb0
commit
0a0594ee2e
|
@ -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>
|
|
@ -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> →
|
||||
<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>
|
||||
|
|
|
@ -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;
|
||||
}
|
Loading…
Reference in a new issue