forked from External/greenlight
86 lines
3.1 KiB
Plaintext
86 lines
3.1 KiB
Plaintext
<div class="room-section pb-1">
|
|
<div class="container">
|
|
<div class="row pt-9">
|
|
<div class="col-lg-9 col-sm-12">
|
|
<h1 id="user-text" class="display-3 text-left mb-3 font-weight-400"><%= @room.name %>
|
|
<% if current_user.main_room == @room %>
|
|
<i class="fas fa-home align-top" style="font-size: 22px;"></i>
|
|
<% end %>
|
|
</h1>
|
|
<h4 class="text-left mb-6"><%= @room.sessions %> Sessions | <%= @recordings.length %> Recordings</h4>
|
|
<label class="form-label">Invite Participants</label>
|
|
<form class="form-inline">
|
|
<div class="input-icon" style="width: 45%;">
|
|
<span class="input-icon-addon">
|
|
<i class="fe fe-link"></i>
|
|
</span>
|
|
<input id="invite-url" type="text" class="form-control" value="<%= request.base_url + @room.invite_path %>" readonly="" style="width: 100%;">
|
|
</div>
|
|
<div id="copy" class="btn btn-primary mx-2">
|
|
<i class="fas fa-copy"></i>
|
|
Copy
|
|
</div>
|
|
<!-- <div id="email" class="btn btn-primary">
|
|
<i class="fas fa-envelope"></i>
|
|
Email
|
|
</div> -->
|
|
</form>
|
|
</div>
|
|
<div class="col-lg-3 col-sm-12 bottom-div mt-5">
|
|
<% if @is_running %>
|
|
<%= button_to "Join", room_path(@room), class: "btn btn-primary btn-block px-7 start-button float-right" %>
|
|
<% else %>
|
|
<%= button_to "Start", start_room_path(@room), class: "btn btn-primary btn-block px-7 start-button float-right" %>
|
|
<% end %>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row pt-7 pb-2">
|
|
<% if current_user.rooms.length > 1 %>
|
|
<% current_user.rooms.each do |room| %>
|
|
<div class="col-lg-4 col-md-6 col-sm-12">
|
|
<%= link_to room do %>
|
|
<%= render "shared/components/room_block", room: room %>
|
|
<% end %>
|
|
</div>
|
|
<% end %>
|
|
<% end %>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<%= render "shared/sessions", recordings: @recordings, only_public: false %>
|
|
|
|
<script>
|
|
var invite_url;
|
|
var copy = $('#copy');
|
|
|
|
// Handle copy button.
|
|
copy.on('click', function(){
|
|
var inviteURL = $('#invite-url');
|
|
inviteURL.select();
|
|
|
|
var success = document.execCommand("copy");
|
|
if (success) {
|
|
inviteURL.blur();
|
|
copy.addClass('btn-success');
|
|
copy.html("<i class='fas fa-check'></i> Copy")
|
|
setTimeout(function(){
|
|
copy.removeClass('btn-success');
|
|
copy.html("<i class='fas fa-copy'></i> Copy")
|
|
}, 2000)
|
|
}
|
|
});
|
|
|
|
// Handle recording emails.
|
|
$('.email-link').each(function(){
|
|
$(this).click(function(){
|
|
var subject = $(".username").text() + " has invited you to view a recording.";
|
|
var body = "To view the recording, follow the link below:\n\n" + $(this).attr("data-pres-link");
|
|
var footer = "\n\nThis e-mail is auto-generated by BigBlueButton.\nBigBlueButton is an open source web conferencing system. For more information on BigBlueButton, see https://bigbluebutton.org/."
|
|
var win = window.open("mailto:?subject=" + encodeURIComponent(subject) + "&body=" + encodeURIComponent(body) + encodeURIComponent(footer), '_blank');
|
|
win.focus();
|
|
});
|
|
});
|
|
</script>
|