lib/vmdb/global_methods.rb
# Get dictionary name with default settings
Get dictionary name with default settings
Get dictionary name with default settings
def ui_lookup(options = {})
      if options[:table]
        Dictionary.gettext(options[:table], :type => :table, :notfound => :titleize, :plural => false)
      elsif options[:tables]
        Dictionary.gettext(options[:tables], :type => :table, :notfound => :titleize, :plural => true)
      elsif options[:model]
        Dictionary.gettext(options[:model], :type => :model, :notfound => :titleize, :plural => false)
      elsif options[:models]
        Dictionary.gettext(options[:models], :type => :model, :notfound => :titleize, :plural => true)
      elsif options[:ui_title]
        ui_lookup_for_title(options[:ui_title])
      else
        ''
      end
    end
def ui_lookup ( options = { } ) if options [ :table ] Dictionary . gettext ( options [ :table ] , :type => :table , :notfound => :titleize , :plural => false ) elsif options [ :tables ] Dictionary . gettext ( options [ :tables ] , :type => :table , :notfound => :titleize , :plural => true ) elsif options [ :model ] Dictionary . gettext ( options [ :model ] , :type => :model , :notfound => :titleize , :plural => false ) elsif options [ :models ] Dictionary . gettext ( options [ :models ] , :type => :model , :notfound => :titleize , :plural => true ) elsif options [ :ui_title ] ui_lookup_for_title ( options [ :ui_title ] ) else '' end end
Get dictionary name with default settings
Get dictionary name with default settings
options
<not_specific>