add room functionality

This commit is contained in:
Josh
2018-06-01 11:55:52 -04:00
parent 1bcd176285
commit 45fb18e609
9 changed files with 157 additions and 60 deletions

View File

@ -14,21 +14,21 @@
<td>
<div><%= room.name %></div>
<div class="small text-muted">
<i>Last Session on <%= room.created_at.strftime("%B #{room.created_at.day.ordinalize}, %Y.") %></i>
<i>Last Session on <%= recording_date(room.created_at) %></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">
<%= button_to root_path, class: "dropdown-item" do %>
<i class="dropdown-icon fas fa-home"></i> Make Home Room
<% end %>
<% if room != current_user.main_room %>
<%= button_to room, method: :delete, data: { confirm: 'Are you sure?' }, class: "dropdown-item" do %>
<i class="dropdown-icon far fa-trash-alt"></i> Delete
<%= button_to make_home_path(room), class: "dropdown-item" do %>
<i class="dropdown-icon fas fa-home"></i> Make Home Room
<% end %>
<% end %>
<%= button_to room, method: :delete, data: { confirm: 'Are you sure?' }, class: "dropdown-item" do %>
<i class="dropdown-icon far fa-trash-alt"></i> Delete
<% end %>
</div>
</div>
</td>