module CommonInterface module Demo class Basic inherit Crystal::HttpController helper CommonInterface::Demo::ViewHelper before :prepare_samples, :prepare_theme layout '/CommonInterface/Demo/layouts/theme', :except => %w(help index) def help; end def dialog; end def index; end def aspects; end def basic; end def basic2; end def folder; end def items; end def list; end def page; end def selector; end def user; end def style; end def popup; end def tmp; end def select_menu session[:top_menu] = params[:top_menu] if params[:top_menu] session[:side_menu] = params[:side_menu] if params[:side_menu] redirect_to :back end attr_reader :samples def title workspace.method_name.humanize end helper_method :title protected def prepare_theme current_theme.name = params[:_theme] current_theme.layout_template = params[:_layout_template] end def prepare_samples @samples = { :title => workspace.method_name.humanize, :top_menu_items => %w(Email Contacts Calendar Files), :active_top_menu => (workspace.request.session[:top_menu] || 'Email'), :side_menu_items => %w(control_caption_0 control_caption_1 control_caption_2), :active_side_menu => (workspace.request.session[:side_menu] || 'control_caption_0'), :tabs => %w(Compose Contacts Import Categories), :active_tab => 'Compose', :common_name => "Terminator Movie Series", :common_tags => ['egypt', 'photo', 'travel'].collect{|w| "#{w}"}, :common_details => ["Today at 15:58", "by admin", "{7}"], :comment_details => ["Today at 15:58", "by admin"], :common_controls => %w{add edit delete}.collect{|w| "#{w}"}, :model => { :name => "Some Name", :active => true, :body => "Some text", :errors => { :base => ["Base Error Description", "Base Error Description 2"], :name => ["Name Error Description 1", "Name Error Description 2"] } }, :detail_text => %(

The Terminator (1984) More at IMDbPro

Your future is in his hands.

), :note_text => %(

The Terminator (1984) More at IMDbPro

In the Year of Darkness, 2029, the rulers of this planet devised the ultimate plan. They would reshape the Future by changing the Past. The plan required something that felt no pity. No pain. No fear. Something unstoppable. They created 'THE TERMINATOR'

The thing that won't die, in the nightmare that won't end. A human-looking, apparently unstoppable cyborg is sent from the future to kill Sarah Connor; Kyle Reese is sent to stop it.

Your future is in his hands.

), :comment_text => %(

Although the Stack Overflow engine was always designed with a technical audience in mind, I’m intrigued to see how far we can push the boundaries of that audience.

We’ve pushed a little bit when going from programmers, to sysadmins, to power computer users — and we may try pushing a tad further this year with yet another site.

) }.to_openobject end end end end