bigbluebutton-Github/labs/meteor-client/client/views/users/user_item.html

91 lines
4.0 KiB
HTML
Executable File

<template name="userItem">
<td><span>{{user.name}}</span></td>
{{#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}}
<td>
{{#if user.handRaised}}
{{> makeButton id=user.externUserId btn_class="raiseHand btn-primary" i_class="hand-up" _id=_id isDisabled="disabled"}}
{{else}}
{{> makeButton id=user.externUserId btn_class="raiseHand btn-primary" i_class="hand-up" _id=_id}}
{{/if}}
</td>
{{> displayOwnControls}}
{{else}}
{{> displayOtherUsersControls}}
{{/if}}
{{/with}}
{{> displayStandardUserControls}}
</template>
<!-- ####################################################################################### -->
<template name="displayStandardUserControls">
<td>
{{#if user.presenter}}
{{> makeButton id=user.externUserId btn_class="setPresenter btn-primary" i_class="picture" _id=_id isDisabled="disabled" isPresenter=true}}
{{else}}
{{> makeButton id=user.externUserId btn_class="setPresenter btn-primary" i_class="picture" _id=_id isPresenter=false}}
{{/if}}
</td>
<td>{{> makeButton id=user.externUserId btn_class="kickUser btn-primary" i_class="remove-circle" _id=_id}}</td>
</template>
<!-- ####################################################################################### -->
<template name="displayOwnControls">
<!-- toggles for own user's mic and cam-->
<td>
{{#if user.sharingVideo}}
{{> makeButton id=user.externUserId btn_class="disableCam btn-primary" i_class="facetime-video" _id=_id}}
{{else}}
{{> makeButton id=user.externUserId btn_class="enableCam btn-primary" i_class="stop" _id=_id}}
{{/if}}
</td>
<td>
{{#if user.sharingAudio}}
{{> makeButton id=user.externUserId btn_class="disableMic btn-primary" i_class="bullhorn" _id=_id}}
{{else}}
{{> makeButton id=user.externUserId btn_class="enableMic btn-primary" i_class="volume-off" _id=_id}}
{{/if}}
</td>
</template>
<!-- ####################################################################################### -->
<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}}
<td>
{{#if this.user.permissions.disableCam}} <!-- if user viewing has ability to disable -->
{{#if ../../user.sharingVideo}}
{{> makeButton id=../../user.externUserId btn_class="disableCam btn-primary" i_class="facetime-video" _id=_id}}
{{else}}
{{> makeButton id=../../user.externUserId btn_class="enableCam btn-primary" i_class="stop" _id=_id}}
{{/if}}
{{else}}
{{#if ../../user.sharingVideo}}
{{> makeButton id=../../user.externUserId btn_class="disableCam btn-primary" i_class="facetime-video" _id=_id isDisabled="disabled"}}
{{else}}
{{> makeButton id=../../user.externUserId btn_class="enableCam btn-primary" i_class="stop" _id=_id isDisabled="disabled"}}
{{/if}}
{{/if}}
</td>
<td>
{{#if this.user.permissions.disableMic}} <!-- if user viewing has ability to disable -->
{{#if ../../user.sharingAudio}}
{{> makeButton id=../../user.externUserId btn_class="disableMic btn-primary" i_class="bullhorn" _id=_id}}
{{else}}
{{> makeButton id=../../user.externUserId btn_class="enableMic btn-primary" i_class="volume-off" _id=_id}}
{{/if}}
{{else}}
{{#if ../../user.sharingAudio}}
{{> makeButton id=../../user.externUserId btn_class="disableMic btn-primary" i_class="bullhorn" _id=_id isDisabled="disabled"}}
{{else}}
{{> makeButton id=../../user.externUserId btn_class="enableMic btn-primary" i_class="volume-off" _id=_id isDisabled="disabled"}}
{{/if}}
{{/if}}
</td>
{{/with}}
</template>