<% metaUser = recording.metadata.all.select{ |m| m.name == BigbluebuttonRails.metadata_user_id.to_s }.first %>
<% metaTitle = recording.metadata.all.select{ |m| m.name == configatron.metadata.title }.first %>
<% metaDesc = recording.metadata.all.select{ |m| m.name == configatron.metadata.description }.first %>
<% if metaTitle.nil? or metaTitle.content.blank? %>
<%= t('recordings.no_title') %>:
<% else %>
<%= metaTitle.content %>:
<% end %>
<% if metaDesc.nil? or metaDesc.content.blank? %>
<%= t('recordings.no_description') %>
<% else %>
<%= metaDesc.content %>
<% end %>
<%= t('recordings.playback') %>:
<% unless recording.available %>
<%= t('recordings.unavailable') %>
<%= image_tag("icons/help.png",:title=>"",:size=>"16x16",:class=>"tooltip_unavailable icon",:style=>"cursor:pointer",:title => t('recordings.unavailable_tip')).html_safe %>
<% else %>
<% if recording.playback_formats.size > 0 %>
<% recording.playback_formats.each do |playback| %>
<%= image_tag "icons/16/play2.png", :class => "playback-icon" %>
<%= playback.format_type %>
<% end %>
<% else %>
<%= t('recordings.processing_dots') %>
<% end %>
<% end %>
<% if show_authors %>
<% unless metaUser.nil? %>
<% user = User.find_by_id(metaUser.content) %>
<% unless user.nil? %>
<%= t('recordings.created_by') %>:
<%= link_to user.full_name, user_profile_path(user) %>,
<% end %>
<% end %>
<% end %>
<%= t('recordings.started_at') %>: <%= recording.start_time %>,
<%= t('recordings.duration') %>:
<%= distance_of_time_in_words(recording.start_time, recording.end_time) %>
<% end %>