diff --git a/Gemfile b/Gemfile index 33f29772..c1ee7d59 100644 --- a/Gemfile +++ b/Gemfile @@ -56,3 +56,5 @@ gem 'bigbluebutton-api-ruby' gem 'bootstrap-sass', '3.3.0.0' gem 'bootstrap-social-rails', '~> 4.12' +gem 'jquery-ui-rails' +gem 'jquery-datatables-rails', '~> 3.4.0' diff --git a/Gemfile.lock b/Gemfile.lock index 32c8ad22..6e41f344 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -75,10 +75,17 @@ GEM jbuilder (2.6.0) activesupport (>= 3.0.0, < 5.1) multi_json (~> 1.2) + jquery-datatables-rails (3.4.0) + actionpack (>= 3.1) + jquery-rails + railties (>= 3.1) + sass-rails jquery-rails (4.2.1) rails-dom-testing (>= 1, < 3) railties (>= 4.2.0) thor (>= 0.14, < 2.0) + jquery-ui-rails (5.0.5) + railties (>= 3.2.16) json (1.8.3) jwt (1.5.4) listen (3.0.8) @@ -211,7 +218,9 @@ DEPENDENCIES coffee-rails (~> 4.2) devise (= 4.2.0) jbuilder (~> 2.5) + jquery-datatables-rails (~> 3.4.0) jquery-rails + jquery-ui-rails listen (~> 3.0.5) omniauth (= 1.3.1) omniauth-google-oauth2 (= 0.4.1) @@ -228,4 +237,4 @@ DEPENDENCIES web-console BUNDLED WITH - 1.13.2 + 1.13.5 diff --git a/app/assets/images/bbb-logo.png b/app/assets/images/bbb-logo.png new file mode 100644 index 00000000..3737f7c5 Binary files /dev/null and b/app/assets/images/bbb-logo.png differ diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index b12018d0..ce912696 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -10,7 +10,8 @@ // Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details // about supported directives. // -//= require jquery -//= require jquery_ujs +//= require jquery2 +//= require jquery-ui +//= require bootstrap-sprockets //= require turbolinks //= require_tree . diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css index 0ebd7fe8..a15c8c86 100644 --- a/app/assets/stylesheets/application.css +++ b/app/assets/stylesheets/application.css @@ -11,5 +11,7 @@ * It is generally better to create a new file per style scope. * *= require_tree . + *= require jquery-ui + *= require dataTables/jquery.dataTables *= require_self */ diff --git a/app/assets/stylesheets/landing.scss b/app/assets/stylesheets/landing.scss index f33d6f8d..0dbe3ca0 100644 --- a/app/assets/stylesheets/landing.scss +++ b/app/assets/stylesheets/landing.scss @@ -1,3 +1,7 @@ // 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/ + +// Bootstrap +@import "bootstrap-sprockets"; +@import "bootstrap"; diff --git a/app/assets/stylesheets/narrow-jumbotron.css b/app/assets/stylesheets/narrow-jumbotron.css new file mode 100644 index 00000000..a2dbf869 --- /dev/null +++ b/app/assets/stylesheets/narrow-jumbotron.css @@ -0,0 +1,79 @@ +/* Space out content a bit */ +body { + padding-top: 1.5rem; + padding-bottom: 1.5rem; +} + +/* Everything but the jumbotron gets side spacing for mobile first views */ +.header, +.marketing, +.footer { + padding-right: 1rem; + padding-left: 1rem; +} + +/* Custom page header */ +.header { + padding-bottom: 1rem; + border-bottom: .05rem solid #e5e5e5; +} +/* Make the masthead heading the same height as the navigation */ +.header h3 { + margin-top: 0; + margin-bottom: 0; + line-height: 3rem; +} + +/* Custom page footer */ +.footer { + padding-top: 1.5rem; + color: #777; + border-top: .05rem solid #e5e5e5; +} + +/* Customize container */ +@media (min-width: 48em) { + .container { + max-width: 72rem; + } +} +.container-narrow > hr { + margin: 2rem 0; +} + +/* Main marketing message and sign up button */ +.jumbotron { + text-align: center; + border-bottom: .05rem solid #e5e5e5; +} +.jumbotron .btn { + padding: .75rem 1.5rem; + font-size: 1.5rem; +} + +/* Supporting marketing content */ +.marketing { + margin: 3rem 0; +} +.marketing p + h4 { + margin-top: 1.5rem; +} + +/* Responsive: Portrait tablets and up */ +@media screen and (min-width: 48em) { + /* Remove the padding we set earlier */ + .header, + .marketing, + .footer { + padding-right: 0; + padding-left: 0; + } + /* Space out the masthead */ + .header { + margin-bottom: 2rem; + } + /* Remove the bottom border on the jumbotron for visual effect */ + .jumbotron { + border-bottom: 0; + } +} diff --git a/app/controllers/landing_controller.rb b/app/controllers/landing_controller.rb index 135fd099..d33b4e2b 100644 --- a/app/controllers/landing_controller.rb +++ b/app/controllers/landing_controller.rb @@ -1,15 +1,6 @@ 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 + @meeting_url = helpers.meeting_url(@meeting_token) end end diff --git a/app/helpers/landing_helper.rb b/app/helpers/landing_helper.rb index 6aa3ee92..3f9b3bc7 100644 --- a/app/helpers/landing_helper.rb +++ b/app/helpers/landing_helper.rb @@ -1,2 +1,9 @@ module LandingHelper + 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.gsub(/\/+$/, '') + end end diff --git a/app/views/landing/index.html.erb b/app/views/landing/index.html.erb index fed5c740..18eee059 100644 --- a/app/views/landing/index.html.erb +++ b/app/views/landing/index.html.erb @@ -1,35 +1,48 @@ -
<%= @meeting_url %>
-
+
+
+
+
+
+
+
+
+
+ |
-