add hashtag to show
This commit is contained in:
parent
dc5e24dcf2
commit
e348e3e18f
|
|
@ -12,7 +12,8 @@ class VideoProsController < ApplicationController
|
|||
video_image.view_count += 1
|
||||
video_image.inc_count
|
||||
{
|
||||
"video_image" => video_image
|
||||
"video_image" => video_image,
|
||||
"url" => "/#{I18n.locale.to_s}" + OrbitHelper.page.url
|
||||
}
|
||||
end
|
||||
def show_api
|
||||
|
|
@ -168,7 +169,7 @@ class VideoProsController < ApplicationController
|
|||
|
||||
hashtag_id = hashtag.id.to_s rescue nil
|
||||
hashtags = VideoTag.all.map do |tag|
|
||||
{"hashtag" => tag.title, "hash_url" => request.base_url + request.path + "?hashtag=#{tag.title}", "selected" => (hashtag_id == tag.id.to_s ? "selected" : "")}
|
||||
{"hashtag" => tag.title, "hash_url" => request.path + "?hashtag=#{tag.title}", "selected" => (hashtag_id == tag.id.to_s ? "selected" : "")}
|
||||
end
|
||||
{
|
||||
"extras" => {
|
||||
|
|
|
|||
|
|
@ -28,6 +28,11 @@
|
|||
%>
|
||||
<div class="video_detail">
|
||||
<h3><%= video_title %></h3>
|
||||
<ul class="hashtags">
|
||||
<% video_image.video_tags.each do |tag| %>
|
||||
<li><a href="<%= data["url"] + "?hashtag=#{tag.title}" %>">#<%= tag.title %></a></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<% if video_image.is_youtube %>
|
||||
<div class="video_yt_box video_box_wrap">
|
||||
<iframe id="muteYouTubeVideoPlayer" frameborder="0" allowfullscreen="1"src="<%= video_url%>"></iframe>
|
||||
|
|
@ -93,5 +98,8 @@
|
|||
.view_info img{
|
||||
margin-right: 5px;
|
||||
}
|
||||
.hashtags li{
|
||||
display: inline;
|
||||
}
|
||||
</style>
|
||||
</div>
|
||||
Loading…
Reference in New Issue