2014-06-07 06:19:09 +08:00
|
|
|
<template name="userItem">
|
2014-06-17 03:11:22 +08:00
|
|
|
<td><span>{{user.name}}</span></td>
|
2014-06-11 03:59:58 +08:00
|
|
|
|
2014-06-17 01:47:16 +08:00
|
|
|
{{#with getCurrentUser}} <!--We need a helper to get the current user, because the current context (this) is the user being displayed-->
|
|
|
|
<!-- Current User -->
|
|
|
|
{{#if compareUserIds this.user.userId ../user.userId}}
|
2014-06-17 03:11:22 +08:00
|
|
|
<td>
|
2014-06-17 01:47:16 +08:00
|
|
|
{{#if user.handRaised}}
|
2014-06-17 23:08:34 +08:00
|
|
|
{{> makeButton id=user.externUserId btn_class="raiseHand btn-primary" i_class="hand-up" _id=_id isDisabled="disabled"}}
|
2014-06-11 03:59:58 +08:00
|
|
|
{{else}}
|
2014-06-17 23:08:34 +08:00
|
|
|
{{> makeButton id=user.externUserId btn_class="raiseHand btn-primary" i_class="hand-up" _id=_id}}
|
2014-06-11 03:59:58 +08:00
|
|
|
{{/if}}
|
2014-06-17 03:11:22 +08:00
|
|
|
</td>
|
2014-06-17 01:47:16 +08:00
|
|
|
{{> displayOwnControls}}
|
|
|
|
{{else}}
|
|
|
|
{{> displayOtherUsersControls}}
|
|
|
|
{{/if}}
|
|
|
|
{{/with}}
|
2014-06-12 00:11:07 +08:00
|
|
|
|
2014-06-17 01:47:16 +08:00
|
|
|
{{> displayStandardUserControls}}
|
|
|
|
</template>
|
2014-06-12 00:11:07 +08:00
|
|
|
|
2014-06-17 01:47:16 +08:00
|
|
|
<!-- ####################################################################################### -->
|
|
|
|
<template name="displayStandardUserControls">
|
2014-06-17 03:11:22 +08:00
|
|
|
<td>
|
2014-06-17 01:47:16 +08:00
|
|
|
{{#if user.presenter}}
|
2014-06-17 23:47:26 +08:00
|
|
|
{{> makeButton id=user.externUserId btn_class="setPresenter btn-primary" i_class="picture" _id=_id isDisabled="disabled" isPresenter=true}}
|
2014-06-17 01:47:16 +08:00
|
|
|
{{else}}
|
2014-06-17 23:47:26 +08:00
|
|
|
{{> makeButton id=user.externUserId btn_class="setPresenter btn-primary" i_class="picture" _id=_id isPresenter=false}}
|
2014-06-17 01:47:16 +08:00
|
|
|
{{/if}}
|
2014-06-17 03:11:22 +08:00
|
|
|
</td>
|
2014-06-17 23:08:34 +08:00
|
|
|
|
|
|
|
<td>{{> makeButton id=user.externUserId btn_class="kickUser btn-primary" i_class="remove-circle" _id=_id}}</td>
|
2014-06-17 01:47:16 +08:00
|
|
|
</template>
|
|
|
|
<!-- ####################################################################################### -->
|
|
|
|
|
|
|
|
<template name="displayOwnControls">
|
|
|
|
<!-- toggles for own user's mic and cam-->
|
2014-06-17 03:11:22 +08:00
|
|
|
<td>
|
2014-06-24 00:58:30 +08:00
|
|
|
{{#if isUserSharingVideo user}}
|
2014-06-17 23:08:34 +08:00
|
|
|
{{> makeButton id=user.externUserId btn_class="disableCam btn-primary" i_class="facetime-video" _id=_id}}
|
2014-06-17 01:47:16 +08:00
|
|
|
{{else}}
|
2014-06-17 23:08:34 +08:00
|
|
|
{{> makeButton id=user.externUserId btn_class="enableCam btn-primary" i_class="stop" _id=_id}}
|
2014-06-17 01:47:16 +08:00
|
|
|
{{/if}}
|
2014-06-17 03:11:22 +08:00
|
|
|
</td>
|
|
|
|
<td>
|
2014-06-24 00:58:30 +08:00
|
|
|
{{#if isUserSharingAudio user}}
|
2014-06-17 23:08:34 +08:00
|
|
|
{{> makeButton id=user.externUserId btn_class="disableMic btn-primary" i_class="bullhorn" _id=_id}}
|
2014-06-17 01:47:16 +08:00
|
|
|
{{else}}
|
2014-06-17 23:08:34 +08:00
|
|
|
{{> makeButton id=user.externUserId btn_class="enableMic btn-primary" i_class="volume-off" _id=_id}}
|
2014-06-17 01:47:16 +08:00
|
|
|
{{/if}}
|
2014-06-17 23:08:34 +08:00
|
|
|
</td>
|
2014-06-17 01:47:16 +08:00
|
|
|
</template>
|
2014-06-11 03:59:58 +08:00
|
|
|
|
2014-06-17 01:47:16 +08:00
|
|
|
<!-- ####################################################################################### -->
|
|
|
|
<template name="displayOtherUsersControls">
|
|
|
|
<!-- toggles for another user's mic and cam-->
|
|
|
|
<!-- if the current user is a mod, display all buttons with the id of the user being displayed -->
|
|
|
|
{{#with getCurrentUser}}
|
2014-06-17 03:11:22 +08:00
|
|
|
<td>
|
2014-06-17 23:08:34 +08:00
|
|
|
{{#if this.user.permissions.disableCam}} <!-- if user viewing has ability to disable -->
|
2014-06-24 00:58:30 +08:00
|
|
|
{{#if isUserSharingVideo ../../user}}
|
2014-06-17 23:47:26 +08:00
|
|
|
{{> makeButton id=../../user.externUserId btn_class="disableCam btn-primary" i_class="facetime-video" _id=_id}}
|
2014-06-17 01:47:16 +08:00
|
|
|
{{else}}
|
2014-06-17 23:47:26 +08:00
|
|
|
{{> makeButton id=../../user.externUserId btn_class="enableCam btn-primary" i_class="stop" _id=_id}}
|
2014-06-17 01:47:16 +08:00
|
|
|
{{/if}}
|
|
|
|
{{else}}
|
2014-06-24 00:58:30 +08:00
|
|
|
{{#if isUserSharingVideo ../../user}}
|
2014-06-17 23:47:26 +08:00
|
|
|
{{> makeButton id=../../user.externUserId btn_class="disableCam btn-primary" i_class="facetime-video" _id=_id isDisabled="disabled"}}
|
2014-06-17 01:47:16 +08:00
|
|
|
{{else}}
|
2014-06-17 23:47:26 +08:00
|
|
|
{{> makeButton id=../../user.externUserId btn_class="enableCam btn-primary" i_class="stop" _id=_id isDisabled="disabled"}}
|
2014-06-17 01:47:16 +08:00
|
|
|
{{/if}}
|
|
|
|
{{/if}}
|
2014-06-17 03:11:22 +08:00
|
|
|
</td>
|
|
|
|
<td>
|
2014-06-17 23:08:34 +08:00
|
|
|
{{#if this.user.permissions.disableMic}} <!-- if user viewing has ability to disable -->
|
2014-06-24 00:58:30 +08:00
|
|
|
{{#if isUserSharingAudio ../../user}}
|
2014-06-17 23:47:26 +08:00
|
|
|
{{> makeButton id=../../user.externUserId btn_class="disableMic btn-primary" i_class="bullhorn" _id=_id}}
|
2014-06-17 01:47:16 +08:00
|
|
|
{{else}}
|
2014-06-17 23:47:26 +08:00
|
|
|
{{> makeButton id=../../user.externUserId btn_class="enableMic btn-primary" i_class="volume-off" _id=_id}}
|
2014-06-17 01:47:16 +08:00
|
|
|
{{/if}}
|
|
|
|
{{else}}
|
2014-06-24 00:58:30 +08:00
|
|
|
{{#if isUserSharingAudio ../../user}}
|
2014-06-17 23:47:26 +08:00
|
|
|
{{> makeButton id=../../user.externUserId btn_class="disableMic btn-primary" i_class="bullhorn" _id=_id isDisabled="disabled"}}
|
2014-06-17 01:47:16 +08:00
|
|
|
{{else}}
|
2014-06-17 23:47:26 +08:00
|
|
|
{{> makeButton id=../../user.externUserId btn_class="enableMic btn-primary" i_class="volume-off" _id=_id isDisabled="disabled"}}
|
2014-06-17 01:47:16 +08:00
|
|
|
{{/if}}
|
|
|
|
{{/if}}
|
2014-06-17 03:11:22 +08:00
|
|
|
</td>
|
2014-06-17 01:47:16 +08:00
|
|
|
{{/with}}
|
2014-06-23 21:21:03 +08:00
|
|
|
</template>
|