Sha256: 3d23c792205ab553d02dbfbc00fd1fd872a5d9ce0ab5d3d084d9cdb743cd15fa
Contents?: true
Size: 599 Bytes
Versions: 33
Compression:
Stored size: 599 Bytes
Contents
module VersionsHelper # Find the list of tabs for the popup when editing a node. To add a tab for some document class, # create a file named '_ClassName.rhtml' in the folder 'app/views/templates/edit_tabs'. def form_tabs tabs = ['text', 'title'] klass = nil @node.class.ancestors.map { |a| a.to_s.downcase }.each do |k| if File.exists?(File.join(Zena::ROOT, 'app', 'views', 'templates', 'edit_tabs', '_' + k + '.rhtml')) klass = k break end break if k == 'node' end tabs << klass if klass tabs << 'custom' tabs << 'help' end end
Version data entries
33 entries across 33 versions & 1 rubygems