Sha256: 208bd89c376d913eba7953675662c98ae8a3d1ba41f78bf31906954ab3a7c6d0
Contents?: true
Size: 760 Bytes
Versions: 33
Compression:
Stored size: 760 Bytes
Contents
module NodesHelper # Find the list of tabs for the popup when 'driving' a node. To add a tab for some document class, # create a file named '_any_className.rhtml' in the folder 'app/views/templates/drive_tabs'. # If you want this tab to be used only for a certain skin, use the name '_skinName_className.rhtml'. # Return a list in the form [name, filename], [name, ...], ... def form_tabs tabs = ['links','drive'] klass = nil @node.class.ancestors.map { |a| a.to_s.downcase }.each do |k| if File.exists?(File.join(Zena::ROOT, 'app', 'views', 'templates', 'drive_tabs', '_' + k + '.rhtml')) klass = k break end break if k == 'node' end tabs << klass if klass tabs << 'help' tabs end end
Version data entries
33 entries across 33 versions & 1 rubygems