greenlight/app/views/landing/index.html.erb

79 lines
2.3 KiB
Plaintext

<div class='container'>
<!-- Body -->
<div class='body'>
<div class="container">
<div class="jumbotron">
<!-- Meeting URL -->
<h4 class="display-3">
<div id="landing_page_url" class="center-block">
<span id="meeting_url"><%= @meeting_url %></span>
</div>
</h4>
<!-- Join form -->
<div id="landing_page_join">
<form id="join_form" class="form-inline">
<div class="form-group">
<label for="join_form_name" class="sr-only">Name</label>
<input id="join_form_name" type="text" class="form-control input" id="name" placeholder="Your name" required>
</div>
<button id="join_form_button" type="button" class="btn btn-success" data-url="<%= bbb_join_path(@meeting_token) %>">Join</button>
</form>
</div>
</div>
<figure class=highlight><pre><figcaption class="text" data-lang="text">
<p>Hi Everyone</p>
<p>The meeting will be at this URL</p>
<p><a href="<%= @meeting_url %>"><span id="meeting_url"><%= @meeting_url %></a></p>
<p>Please join!</p>
</figcaption></pre></figure>
<div id="landing_page_footer_message">
<p>Bookmark this page to reuse this meeting URL, or click refresh button to generate a new meeting URL</p>
</div>
<div id="landing_page_footer_oauth_append">
<p>You can have a personal URL (with recordings) by signing in below</p>
</div>
</div>
</div>
</div>
<script>
$(document).ready(function($) {
$('#join_form_button').click (function (event) {
$.ajax({
url : $(this).data ('url') + "?name=" + $('#join_form_name').val(),
dataType : "json",
async : true,
type : 'GET',
success : function(data) {
$(location).attr("href", data.response.join_url);
},
error : function(xhr, status, error) {
console.info(status);
console.info(error);
},
complete : function(xhr, status) {
}
});
});
});
</script>
<% if current_user.nil? %>
<ul>
<li><%= link_to 'Twitter', '/auth/twitter' %></li>
<li><%= link_to 'Google', '/auth/google' %></li>
</ul>
<% else %>
<div>Hello <%= current_user.name %></div>
<%= link_to 'Logout', '/logout' %>
<% end %>