Module VocabularyListsHelper
In: app/helpers/vocabulary_lists_helper.rb

Methods

Public Instance methods

[Source]

    # File app/helpers/vocabulary_lists_helper.rb, line 3
 3:   def description_form_column(record, input_name)
 4:     text_area(
 5:       :record, 
 6:       :description, 
 7:       :name => input_name,
 8:       :rows => 5
 9:     )
10:   end

[Source]

    # File app/helpers/vocabulary_lists_helper.rb, line 24
24:   def export_character_for_kls(character)
25:     locale_language = Language.get_language(params[:lang])
26:     language_id = session[:language_target_id] || locale_language ? locale_language.id : nil
27:     language_id ||= Language.get_english.id
28:     character_meanings = character.character_meanings.map{ |character_meaning| 
29:       language_id == character_meaning.language_id  ? character_meaning.meaning : nil
30:     }.compact
31:     h("#{character.character}#{character_meanings.empty? ? '' : ';'}#{character_meanings.join('||')}\n")
32:   end

[Source]

    # File app/helpers/vocabulary_lists_helper.rb, line 16
16:   def export_column(record)
17:     links = Array.new
18:     if record.authorized_for_read? && record.language == Language.get_japanese
19:       links << link_to('KLS', :action => :export, :format => :kls, :id => record.id)
20:     end
21:     links.join(', ')
22:   end

[Source]

    # File app/helpers/vocabulary_lists_helper.rb, line 34
34:   def export_words_for_kls(words)
35:     unique_characers = Hash.new
36:     for word in words
37:       word.spelling.each_char{ |character| unique_characers[character] = h("#{character}\n") }
38:     end 
39:     unique_characers.values.join('')
40:   end

[Source]

    # File app/helpers/vocabulary_lists_helper.rb, line 12
12:   def words_read_only_show_column(record)
13:     render :active_scaffold => 'words', :sort => "spelling", :sort_direction => "ASC"
14:   end

[Validate]