Class: ODDB::View::LanguageChooserShort

Inherits:
Navigation show all
Defined in:
src/view/language_chooser.rb

Constant Summary

CSS_CLASS =
nil
:languages
LanguageNavigationLink
HTML_ATTRIBUTES =
{ }

Constants inherited from Navigation

COMPONENTS, LEGACY_INTERFACE, NAV_LINK_CLASS, NAV_LINK_CSS, NAV_METHOD, SYMBOL_MAP

Instance Method Summary (collapse)

Methods inherited from Navigation

#home, #init

Methods included from ExternalLinks

#contact_link, #data_declaration, #external_link, #faq_link, #generic_definition, #help_link, #legal_note, #meddrugs_update, #wiki_link

Methods inherited from HtmlGrid::Composite

event_link, #hash_insert_col, #hash_insert_row

Instance Method Details

- (Object) build_navigation



58
59
60
61
62
63
64
65
66
67
68
69
70
71
# File 'src/view/language_chooser.rb', line 58

def build_navigation
  offset = 0
  @lookandfeel.languages.each_with_index do |state, idx| 
    xpos = idx*2
    pos = [xpos,0]
    if(state.is_a?(String))
      state = state.intern
    end
    symbol_map.store(state, LanguageNavigationLinkShort)
    components.store(pos, state)
    components.store([xpos-1,0], :navigation_divider) if idx > 0
    offset = idx.next * 2
  end
end