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

91 lines
4.6 KiB
HTML
Executable File

<template name="userItem">
<span>{{user.name}}</span>
{{#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}}
{{#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}}
{{> displayOwnControls}}
{{else}}
{{> displayOtherUsersControls}}
{{/if}}
{{/with}}
{{> displayStandardUserControls}}
</template>
<!-- ####################################################################################### -->
<template name="displayStandardUserControls">
{{#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}}
<button type="submit" id="{{user.externUserId}}" class="kickUser btn btn-primary">
<i class="glyphicon glyphicon-remove-circle"></i></button>
</template>
<!-- ####################################################################################### -->
<template name="displayOwnControls">
<!-- toggles for own user's mic and cam-->
{{#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}}
{{#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}}
</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}}
{{#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}}
{{#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}}
{{/with}}
</template>