display values only when present
This commit is contained in:
parent
d941e096ba
commit
9b6e967787
|
@ -92,7 +92,7 @@ class JournalPaper
|
|||
end
|
||||
|
||||
def values_for_view
|
||||
attribute_values = self.attributes.select{|k,v| v if k.in?(["year","language","isbn","vol_no","issue_no","form_to_start","form_to_end","total_pages","keywords","abstract","publication_date","url","note"])}
|
||||
attribute_values = self.attributes.select{|k,v| v if (k.in?(["year","language","isbn","vol_no","issue_no","form_to_start","form_to_end","total_pages","keywords","abstract","publication_date","url","note"]) && v.present?)}
|
||||
localized_fields = {"paper_title" => self.attributes["paper_title"][I18n.locale], "journal_title" => self.attributes["journal_title"][I18n.locale]}
|
||||
authors = {"authors" => self.authors}
|
||||
files = Hash.new
|
||||
|
|
Loading…
Reference in New Issue