Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit ffcd709

Browse files
committedApr 25, 2021
Issues-544:Tooltips
1 parent 510acfd commit ffcd709

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed
 

‎views/group/helper_functions.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,23 +45,23 @@ function watchGroupButton($group) {
4545
$hasWatched = $groupModel->hasWatchedGroup($group);
4646
$groupID = $group->GroupID;
4747
$output = '';
48-
$text = $hasWatched ? t('Stop watching the group') : t('Watch the group');
48+
$text = $hasWatched ? t('Stop watching forum') : t('Watch forum');
4949

5050
if($canWatch && !$hasWatched) {
51-
$icon = watchIcon($hasWatched, $text);
51+
$icon = '<span class="tooltiptext">'.$text.'</span>'. watchIcon($hasWatched, '');
5252
$output .= anchor(
5353
$icon,
5454
"/group/watch/{$groupID}/" . Gdn::session()->transientKey(),
55-
'Hijack watchButton' . ($hasWatched ? ' isWatching' : ''),
55+
'Hijack watchButton ' . ($hasWatched ? ' isWatching tooltip' : 'tooltip'),
5656
['title' => $text, 'aria-pressed' => $hasWatched ? 'true' : 'false', 'role' => 'button', 'tabindex' => '0']
5757
);
5858

5959
} else if($hasWatched) {
60-
$icon = watchIcon($hasWatched,$text);
60+
$icon = '<span class="tooltiptext">'.$text.'</span>'. watchIcon($hasWatched,'');
6161
$output .= anchor(
6262
$icon,
6363
"/group/unwatch/{$groupID}/" . Gdn::session()->transientKey(),
64-
'Hijack watchButton' . ($hasWatched ? ' isWatching' : ''),
64+
'Hijack watchButton ' . ($hasWatched ? ' isWatching tooltip' : 'tooltip'),
6565
['title' => $text, 'aria-pressed' => $hasWatched ? 'true' : 'false', 'role' => 'button', 'tabindex' => '0']
6666
);
6767
}

0 commit comments

Comments
 (0)
Please sign in to comment.