forked from External/greenlight
properly generate some urls
This commit is contained in:
@ -26,8 +26,7 @@ class @Meeting
|
||||
if _meetingInstance
|
||||
return _meetingInstance
|
||||
meetingId = $(".page-wrapper").data('id')
|
||||
if (type = location.pathname.split('/')[1]) != 'rooms'
|
||||
type = 'meetings'
|
||||
type = $("body").data('resource')
|
||||
name = $('.meeting-user-name').val()
|
||||
adminId = $(".page-wrapper").data('admin-id')
|
||||
_meetingInstance = new Meeting(meetingId, type, name, adminId)
|
||||
@ -42,9 +41,9 @@ class @Meeting
|
||||
fullId = encodeURIComponent(adminId) + '/' + encodeURIComponent(meetingId)
|
||||
else
|
||||
fullId = encodeURIComponent(meetingId)
|
||||
return @buildFullDomainURL() + '/' + type + '/' + fullId
|
||||
return @buildRootURL() + '/' + type + '/' + fullId
|
||||
|
||||
@buildFullDomainURL: ->
|
||||
@buildRootURL: ->
|
||||
url = location.protocol + '//' + location.hostname
|
||||
if location.port
|
||||
url += ':' + location.port
|
||||
|
@ -238,7 +238,7 @@ class @Recordings
|
||||
|
||||
getRecordingsURL: ->
|
||||
if $(".page-wrapper.rooms").data('main-room')
|
||||
base_url = '/rooms/'+Meeting.getInstance().getAdminId()
|
||||
base_url = Meeting.buildRootURL()+'/'+$('body').data('resource')+'/'+Meeting.getInstance().getAdminId()
|
||||
else
|
||||
base_url = $('.meeting-url').val()
|
||||
base_url+'/recordings'
|
||||
|
@ -43,6 +43,10 @@ module ApplicationHelper
|
||||
end
|
||||
end
|
||||
|
||||
def omniauth_login_url(provider)
|
||||
"/auth/#{provider}"
|
||||
end
|
||||
|
||||
# Whether the current page is the page of a room/meeting or not
|
||||
def on_room_or_meeting_page?
|
||||
params[:id].present?
|
||||
|
@ -38,7 +38,7 @@
|
||||
<% else %>
|
||||
<div class="text-center">
|
||||
<div><%= t('are_you', name: @user.name) %></div>
|
||||
<div class=""><%= link_to t('login'), '/users/login' %></div>
|
||||
<div class=""><%= link_to t('login'), user_login_url %></div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
@ -26,7 +26,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
<link href="https://fonts.googleapis.com/css?family=Roboto:400,700" rel="stylesheet">
|
||||
</head>
|
||||
|
||||
<body class="app-background" data-controller="<%= params[:controller] %>" data-action="<%= params[:action] %>">
|
||||
<body class="app-background" data-controller="<%= params[:controller] %>" data-action="<%= params[:action] %>" data-resource="<%= params[:resource] %>">
|
||||
<!-- Messages -->
|
||||
<div id='alerts'>
|
||||
</div>
|
||||
|
@ -26,7 +26,7 @@
|
||||
<%= render layout: 'shared/center_panel' do %>
|
||||
<div class="center-block center-panel-content-size col-xs-12">
|
||||
<% if omniauth_providers_configured(:twitter) %>
|
||||
<%= link_to '/auth/twitter', class: "signin-link signin-link-twitter" do %>
|
||||
<%= link_to omniauth_login_url(:twitter), class: "signin-link signin-link-twitter" do %>
|
||||
<div class="signin-button center-block">
|
||||
<div class="signin-icon-wrapper">
|
||||
<%= image_tag("twitter_signin_logo.png", alt: "T", class: "signin-icon") %>
|
||||
@ -38,7 +38,7 @@
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% if omniauth_providers_configured(:google) %>
|
||||
<%= link_to '/auth/google', class: "signin-link signin-link-google" do %>
|
||||
<%= link_to omniauth_login_url(:google), class: "signin-link signin-link-google" do %>
|
||||
<div class="signin-button center-block">
|
||||
<div class="signin-icon-wrapper">
|
||||
<%= image_tag("g-normal.png", alt: "G", class: "signin-icon") %>
|
||||
|
@ -26,7 +26,7 @@
|
||||
<% else %>
|
||||
<div class="text-center">
|
||||
<span><%= t('login_description') %></span>
|
||||
<div><%= link_to t('login'), '/users/login' %></div>
|
||||
<div><%= link_to t('login'), user_login_url %></div>
|
||||
</div>
|
||||
<% end %>
|
||||
</span>
|
||||
|
Reference in New Issue
Block a user