Top Level Namespace

Defined Under Namespace

Modules: SurveyMetamodel, SurveyOnRails Classes: String, SurveyGenerator

Constant Summary collapse

APPLICATION =
SurveyOnRails::Builder::build do
	application do
		model(:surveys => SURVEYS)

		
		view(:static_pages => STATIC_PAGES, :header => HEADER.first, :footer => FOOTER.first, :styles => STYLES, :forms => FORMS)
	end
end
FORMS =
SurveyOnRails::Builder::build do
  form("customer_satisfaction_survey") do
    convenience
    professionality
    quality
    adequacy
    responsiveness
    service
    satisfaction
    rating
    recommendation
  end
end
SURVEYS =
SurveyOnRails::Builder::build do
  survey("customer_satisfaction_survey", :author => "Example Company", :title => "Customer Satisfaction Survey") do
    singleChoice "convenience", :title => "How convenient is our company to use?", :choices_s => "Extremely convenient, Very convenient, Moderately convenient, Slightly convenient, Not at all convenient"
    singleChoice "professionality", :title => "How professional is our company?", :choices_s => "Extremely professional, Very professional, Moderately professional, Slightly professional, Not at all professional"
    singleChoice "quality", :title => "Compared to our competitors, is our product quality better, worse, or about the same?", :choices_s => "Much better, Somewhat better, Slightly better, About the same, Slightly worse, Somewhat worse, Much worse"
    singleChoice "adequacy", :title => "Compared to our competitors, are our prices more reasonable, less reasonable, or about the same?", :choices_s => "Much more reasonable, Somewhat more reasonable, Slightly more reasonable, About as reasonable, Slightly less reasonable, Somewhat less reasonable, Much less reasonable"
    singleChoice "responsiveness", :title => "How responsive is our company?", :choices_s => "Extremely responsive, Very responsive, Moderately responsive, Slightly responsive, Not at all responsive"
    singleChoice "service", :title => "How well do the customer service representatives at our company answer your questions?", :choices_s => "Extremely well, Very well, Moderately well, Slightly well, Not at all well"
    singleChoice "satisfaction", :title => "Overall, are you satisfied with the employees at our company, neither satisfied nor dissatisfied with them, or dissatisfied with them?", :choices_s => "Extremely satisfied, Moderately satisfied, Slightly satisfied, Neither satisfied nor dissatisfied, Slightly dissatisfied, Moderately dissatisfied, Extremely dissatisfied"
    singleChoice "rating", :title => "Do you like our company, neither like nor dislike it, or dislike it?", :choices_s => "Like a great deal, Like a moderate amount, Like a little, Neither like nor dislike, Dislike a little, Dislike a moderate amount, Dislike a great deal"
    singleChoice "recommendation", :title => "How likely are you to recommend our company to people you know ?", :choices_s => "Extremely likely, Very likely, Moderately likely, Slightly likely, Not at all likely"
  end
end
STATIC_PAGES =
SurveyOnRails::Builder::build do
  staticPage "home", :title => "Home", :root => true
  staticPage "about", :title => "About"
  staticPage "contact", :title => "Contact"
  staticPage "help", :title => "Help"
end
HEADER =
SurveyOnRails::Builder::build do
	header do
    link "link_2", :title => "Home", :url => "root_path", :path => true
    link "link_3", :title => "Help", :url => "help_path", :path => true
	  surveyManagement
	  userManagement
	end
end
SurveyOnRails::Builder::build do
	footer do
    link "link_7", :title => "About", :url => "about_path", :path => true
    link "link_8", :title => "Contact", :url => "contact_path", :path => true
	end
end
STYLES =
SurveyOnRails::Builder::build do
  staticStyle :element_names => "quality", :foreground => :darkGray, :background => :lightGray
end