Skip to content
Snippets Groups Projects
Commit 0cf5badd authored by Joshua Arts's avatar Joshua Arts
Browse files

add option to disable recording thumbnails

parent 04d07ee8
No related branches found
No related tags found
No related merge requests found
......@@ -70,6 +70,11 @@ class ApplicationController < ActionController::Base
end
helper_method :loadbalanced_configuration?
def recording_thumbnails?
Rails.configuration.recording_thumbnails
end
helper_method :recording_thumbnails?
def allow_greenlight_users?
Rails.configuration.greenlight_accounts
end
......
......@@ -25,7 +25,9 @@
<thead>
<tr>
<th><%= t("recording.table.name") %></th>
<% if recording_thumbnails? %>
<th><%= t("recording.table.thumbnails") %></th>
<% end %>
<th class="text-left"><%= t("recording.table.length") %></th>
<th class="text-left"><%= t("recording.table.users") %></th>
<th class="text-left"><%= t("recording.table.visibility") %></th>
......
......@@ -22,7 +22,7 @@
</td>
<td>
<% p = recording[:playbacks].find do |p| p[:type] == "presentation" end %>
<% if p %>
<% if p && p.key?(:preview) && recording_thumbnails? %>
<% p[:preview][:images][:image].each do |img| %>
<%= image_tag(img[:content].strip, class: "thumbnail px-2") %>
<% end %>
......
......@@ -20,14 +20,14 @@
<%= t("recording.recorded_on", date: recording_date(recording[:startTime])) %>
</div>
</td>
<td>
<% p = recording[:playbacks].find do |p| p[:type] == "presentation" end %>
<% if p %>
<% if p && p.key?(:preview) && recording_thumbnails? %>
<td>
<% safe_recording_images(p[:preview][:images][:image]).each do |img| %>
<%= image_tag(img[:content].strip, class: "thumbnail px-2") %>
<% end %>
<% end %>
</td>
<% end %>
<td class="text-left">
<div class="small text-muted text-uppercase">
<%= t("recording.table.length") %>
......
......@@ -76,5 +76,8 @@ module Greenlight
# Configure custom branding image.
config.branding_image = ENV['BRANDING_IMAGE']
# Enable/disable recording thumbnails.
config.recording_thumbnails = (ENV['RECORDING_THUMBNAILS'] != "false")
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment