def renderOrRedirectNextScreen(self,review,nthScreen): screen = Screen.getNthActiveScreen(nthScreen) if screen is not None: promptsObj = ScreenHandler.getPromptsForNthScreen(review,screen) return self.render("templates/screen.html",prompts=promptsObj,review=review,nthScreen=long(nthScreen),PromptResponse=PromptResponse) return self.render("templates/done.html")
from era_db import Screen, Prompt, Option, eraDB # You *must* call prepareReconfig() before defining the workflow eraDB.prepareReconfig() s1 = Screen.new() p1 = Prompt.new() p1.setText("Please enter the name of the paper being reviewed.") p1.setType("input") s1.addPrompt(p1) p2 = Prompt.new() p2.setText("Please enter the author's name.") p2.setType("input") s1.addPrompt(p2) p3 = Prompt.new() p3.setText("Please enter your name.") p3.setType("input") s1.addPrompt(p3) p4 = Prompt.new() p4.setText("Claims") p4.setType("textarea") s1.addPrompt(p4) p5 = Prompt.new() p5.setText("Summary") p5.setType("textarea") s1.addPrompt(p5)