forked from External/greenlight
commit
0fc0e27d02
3
Gemfile
3
Gemfile
|
@ -46,3 +46,6 @@ end
|
||||||
|
|
||||||
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
|
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
|
||||||
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
|
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
|
||||||
|
|
||||||
|
gem 'bigbluebutton-api-ruby'
|
||||||
|
|
||||||
|
|
|
@ -39,6 +39,8 @@ GEM
|
||||||
minitest (~> 5.1)
|
minitest (~> 5.1)
|
||||||
tzinfo (~> 1.1)
|
tzinfo (~> 1.1)
|
||||||
arel (7.1.4)
|
arel (7.1.4)
|
||||||
|
bigbluebutton-api-ruby (1.6.0)
|
||||||
|
xml-simple (~> 1.1)
|
||||||
builder (3.2.2)
|
builder (3.2.2)
|
||||||
byebug (9.0.6)
|
byebug (9.0.6)
|
||||||
coffee-rails (4.2.1)
|
coffee-rails (4.2.1)
|
||||||
|
@ -149,11 +151,13 @@ GEM
|
||||||
websocket-driver (0.6.4)
|
websocket-driver (0.6.4)
|
||||||
websocket-extensions (>= 0.1.0)
|
websocket-extensions (>= 0.1.0)
|
||||||
websocket-extensions (0.1.2)
|
websocket-extensions (0.1.2)
|
||||||
|
xml-simple (1.1.5)
|
||||||
|
|
||||||
PLATFORMS
|
PLATFORMS
|
||||||
ruby
|
ruby
|
||||||
|
|
||||||
DEPENDENCIES
|
DEPENDENCIES
|
||||||
|
bigbluebutton-api-ruby
|
||||||
byebug
|
byebug
|
||||||
coffee-rails (~> 4.2)
|
coffee-rails (~> 4.2)
|
||||||
jbuilder (~> 2.5)
|
jbuilder (~> 2.5)
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
# Place all the behaviors and hooks related to the matching controller here.
|
||||||
|
# All this logic will automatically be available in application.js.
|
||||||
|
# You can use CoffeeScript in this file: http://coffeescript.org/
|
|
@ -0,0 +1,3 @@
|
||||||
|
// Place all the styles related to the landing controller here.
|
||||||
|
// They will automatically be included in application.css.
|
||||||
|
// You can use Sass (SCSS) here: http://sass-lang.com/
|
|
@ -0,0 +1,15 @@
|
||||||
|
class LandingController < ApplicationController
|
||||||
|
def index
|
||||||
|
@meeting_token = params[:id] || @meeting_token = rand.to_s[2..10]
|
||||||
|
@meeting_url = meeting_url(@meeting_token)
|
||||||
|
end
|
||||||
|
|
||||||
|
private
|
||||||
|
def meeting_url(meeting_token)
|
||||||
|
_meeting_url = "#{request.original_url}"
|
||||||
|
_meeting_url += "meeting" if ( request.original_url == "#{request.base_url}/" )
|
||||||
|
_meeting_url += "/" unless _meeting_url.end_with?('/')
|
||||||
|
_meeting_url += "#{meeting_token}" if !params.has_key?(:id)
|
||||||
|
_meeting_url
|
||||||
|
end
|
||||||
|
end
|
|
@ -0,0 +1,2 @@
|
||||||
|
module LandingHelper
|
||||||
|
end
|
|
@ -0,0 +1,35 @@
|
||||||
|
<h1>Landing#index</h1>
|
||||||
|
<div id="landing_page_url">
|
||||||
|
<p><span id="meeting_url"><%= @meeting_url %></span></p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="landing_page_join_form">
|
||||||
|
<form action="#">
|
||||||
|
<input type="text" name="name" value="" placement="Your name">
|
||||||
|
<input type="submit" value="Join">
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="landing_page_invite_text">
|
||||||
|
<table border="1">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<p>Hi Everyone</p>
|
||||||
|
<br>
|
||||||
|
<p>The meeting will be at this URL</p>
|
||||||
|
<br>
|
||||||
|
<p><a href="<%= @meeting_url %>"><span id="meeting_url"><%= @meeting_url %></a></p>
|
||||||
|
<br>
|
||||||
|
<p>Please join!</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<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>
|
|
@ -1,3 +1,6 @@
|
||||||
Rails.application.routes.draw do
|
Rails.application.routes.draw do
|
||||||
|
get 'meeting(/:id)', to: 'landing#index'
|
||||||
|
|
||||||
|
root to: 'landing#index'
|
||||||
# For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html
|
# For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html
|
||||||
end
|
end
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
require 'test_helper'
|
||||||
|
|
||||||
|
class LandingControllerTest < ActionDispatch::IntegrationTest
|
||||||
|
test "should get index" do
|
||||||
|
get landing_index_url
|
||||||
|
assert_response :success
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
Loading…
Reference in New Issue