remove refresh on specific pages and change join form

This commit is contained in:
Zachary Chai 2016-11-01 17:04:57 -04:00
parent bef04f0465
commit 7da04d3334
4 changed files with 32 additions and 12 deletions

View File

@ -2,6 +2,10 @@
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/
.join-form {
width: 100%;
}
.rooms {
.table-wrapper {
padding: 40px 50px 10px 50px;

View File

@ -15,7 +15,7 @@ class LandingController < ApplicationController
end
def admin?
@user == current_user
@user && @user == current_user
end
helper_method :admin?

View File

@ -7,12 +7,14 @@
</small>
<% end %>
<% content_for :footer do %>
<div class="panel-footer">
<div class="text-center">
<a href="#" class="generate-link">Click refresh</a> to generate a new meeting URL
<% if !@meeting_id %>
<% content_for :footer do %>
<div class="panel-footer">
<div class="text-center">
<a href="#" class="generate-link">Click refresh</a> to generate a new meeting URL
</div>
</div>
</div>
<% end %>
<% end %>
<div class="page-wrapper meetings">

View File

@ -1,9 +1,23 @@
<div class="input-group input-spacing">
<% @current_user = user %>
<%= text_field :current_user, :name, class: 'form-control meeting-user-name', placeholder: 'Enter your name' %>
<span class="input-group-btn">
<button type="button" class="btn btn-primary meeting-join">
<div class="join-form input-group input-spacing">
<% if current_user %>
<% @current_user = user %>
<%= text_field :current_user, :name, class: 'form-control meeting-user-name', type: 'hidden' %>
<% else %>
<%= text_field :nil, :nil, class: 'form-control meeting-user-name', placeholder: 'Enter your name' %>
<% end %>
<% if admin? %>
<button type="button" class="btn btn-primary center-block meeting-join">
Start
</button>
<% elsif current_user %>
<button type="button" class="btn btn-primary center-block meeting-join">
Join
</button>
</span>
<% else %>
<span class="input-group-btn">
<button type="button" class="btn btn-primary meeting-join">
Join
</button>
</span>
<% end %>
</div>