Sha256: 0ca3fff34433909e037cbfc78413492926686e0da5f4cf97454937d45d11aaae

Contents?: true

Size: 1.27 KB

Versions: 5

Compression:

Stored size: 1.27 KB

Contents

module LolitaTranslation
  class Engine < Rails::Engine

  end
end

Lolita::Hooks.component(:"/lolita/configuration/tab/form").before do
  tab = self.component_locals[:tab]
  if Lolita::Translation.translatable?(tab)
    self.send(:render_component,"lolita/translation",:switch, :tab => tab)
  end
end

Lolita::Hooks.component(:"/lolita/configuration/tab/fields").after do
  tab = self.component_locals[:tab]
  if Lolita::Translation.translatable?(tab)
    self.render_component Lolita::Translation.create_translations_nested_form(self.resource,tab)
  end
end

Lolita::Hooks.component(:"/lolita/configuration/tab/fields").around do
  tab = self.component_locals[:tab]
  if Lolita::Translation.translatable?(tab)
    self.send(:render_component,"lolita/translation",:language_wrap,:tab => tab, :content => let_content)
  else
    let_content
  end
end

Lolita::Hooks.component(:"/lolita/configuration/nested_form/fields").around do
  tab = self.component_locals[:nested_form].parent
  if Lolita::Translation.translatable?(tab)
    self.send(:render_component,"lolita/translation",:language_wrap, :tab => tab, :content => let_content)
  else
    let_content
  end
end

Lolita::Hooks.component(:"/lolita/configuration/tabs/display").before do
  self.render_component "lolita/translation", :assets
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
lolita-translation-0.3.3 lib/lolita-translation/rails.rb
lolita-translation-0.2.18 lib/lolita-translation/rails.rb
lolita-translation-0.3.2 lib/lolita-translation/rails.rb
lolita-translation-0.3.1 lib/lolita-translation/rails.rb
lolita-translation-0.3.0 lib/lolita-translation/rails.rb