parent
45d49bc290
commit
25449e9803
|
@ -152,9 +152,9 @@ class Book
|
|||
def get_plugin_field_data(field)
|
||||
case field
|
||||
when "book_paper_type"
|
||||
value = self.book_type.title rescue ""
|
||||
value = (self.book_type.title rescue "")
|
||||
when "author_type"
|
||||
value = self.book_author_types.collect{|type| type.title}.join(',') rescue ""
|
||||
value = (self.book_author_types.collect{|type| type.title}.join(',') rescue "")
|
||||
when "author_name"
|
||||
value = []
|
||||
([I18n.locale]+(Site.first.in_use_locales-[I18n.locale])).each do |locale|
|
||||
|
@ -180,7 +180,7 @@ class Book
|
|||
when "authors"
|
||||
value = get_authors_show(self)
|
||||
else
|
||||
value = self.send(field) rescue ""
|
||||
value = (self.send(field) rescue "")
|
||||
end
|
||||
|
||||
value = (value =~ /\A#{URI::regexp(['http', 'https'])}\z/) ? "<a href='#{value}' target='blank'>#{value}</a>" : value
|
||||
|
|
Loading…
Reference in New Issue