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

92 lines
4.1 KiB
HTML
Raw Normal View History

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>
{{#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>
{{#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"}}
{{else}}
2014-06-17 23:08:34 +08:00
{{> makeButton id=user.externUserId btn_class="raiseHand btn-primary" i_class="hand-up" _id=_id}}
{{/if}}
2014-06-17 03:11:22 +08:00
</td>
{{> displayOwnControls}}
{{else}}
{{> displayOtherUsersControls}}
{{/if}}
{{/with}}
{{> displayStandardUserControls}}
</template>
<!-- ####################################################################################### -->
<template name="displayStandardUserControls">
2014-06-17 03:11:22 +08:00
<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}}
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>
</template>
<!-- ####################################################################################### -->
<template name="displayOwnControls">
<!-- toggles for own user's mic and cam-->
2014-06-17 03:11:22 +08:00
<td>
{{#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}}
{{else}}
2014-06-17 23:08:34 +08:00
{{> makeButton id=user.externUserId btn_class="enableCam btn-primary" i_class="stop" _id=_id}}
{{/if}}
2014-06-17 03:11:22 +08:00
</td>
<td>
{{#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}}
{{else}}
2014-06-17 23:08:34 +08:00
{{> makeButton id=user.externUserId btn_class="enableMic btn-primary" i_class="volume-off" _id=_id}}
{{/if}}
2014-06-17 23:08:34 +08:00
</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}}
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 -->
{{#if isUserSharingVideo ../../user}}
{{> 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 isUserSharingVideo ../../user}}
{{> 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}}
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 -->
{{#if isUserSharingAudio ../../user}}
{{> 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 isUserSharingAudio ../../user}}
{{> 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}}
2014-06-17 03:11:22 +08:00
</td>
{{/with}}
2014-06-23 21:21:03 +08:00
</template>