GRN2-264: Allow users to change the room settings on Home Room (#951)

* GRN2-264: Allow users to change the room settings on Home Room

* fixing inconsistencies

* removing 'secondary_rooms' method and adjusting looping
This commit is contained in:
etiennevvv
2020-02-11 13:47:11 -05:00
committed by farhatahmad
parent 01c93b1f67
commit b67bee2638
5 changed files with 24 additions and 44 deletions

View File

@ -25,7 +25,7 @@
<div class="col-lg-8 col-sm-12">
<div id="room-title" class="display-3 form-inline <%= 'edit_hover_class' if current_user.main_room != @room %>" data-path="<%= update_settings_path(@room) %>">
<% if current_user.main_room == @room %>
<h1 contenteditable=false id="user-text" class="display-3 text-left mb-3 font-weight-400"><%= t("home_room") %></h1>
<h1 contenteditable=false id="user-text" class="display-3 text-left mb-3 font-weight-400"><%= @room.name %></h1>
<a class="disable-click"><i class="fas fa-home align-top home-indicator ml-2"></i></a>
<% else %>
<h1 contenteditable=false id="user-text" class="display-3 text-left mb-3 font-weight-400"><%= @room.name %></h1>
@ -77,21 +77,14 @@
</div>
<div id="room_block_container" class="row pt-7 pb-5">
<% if current_user.rooms.length > 1 %>
<% current_user.rooms.each do |room| %>
<div class="col-lg-4 col-md-6 col-sm-12">
<%= link_to current_user.main_room do %>
<%= render "rooms/components/room_block", room: current_user.main_room %>
<%= link_to room do %>
<%= render "rooms/components/room_block", room: room %>
<% end %>
</div>
<% current_user.secondary_rooms.each do |room| %>
<div class="col-lg-4 col-md-6 col-sm-12">
<%= link_to room do %>
<%= render "rooms/components/room_block", room: room %>
<% end %>
</div>
<% end %>
<% end %>
<% if shared_access_allowed %>
<% current_user.shared_rooms.each do |room| %>
<div class="col-lg-4 col-md-6 col-sm-12">