1
0
Fork 0
mirror of https://github.com/Oreolek/ifhub-skin.git synced 2024-06-26 03:50:46 +03:00

Починка #4: прямая ссылка на комментарии

This commit is contained in:
Alexander Yakovlev 2017-01-11 16:53:59 +07:00
parent 0cc50e1ac8
commit 39aa200def
3 changed files with 51 additions and 0 deletions

View 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> &rarr;
<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()
]}

View 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}

View file

@ -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;