bigbluebutton-Github/labs/meteor-client/client/views/users/user_item.html
2014-06-16 12:11:22 -07:00

103 lines
4.7 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}}
<button type="submit" id="{{user.externUserId}}" class="raiseHand btn btn-primary" disabled>
<i class="glyphicon glyphicon-hand-up"></i> <!-- Hand Raised -->
</button>
{{else}}
<button type="submit" id="{{user.externUserId}}" class="raiseHand btn btn-primary">
<i class="glyphicon glyphicon-hand-up"></i> <!-- Hand Raised -->
</button>
{{/if}}
</td>
{{> displayOwnControls}}
{{else}}
{{> displayOtherUsersControls}}
{{/if}}
{{/with}}
{{> displayStandardUserControls}}
</template>
<!-- ####################################################################################### -->
<template name="displayStandardUserControls">
<td>
{{#if user.presenter}}
<button type="submit" id="{{user.externUserId}}" class="setPresenter btn btn-primary" disabled><i class="glyphicon glyphicon-picture"></i></button>
{{else}}
<button type="submit" id="{{user.externUserId}}" class="setPresenter btn btn-primary">
<i class="glyphicon glyphicon-picture"></i></button>
{{/if}}
</td>
<td>
<button type="submit" id="{{user.externUserId}}" class="kickUser btn btn-primary">
<i class="glyphicon glyphicon-remove-circle"></i></button>
</td>
</template>
<!-- ####################################################################################### -->
<template name="displayOwnControls">
<!-- toggles for own user's mic and cam-->
<td>
{{#if user.sharingAudio}}
<button type="submit" id="{{user.externUserId}}" class="disableMic btn btn-primary">
<i class="glyphicon glyphicon-bullhorn"></i></button>
{{else}}
<button type="submit" id="{{user.externUserId}}" class="enableMic btn btn-primary">
<i class="glyphicon glyphicon-volume-off"></i></button>
{{/if}}
</td>
<td>
{{#if user.sharingVideo}}
<button type="submit" id="{{user.externUserId}}" class="disableCam btn btn-primary">
<i class="glyphicon glyphicon-facetime-video"></i></button>
{{else}}
<button type="submit" id="{{user.externUserId}}" class="enableCam btn btn-primary">
<i class="glyphicon glyphicon-stop"></i></button>
{{/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.disableMic}} <!-- if user viewing has ability to disable -->
{{#if ../../user.sharingAudio}}
<button type="submit" id="{{../../user.externUserId}}" class="disableMic btn btn-primary"><i class="glyphicon glyphicon-bullhorn"></i></button>
{{else}}
<button type="submit" id="{{../../user.externUserId}}" class="enableMic btn btn-primary"><i class="glyphicon glyphicon-volume-off"></i></button>
{{/if}}
{{else}}
{{#if ../../user.sharingAudio}}
<button type="submit" id="{{../../user.externUserId}}" class="disableMic btn btn-primary" disabled><i class="glyphicon glyphicon-bullhorn"></i></button>
{{else}}
<button type="submit" id="{{../../user.externUserId}}" class="enableMic btn btn-primary" disabled><i class="glyphicon glyphicon-volume-off"></i></button>
{{/if}}
{{/if}}
</td>
<td>
{{#if this.user.permissions.disableCam}} <!-- if user viewing has ability to disable -->
{{#if ../../user.sharingVideo}}
<button type="submit" id="{{../../user.externUserId}}" class="disableCam btn btn-primary"><i class="glyphicon glyphicon-facetime-video"></i></button>
{{else}}
<button type="submit" id="{{../../user.externUserId}}" class="enableCam btn btn-primary"><i class="glyphicon glyphicon-stop"></i></button>
{{/if}}
{{else}}
{{#if ../../user.sharingVideo}}
<button type="submit" id="{{../../user.externUserId}}" class="disableCam btn btn-primary" disabled><i class="glyphicon glyphicon-facetime-video"></i></button>
{{else}}
<button type="submit" id="{{../../user.externUserId}}" class="enableCam btn btn-primary" disabled><i class="glyphicon glyphicon-stop"></i></button>
{{/if}}
{{/if}}
</td>
{{/with}}
</template>