From d8f6c3f8725ae7b57feccc70421472b7c7004386 Mon Sep 17 00:00:00 2001 From: Rafael Baldasso Audibert <32079912+rafaeelaudibert@users.noreply.github.com> Date: Mon, 13 May 2019 18:05:31 -0300 Subject: [PATCH] Added Google calendar button (#429) * implement first version of the recording authentication, redirecting to the playback URL with the jwt token * set default recording visibility by environment variable * use the http header, if present, to determine the client ip address * fix email verification when disabled * revert playback component to link_to, change method to get * remove unnecessary variable * Added "Add to Google Calendar" button on Room page * Added Google Calendar button enable to env.sample * Updated CSS for the Google Calendar Button row * Added correct translation when copying room link * Fixed new Google Calendar button mobile display * GRN-80: Allow local accounts on multitenant (#428) * Changed the way the omniauth providers are declared * Allow local authentication for multitenant mode based on customer settings * Cleanead up code mandated by rubocop * Completed implementation for signin and added the one for signup * Fixed issue with rubocop * Renamed customer_name to lb_user * Renamed lb_user -> user_domain, fixed issue with signup controller, email verification WAS NOT implemented * Completed implementation of email_verification * Fixed rubocop issue * Final update * Fix for test with loadbalancer * Make sure loadbalancer mockup is only used when env defined * Fix for test on rooms_controller * Fixed most of the test failing on multitenant env * Fixed issue detected by rubocop * Fixed issue with activation tockens not working on resend * Fixed new issue found by rubocop * Updated travis script * Harcoded credentials for mockup * Updated expectation on start_session * Fixed issue with duplication of home room * Updated script for rubocop * Restored Gemfile * Update sample.env * Update sample.env --- .../javascripts/{room.js => room.js.erb} | 4 +- app/assets/stylesheets/application.scss | 2 +- app/helpers/rooms_helper.rb | 5 +++ app/views/rooms/show.html.erb | 42 +++++++++++++------ .../shared/components/_recording_row.html.erb | 4 +- config/application.rb | 3 ++ config/locales/en.yml | 2 + sample.env | 4 ++ 8 files changed, 48 insertions(+), 18 deletions(-) rename app/assets/javascripts/{room.js => room.js.erb} (96%) diff --git a/app/assets/javascripts/room.js b/app/assets/javascripts/room.js.erb similarity index 96% rename from app/assets/javascripts/room.js rename to app/assets/javascripts/room.js.erb index e229c7d4..f5be24f0 100644 --- a/app/assets/javascripts/room.js +++ b/app/assets/javascripts/room.js.erb @@ -32,10 +32,10 @@ $(document).on('turbolinks:load', function(){ if (success) { inviteURL.blur(); copy.addClass('btn-success'); - copy.html(" Copy") + copy.html(" <%= I18n.t("copied") %>") setTimeout(function(){ copy.removeClass('btn-success'); - copy.html(" Copy") + copy.html(" <%= I18n.t("copy") %>") }, 2000) } }); diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index 93725e12..d675a905 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -105,7 +105,7 @@ a { } .invite-link-input { - width: 45%; + width: 100%; } .no-border-top { diff --git a/app/helpers/rooms_helper.rb b/app/helpers/rooms_helper.rb index e61f5cc9..a1991872 100644 --- a/app/helpers/rooms_helper.rb +++ b/app/helpers/rooms_helper.rb @@ -17,4 +17,9 @@ # with BigBlueButton; if not, see . module RoomsHelper + # Helper to generate the path to a Google Calendar event creation + # It will have its title set as the room name, and the location as the URL to the room + def google_calendar_path + "http://calendar.google.com/calendar/r/eventedit?text=#{@room.name}&location=#{request.base_url + request.fullpath}" + end end diff --git a/app/views/rooms/show.html.erb b/app/views/rooms/show.html.erb index 70f262bf..83e1e93f 100644 --- a/app/views/rooms/show.html.erb +++ b/app/views/rooms/show.html.erb @@ -15,8 +15,8 @@
-
-
+
+

<%= @room.name %>

<% if current_user.main_room == @room %> @@ -27,20 +27,36 @@

<%= @room.sessions %> <%= t("room.sessions") %> | <%= @recordings.length %> <%= t("room.recordings") %>

-
-