This repository has been archived on 2021-10-24. You can view files and clone it, but cannot push or open issues or pull requests.
greenlight/app/views/shared/components/_recording_row.html.erb

79 lines
3.5 KiB
Plaintext
Raw Normal View History

2018-08-01 09:45:12 -04:00
<%
# BigBlueButton open source conferencing system - http://www.bigbluebutton.org/.
# Copyright (c) 2018 BigBlueButton Inc. and by respective authors (see below).
# This program is free software; you can redistribute it and/or modify it under the
# terms of the GNU Lesser General Public License as published by the Free Software
# Foundation; either version 3.0 of the License, or (at your option) any later
# version.
#
# BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
# You should have received a copy of the GNU Lesser General Public License along
# with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
%>
2018-06-01 11:55:52 -04:00
<tr>
<td>
<div><%= recording[:name] %></div>
<div class="small text-muted">
2018-07-17 11:57:49 -04:00
<%= t("recording.recorded_on", date: recording_date(recording[:startTime])) %>
2018-06-01 11:55:52 -04:00
</div>
</td>
<% if recording_thumbnails? %>
<td>
<% p = recording[:playbacks].find do |p| p.key?(:preview) end %>
<% if p %>
<% safe_recording_images(p[:preview][:images][:image]).each do |img| %>
<%= image_tag(img[:content].strip, class: "thumbnail px-2") %>
<% end %>
2018-06-01 11:55:52 -04:00
<% end %>
</td>
<% end %>
2018-06-01 11:55:52 -04:00
<td class="text-left">
<%= recording_length(recording[:playbacks]) %>
2018-06-01 11:55:52 -04:00
</td>
<td class="text-left">
<%= recording[:participants] || "-" %>
2018-06-01 11:55:52 -04:00
</td>
<td class="text-left">
2018-06-11 17:32:08 -04:00
<div class="dropdown">
<% if recording[:metadata][:"gl-listed"] == "true" %>
2018-07-17 11:57:49 -04:00
<button class="btn btn-sm btn-secondary dropdown-toggle" data-toggle="dropdown"><i class="dropdown-icon fas fa-globe px-2"></i> <%= t("recording.visibility.public") %></button>
2018-06-12 14:36:35 -04:00
<% else %>
2018-07-17 11:57:49 -04:00
<button class="btn btn-sm btn-secondary dropdown-toggle" data-toggle="dropdown"><i class="dropdown-icon fas fa-link px-2"></i> <%= t("recording.visibility.unlisted") %></button>
2018-06-12 14:36:35 -04:00
<% end %>
2018-06-11 17:32:08 -04:00
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
2018-06-12 14:36:35 -04:00
<%= button_to update_recording_path(@room, record_id: recording[:recordID], state: "public"), class: "dropdown-item" do %>
2018-07-17 11:57:49 -04:00
<i class="dropdown-icon fas fa-globe"></i> <%= t("recording.visibility.public") %>
2018-06-11 17:32:08 -04:00
<% end %>
2018-06-12 14:36:35 -04:00
<%= button_to update_recording_path(@room, record_id: recording[:recordID], state: "unlisted"), class: "dropdown-item" do %>
2018-07-17 11:57:49 -04:00
<i class="dropdown-icon fas fa-link"></i> <%= t("recording.visibility.unlisted") %>
2018-06-11 17:32:08 -04:00
<% end %>
</div>
2018-06-01 11:55:52 -04:00
</div>
</td>
<td>
<% recording[:playbacks].each do |p| %>
2018-06-11 17:32:08 -04:00
<%= link_to p[:type].capitalize, p[:url], class: "btn btn-sm btn-primary", target: "_blank" %>
2018-06-01 11:55:52 -04:00
<% end %>
</td>
<td class="text-center">
<div class="item-action dropdown">
2018-07-30 11:48:11 -04:00
<a href="javascript:void(0)" data-toggle="dropdown" class="icon">
<i class="fas fa-ellipsis-v px-4"></i>
</a>
2018-06-12 14:36:35 -04:00
<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>
<div class="dropdown-divider"></div>
<% end %>
2018-06-01 11:55:52 -04:00
<%= button_to delete_recording_path(@room, record_id: recording[:recordID]), method: :delete, class: "dropdown-item" do %>
2018-07-17 11:57:49 -04:00
<i class="dropdown-icon far fa-trash-alt"></i> <%= t("delete") %>
2018-06-01 11:55:52 -04:00
<% end %>
</div>
</div>
</td>
</tr>