forked from External/greenlight
separate root page and meetings page
This commit is contained in:
@ -131,7 +131,7 @@
|
||||
}
|
||||
};
|
||||
|
||||
var initIndex = function() {
|
||||
var initMeetings = function() {
|
||||
|
||||
$('.generate-link').click (function (e) {
|
||||
e.preventDefault();
|
||||
@ -157,8 +157,10 @@
|
||||
$(document).on("turbolinks:load", function() {
|
||||
if ($("body[data-controller=landing]").get(0)) {
|
||||
init();
|
||||
if ($("body[data-action=meetings]").get(0)) {
|
||||
initIndex();
|
||||
if ($("body[data-action=index]").get(0)) {
|
||||
initMeetings();
|
||||
} else if ($("body[data-action=meetings]").get(0)) {
|
||||
initMeetings();
|
||||
} else if ($("body[data-action=rooms]").get(0)) {
|
||||
initRooms();
|
||||
}
|
||||
|
@ -2,6 +2,9 @@ class LandingController < ApplicationController
|
||||
include BbbApi
|
||||
|
||||
def index
|
||||
end
|
||||
|
||||
def resource
|
||||
if params[:resource] == 'meetings'
|
||||
render_meeting
|
||||
elsif params[:resource] == 'rooms'
|
||||
|
@ -2,7 +2,7 @@ class SessionsController < ApplicationController
|
||||
def create
|
||||
@user = User.from_omniauth(request.env['omniauth.auth'])
|
||||
session[:user_id] = @user.id
|
||||
redirect_to controller: 'landing', action: 'index', id: @user.encrypted_id, resource: 'rooms'
|
||||
redirect_to @user.room_url
|
||||
rescue => e
|
||||
logger.error "Error authenticating via omniauth: #{e}"
|
||||
redirect_to root_path
|
||||
|
33
app/views/landing/index.html.erb
Normal file
33
app/views/landing/index.html.erb
Normal file
@ -0,0 +1,33 @@
|
||||
<% content_for :title do %>
|
||||
<div class="title">
|
||||
<%= t('hi_all') %>
|
||||
</div>
|
||||
<small>
|
||||
<%= t('session_url_explanation') %>
|
||||
</small>
|
||||
<% end %>
|
||||
|
||||
<% if !@meeting_id %>
|
||||
<% content_for :footer do %>
|
||||
<div class="panel-footer">
|
||||
<div class="text-center">
|
||||
<%= t('refresh_html') %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<div class="page-wrapper meetings" data-id="<%= @meeting_id %>">
|
||||
<div class="container-fluid">
|
||||
|
||||
<div class="center-panel-wrapper">
|
||||
<%= render layout: 'shared/center_panel' do %>
|
||||
<div class="center-block center-panel-conent-size col-xs-12">
|
||||
<%= render 'shared/meeting_url', hidden: false %>
|
||||
<%= render 'shared/join_form' %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
@ -17,6 +17,14 @@
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<% content_for :footer do %>
|
||||
<div class="panel-footer">
|
||||
<div class="text-center">
|
||||
<%= link_to t('create_your_session'), root_path %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<div class="page-wrapper meetings" data-id="<%= @meeting_id %>">
|
||||
<div class="container-fluid">
|
||||
|
||||
|
Reference in New Issue
Block a user