Sha256: 19a1304a44fcf7c971a76ef62def676521d7bffadcbc6ffaaa7b6f07a6f30367

Contents?: true

Size: 445 Bytes

Versions: 5

Compression:

Stored size: 445 Bytes

Contents

# append route
Lolita.add_module Lolita::FileUpload, :nested=>true,:route=>lambda{|resource|
  if resource.lolita.tabs.by_type(:files)
    return :file_upload
  end
}
# append fixed gallery
Lolita::Hooks.component(:"/lolita/configuration/tabs/display").before do
  resource_class = self.send(:resource_class)
  if resource_class.lolita.tabs.by_type(:files)
    self.render_component(:"/lolita/configuration/tab/files", :fixed_gallery) 
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
lolita-file-upload-0.4.12 lib/lolita-file-upload/module.rb
lolita-file-upload-0.4.11 lib/lolita-file-upload/module.rb
lolita-file-upload-0.4.10 lib/lolita-file-upload/module.rb
lolita-file-upload-0.4.9 lib/lolita-file-upload/module.rb
lolita-file-upload-0.4.8 lib/lolita-file-upload/module.rb