From e348e3e18fe951f4da530411a68533e209e51ae6 Mon Sep 17 00:00:00 2001 From: rulingcom Date: Tue, 22 Apr 2025 19:11:09 +0800 Subject: [PATCH] add hashtag to show --- app/controllers/video_pros_controller.rb | 5 +++-- app/views/video_pros/show.html.erb | 8 ++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/app/controllers/video_pros_controller.rb b/app/controllers/video_pros_controller.rb index 23ff6f8..4890d9a 100644 --- a/app/controllers/video_pros_controller.rb +++ b/app/controllers/video_pros_controller.rb @@ -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" => { diff --git a/app/views/video_pros/show.html.erb b/app/views/video_pros/show.html.erb index 1597da0..0702cda 100644 --- a/app/views/video_pros/show.html.erb +++ b/app/views/video_pros/show.html.erb @@ -28,6 +28,11 @@ %>

<%= video_title %>

+ <% if video_image.is_youtube %>
@@ -93,5 +98,8 @@ .view_info img{ margin-right: 5px; } + .hashtags li{ + display: inline; + }
\ No newline at end of file