forked from External/greenlight
		
	Fixed room view broken when no format presentation is included (GRN-34) (#289)
This commit is contained in:
		| @@ -20,14 +20,16 @@ | |||||||
|       <%= t("recording.recorded_on", date: recording_date(recording[:startTime])) %> |       <%= t("recording.recorded_on", date: recording_date(recording[:startTime])) %> | ||||||
|     </div> |     </div> | ||||||
|   </td> |   </td> | ||||||
|  |   <% if recording_thumbnails? %> | ||||||
|     <td> |     <td> | ||||||
|     <% p = recording[:playbacks].find do |p| p[:type] == "presentation" end %> |       <% p = recording[:playbacks].find do |p| p.key?(:preview) end %> | ||||||
|     <% if p && p.key?(:preview) && recording_thumbnails? %> |       <% if p %> | ||||||
|         <% 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 %> | ||||||
|       <% 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") %> | ||||||
| @@ -50,6 +52,7 @@ | |||||||
|     </div> |     </div> | ||||||
|   </td> |   </td> | ||||||
|   <td> |   <td> | ||||||
|  |     <% p = recording[:playbacks].find do |p| p.key?(:length) end %> | ||||||
|     <% recording[:playbacks].each do |p| %> |     <% recording[:playbacks].each do |p| %> | ||||||
|       <%= link_to p[:type].capitalize, p[:url], class: "btn btn-sm btn-primary", target: "_blank" %> |       <%= link_to p[:type].capitalize, p[:url], class: "btn btn-sm btn-primary", target: "_blank" %> | ||||||
|     <% end %> |     <% end %> | ||||||
|   | |||||||
| @@ -20,24 +20,20 @@ | |||||||
|       <%= t("recording.recorded_on", date: recording_date(recording[:startTime])) %> |       <%= t("recording.recorded_on", date: recording_date(recording[:startTime])) %> | ||||||
|     </div> |     </div> | ||||||
|   </td> |   </td> | ||||||
|   <% p = recording[:playbacks].find do |p| p[:type] == "presentation" end %> |   <% if recording_thumbnails? %> | ||||||
|   <% if p && p.key?(:preview) && recording_thumbnails? %> |  | ||||||
|     <td> |     <td> | ||||||
|  |       <% p = recording[:playbacks].find do |p| p.key?(:preview) end %> | ||||||
|  |       <% if p %> | ||||||
|         <% 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 %> |   <% end %> | ||||||
|   <td class="text-left"> |   <td class="text-left"> | ||||||
|     <div class="small text-muted text-uppercase"> |  | ||||||
|       <%= t("recording.table.length") %> |  | ||||||
|     </div> |  | ||||||
|     <%= recording_length(recording[:playbacks]) %> |     <%= recording_length(recording[:playbacks]) %> | ||||||
|   </td> |   </td> | ||||||
|   <td class="text-left"> |   <td class="text-left"> | ||||||
|     <div class="small text-muted text-uppercase"> |  | ||||||
|       <%= t("recording.table.users") %> |  | ||||||
|     </div> |  | ||||||
|     <%= recording[:participants] || "-" %> |     <%= recording[:participants] || "-" %> | ||||||
|   </td> |   </td> | ||||||
|   <td class="text-left"> |   <td class="text-left"> | ||||||
| @@ -68,8 +64,11 @@ | |||||||
|         <i class="fas fa-ellipsis-v px-4"></i> |         <i class="fas fa-ellipsis-v px-4"></i> | ||||||
|       </a> |       </a> | ||||||
|       <div class="dropdown-menu dropdown-menu-right"> |       <div class="dropdown-menu dropdown-menu-right"> | ||||||
|  |         <% p = recording[:playbacks].find do |p| p.key?(:length) end %> | ||||||
|  |         <% if p %> | ||||||
|           <a class="dropdown-item email-link" data-pres-link="<%= p[:url] %>"><i class="dropdown-icon far fa-envelope"></i> <%= t("recording.email") %></a> |           <a class="dropdown-item email-link" data-pres-link="<%= p[:url] %>"><i class="dropdown-icon far fa-envelope"></i> <%= t("recording.email") %></a> | ||||||
|           <div class="dropdown-divider"></div> |           <div class="dropdown-divider"></div> | ||||||
|  |         <% end %> | ||||||
|         <%= button_to delete_recording_path(@room, record_id: recording[:recordID]), method: :delete, class: "dropdown-item" do %> |         <%= 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> <%= t("delete") %> |           <i class="dropdown-icon far fa-trash-alt"></i> <%= t("delete") %> | ||||||
|         <% end %> |         <% end %> | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user