forked from External/greenlight
separate root page and meetings page
This commit is contained in:
parent
fe0ce271d0
commit
269ce7915e
|
@ -131,7 +131,7 @@
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
var initIndex = function() {
|
var initMeetings = function() {
|
||||||
|
|
||||||
$('.generate-link').click (function (e) {
|
$('.generate-link').click (function (e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
@ -157,8 +157,10 @@
|
||||||
$(document).on("turbolinks:load", function() {
|
$(document).on("turbolinks:load", function() {
|
||||||
if ($("body[data-controller=landing]").get(0)) {
|
if ($("body[data-controller=landing]").get(0)) {
|
||||||
init();
|
init();
|
||||||
if ($("body[data-action=meetings]").get(0)) {
|
if ($("body[data-action=index]").get(0)) {
|
||||||
initIndex();
|
initMeetings();
|
||||||
|
} else if ($("body[data-action=meetings]").get(0)) {
|
||||||
|
initMeetings();
|
||||||
} else if ($("body[data-action=rooms]").get(0)) {
|
} else if ($("body[data-action=rooms]").get(0)) {
|
||||||
initRooms();
|
initRooms();
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,9 @@ class LandingController < ApplicationController
|
||||||
include BbbApi
|
include BbbApi
|
||||||
|
|
||||||
def index
|
def index
|
||||||
|
end
|
||||||
|
|
||||||
|
def resource
|
||||||
if params[:resource] == 'meetings'
|
if params[:resource] == 'meetings'
|
||||||
render_meeting
|
render_meeting
|
||||||
elsif params[:resource] == 'rooms'
|
elsif params[:resource] == 'rooms'
|
||||||
|
|
|
@ -2,7 +2,7 @@ class SessionsController < ApplicationController
|
||||||
def create
|
def create
|
||||||
@user = User.from_omniauth(request.env['omniauth.auth'])
|
@user = User.from_omniauth(request.env['omniauth.auth'])
|
||||||
session[:user_id] = @user.id
|
session[:user_id] = @user.id
|
||||||
redirect_to controller: 'landing', action: 'index', id: @user.encrypted_id, resource: 'rooms'
|
redirect_to @user.room_url
|
||||||
rescue => e
|
rescue => e
|
||||||
logger.error "Error authenticating via omniauth: #{e}"
|
logger.error "Error authenticating via omniauth: #{e}"
|
||||||
redirect_to root_path
|
redirect_to root_path
|
||||||
|
|
|
@ -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 %>
|
||||||
<% 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="page-wrapper meetings" data-id="<%= @meeting_id %>">
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
|
|
||||||
|
|
|
@ -35,6 +35,7 @@ en-US:
|
||||||
unpublish_recording: Hide recording
|
unpublish_recording: Hide recording
|
||||||
copied: Copied
|
copied: Copied
|
||||||
copy_error: Use Ctrl-c to copy
|
copy_error: Use Ctrl-c to copy
|
||||||
|
create_your_session: Create your own session
|
||||||
date_recorded: Date
|
date_recorded: Date
|
||||||
duration: Duration
|
duration: Duration
|
||||||
end: End
|
end: End
|
||||||
|
|
|
@ -11,7 +11,7 @@ Rails.application.routes.draw do
|
||||||
# There are two resources [meetings|rooms]
|
# There are two resources [meetings|rooms]
|
||||||
# meetings offer a landing page for NON authenticated users to create and join session in BigBlueButton
|
# meetings offer a landing page for NON authenticated users to create and join session in BigBlueButton
|
||||||
# rooms offer a customized landing page for authenticated users to create and join session in BigBlueButton
|
# rooms offer a customized landing page for authenticated users to create and join session in BigBlueButton
|
||||||
get '/:resource/:id', to: 'landing#index', as: :resource
|
get '/:resource/:id', to: 'landing#resource', as: :resource
|
||||||
get '/:resource/:id/join', to: 'bbb#join', as: :bbb_join, defaults: {format: 'json'}
|
get '/:resource/:id/join', to: 'bbb#join', as: :bbb_join, defaults: {format: 'json'}
|
||||||
get '/:resource/:id/wait', to: 'landing#wait_for_moderator'
|
get '/:resource/:id/wait', to: 'landing#wait_for_moderator'
|
||||||
get '/:resource/:id/session_status_refresh', to: 'landing#session_status_refresh'
|
get '/:resource/:id/session_status_refresh', to: 'landing#session_status_refresh'
|
||||||
|
|
Loading…
Reference in New Issue