From 4b2cf0aeb0d46c3fe85e669293e045aeb8a3beec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B1=E5=8D=9A=E4=BA=9E?= Date: Mon, 2 Oct 2023 20:38:22 +0800 Subject: [PATCH] announcement export excel add frontend url link --- app/views/admin/announcements/_export_excel.xlsx.axlsx | 6 ++++++ config/locales/en.yml | 1 + config/locales/zh_tw.yml | 1 + 3 files changed, 8 insertions(+) diff --git a/app/views/admin/announcements/_export_excel.xlsx.axlsx b/app/views/admin/announcements/_export_excel.xlsx.axlsx index 40ebbb1..1cbdfc6 100644 --- a/app/views/admin/announcements/_export_excel.xlsx.axlsx +++ b/app/views/admin/announcements/_export_excel.xlsx.axlsx @@ -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(";") diff --git a/config/locales/en.yml b/config/locales/en.yml index 5890262..0f971ae 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -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 diff --git a/config/locales/zh_tw.yml b/config/locales/zh_tw.yml index ebff982..9935154 100644 --- a/config/locales/zh_tw.yml +++ b/config/locales/zh_tw.yml @@ -149,6 +149,7 @@ zh_tw: frontend: bulletins: 公告前台 search_result: 搜尋結果頁 + link: 前臺連結 link_name: 連結名稱 new_bulletin_category: 新增公告類別 picture: 刊頭圖片