Sha256: e0908614bf4e985a3cfb5976a65d11ec8c939bb2f3840a7f35b67e976f61f443
Contents?: true
Size: 1.43 KB
Versions: 10
Compression:
Stored size: 1.43 KB
Contents
Lolita::Hooks.component(:"/lolita/configuration/tab/error_msg").before do tab = self.component_locals[:tab] if tab.translatable? 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 tab.translatable? self.render_component tab.build_translations_nested_form(self.resource) end end Lolita::Hooks.component(:"/lolita/configuration/tab/fields").around do tab = self.component_locals[:tab] if tab.translatable? content = nil resource.in(resource.original_locale) do content = let_content end self.send(:render_component,"lolita/translation",:language_wrap, { :tab => tab, :content => content, :active => true, :translation_locale => resource.original_locale }) else let_content end end Lolita::Hooks.component(:"/lolita/configuration/nested_form/fields").around do tab = self.component_locals[:nested_form].parent if tab.translatable? && current_form.object.respond_to?(:locale) self.send(:render_component,"lolita/translation",:language_wrap, { :tab => tab, :content => let_content, :active => false, :translation_locale => current_form.object.locale }) else let_content end end Lolita::Hooks.component(:"/lolita/configuration/tabs/display").before do self.render_component "lolita/translation", :assets end
Version data entries
10 entries across 10 versions & 1 rubygems