From 62b0cf84fa8a4bfd72a0be037ee6948ce8d449a5 Mon Sep 17 00:00:00 2001 From: Bohung Date: Fri, 9 Apr 2021 18:04:53 +0800 Subject: [PATCH] Change read more url for tags. --- app/controllers/announcements_controller.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/controllers/announcements_controller.rb b/app/controllers/announcements_controller.rb index 9f9b8f4..607eb2c 100644 --- a/app/controllers/announcements_controller.rb +++ b/app/controllers/announcements_controller.rb @@ -322,7 +322,7 @@ class AnnouncementsController < ApplicationController read_more_text = I18n.t("announcement.more") if cats.count == 1 && cats[0] != "all" begin - read_more_text = I18n.t("announcement.more_") + cats_translations[cats[0]] + read_more_text = I18n.t("announcement.more_") + ((all_tags.count == 1 && all_tags[0] != 'all') ? tags_translations[tags[0]] : cats_translations[cats[0]]) rescue nil end @@ -374,9 +374,9 @@ class AnnouncementsController < ApplicationController " end - read_more_url = "/#{I18n.locale.to_s + page.url}" rescue "" - read_more_url = read_more_url + "?" + {"category"=>all_cats}.to_param if read_more_url != "" if @tab_option == 0 + read_more_url = "/#{I18n.locale.to_s + page.url}" rescue "" + read_more_url = read_more_url + "?" + {"category"=>all_cats,"tags"=>all_tags}.to_param if read_more_url != "" extra_after_html += "