From 4d62acaf8c1feace19707094694cbef28d1f96dd Mon Sep 17 00:00:00 2001 From: Eric Tsai Date: Wed, 15 Jan 2020 16:40:31 +0800 Subject: [PATCH 1/2] add missing attributes for xlsx templates --- .../admin/journal_papers/download_excel.xlsx.axlsx | 6 ++++++ app/views/admin/journal_papers/excel_format.xlsx.axlsx | 10 +++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/app/views/admin/journal_papers/download_excel.xlsx.axlsx b/app/views/admin/journal_papers/download_excel.xlsx.axlsx index 0e36354..9fc5faa 100644 --- a/app/views/admin/journal_papers/download_excel.xlsx.axlsx +++ b/app/views/admin/journal_papers/download_excel.xlsx.axlsx @@ -29,6 +29,10 @@ wb = xlsx_package.workbook row << t("personal_journal.issue_no") + row << t("personal_journal.form_to_start") + + row << t("personal_journal.form_to_end") + row << t("personal_journal.total_pages") row << t("personal_journal.level_type") @@ -70,6 +74,8 @@ wb = xlsx_package.workbook row << jp.language row << jp.vol_no row << jp.issue_no + row << jp.form_to_start + row << jp.form_to_end row << jp.total_pages row << (jp.journal_levels.map{|jl| jl.title}.join(", ") rescue "") row << (jp.journal_paper_type.title rescue "") diff --git a/app/views/admin/journal_papers/excel_format.xlsx.axlsx b/app/views/admin/journal_papers/excel_format.xlsx.axlsx index e2efe18..045f233 100644 --- a/app/views/admin/journal_papers/excel_format.xlsx.axlsx +++ b/app/views/admin/journal_papers/excel_format.xlsx.axlsx @@ -52,6 +52,14 @@ wb.add_worksheet(name: "Journal Paper") do |sheet| row1 << "textfield" row2 << "" + row << t("personal_journal.form_to_start") + row1 << "number" + row2 << "Example: 11 or 21" + + row << t("personal_journal.form_to_end") + row1 << "number" + row2 << "Example: 13 or 23" + row << t("personal_journal.total_pages") row1 << "number" row2 << "Example: 10 or 20 or 100" @@ -142,4 +150,4 @@ wb.add_worksheet(name: "Journal Paper") do |sheet| end -end \ No newline at end of file +end From 7ba8a128ff58b07319bb24a7d96bd03d747d1cd7 Mon Sep 17 00:00:00 2001 From: Eric Tsai Date: Wed, 15 Jan 2020 17:03:19 +0800 Subject: [PATCH 2/2] add link to member show page --- app/models/journal_paper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/journal_paper.rb b/app/models/journal_paper.rb index 00faf85..fbc1265 100644 --- a/app/models/journal_paper.rb +++ b/app/models/journal_paper.rb @@ -218,7 +218,7 @@ class JournalPaper when "url" value = self.url.to_s.blank? ? "" : "#{self.url}" when "authors" - value = get_authors_show(self) + value = get_member_show(self) rescue "" else value = self.send(field) rescue "" end