Module: DocumentsHelper

Defined in:
app/helpers/documents_helper.rb

Instance Method Summary collapse

Instance Method Details

#form_tabsObject

Find the list of tabs for the popup when creating a new document. Any erb file found in ‘app/views/templates/document_create_tabs’ starting with an underscore will be used.



5
6
7
8
9
10
11
12
13
# File 'app/helpers/documents_helper.rb', line 5

def form_tabs
  tabs = []
  Dir.entries(File.join(Zena::ROOT, 'app', 'views', 'templates', 'document_create_tabs')).sort.each do |file|
    next unless file =~ /^_(.*).rhtml$/
    tab_name = $1
    tabs << tab_name
  end
  tabs
end