forked from External/greenlight
add ability to change recording visibility
This commit is contained in:
@ -15,7 +15,9 @@
|
||||
<th class="text-left">Users</th>
|
||||
<th class="text-left">Visibility</th>
|
||||
<th>Formats</th>
|
||||
<th class="text-center"><i class="icon-settings"></i></th>
|
||||
<% unless only_public %>
|
||||
<th class="text-center"><i class="icon-settings"></i></th>
|
||||
<% end %>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@ -27,7 +29,11 @@
|
||||
</tr>
|
||||
<% else %>
|
||||
<% recordings.each do |recording| %>
|
||||
<%= render "shared/components/recording_row", recording: recording %>
|
||||
<% if only_public %>
|
||||
<%= render "shared/components/public_recording_row", recording: recording %>
|
||||
<% else %>
|
||||
<%= render "shared/components/recording_row", recording: recording %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</tbody>
|
||||
|
42
app/views/shared/components/_public_recording_row.html.erb
Normal file
42
app/views/shared/components/_public_recording_row.html.erb
Normal file
@ -0,0 +1,42 @@
|
||||
<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].strip, 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="dropdown">
|
||||
<% if recording[:metadata][:"gl-listed"] == "true" %>
|
||||
<i class="dropdown-icon fe fe-globe px-2"></i> Public
|
||||
<% else %>
|
||||
<i class="dropdown-icon fe fe-link px-2"></i> Unlisted
|
||||
<% end %>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<% recording[:playbacks].each do |p| %>
|
||||
<%= link_to p[:type].capitalize, p[:url], class: "btn btn-sm btn-primary", target: "_blank" %>
|
||||
<% end %>
|
||||
</td>
|
||||
</tr>
|
@ -9,7 +9,7 @@
|
||||
<% 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") %>
|
||||
<%= image_tag(img[:content].strip, class: "thumbnail px-2") %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</td>
|
||||
@ -27,7 +27,7 @@
|
||||
</td>
|
||||
<td class="text-left">
|
||||
<div class="dropdown">
|
||||
<% if recording[:metadata]["gl-listed"] %>
|
||||
<% if recording[:metadata][:"gl-listed"] == "true" %>
|
||||
<button class="btn btn-sm btn-secondary dropdown-toggle" data-toggle="dropdown"><i class="dropdown-icon fe fe-globe px-2"></i> Public</button>
|
||||
<% else %>
|
||||
<button class="btn btn-sm btn-secondary dropdown-toggle" data-toggle="dropdown"><i class="dropdown-icon fe fe-link px-2"></i> Unlisted</button>
|
||||
|
Reference in New Issue
Block a user