Commit 844907d0 authored by marcheing's avatar marcheing

Add new player view and partials for contents#show

parent f10b0ffc
<div class="content-details">
<div class="left-col">
<h2 class="content-title"><%= content.title %></h2>
<div class="inline-grid">
<h3 class="content-author"><%= t('.by') %> <%= content.user.profile.full_name %></h3>
<!-- TODO: Uncomment after the follow routes are defined
<a href=<#= follow_path(video.user) %> class="follow-button small has-tip top" data-tooltip aria-haspopup="true" class="has-tip top ic-premio" data-disable-hover='false' tabindex=1 title="Seguir usuário">
<i class="fa fa-long-arrow-left"></i>
<i class="fa fa-long-arrow-left"></i>
<i class="fa fa-long-arrow-left"></i>
<i class="fa fa-long-arrow-left"></i>
</a>
-->
</div>
<p><%= content.user.profile.city %> - <%= content.user.profile.state %> <%= content.user.profile.country %></p>
<p><%= t('.added_on', date: content.created_at.to_date) %><span class="video-license">BY-NC-SA</span></p>
</div>
<div class="right-col">
<!-- TODO: Uncomment after video awards and features are implemented
<div class="content-icons-group">
<# if video.awarded? %>
<span data-tooltip aria-haspopup="true" class="has-tip top ic-premio" data-disable-hover='false' tabindex=1 title="<#= t('.awarded')%>"></span>
<# end %>
<# if featured? video %>
<span data-tooltip aria-haspopup="true" class="has-tip top ic-destaque" data-disable-hover='false' tabindex=1 title="<#= t('.featured')%>"></span>
<# end %>
</div>
-->
<h3 class="content-views"><%= content.view_count %> <%= t('.views') %></h3>
<!-- TODO: Uncomment after content rating backed is complete
<div class="content-rating">
<# if user_signed_in? %>
<#= form_tag '/votes', method: :post, remote: true do %>
<#= hidden_field_tag 'vote[content_id]', video.id %>
<%# TODO: Votes will be public only on public contests %>
<#= hidden_field_tag 'public_vote', false %>
<input type="range" min="0" max="5" value="<#= video.average_of_users_grade_rounded %>" step="0.5" id="content-rating-val" name="vote[grade]">
<div class="rateit" data-rateit-backingfld="#content-rating-val" data-rateit-ispreset="true" data-rateit-starwidth="20" data-rateit-starheight="20"></div>
<div>
<button type="submit" class="evaluate-button"><#= t('.evaluate') %></button>
</div>
<# end %>
<# else %>
<#= t('.needs_to_login_to_evaluate') %>
<# end %>
</div>
-->
</div>
<div class="columns small-12">
<!-- Uncomment after the tags backend is complete
<h3 class="content-tags"><#= t('.contents.show.details.tags') %>
<# if video.show_tags.empty? %>
<#= t('.none') %>
<# else %>
<#= video.show_tags %>
<# end %>
</h3>
-->
<!-- Uncomment after the contests backend is complete
<h3 class="content-contests"> <#= t('.contents.show.details.contests') %>
<# if video.contests.empty? %>
<#= t('.none') %>
<# else %>
<# video.contests.each do |contest| %>
<#= link_to(contest.name, contest_path(id: contest)) %>
<# end %>
<# end %>
</h3>
-->
</div>
</div>
<div>
<video id="video-<%= content.id %>" class="video-js" controls preload="none" width="<%= video.instance.width %>" height="<%= video.instance.height %>" data-setup="{}">
<source src="<%= video.url %>" type="video/mp4">
<p class="vjs-no-js">
<%= t('video_js_support_message_html') %>
</p>
</video>
</div>
<p id="notice"><%= notice %></p>
<p>
<strong>Title:</strong>
<%= @content.title %>
</p>
<p>
<strong>User:</strong>
<%= @content.user_id %>
</p>
<p>
<strong>Adult:</strong>
<%= @content.adult %>
</p>
<p>
<strong>Rating:</strong>
<%= @content.rating %>
</p>
<p>
<strong>Soundtrack:</strong>
<%= @content.soundtrack %>
</p>
<p>
<strong>View count:</strong>
<%= @content.view_count %>
</p>
<p>
<strong>Deleted:</strong>
<%= @content.deleted %>
</p>
<p>
<strong>Zip code:</strong>
<%= @content.zip_code %>
</p>
<p>
<strong>Director:</strong>
<%= @content.director %>
</p>
<p>
<strong>Co director:</strong>
<%= @content.co_director %>
</p>
<p>
<strong>Team:</strong>
<%= @content.team %>
</p>
<p>
<strong>Allow comments:</strong>
<%= @content.allow_comments %>
</p>
<%= link_to 'Back', contents_path %>
<main>
<div class="content-detailed-section">
<div class="autoplay-section">
<div class="autoplay-label"><%= t('.autoplay') %></div>
<div class="switch tiny">
<input class="switch-input" id="auto-play" type="checkbox" name="autoplay">
<label class="switch-paddle" for="auto-play">
<span class="show-for-sr"><%= t('.autoplay') %></span>
</label>
</div>
</div>
<div class="content-box">
<%= render partial: 'video_player', locals: { content: @content, video: @video } %>
</div>
<%= render partial: 'content_details', locals: { content: @content } %>
</div>
<div class="related-content">
<div class="content-sub-container">
<div class="inline-grid">
<ul class="tabs" data-tabs id="example-tabs">
<li class="tabs-title is-active"><a href="#list-videos-related" aria-selected="true"><%= t('.related_content') %></a></li>
<li class="tabs-title"><a href="#list-videos-same-author"><%= t('.other_content_from_user')%></a></li>
<!-- TODO: Uncomment and add comments partial after the comment backend
<# if @video.allow_comments? %>
<li class="tabs-title"><a href="#comments"><#= t('.comment_this_content') %></a></li>
<# end %>
-->
</ul>
</div>
</div>
<div class="tabs-content" data-tabs-content="example-tabs">
<div class="tabs-panel is-active" id="list-videos-related">
<div id="list-related">
</div>
<p class="see-more">
<a name="load_related" class="see-more-button"><%= t('.see_more') %></a>
</p>
</div>
<div class="tabs-panel" id="list-videos-same-author">
<div id="list-same">
</div>
<p class="see-more">
<a name="load_more_from_user" class="see-more-button"><%= t('.see_more') %></a>
</p>
</div>
<!-- TODO: Uncomment and add comments partial after the comment backend
<#= render partial: 'comments', locals: { video: @video } %>
-->
</div>
</div>
</main>
......@@ -20,3 +20,22 @@ en:
team_tooltip: Add here the team members and video actors.
soundtrack_tooltip: Be sure you have the permission to use the soundtrack.
video_has_not_finished_encoding: The requested video is not yet ready to be shown to public
contents:
content_details:
by: By
added_on: 'Added on %{date}'
featured: Featured
awarded: Awarded
views: visits
evaluate: Evaluate
needs_to_login_to_evaluate: You need to be logged in to evaluate this content
video_player:
video_js_support_message_html: To view this video please enable JavaScript, and consider upgrading to a web browser that <a href="http://videojs.com/html5-video-support/" target="_blank">supports HTML5 video</a>
show:
autoplay: Autoplay
related_content: Relateds
other_content_from_user: Other contents from this user
contests: Contests
comment_this_content: Comment this content
post_comment: Post comment
see_more: See more
......@@ -20,3 +20,22 @@ pt-BR:
team_tooltip: Coloque aqui os membros da equipe e atores do vídeo.
soundtrack_tooltip: Tenha certeza que você possui permissão para usar a trilha sonora.
video_has_not_finished_encoding: O vídeo requisitado ainda não está pronto para ser exibido
contents:
content_details:
by: Por
added_on: 'Adicionado em %{date}'
featured: Destaque
awarded: Premiado
views: visitas
evaluate: Avaliar
needs_to_login_to_evaluate: Você precisa estar logado para avaliar este conteúdo
video_player:
video_js_support_message_html: Para ver este video por favor ative o JavaScript, e considere utilizar um navegador que <a href="http://videojs.com/html5-video-support/" target="_blank">suporte videos HTML5</a>
show:
autoplay: Tocar automaticamente
related_content: Relacionados
other_content_from_user: Outros conteúdos deste usuário
contests: Concursos
comment_this_content: Comentar neste conteúdo
post_comment: Postar comentário
see_more: Veja mais
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment