From d822dff1bcfb2dcdefda1b301c8c2e079ed4378d Mon Sep 17 00:00:00 2001 From: Chiffa Date: Mon, 13 Mar 2017 04:11:41 +0500 Subject: [PATCH] activity block text tooltip --- .../components/activity/blocks/recent-comments.tpl | 7 ++++++- .../frontend/components/activity/blocks/recent-item.tpl | 3 ++- .../frontend/components/activity/blocks/recent-topics.tpl | 6 +++++- .../synio/components/activity/blocks/recent-comments.tpl | 7 ++++++- .../skin/synio/components/activity/blocks/recent-item.tpl | 4 ++-- .../synio/components/activity/blocks/recent-topics.tpl | 6 +++++- 6 files changed, 26 insertions(+), 7 deletions(-) diff --git a/application/frontend/components/activity/blocks/recent-comments.tpl b/application/frontend/components/activity/blocks/recent-comments.tpl index dd1ea462..a21deaa8 100644 --- a/application/frontend/components/activity/blocks/recent-comments.tpl +++ b/application/frontend/components/activity/blocks/recent-comments.tpl @@ -11,8 +11,13 @@ {component 'activity' template='recent-item' user = $comment->getUser() + comment = $comment topic = $topic - date = $comment->getDate()} + date = $comment->getDate() + classes = 'js-title-comment' + attributes = [ + title => {$comment->getText()|strip_tags|trim|truncate:100:'...'|escape} + ]} {foreachelse} {component 'blankslate' text={lang 'common.empty'} mods='no-background'} {/foreach} diff --git a/application/frontend/components/activity/blocks/recent-item.tpl b/application/frontend/components/activity/blocks/recent-item.tpl index 1a173406..0980b5dc 100644 --- a/application/frontend/components/activity/blocks/recent-item.tpl +++ b/application/frontend/components/activity/blocks/recent-item.tpl @@ -23,4 +23,5 @@ image=[ 'path' => $user->getProfileAvatarPath(48), 'url' => $user->getUserWebPath() - ]} \ No newline at end of file + ] + params=$params} \ No newline at end of file diff --git a/application/frontend/components/activity/blocks/recent-topics.tpl b/application/frontend/components/activity/blocks/recent-topics.tpl index 765c7c28..c84b1215 100644 --- a/application/frontend/components/activity/blocks/recent-topics.tpl +++ b/application/frontend/components/activity/blocks/recent-topics.tpl @@ -10,7 +10,11 @@ {component 'activity' template='recent-item' user = $topic->getUser() topic = $topic - date = $topic->getDatePublish()} + date = $topic->getDatePublish() + classes = 'js-title-topic' + attributes = [ + title => {$topic->getText()|strip_tags|trim|truncate:150:'...'|escape} + ]} {foreachelse} {component 'blankslate' text={lang 'common.empty'} mods='no-background'} {/foreach} diff --git a/application/frontend/skin/synio/components/activity/blocks/recent-comments.tpl b/application/frontend/skin/synio/components/activity/blocks/recent-comments.tpl index 1cdef46f..541a65da 100644 --- a/application/frontend/skin/synio/components/activity/blocks/recent-comments.tpl +++ b/application/frontend/skin/synio/components/activity/blocks/recent-comments.tpl @@ -11,8 +11,13 @@ {component 'activity' template='recent-item' user = $comment->getUser() + comment = $comment topic = $topic - date = $comment->getDate()} + date = $comment->getDate() + classes = 'js-title-comment' + attributes = [ + title => {$comment->getText()|strip_tags|trim|truncate:100:'...'|escape} + ]} {foreachelse} {component 'blankslate' text={lang 'common.empty'} mods='no-background'} {/foreach} diff --git a/application/frontend/skin/synio/components/activity/blocks/recent-item.tpl b/application/frontend/skin/synio/components/activity/blocks/recent-item.tpl index fe08c549..fad9a1ea 100644 --- a/application/frontend/skin/synio/components/activity/blocks/recent-item.tpl +++ b/application/frontend/skin/synio/components/activity/blocks/recent-item.tpl @@ -1,6 +1,6 @@ -{component_define_params params=[ 'user', 'topic', 'date' ]} +{component_define_params params=[ 'user', 'topic', 'date', 'classes', 'attributes' ]} -
+
{$user->getDisplayName()}