forked from External/greenlight
add room functionality
This commit is contained in:
52
app/views/shared/components/_recording_row.html.erb
Normal file
52
app/views/shared/components/_recording_row.html.erb
Normal file
@ -0,0 +1,52 @@
|
||||
<tr>
|
||||
<td>
|
||||
<div><%= recording[:name] %></div>
|
||||
<div class="small text-muted">
|
||||
Recorded on <%= recording_date(recording[:startTime]) %>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<% p = recording[:playbacks].find do |p| p[:type] == "presentation" end %>
|
||||
<% if p %>
|
||||
<% p[:preview][:images][:image].each do |img| %>
|
||||
<%= image_tag(img[:content], class: "thumbnail px-2") %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</td>
|
||||
<td class="text-left">
|
||||
<div class="small text-muted text-uppercase">
|
||||
Length
|
||||
</div>
|
||||
<%= recording_length(recording[:startTime], recording[:endTime]) %>
|
||||
</td>
|
||||
<td class="text-left">
|
||||
<div class="small text-muted text-uppercase">
|
||||
Users
|
||||
</div>
|
||||
<%= recording[:participants] %>
|
||||
</td>
|
||||
<td class="text-left">
|
||||
<div class="small text-muted text-uppercase">
|
||||
Visibility
|
||||
</div>
|
||||
<%= recording[:state].capitalize %>
|
||||
</td>
|
||||
<td>
|
||||
<% recording[:playbacks].each do |p| %>
|
||||
<%= link_to p[:type].capitalize, p[:url], class: "btn btn-secondary", target: "_blank" %>
|
||||
<% end %>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<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 far fa-eye"></i> Change Visibility</a>
|
||||
<a href="javascript:void(0)" class="dropdown-item"><i class="dropdown-icon far fa-envelope"></i> Email Recording</a>
|
||||
<div class="dropdown-divider"></div>
|
||||
<%= button_to delete_recording_path(@room, record_id: recording[:recordID]), method: :delete, class: "dropdown-item" do %>
|
||||
<i class="dropdown-icon far fa-trash-alt"></i> Delete
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
@ -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>
|
||||
|
Reference in New Issue
Block a user