Statics landing page, first approach

This commit is contained in:
jfederico
2016-10-17 10:21:18 -04:00
parent fb5afb7d9b
commit 3376a929f5
2 changed files with 45 additions and 1 deletions

View File

@ -1,4 +1,15 @@
class LandingController < ApplicationController class LandingController < ApplicationController
def index 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
end end

View File

@ -1,2 +1,35 @@
<h1>Landing#index</h1> <h1>Landing#index</h1>
<p>Find me in app/views/landing/index.html.erb</p> <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>