Module CharacterRadicalsHelper
In: app/helpers/character_radicals_helper.rb

Methods

Public Instance methods

[Source]

   # File app/helpers/character_radicals_helper.rb, line 7
7:   def link_to_clear_radical_filter
8:     return link_to(t('actions.reset'), :controller => :character_radicals, :action => :set_search)
9:   end

[Source]

    # File app/helpers/character_radicals_helper.rb, line 11
11:   def link_to_radical_filter(radical, session_radicals_map)
12:     remaining_active_radicals = CharacterRadical.find_distinct_remaining_radical_ids(session_radicals_map)
13:     link = link_to("#{radical.character}", :controller => :character_radicals, :action => :set_search, :character_radical_ids => radical.id)  
14:     if session_radicals_map && session_radicals_map.has_key?(radical.id.to_s)
15:       return "<span class='kb_selected_radical'>#{link}</span>"
16:     else
17:       if session_radicals_map.nil? || session_radicals_map.empty?
18:         return link
19:       elsif remaining_active_radicals.has_key?(radical.id.to_s)
20:         return link
21:       else
22:         return "<span class='kb_unselectable_radical'>#{radical.character}</span>"
23:       end
24:     end
25:   end

[Source]

   # File app/helpers/character_radicals_helper.rb, line 3
3:   def radicals_group_map
4:     RadicalGroup.get_radical_groups
5:   end

[Validate]