Class: ODDB::View::LanguageNavigationLink

Inherits:
HtmlGrid::Link
  • Object
show all
Defined in:
src/view/navigationlink.rb

Direct Known Subclasses

LanguageNavigationLinkShort

Constant Summary

CSS_CLASS =
"list"

Instance Method Summary (collapse)

Instance Method Details

- (Object) init



22
23
24
25
26
27
28
29
30
31
# File 'src/view/navigationlink.rb', line 22

def init
  super
  lang = @lookandfeel.language
  unless(lang == @name.to_s)
    path = @session.request_path.dup
    base = "/#{@name}/"
    path.sub!(%r{/#{lang}/?}u, base) || path = base
    @attributes.store("href", path)
  end
end