mirror of
https://github.com/Oreolek/ifhub-skin.git
synced 2024-06-28 21:04:59 +03:00
Починка #4: прямая ссылка на комментарии
This commit is contained in:
parent
0cc50e1ac8
commit
39aa200def
26
components/activity/blocks/recent-comment.tpl
Normal file
26
components/activity/blocks/recent-comment.tpl
Normal file
|
@ -0,0 +1,26 @@
|
|||
{component_define_params params=[ 'user', 'topic', 'date', 'commentN' ]}
|
||||
|
||||
{capture 'item_content'}
|
||||
<a href="{$user->getUserWebPath()}" class="ls-activity-block-recent-user">{$user->getDisplayName()}</a> →
|
||||
<a href="{$topic->getUrl()}#comment{$commentN}">{$topic->getTitle()|escape}</a>
|
||||
|
||||
<p class="ls-activity-block-recent-info">
|
||||
<time datetime="{date_format date=$date format='c'}" class="ls-activity-block-recent-time">
|
||||
{date_format date=$date hours_back="12" minutes_back="60" now="60" day="day H:i" format="j F Y"}
|
||||
</time>
|
||||
|
||||
<a href="{$topic->getUrl()}#comments" class="ls-activity-block-recent-comments">
|
||||
{component 'icon' icon='comments'}
|
||||
{lang 'comments.comments_declension' count=$topic->getCountComment() plural=true}
|
||||
</a>
|
||||
</p>
|
||||
{/capture}
|
||||
|
||||
{component 'item'
|
||||
element = 'li'
|
||||
mods = 'image-rounded'
|
||||
desc = $smarty.capture.item_content
|
||||
image=[
|
||||
'path' => $user->getProfileAvatarPath(48),
|
||||
'url' => $user->getUserWebPath()
|
||||
]}
|
22
components/activity/blocks/recent-comments.tpl
Normal file
22
components/activity/blocks/recent-comments.tpl
Normal file
|
@ -0,0 +1,22 @@
|
|||
{**
|
||||
* Последняя активность
|
||||
* Топики отсортированные по времени последнего комментария
|
||||
*}
|
||||
|
||||
{component_define_params params=[ 'comments' ]}
|
||||
|
||||
{capture 'items'}
|
||||
{foreach $comments as $comment}
|
||||
{$topic = $comment->getTarget()}
|
||||
|
||||
{component 'activity' template='blocks/recent-comment'
|
||||
user = $comment->getUser()
|
||||
topic = $topic
|
||||
commentN = $comment->getID()
|
||||
date = $comment->getDate()}
|
||||
{foreachelse}
|
||||
{component 'blankslate' text={lang 'common.empty'} mods='no-background'}
|
||||
{/foreach}
|
||||
{/capture}
|
||||
|
||||
{component 'item' template='group' items=$smarty.capture.items}
|
|
@ -32,4 +32,7 @@ $config['head']['template']['css'] = array(
|
|||
"___path.skin.assets.web___/css/print.css"
|
||||
);
|
||||
|
||||
$config['view']['seo']['topic_heading'] = 'h1';
|
||||
$config['view']['seo']['topic_heading_list'] = 'h2';
|
||||
|
||||
return $config;
|
||||
|
|
Loading…
Reference in a new issue