forked from External/greenlight
		
	add option to disable recording thumbnails
This commit is contained in:
		@@ -70,6 +70,11 @@ class ApplicationController < ActionController::Base
 | 
				
			|||||||
  end
 | 
					  end
 | 
				
			||||||
  helper_method :loadbalanced_configuration?
 | 
					  helper_method :loadbalanced_configuration?
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  def recording_thumbnails?
 | 
				
			||||||
 | 
					    Rails.configuration.recording_thumbnails
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
 | 
					  helper_method :recording_thumbnails?
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  def allow_greenlight_users?
 | 
					  def allow_greenlight_users?
 | 
				
			||||||
    Rails.configuration.greenlight_accounts
 | 
					    Rails.configuration.greenlight_accounts
 | 
				
			||||||
  end
 | 
					  end
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -25,7 +25,9 @@
 | 
				
			|||||||
              <thead>
 | 
					              <thead>
 | 
				
			||||||
                <tr>
 | 
					                <tr>
 | 
				
			||||||
                  <th><%= t("recording.table.name") %></th>
 | 
					                  <th><%= t("recording.table.name") %></th>
 | 
				
			||||||
                  <th><%= t("recording.table.thumbnails") %></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.length") %></th>
 | 
				
			||||||
                  <th class="text-left"><%= t("recording.table.users") %></th>
 | 
					                  <th class="text-left"><%= t("recording.table.users") %></th>
 | 
				
			||||||
                  <th class="text-left"><%= t("recording.table.visibility") %></th>
 | 
					                  <th class="text-left"><%= t("recording.table.visibility") %></th>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -22,7 +22,7 @@
 | 
				
			|||||||
  </td>
 | 
					  </td>
 | 
				
			||||||
  <td>
 | 
					  <td>
 | 
				
			||||||
    <% p = recording[:playbacks].find do |p| p[:type] == "presentation" end %>
 | 
					    <% 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| %>
 | 
					      <% p[:preview][:images][:image].each do |img| %>
 | 
				
			||||||
        <%= image_tag(img[:content].strip, class: "thumbnail px-2") %>
 | 
					        <%= image_tag(img[:content].strip, class: "thumbnail px-2") %>
 | 
				
			||||||
      <% end %>
 | 
					      <% end %>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -20,14 +20,14 @@
 | 
				
			|||||||
      <%= t("recording.recorded_on", date: recording_date(recording[:startTime])) %>
 | 
					      <%= t("recording.recorded_on", date: recording_date(recording[:startTime])) %>
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
  </td>
 | 
					  </td>
 | 
				
			||||||
  <td>
 | 
					  <% p = recording[:playbacks].find do |p| p[:type] == "presentation" end %>
 | 
				
			||||||
    <% p = recording[:playbacks].find do |p| p[:type] == "presentation" end %>
 | 
					  <% if p && p.key?(:preview) && recording_thumbnails? %>
 | 
				
			||||||
    <% if p %>
 | 
					    <td>
 | 
				
			||||||
      <% safe_recording_images(p[:preview][:images][:image]).each do |img| %>
 | 
					      <% safe_recording_images(p[:preview][:images][:image]).each do |img| %>
 | 
				
			||||||
        <%= image_tag(img[:content].strip, class: "thumbnail px-2") %>
 | 
					        <%= image_tag(img[:content].strip, class: "thumbnail px-2") %>
 | 
				
			||||||
      <% end %>
 | 
					      <% end %>
 | 
				
			||||||
    <% end %>
 | 
					    </td>
 | 
				
			||||||
  </td>
 | 
					  <% end %>
 | 
				
			||||||
  <td class="text-left">
 | 
					  <td class="text-left">
 | 
				
			||||||
    <div class="small text-muted text-uppercase">
 | 
					    <div class="small text-muted text-uppercase">
 | 
				
			||||||
      <%= t("recording.table.length") %>
 | 
					      <%= t("recording.table.length") %>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -76,5 +76,8 @@ module Greenlight
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    # Configure custom branding image.
 | 
					    # Configure custom branding image.
 | 
				
			||||||
    config.branding_image = ENV['BRANDING_IMAGE']
 | 
					    config.branding_image = ENV['BRANDING_IMAGE']
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    # Enable/disable recording thumbnails.
 | 
				
			||||||
 | 
					    config.recording_thumbnails = (ENV['RECORDING_THUMBNAILS'] != "false")
 | 
				
			||||||
  end
 | 
					  end
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user