Fix indent.
This commit is contained in:
		
							parent
							
								
									c901f08b33
								
							
						
					
					
						commit
						ffbf29d912
					
				|  | @ -1,5 +1,5 @@ | |||
| module Admin::PersonalBooksHelper | ||||
|  def get_authors_text(book) | ||||
|   def get_authors_text(book) | ||||
|     authors_text = Nokogiri::HTML(book.authors.to_s).text | ||||
|     split_text = authors_text.match(/[、,,\/]/) | ||||
|     split_text = split_text.nil? ? '/' : split_text[0] | ||||
|  | @ -9,8 +9,8 @@ module Admin::PersonalBooksHelper | |||
|       full_authors_names += authors_names | ||||
|     end | ||||
|     full_authors_names.join(split_text) | ||||
|  end | ||||
|  def get_authors_show(book) | ||||
|   end | ||||
|   def get_authors_show(book) | ||||
|     authors_text = Nokogiri::HTML(book.authors.to_s).text | ||||
|     split_text = authors_text.match(/[、,,\/]/) | ||||
|     split_text = split_text.nil? ? '/' : split_text[0] | ||||
|  | @ -25,25 +25,25 @@ module Admin::PersonalBooksHelper | |||
|       full_authors += authors_names | ||||
|     end | ||||
|     full_authors.join(split_text) | ||||
|  end | ||||
|  def get_member(book) | ||||
|    Array(MemberProfile.where(:id.in=>Array(book).collect(&:member_profile_id).flatten)) | ||||
|  end | ||||
|  def get_member_show(book) | ||||
|    get_member(book).collect{|member| "<a href='#{OrbitHelper.url_to_plugin_show(member.to_param,'member')}' title='#{member.name}'>#{member.name}</a>"}.join('/') | ||||
|  end | ||||
|  def get_publisher(book) | ||||
|    book.publisher | ||||
|  end | ||||
|  def get_author_type(book) | ||||
|    book.book_author_types.collect(&:title).join(', ') rescue '' | ||||
|  end | ||||
|  def get_paper_type(book) | ||||
|    !book.book_type.blank? ? book.book_type.title : nil | ||||
|  end | ||||
|  def get_publication_date(book) | ||||
|    book.publication_date.strftime('%Y/%m/%d') rescue '' | ||||
|  end | ||||
|   end | ||||
|   def get_member(book) | ||||
|     Array(MemberProfile.where(:id.in=>Array(book).collect(&:member_profile_id).flatten)) | ||||
|   end | ||||
|   def get_member_show(book) | ||||
|     get_member(book).collect{|member| "<a href='#{OrbitHelper.url_to_plugin_show(member.to_param,'member')}' title='#{member.name}'>#{member.name}</a>"}.join('/') | ||||
|   end | ||||
|   def get_publisher(book) | ||||
|     book.publisher | ||||
|   end | ||||
|   def get_author_type(book) | ||||
|     book.book_author_types.collect(&:title).join(', ') rescue '' | ||||
|   end | ||||
|   def get_paper_type(book) | ||||
|     !book.book_type.blank? ? book.book_type.title : nil | ||||
|   end | ||||
|   def get_publication_date(book) | ||||
|     book.publication_date.strftime('%Y/%m/%d') rescue '' | ||||
|   end | ||||
| 	def get_paper_list | ||||
| 	  user = current_user.nil? ? OrbitHelper.current_user : current_user | ||||
| 	  user_profile = user.member_profile | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue