Cleaned up UI with a message when you cannot chat with anyone.
This commit is contained in:
parent
ab81ad8440
commit
dde59de62c
@ -146,6 +146,11 @@ Template.optionsBar.events
|
||||
setInSession 'display_chatPane', true
|
||||
setInSession "inChatWith", @_id
|
||||
|
||||
Template.optionsBar.helpers
|
||||
thereArePeopletoChatWith: -> # Subtract 1 for the current user. Returns whether there are other people in the chat
|
||||
# TODO: Add a check for the count to only include users who are allowed to private chat
|
||||
(Meteor.Users.find({'meetingId': getInSession("meetingId")}).count()-1) >= 1
|
||||
|
||||
Template.optionsBar.rendered = ->
|
||||
$('div[rel=tooltip]').tooltip()
|
||||
|
||||
|
@ -59,24 +59,28 @@
|
||||
<!-- Displays the list of options available -->
|
||||
<template name="optionsBar">
|
||||
<div class="optionsBar">
|
||||
<p>Select a person to chat with privately</p>
|
||||
<div class="private-chat-user-box" rel="tooltip" data-placement="top" title="Select a participant to open a private chat">
|
||||
{{#Layout template="scrollWindow" id="privateChatUserScrollWindow"}}
|
||||
{{#contentFor region="scrollContents"}}
|
||||
<table class="table table-hover">
|
||||
<tbody class="private-chat-user-list">
|
||||
{{#each getUsersInMeeting}}
|
||||
<tr class="private-chat-user-entry">
|
||||
{{#unless isCurrentUser _id}}
|
||||
{{user.name}}
|
||||
{{/unless}}
|
||||
</tr>
|
||||
{{/each}}
|
||||
</tbody>
|
||||
</table>
|
||||
{{/contentFor}}
|
||||
{{/Layout}}
|
||||
</div>
|
||||
{{#if thereArePeopletoChatWith}} <!-- There are people we can chat with, display the user list -->
|
||||
<p>Select a person to chat with privately</p>
|
||||
<div class="private-chat-user-box" rel="tooltip" data-placement="top" title="Select a participant to open a private chat">
|
||||
{{#Layout template="scrollWindow" id="privateChatUserScrollWindow"}}
|
||||
{{#contentFor region="scrollContents"}}
|
||||
<table class="table table-hover">
|
||||
<tbody class="private-chat-user-list">
|
||||
{{#each getUsersInMeeting}}
|
||||
<tr class="private-chat-user-entry">
|
||||
{{#unless isCurrentUser _id}}
|
||||
{{user.name}}
|
||||
{{/unless}}
|
||||
</tr>
|
||||
{{/each}}
|
||||
</tbody>
|
||||
</table>
|
||||
{{/contentFor}}
|
||||
{{/Layout}}
|
||||
</div>
|
||||
{{else}}
|
||||
<p>There are no participants to chat with right now.</p>
|
||||
{{/if}}
|
||||
<br/>
|
||||
{{> chatOptions}}
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user