fix error

This commit is contained in:
chiu 2021-09-15 23:57:44 +08:00
parent 4479710543
commit ae965bbb6a
1 changed files with 7 additions and 3 deletions

View File

@ -60,11 +60,15 @@ class SiteFeedAnnc
tmp["subtitle"] = tmp["subtitle_translations"][locale]
tmp["source-site-link"] = tmp["source-site"]
tmp["source-site"] = "<a href='#{tmp["source-site"]}' target='_blank' class='feed-source'>#{tmp["source-site-title"]}</a>"
if !tmp["external_link"].blank?
tmp["link_to_show"] = tmp["external_link"]
else
if !is_widget
tmp["link_to_show"] = OrbitHelper.url_to_show(tmp["params"]) rescue ''
else
tmp["link_to_show"] = OrbitHelper.widget_item_url(tmp["params"]) rescue ''
end
end
tmp["target"] = "_self"
tmp["img_src"] = tmp["image"]["thumb"] || "/assets/announcement-default.jpg"
tmp["img_description"] = tmp["image_description_translations"][locale]