greenlight/app/views/shared/components/_room_block.html.erb

39 lines
1.5 KiB
Plaintext

<div class="card">
<div class="card-body p-1">
<table class="table table-hover table-vcenter text-nowrap table-no-border" style="border-bottom: none;">
<tbody>
<td>
<span class="stamp stamp-md bg-cyan">
<% if room == current_user.main_room %>
<i class="fas fa-home"></i>
<% else %>
<i class="fas fa-chalkboard-teacher"></i>
<% end %>
</span>
</td>
<td>
<h4 class="font-weight-normal p-0"><%= room.name %></h4>
<div class="small text-muted">
<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">
<% if room != current_user.main_room %>
<%= 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>
</tbody>
</table>
</div>
</div>