Merge branch 'master' into 'master'

add link to member show page / add missing attributes for xlsx templates

* add link to member show page  
* add missing attributes for xlsx templates

See merge request !7
This commit is contained in:
EricTYL 2020-01-17 18:02:22 +08:00
commit 3fb13a59b2
3 changed files with 16 additions and 2 deletions

View File

@ -218,7 +218,7 @@ class JournalPaper
when "url"
value = self.url.to_s.blank? ? "" : "<a href='#{self.url}'>#{self.url}</a>"
when "authors"
value = get_authors_show(self)
value = get_member_show(self) rescue ""
else
value = self.send(field) rescue ""
end

View File

@ -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 "")

View File

@ -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
end