mirror of
https://github.com/wbbaddons/Tims-Chat.git
synced 2024-12-22 21:40:08 +00:00
Add class 'mod' to user if he's got moderative permissions in the room
This commit is contained in:
parent
c36b38b12e
commit
850bfacfbb
@ -720,6 +720,11 @@ Move the user to the new position if he was found in the old list.
|
|||||||
else
|
else
|
||||||
element.removeClass 'suspended'
|
element.removeClass 'suspended'
|
||||||
|
|
||||||
|
if user.mod
|
||||||
|
element.addClass 'mod'
|
||||||
|
else
|
||||||
|
element.removeClass 'mod'
|
||||||
|
|
||||||
$('#timsChatUserList > ul').append element
|
$('#timsChatUserList > ul').append element
|
||||||
|
|
||||||
Build HTML of the user and insert it into the list, if the users was not found in the chat before.
|
Build HTML of the user and insert it into the list, if the users was not found in the chat before.
|
||||||
@ -732,6 +737,7 @@ Build HTML of the user and insert it into the list, if the users was not found i
|
|||||||
li.addClass 'jsTooltip'
|
li.addClass 'jsTooltip'
|
||||||
li.addClass 'you' if user.userID is WCF.User.userID
|
li.addClass 'you' if user.userID is WCF.User.userID
|
||||||
li.addClass 'suspended' if user.suspended
|
li.addClass 'suspended' if user.suspended
|
||||||
|
li.addClass 'mod' if user.mod
|
||||||
if user.awayStatus?
|
if user.awayStatus?
|
||||||
li.addClass 'away'
|
li.addClass 'away'
|
||||||
li.attr 'title', user.awayStatus
|
li.attr 'title', user.awayStatus
|
||||||
|
@ -122,6 +122,7 @@ public function show() {
|
|||||||
'username' => $user->username,
|
'username' => $user->username,
|
||||||
'awayStatus' => $user->chatAway,
|
'awayStatus' => $user->chatAway,
|
||||||
'suspended' => (boolean) !$this->room->canWrite($user->getDecoratedObject()),
|
'suspended' => (boolean) !$this->room->canWrite($user->getDecoratedObject()),
|
||||||
|
'mod' => $this->room->canBan($user->getDecoratedObject()) || $this->room->canMute($user->getDecoratedObject()),
|
||||||
'avatar' => array(
|
'avatar' => array(
|
||||||
16 => $user->getAvatar()->getImageTag(16),
|
16 => $user->getAvatar()->getImageTag(16),
|
||||||
24 => $user->getAvatar()->getImageTag(24),
|
24 => $user->getAvatar()->getImageTag(24),
|
||||||
|
Loading…
Reference in New Issue
Block a user