Merge pull request #107 from zach-chai/add_logout

add link to personal room and logout on every landing page
This commit is contained in:
Zachary Chai 2017-02-03 10:22:53 -05:00 committed by GitHub
commit b923367e5c
3 changed files with 11 additions and 13 deletions

View File

@ -22,11 +22,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
<% content_for :footer do %>
<div class="panel-footer">
<div class="text-center">
<% if current_user %>
<%= link_to t('return_to_room'), current_user.room_url %>
<% else %>
<%= link_to t('create_your_session'), root_path %>
<% end %>
<%= link_to t('create_your_session'), root_path %>
</div>
</div>
<% end %>

View File

@ -30,10 +30,8 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
<% end %>
</div>
<% if !@main_room %>
<div class="row text-center">
<%= link_to(t('return_to_room'), current_user.room_url) %>
</div>
<% unless @main_room && !current_user %>
<%= render 'shared/signup' %>
<% end %>
<div class="table-wrapper">

View File

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