forked from External/greenlight
add room functionality
This commit is contained in:
@ -26,53 +26,8 @@
|
||||
</td>
|
||||
</tr>
|
||||
<% else %>
|
||||
<% 3.times do %>
|
||||
<tr>
|
||||
<td>
|
||||
<div>Example Meeting</div>
|
||||
<div class="small text-muted">
|
||||
June 21, 2017 <i>(about 3 hours ago)</i>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<img class="thumbnail px-2" src="http://test-install.blindsidenetworks.com/presentation/b622495d927cd99e9898b0601c2b18a5424a0627-1527259102285/presentation/d2d9a672040fbde2a47a10bf6c37b6a4b5ae187f-1527259102298/thumbnails/thumb-1.png">
|
||||
<img class="thumbnail px-2" src="http://test-install.blindsidenetworks.com/presentation/b622495d927cd99e9898b0601c2b18a5424a0627-1527259102285/presentation/d2d9a672040fbde2a47a10bf6c37b6a4b5ae187f-1527259102298/thumbnails/thumb-1.png">
|
||||
<img class="thumbnail px-2" src="http://test-install.blindsidenetworks.com/presentation/b622495d927cd99e9898b0601c2b18a5424a0627-1527259102285/presentation/d2d9a672040fbde2a47a10bf6c37b6a4b5ae187f-1527259102298/thumbnails/thumb-1.png">
|
||||
</td>
|
||||
<td class="text-left">
|
||||
<div class="small text-muted text-uppercase">
|
||||
Length
|
||||
</div>
|
||||
1 hr
|
||||
</td>
|
||||
<td class="text-left">
|
||||
<div class="small text-muted text-uppercase">
|
||||
Users
|
||||
</div>
|
||||
4
|
||||
</td>
|
||||
<td class="text-left">
|
||||
<div class="small text-muted text-uppercase">
|
||||
Visibility
|
||||
</div>
|
||||
Unlisted
|
||||
</td>
|
||||
<td>
|
||||
<a href="#" class="btn btn-secondary">Presentation</a>
|
||||
<a href="#" class="btn btn-secondary">Podcast</a>
|
||||
</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>
|
||||
<a href="javascript:void(0)" class="dropdown-item"><i class="dropdown-icon far fa-trash-alt"></i> Delete</a>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<% recordings.each do |recording| %>
|
||||
<%= render "shared/components/recording_row", recording: recording %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</tbody>
|
||||
|
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