announcement export excel add frontend url link

This commit is contained in:
邱博亞 2023-10-02 20:38:22 +08:00
parent 1879d976d4
commit 4b2cf0aeb0
3 changed files with 8 additions and 0 deletions

View File

@ -90,6 +90,10 @@ wb.add_worksheet(name: "Annoucement") do |sheet|
row1 << "editor"
row2 << ""
row << t("announcement.frontend.link")
row1 << "textfield"
row2 << "Seperate with ';'. Example: http://rulingcom.com; http://google.com"
row << t("link")
row1 << "textfield"
row2 << "Seperate with ';'. Example: http://rulingcom.com; http://google.com"
@ -154,6 +158,8 @@ wb.add_worksheet(name: "Annoucement") do |sheet|
row << anns.text_translations["en"]
row << anns.text_translations["zh_tw"]
row << page_for_bulletin(anns)
links = anns.bulletin_links.asc(:created_at)
t = links.collect{|l|l.url}
row << t.join(";")

View File

@ -146,6 +146,7 @@ en:
frontend:
bulletins: Announcement front-end
search_result: Search result
link: Fronend Link
link_name: Link Name
new_bulletin_category: New Bulletin Category
picture: Cover Picture

View File

@ -149,6 +149,7 @@ zh_tw:
frontend:
bulletins: 公告前台
search_result: 搜尋結果頁
link: 前臺連結
link_name: 連結名稱
new_bulletin_category: 新增公告類別
picture: 刊頭圖片