86 lines
2.7 KiB
Plaintext
86 lines
2.7 KiB
Plaintext
<%
|
|
data = action_data
|
|
video_image = data["video_image"]
|
|
video_title = video_image.title.to_s
|
|
video_desc = video_image.desc.to_s
|
|
video_post_agency = video_image.post_agency.to_s
|
|
video_postdate = video_image.postdate.to_s
|
|
if video_image.is_youtube
|
|
video_url = video_image.embed_url
|
|
video_webm_url = nil
|
|
else
|
|
video_url = video_image.video_file.url
|
|
video_webm_url = video_image.video_file_webm.url
|
|
end
|
|
hd_icon_url = "/assets/video_pro/icon_hd.png"
|
|
view_icon_url = "/assets/video_pro/icon_view.png"
|
|
view_count_trans = I18n.t("video_pro.view_count")
|
|
view_count = video_image.view_count
|
|
autoplay_video = false
|
|
hide_video_tools = false
|
|
snapshot_url = video_image.get_snapshot_url
|
|
@is_frontend = true
|
|
video_scale = (video_image.scale ? video_image.scale : 56.25)
|
|
%>
|
|
<div class="video_detail">
|
|
<h3><%= video_title %></h3>
|
|
<% if video_image.is_youtube %>
|
|
<div class="video_yt_box video_box_wrap">
|
|
<iframe id="muteYouTubeVideoPlayer" frameborder="0" allowfullscreen="1"src="<%= video_url%>"></iframe>
|
|
</div>
|
|
<% else %>
|
|
<%= stylesheet_link_tag("video_pro/jplayer.blue.monday.min.css") %>
|
|
<%= javascript_include_tag("video_pro/jquery.jplayer.min.js") %>
|
|
<div class="video_box_wrap" data-auto-height="true">
|
|
<div class="video_box jplayer_slide">
|
|
<%= render partial: "admin/video_pros/jplayer", locals:{i: "video_file",file_name: video_title,file_url: video_url,file_webm_url: video_webm_url,:@autoplay_video=> autoplay_video,:@apply_autoplay_script=>true,:@hide_video_tools=> hide_video_tools,:@is_frontend=>true,:@file_poster=> snapshot_url} %>
|
|
</div>
|
|
</div>
|
|
<% end %>
|
|
<div class="imglst_desc">
|
|
<div class="video_group_time"><%= video_post_agency %> | <%= video_postdate %></div>
|
|
<div class="movie_desc"><%= video_desc %></div>
|
|
<div class="view_info">
|
|
<span><img src="<%= hd_icon_url %>" alt="HD"></span>
|
|
<span><img src="<%= view_icon_url %>" alt="<%= view_count_trans %>">x <%= view_count %></span>
|
|
</div>
|
|
</div>
|
|
<style>
|
|
.video_box_wrap{
|
|
height: 0;
|
|
padding-bottom: <%=video_scale%>%;
|
|
position: relative;
|
|
overflow: hidden;
|
|
}
|
|
.video_box{
|
|
width: 100%;
|
|
height: 100%;
|
|
position: absolute;
|
|
}
|
|
.video_yt_box iframe{
|
|
width: 100%;
|
|
height: 100%;
|
|
position: absolute;
|
|
}
|
|
.video_group_time{
|
|
color: #4487cb;
|
|
}
|
|
.video_category{
|
|
color: #e4374a;
|
|
}
|
|
.video_title h4{
|
|
font-size: 1.6em;
|
|
font-weight: bold;
|
|
margin-bottom: 0;
|
|
text-overflow: ellipsis;
|
|
overflow: hidden;
|
|
white-space: nowrap;
|
|
}
|
|
.view_info{
|
|
float: right;
|
|
}
|
|
.view_info img{
|
|
margin-right: 5px;
|
|
}
|
|
</style>
|
|
</div> |