restructure app

This commit is contained in:
Josh
2018-05-29 15:28:29 -04:00
parent 5042e2572c
commit 32ec2bacce
31 changed files with 303 additions and 472 deletions

View File

@ -33,6 +33,11 @@
<%= yield %>
<%= render "shared/footer" %>
<!-- Modal Load -->
<% if current_user %>
<%= render "shared/modals/create_room_modal" %>
<% end %>
</div>
</body>

View File

@ -1,15 +0,0 @@
<div class="row invite-join-wrapper hidden">
<div class="col-xs-6">
<%= render 'shared/title', title: t('invite') do %>
<span><%= t('invite_description') %></span>
<% end %>
<%= render 'shared/meeting_url', hidden: false %>
</div>
<div class="verticle-line"></div>
<div class="col-xs-6">
<%= render 'shared/title', title: t('join'), title_class: 'join-meeting-title' %>
<button type="button" class="btn btn-primary center-block meeting-start has-tooltip" data-placement="top" title="<%= t('start_meeting') %>">
<%= t('start_join') %>
</button>
</div>
</div>

View File

@ -2,7 +2,6 @@
<% if current_user %>
<h1 id="user-text" class="display-3 text-center text-primary mt-9"><%= "Welcome, #{current_user.firstname}." %></h1>
<%= render "shared/modals/create_room_modal" %>
<% else %>
<h1 id="main-text" class="display-3 text-center text-primary mt-9">Teach Students Online.</h1>
<%= render "shared/modals/video_modal" %>
@ -10,47 +9,19 @@
<hr class="small-rule">
<% if current_user %>
<div class="row">
<% 3.times do %>
<div class="col-4">
<div class="card">
<div class="card-body p-1">
<table class="table table-hover table-outline table-vcenter text-nowrap card-table">
<tbody>
<td>
<span class="colorinput-color bg-azure"></span>
</td>
<td>
<div>Example Room</div>
<div class="small text-muted">
<i>Created on June 17th, 2017</i>
</div>
</td>
<td class="text-right">
<div class="item-action dropdown">
<a href="javascript:void(0)" data-toggle="dropdown" class="icon"><i class="fe fe-more-vertical"></i></a>
<div class="dropdown-menu dropdown-menu-right">
<a href="javascript:void(0)" class="dropdown-item"><i class="dropdown-icon fe fe-tag"></i> Action </a>
<a href="javascript:void(0)" class="dropdown-item"><i class="dropdown-icon fe fe-edit-2"></i> Another action </a>
<a href="javascript:void(0)" class="dropdown-item"><i class="dropdown-icon fe fe-message-square"></i> Something else here</a>
<div class="dropdown-divider"></div>
<a href="javascript:void(0)" class="dropdown-item"><i class="dropdown-icon fe fe-link"></i> Separated link</a>
</div>
</div>
</td>
</tbody>
</table>
<div class="row">
<% current_user.rooms.each do |room| %>
<div class="col-4">
<%= link_to room do %>
<%= render "shared/components/room_block", room: room %>
<% end %>
</div>
</div>
<% end %>
</div>
<% end %>
</div>
<!-- <%= render "shared/start_meeting" %> -->
<br>
<br>
<% else %>
<%= render "shared/features" %>
<%= render "shared/features" %>
<% end %>
</div>

View File

@ -1,11 +0,0 @@
<h4>This is an unauthenticated meeting page.</h4>
<% if current_user %>
<%= link_to "Join", join_meeting_path(uid: @meeting.uid), {method: :post} %>
<% else %>
<p>Enter a name to join the session.</p>
<%= form_tag join_meeting_path do %>
<%= text_field_tag "join_name" %>
<%= submit_tag "Join" %>
<% end %>
<% end %>

View File

@ -1,7 +1,7 @@
<p>The join the meeting, enter a name.</p>
<p>Enter a name to start a session.</p>
<%= form_tag join_room_path(room_uid: @room.uid) do %>
<%= form_tag room_path(@room) do %>
<%= text_field_tag "join_name" %>
<%= submit_tag "Join" %>
<% end %>
<% end %>

View File

@ -1,17 +1,6 @@
<div class="container">
<div class="row">
<div class="col-10 offset-1">
<p style="font-size: 25px;">Sessions</p>
<!-- <div class="input-icon float-right">
<input type="text" class="form-control" placeholder="Search for...">
<span class="input-icon-addon">
<i class="fe fe-search"></i>
</span>
</div> -->
<hr>
</div>
</div>
<%= render "shared/components/subtitle", subtitle: "Sessions" %>
<div class="col-10 offset-1">
<div class="card">
@ -82,9 +71,9 @@
Sessions
<br><br>
<%= @meeting.recordings %>
<%= @room.recordings %>
<% @meeting.recordings.each do |rec| %>
<% @room.recordings.each do |rec| %>
<p><%= rec[:metadata][:meetingName] %></p>
<% Array.wrap(rec[:playback][:format]).each do |form| %>
<%= link_to form[:type], form[:url] %>

View File

@ -1,20 +1,15 @@
<p>This is a room.</p>
<p><%= @room.user.name %><p>
<p><%= @room.meeting.uid %><p>
<p><%= @room.uid %><p>
<%= link_to 'Sessions', sessions_path %>
<%= link_to 'Settings', root_path %>
<p>Click below to join the meeting.</p>
<% if @room.meeting.is_running? %>
<% if @room.is_running? %>
<p>meeting is already running</p>
<% else %>
<%= link_to "Start Meeting", start_room_path(@room.uid) %>
<%= link_to "Start Room", start_room_path(@room) %>
<% end %>
<br><br>
<%= link_to 'Logout', logout_path %>
<%= link_to "Sessions", sessions_path(@room) %>

View File

@ -1,21 +0,0 @@
<div class="center-panel">
<div class="row">
<div class="center-block center-panel-size col-xs-12">
<div class="panel panel-default">
<div class="panel-body">
<% if bigbluebutton_endpoint_default? %>
<div class="panel-alert alert alert-danger"><%= t('warning_bigbluebutton_endpoint_default') %></div>
<% end %>
<h3 class="title-wrapper text-center">
<%= yield :title %>
</h3>
<%= yield %>
</div>
<%= yield :footer %>
<div class="help-link">
<%= link_to t('help'), 'http://bigbluebutton.org/videos/', target: '_blank' %>
</div>
</div>
</div>
</div>
</div>

View File

@ -1,9 +1,9 @@
<div class="header py-4 mb-6">
<div class="container">
<div class="d-flex">
<a class="header-brand" href="{{ site.base }}/index.html">
<%= link_to root_path, class: "header-brand" do %>
<%= image_tag("bbb_logo.png", class: "header-brand-img") %>
</a>
<% end %>
<div class="d-flex order-lg-2 ml-auto">
<% if current_user %>
@ -24,10 +24,22 @@
<small class="text-muted d-block mt-1"><%= current_user.subtitle %></small>
</span>
</a>
<div class="dropdown-menu dropdown-menu-right dropdown-menu-arrow" x-placement="bottom-end" style="position: absolute; transform: translate3d(-56px, 32px, 0px); top: 0px; left: 0px; will-change: transform;">
<a class="dropdown-item" href="#">
<i class="dropdown-icon fe fe-user"></i> Sessions
</a>
<%= link_to settings_path, class: "dropdown-item" do %>
<i class="dropdown-icon fe fe-settings"></i> Settings
<% end %>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="#">
<i class="dropdown-icon fe fe-help-circle"></i> Need help?
</a>
<%= link_to logout_path, class: "dropdown-item" do %>
<i class="dropdown-icon fe fe-log-out"></i> Sign out
<% end %>
</div>
</div>
<%= link_to logout_path do %>
<i class="fas fa-sign-out-alt fa-2x px-5"></i>
<% end %>
<% else %>
<button type="submit" class="btn btn-pill btn-outline-primary ml-auto" data-toggle="modal" data-target="#loginModal">Login</button>
<%= render "shared/modals/login_modal" %>

View File

@ -1,3 +0,0 @@
<div class="meeting-name-form-wrapper">
<input type="text" class="form-control meeting-name" placeholder="Enter meeting name." maxlength="<%= meeting_name_limit %>">
</div>

View File

@ -1,17 +0,0 @@
<span class="signup">
<% if current_user %>
<div class="text-center">
<% if @main_room %>
<span><%= t('logged_in_description_html', link: link_to(current_user.name, room_path(current_user))) %></span>
<% else %>
<%= link_to(t('return_to_room'), room_path(current_user)) %>
<% end %>
<div><%= link_to t('logout'), logout_url %></div>
</div>
<% else %>
<div class="text-center">
<span><%= t('login_description') %></span>
<div><%= link_to t('login'), login_url %></div>
</div>
<% end %>
</span>

View File

@ -1,7 +0,0 @@
<% title_class ||= '' %>
<div class="title-wrapper text-center">
<div class="title">
<h2 class="<%= title_class if title_class %>"><%= title %></h2>
<%= yield %>
</div>
</div>

View File

@ -0,0 +1,27 @@
<div class="card">
<div class="card-body p-1">
<table class="table table-hover table-outline table-vcenter text-nowrap card-table">
<tbody>
<td>
<span class="colorinput-color bg-azure"></span>
</td>
<td>
<div><%= room.name %></div>
<div class="small text-muted">
<i>Created on <%= room.created_at.strftime("%B #{room.created_at.day.ordinalize}, %Y") %></i>
</div>
</td>
<td class="text-right">
<div class="item-action dropdown">
<a href="javascript:void(0)" data-toggle="dropdown" class="icon"><i class="fe fe-more-vertical"></i></a>
<div class="dropdown-menu dropdown-menu-right">
<a href="javascript:void(0)" class="dropdown-item"><i class="dropdown-icon fe fe-tag"></i> Action </a>
<a href="javascript:void(0)" class="dropdown-item"><i class="dropdown-icon fe fe-edit-2"></i> Another action </a>
<a href="javascript:void(0)" class="dropdown-item"><i class="dropdown-icon fe fe-trash"></i> Delete</a>
</div>
</div>
</td>
</tbody>
</table>
</div>
</div>

View File

@ -0,0 +1,6 @@
<div class="row">
<div class="col-10 offset-1">
<p class="subtitle"><%= subtitle %></p>
<hr>
</div>
</div>

View File

@ -8,28 +8,27 @@
</div>
<hr class="small-rule">
<div class="form-group">
<%= form_for(:room, url: create_room_path) do |f| %>
<div class="input-icon">
<span class="input-icon-addon">
<i class="fas fa-chalkboard-teacher"></i>
</span>
<input type="email" class="form-control" placeholder="Enter a room name...">
<%= f.text_field :name, class: "form-control", placeholder: "Enter a room name...", autocomplete: :off %>
</div>
<label class="custom-switch mt-5 mb-5 float-left">
<input type="checkbox" name="custom-switch-checkbox" class="custom-switch-input">
<%= f.check_box :auto_join, class: "custom-switch-input", checked: true %>
<span class="custom-switch-indicator"></span>
<span class="custom-switch-description">Automatically join me into the room when created.</span>
</label>
</div>
<div class="form-footer">
<button type="submit" class="btn btn-outline-primary btn-block btn-pill">Create Room</button>
<%= f.submit "Create Room", class: "btn btn-outline-primary btn-block btn-pill" %>
</div>
<% end %>
</div>
<div class="card-footer">
<p>You will be free to delete this room at any time.</p>
</div>
</div>
</div>
</div>
</div>

View File

@ -1,11 +1,6 @@
<div class="container">
<div class="row">
<div class="col-10 offset-1">
<p style="font-size: 25px;">Settings</p>
<hr>
</div>
</div>
<%= render "shared/components/subtitle", subtitle: "Settings" %>
<div class="row">
<div class="col-2 offset-1">
@ -108,7 +103,7 @@
settingsButtons = $('.setting-btn');
settingsViews = $('.setting-view');
$(window).on('load', function(){
$(document).ready(function(){
settingsButtons.each(function(i, btn) {
if(i != 0){ $(settingsViews[i]).hide(); }
$(btn).click(function(){
@ -122,4 +117,4 @@ $(window).on('load', function(){
});
});
});
</script>
</script>