Change read more url for tags.
This commit is contained in:
parent
1d76ff87b7
commit
62b0cf84fa
|
@ -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
|
|||
</script>
|
||||
"
|
||||
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 += "
|
||||
<script>
|
||||
$(\"[data-subpart-id=\\\"#{subpart.id}\\\"] .w-annc__more\").attr(\"href\",\"#{read_more_url}\");
|
||||
|
|
Loading…
Reference in New Issue