Title / Description
Code maps_to abstract: "main_page", concrete_widget: "HTMLPage" , params: { id: 'index', title: "Little Monk - Search Fights", include_css: '/stylesheets/airline_mob.css'}do has "user_agent", "mobile", true end maps_to abstract: "main_page", concrete_widget: "HTMLPage" , params: { id: 'index', title: "Little Monk - Search Fights", include_css: '/stylesheets/airline_tickets.css'} maps_to abstract: "header", concrete_widget: "HTMLComposition" maps_to abstract: "title", concrete_widget: "HTMLAnchor", params: {url: "/execute/search_flights", content: "Little Monk!"} #== Legs maps_to abstract: "legs", concrete_widget: "HTMLComposition" maps_to abstract: "leg_go", concrete_widget: "HTMLComposition", params: { css_class: "current_leg" } maps_to abstract: "leg_go_from", concrete_widget: "HTMLText", params: {content: params[:airport_from] } maps_to abstract: "leg_go_depart", concrete_widget: "HTMLText", params: {content: params[:airport_to] } maps_to abstract: "leg_go_arrive", concrete_widget: "HTMLText", params: {content: params[:depart_date] } maps_to abstract: "leg_back", concrete_widget: "HTMLComposition", params: { } maps_to abstract: "leg_back_from", concrete_widget: "HTMLText", params: {content: params[:airport_to] } maps_to abstract: "leg_back_arrive", concrete_widget: "HTMLText", params: {content: params[:airport_from] } maps_to abstract: "leg_back_depart", concrete_widget: "HTMLText", params: {content: params[:return_date] } maps_to abstract: "content", concrete_widget: "HTMLComposition" #= MOBILE MAPS maps_to abstract: "next_leg", concrete_widget: "HTMLAnchor", params: {url: "?next=1", content: "Return Flight >"} #= Flights found maps_to abstract: "flights", concrete_widget: "HTMLComposition", params: {collection: index.entries, as: :flight}do has "user_agent", "mobile", true end maps_to abstract: "flight", concrete_widget: "HTMLComposition", params: {css_class: "flight"}do has "user_agent", "mobile", true end maps_to abstract: "flight_price", concrete_widget: "HTMLSpan", params: {content: "$ #{flight.price.label}", css_class: "price" }do has "user_agent", "mobile", true end maps_to abstract: "flight_name", concrete_widget: "JQueryAjaxAnchorDialog", params: {content: flight.io::flight, css_class: "flight_name" , url: flight.context_anchor.target_url, dialog_id: "flight_info", title: "Flight Info", width: 300 }do has "user_agent", "mobile", true end maps_to abstract: "flight_depart", concrete_widget: "HTMLSpan", params: {content: flight.io::depart, css_class: "flight_depart" }do has "user_agent", "mobile", true end maps_to abstract: "flight_arrive", concrete_widget: "HTMLSpan", params: {content: flight.io::arrive, css_class: "flight_arrive"}do has "user_agent", "mobile", true end #= Mobile maps_to abstract: "main_page", concrete_widget: "HTMLPage" , params: { title: "Search Fights", css_class: "search_page", include_css: '/stylesheets/airline_mob.css' }do has 'user_agent', 'mobile', true end #= Desktop maps_to abstract: "main_page", concrete_widget: "HTMLPage" , params: { title: "Search Fights", css_class: "search_page", include_css: '/stylesheets/airline_tickets.css' } ... #= Mobile maps_to abstract: "pax", concrete_widget: "JQueryIncrementerFormInput", params: {content: 1, min_value: 1}do has 'user_agent', 'mobile', true end #= Desktop maps_to abstract: "pax", concrete_widget: "HTMLFormSelect", params: { options: ["1","2","3","4","5"] } ... {name: "main_page", widget_type: "AbstractInterface", children:[ {name: "header", widget_type: "CompositeInterfaceElement", children: [ {name: "title", widget_type: "SimpleActivator"}, {name: "legs", widget_type: "CompositeInterfaceElement", children: [ {name: "leg_go", widget_type: "CompositeInterfaceElement", children:[ {name: "leg_go_from", widget_type: "ElementExhibitor"}, {name: "leg_go_depart", widget_type: "ElementExhibitor"}, {name: "leg_go_arrive", widget_type: "ElementExhibitor"}, ]}, {name: "leg_back", widget_type: "CompositeInterfaceElement", children:[ {name: "leg_back_from", widget_type: "ElementExhibitor"}, {name: "leg_back_arrive", widget_type: "ElementExhibitor"}, {name: "leg_back_depart", widget_type: "ElementExhibitor"}, ]}, {name: "next_leg", widget_type: "SimpleActivator"} ]}, ] }, {name: "content", widget_type: "CompositeInterfaceElement", children:[ {name: "flights", widget_type: "CompositeInterfaceElement", repeatable: true, children:[ {name: "flight", widget_type: "CompositeInterfaceElement", children:[ {name: "flight_price", widget_type: "ElementExhibitor"}, {name: "flight_name", widget_type: "SimpleActivator"}, {name: "flight_depart", widget_type: "ElementExhibitor"}, {name: "flight_arrive", widget_type: "ElementExhibitor"} ]} ]}, {name: "no_flights", abstract: "CompositeInterfaceElement", children:[ {name: "no_flights_msg", widget_type: "ElementExhibitor"}, {name: "no_flights_anchor", widget_type: "SimpleActivator"} ]} ]} ]} #= Desktop set "leg_back" do has "user_agent", "mobile", false end #= Mobile set "next_leg" do has "user_agent", "mobile", true end set "flights" do equal index.entries.empty?, false end set "no_flights" do equal index.entries.empty?, true end selects { a IO::Flight fl::flightFromApCode airport_from fl::flightToApCode airport_to } @prefix log: <http://www.w3.org/2000/10/swap/log#>. @keywords. @forAll x, y, z. { x parent y. y sister z } log:implies { x aunt z } <WME "params" "node" "http://www.snee.com/ns/flights#SX2836"> <WME "navigational_element" "uri" "http://base#69ab8750-4fda-11e2-b654-00044b181e28"> <WME "http://base#69ab8750-4fda-11e2-b654-00044b181e28" "class" "RDFS::Resource"> <WME "http://base#69ab8750-4fda-11e2-b654-00044b181e28" "class" "SHDM::Context"> <WME "http://base#69ab8750-4fda-11e2-b654-00044b181e28" "context_name" "FlightsByAirports"> <WME "http://base#69ab8750-4fda-11e2-b654-00044b181e28" "context_title" "FlightsByAirports"> <WME "current_node" "uri" "http://www.snee.com/ns/flights#SX2836"> <WME "http://www.snee.com/ns/flights#SX2836" "class" "IO::Flight"> <WME "http://www.snee.com/ns/flights#SX2836" "rdf:type" "IO::Flight"> <WME "http://www.snee.com/ns/flights#SX2836" "fl:flightFromCityName" "Kahului-Maui HI US"> <WME "http://www.snee.com/ns/flights#SX2836" "fl:flightToCityName" "Chicago-O'Hare IL US"> <WME "http://www.snee.com/ns/flights#SX2836" "io:miles" "4182"> <WME "http://www.snee.com/ns/flights#SX2836" "io:depart" "6:45p"> <WME "http://www.snee.com/ns/flights#SX2836" "io:arrive" "7:54a+1"> <WME "http://www.snee.com/ns/flights#SX2836" "io:flight" "SX2836"> <WME "http://www.snee.com/ns/flights#SX2836" "io:aircraft" "763"> <WME "http://www.snee.com/ns/flights#SX2836" "fl:stops" "0, 6"> <WME "http://www.snee.com/ns/flights#SX2836" "io:meals" "D"> <WME "http://www.snee.com/ns/flights#SX2836" "io:duration" "8:09"> <WME "user_agent" "browser" "Chrome"> <WME "user_agent" "browser_version" #<UserAgent::Version 25.0.1364.152>> <WME "user_agent" "platform" "Windows"> <WME "user_agent" "mobile" false> <WME "params" "airport_from" "OGG"> <WME "params" "airport_to" "ORD"> <WME "params" "depart_date" "28 Mar, 13"> <WME "params" "return_date" "2 Apr, 13"> set{ has "navigational_element", "uri", :NAV_ELEM_URI has :NAV_ELEM_URI, "class", "SHDM::Context" has :NAV_ELEM_URI, "context_title", "FlightsByAirports" has "params", "node", :_ } {name: "flight", widget_type: "CompositeInterfaceElement", children: [ {name: "label_fl_number", widget_type: "ElementExhibitor" }, {name: "fl_number", widget_type: "ElementExhibitor" }, {name: "label_from", widget_type: "ElementExhibitor" }, {name: "fl_from", widget_type: "ElementExhibitor" }, {name: "label_to", widget_type: "ElementExhibitor" }, {name: "fl_to", widget_type: "ElementExhibitor" }, {name: "label_depart", widget_type: "ElementExhibitor" }, {name: "fl_depart", widget_type: "ElementExhibitor" }, {name: "label_arrive", widget_type: "ElementExhibitor" }, {name: "fl_arrive", widget_type: "ElementExhibitor" }, {name: "label_duration", widget_type: "ElementExhibitor" }, {name: "fl_duration", widget_type: "ElementExhibitor" }, {name: "label_aircraft", widget_type: "ElementExhibitor" }, {name: "fl_aircraft", widget_type: "ElementExhibitor" }, {name: "label_stops", widget_type: "ElementExhibitor" }, {name: "fl_stops", widget_type: "ElementExhibitor" }, {name: "label_miles", widget_type: "ElementExhibitor" }, {name: "fl_miles", widget_type: "ElementExhibitor" }, {name: "previous_flight", widget_type: "SimpleActivator" }, {name: "next_flight", widget_type: "SimpleActivator" }, ]} maps_to abstract: "flight", concrete_widget: "HTMLComposition" maps_to abstract: "label_fl_number", concrete_widget: "HTMLLabel", params: {content: "Flight"} maps_to abstract: "fl_number", concrete_widget: "HTMLSpan", params: {content: current_node.io::flight} maps_to abstract: "label_from", concrete_widget: "HTMLLabel", params: {content: "From"} maps_to abstract: "fl_from", concrete_widget: "HTMLSpan", params: {content: current_node.fl::flightFromCityName} maps_to abstract: "label_to", concrete_widget: "HTMLLabel", params: {content: "To"} maps_to abstract: "fl_to", concrete_widget: "HTMLSpan", params: {content: current_node.fl::flightToCityName} maps_to abstract: "label_depart", concrete_widget: "HTMLLabel", params: {content: "Departs"} maps_to abstract: "fl_depart", concrete_widget: "HTMLSpan", params: {content: current_node.io::depart} maps_to abstract: "label_arrive", concrete_widget: "HTMLLabel", params: {content: "Arrives"} maps_to abstract: "fl_arrive", concrete_widget: "HTMLSpan", params: {content: current_node.io::arrive} maps_to abstract: "label_aircraft", concrete_widget: "HTMLLabel", params: {content: "Aircraft"} maps_to abstract: "fl_aircraft", concrete_widget: "HTMLSpan", params: {content: current_node.io::aircraft } maps_to abstract: "fl_aircraft", concrete_widget: "HTMLSpan", params: {content: current_node.fl::plane } maps_to abstract: "label_stops", concrete_widget: "HTMLLabel", params: {content: "Stops"} maps_to abstract: "fl_stops", concrete_widget: "HTMLSpan", params: {content: current_node.fl::stops}do eq current_node.fl::stops.empty?, false end maps_to abstract: "fl_stops", concrete_widget: "HTMLSpan", params: {content: "0"} maps_to abstract: "label_miles", concrete_widget: "HTMLLabel", params: {content: "Miles"} maps_to abstract: "fl_miles", concrete_widget: "HTMLSpan", params: {content: current_node.io::miles} #maps_to abstract: "label_price", concrete_widget: "HTMLLabel", params: {content: "Price"} #maps_to abstract: "fl_price", concrete_widget: "HTMLSpan", params: {content: current_node.price.label} maps_to abstract: "previous_flight", concrete_widget: "JQueryAjaxAnchor", params: {content: "<< Previous", url: current_node.previous_node_anchor.target_url, result_element_id: "flight_info"} maps_to abstract: "next_flight", concrete_widget: "JQueryAjaxAnchor", params: {content: "Next >>", url: current_node.next_node_anchor.target_url, result_element_id: "flight_info"} extend nodes: ['leg_go_from', 'leg_back_from'], extension: 'HTMLImage', params: { content: "/images/airline-tickets/arrow_right.gif"} extend nodes: ['leg_go_arrive', 'leg_back_depart'], extension: 'HTMLText', params: { content: " on ", insertion_position: "before"} <WME "user_agent" "browser" "Chrome"> <WME "user_agent" "browser_version" #<UserAgent::Version 25.0.1364.152>> <WME "user_agent" "platform" "Windows"> <WME "user_agent" "mobile" false> <WME "params" "controller" "execute"> <WME "params" "action" "search_flights"> <WME "user_agent" "browser" "Chrome"> <WME "user_agent" "browser_version" #<UserAgent::Version 25.0.1364.152>> <WME "user_agent" "platform" "Windows"> <WME "user_agent" "mobile" false> <WME "params" "airport_from" "OGG"> <WME "params" "airport_to" "ORD"> <WME "params" "depart_date" "28 Mar, 13"> <WME "params" "return_date" "2 Apr, 13"> <WME "params" "pax" "1"> <WME "params" "search_button" "Search"> <WME "params" "controller" "execute"> <WME "params" "action" "search_flights"> <WME "navigational_element" "rdf:about" "http://base#6a8bd530-4fda-11e2-b654-00044b181e28"> <WME "navigational_element" "uri" "http://base#6a8bd530-4fda-11e2-b654-00044b181e28"> <WME "http://base#6a8bd530-4fda-11e2-b654-00044b181e28" "class" "RDFS::Resource"> <WME "http://base#6a8bd530-4fda-11e2-b654-00044b181e28" "rdf:type" "RDFS::Resource"> <WME "http://base#6a8bd530-4fda-11e2-b654-00044b181e28" "class" "SHDM::Index"> <WME "http://base#6a8bd530-4fda-11e2-b654-00044b181e28" "rdf:type" "SHDM::Index"> <WME "http://base#6a8bd530-4fda-11e2-b654-00044b181e28" "class" "SHDM::ContextIndex"> <WME "http://base#6a8bd530-4fda-11e2-b654-00044b181e28" "rdf:type" "SHDM::ContextIndex"> <WME "http://base#6a8bd530-4fda-11e2-b654-00044b181e28" "rdfs:label" "FlightsByAirportsIdx"> <WME "http://base#6a8bd530-4fda-11e2-b654-00044b181e28" "index_title" "FlightsByAirportsIdx"> <WME "http://base#6a8bd530-4fda-11e2-b654-00044b181e28" "index_name" "FlightsByAirportsIdx"> #========================== maps_to abstract: "main_page", concrete_widget: "HTMLPage" , params: { title: "myLogdings.com - #{hotel[:name]}", include_css: "/stylesheets/hotel_mob.css" }do has "user_agent", "mobile", true end maps_to abstract: "main_page", concrete_widget: "HTMLPage" , params: { title: "myLogdings.com - #{hotel[:name]}", include_css: "/stylesheets/hotel.css" } # Header block maps_to abstract: "header", concrete_widget: "HTMLComposition" maps_to abstract: "title", concrete_widget: "HTMLHeading", params: { content: "MyLogdings" } maps_to abstract: "account_anchor", concrete_widget: "HTMLAnchor", params: { content: "Sign in", url: "/signin" }do has "user_agent", "mobile", true end maps_to abstract: "account_anchor", concrete_widget: "HTMLAnchor", params: { content: "Sign in to manage your account", url: "/signin" } maps_to abstract: "content", concrete_widget: "HTMLComposition" # Hotel Data maps_to abstract: "hotel_name", concrete_widget: "HTMLHeading", params: { size: 2, content: hotel[:name] } maps_to abstract: "hotel_images", concrete_widget: "JQueryAnythingSlider", params: { collection: hotel[:images], as: :hotel_image } maps_to abstract: "hotel_image", concrete_widget: "HTMLImage", params: { content: hotel_image } maps_to abstract: "hotel_category", concrete_widget: "HTMLSpan", params: { css_class: "stars_#{hotel[:category]}" } maps_to abstract: "hotel_address", concrete_widget: "HTMLSpan", params: { content: hotel[:address] } maps_to abstract: "hotel_description", concrete_widget: "HTMLParagraph", params: { content: hotel[:description] } # Rates maps_to abstract: "rates", concrete_widget: "HTMLComposition" maps_to abstract: "rates_title", concrete_widget: "HTMLHeading", params: { size: 2, content: "Room prices" } maps_to abstract: "rates_by_room", concrete_widget: "HTMLForm", params: { collection: hotel[:rates], as: :room } maps_to abstract: "room", concrete_widget: "HTMLComposition", params: { css_class: 'line' } maps_to abstract: "room_type", concrete_widget: "HTMLSpan", params: { content: room[:room_type], css_class: "col1" } maps_to abstract: "price", concrete_widget: "HTMLSpan", params: { content: "$ #{room[:price]}", css_class: "col2" } #== Availability maps_to abstract: "availability", concrete_widget: "HTMLSpan", params: { content: "Sold out", css_class: "highlight" }do equal room[:status], 'sold-out' end maps_to abstract: "availability", concrete_widget: "HTMLSpan", params: { content: "Only #{room[:rooms_available]} left!", css_class: "highlight" }do equal room[:status], 'few-rooms' end maps_to abstract: "availability", concrete_widget: "HTMLSpan", params: { content: "Available", css_class: "col3" } maps_to abstract: "book", concrete_widget: "HTMLFormButton", params: { content: "Book", css_class: "col4" } do diff room[:status], "sold-out" has "user_agent", "mobile", true end maps_to abstract: "book", concrete_widget: "HTMLFormButton", params: { content: "Book Now", css_class: "col4" } do diff room[:status], "sold-out" end # Search rates maps_to abstract: "search_rates", concrete_widget: "HTMLForm", params: { method: "get" } maps_to abstract: "search_rates_title", concrete_widget: "HTMLHeading", params: { size: 2, content: "When would you like to stay at #{hotel[:name]}?"} maps_to abstract: "label_checkin", concrete_widget: "HTMLLabel", params: { content: 'Check-in' } maps_to abstract: "checkin", concrete_widget: "JQueryDatePickerInput", params: { date_format: "d M, y", min_date: 0 } maps_to abstract: "label_checkout", concrete_widget: "HTMLLabel", params: {content: 'Check-out' } maps_to abstract: "checkout", concrete_widget: "JQueryDatePickerInput", params: { date_format: "d M, y", min_date: 0 } maps_to abstract: "search", concrete_widget: "HTMLFormButton", params: { content: "Check" } #======== facts = { :user_agent => request.env["HTTP_USER_AGENT"], :params => params, } interface_data = {:params => params} interface_data = { :hotel => { :name => "Rio Carioca Palace", :address => "Avenida Atlantica, 3212, Copacabana, Rio de Janeiro, CEP 22070-000, Brazil", :category => 3, :images => [ 'http://s5.splcdn.net/images/hotels/31746/rio-de-janeiro-rio-othon-palace-hotel-105809.jpg', 'https://www.meridienclube.com.br/storage/modules/site/controllers/hotel/hoteis/462/arcos-rio-palace-0.jpg', 'http://i0.bookcdn.com/data/Photos/LargePhoto2/64/6406/6406059/Intercontinental-Rio-photos-Hotel.JPEG' ], :rates => [ { :room_type => 'Standard Twin Room', :rooms_available => 6, :status => 'available', :price => 205.00 }, { :room_type => 'Standard Double Room', :rooms_available => 0, :status => 'sold-out', :price => 205.00 }, { :room_type => 'Standard Triple Room', :rooms_available => 5, :status => 'available', :price => 315.00 }, { :room_type => 'Executive Twin Room', :rooms_available => 4, :status => 'available', :price => 265.00 }, { :room_type => 'Executive Double Room', :rooms_available => 2, :status => 'few-rooms', :price => 265.00 }, ], :description => "The Rio Carioca Palace offers basic accommodation in a prime location in Rio de Janeiro, only a few yards from the sands of Copacabana Beach and a short drive from Ipanema Beach. In addition to air-conditioned rooms, the hotel provides a terrace with swimming pool, sauna and great views over Copacabana Beach. Without any additional charge, you will be also provided with a daily breakfast buffet, wireless internet all over the building and newspapers at the reception." } } render :text => render_interface(facts, interface_data) <WME "user_agent" "browser" "Firefox"> <WME "user_agent" "browser_version" #<UserAgent::Version 19.0>> <WME "user_agent" "platform" "Windows NT 6.1"> <WME "user_agent" "mobile" false> <WME "params" "checkin" "21 Mar, 13"> <WME "params" "checkout" "22 Mar, 13"> <WME "params" "search" "Check"> <WME "params" "controller" "execute"> <WME "params" "action" "hotel"> <WME "params" "id" "Rio Carioca"> { name: "JQueryDatePickerInput", version: "0.0.3", source: "http://jqueryui.com/datepicker", description: "Form input with Jquery Date Picker Calendar", compatible_abstracts: [ "IndefiniteVariable" ], dependencies: [ "HTMLPage" ], parameters: [ {name: "css_class", mandatory: false, data_type: "string"}, {name: "id", mandatory: false, data_type: "string"}, {name: "content", mandatory: false, data_type: "string"}, {name: "date_format", mandatory: false, data_type: "string", default_value: "yy-mm-dd"}, {name: "min_date", mandatory: false, data_type: "number,string"}, {name: "max_date", mandatory: false, data_type: "number,string"} ], examples: [ %q{ maps_to abstract: "date1", concrete_widget: "JQueryDatePickerInput", params: { date_format: "yy-mm-dd", min_date: -1 } # Dates from yesterday maps_to abstract: "date2", concrete_widget: "JQueryDatePickerInput", params: { date_format: "yy-mm-dd", min_date: "+1m +7d" } # Enabling dates 1 month and 7 days from today } ] } set{ has "params", "action", "hotel" has "params", "id", :_ } {name: "main_page", widget_type: "AbstractInterface", children:[ {name: "header", widget_type: "CompositeInterfaceElement", children: [ {name: "title", widget_type: "ElementExhibitor"}, {name: "account_anchor", widget_type: "SimpleActivator"}, ] }, {name: "content", widget_type: "CompositeInterfaceElement", children:[ {name: "hotel_name", widget_type: "ElementExhibitor"}, {name: "hotel_images", widget_type: "CompositeInterfaceElement", repeatable: true, children: [ {name: "hotel_image", widget_type: "ElementExhibitor"} ]}, {name: "hotel_category", widget_type: "ElementExhibitor"}, {name: "hotel_address", widget_type: "ElementExhibitor"}, {name: "hotel_description", widget_type: "ElementExhibitor"}, {name: "rates", widget_type: "CompositeInterfaceElement", children: [ {name: "rates_title", widget_type: "ElementExhibitor"}, {name: "rates_by_room", widget_type: "CompositeInterfaceElement", repeatable: true, children: [ {name: "room", widget_type: "CompositeInterfaceElement", children: [ {name: "room_type", widget_type: "ElementExhibitor"}, {name: "price", widget_type: "ElementExhibitor"}, {name: "availability", widget_type: "ElementExhibitor"}, {name: "book", widget_type: "SimpleActivator"} ]}, ]}, ]}, {name: "search_rates", widget_type: "CompositeInterfaceElement", children: [ {name: "search_rates_title", widget_type: "ElementExhibitor"}, {name: "label_checkin", widget_type: "ElementExhibitor"}, {name: "checkin", widget_type: "IndefiniteVariable"}, {name: "label_checkout", widget_type: "ElementExhibitor"}, {name: "checkout", widget_type: "IndefiniteVariable"}, {name: "search", widget_type: "SimpleActivator"} ]} ]} ]} set "rates" do has "params", "checkin", :_ has "params", "checkout", :_ end set "search_rates" do neg "params", "checkin", :_ neg "params", "checkout", :_ end maps_to abstract: "main_page", concrete_widget: "HTMLPage" , params: { title: "myLogdings.com - #{hotel[:name]}", include_css: "/stylesheets/hotel_mob.css" }do has "user_agent", "mobile", true end maps_to abstract: "main_page", concrete_widget: "HTMLPage" , params: { title: "myLogdings.com - #{hotel[:name]}", include_css: "/stylesheets/hotel.css" } # Header block maps_to abstract: "header", concrete_widget: "HTMLComposition" maps_to abstract: "title", concrete_widget: "HTMLHeading", params: { content: "MyLogdings" } maps_to abstract: "account_anchor", concrete_widget: "HTMLAnchor", params: { content: "Sign in to manage your account", url: "/signin" } maps_to abstract: "content", concrete_widget: "HTMLComposition" # Hotel Data maps_to abstract: "hotel_name", concrete_widget: "HTMLHeading", params: { size: 2, content: hotel[:name] } maps_to abstract: "hotel_images", concrete_widget: "JQueryAnythingSlider", params: { collection: hotel[:images], as: :hotel_image } maps_to abstract: "hotel_image", concrete_widget: "HTMLImage", params: { content: hotel_image } maps_to abstract: "hotel_category", concrete_widget: "HTMLSpan", params: { css_class: "stars_#{hotel[:category]}" } maps_to abstract: "hotel_address", concrete_widget: "HTMLSpan", params: { content: hotel[:address] } maps_to abstract: "hotel_description", concrete_widget: "HTMLParagraph", params: { content: hotel[:description] } # Rates maps_to abstract: "rates", concrete_widget: "HTMLComposition" maps_to abstract: "rates_title", concrete_widget: "HTMLHeading", params: { size: 2, content: "Room prices" } maps_to abstract: "rates_by_room", concrete_widget: "HTMLForm", params: { collection: hotel[:rates], as: :price } maps_to abstract: "room", concrete_widget: "HTMLComposition", params: { css_class: 'line' } maps_to abstract: "room_type", concrete_widget: "HTMLSpan", params: { content: price[:room_type], css_class: "col1" } maps_to abstract: "price", concrete_widget: "HTMLSpan", params: { content: "$ #{price[:price]}", css_class: "col2" } #== Availability maps_to abstract: "availability", concrete_widget: "HTMLSpan", params: { content: "Sold out", css_class: "highlight" }do equal price[:available], 0 end maps_to abstract: "availability", concrete_widget: "HTMLSpan", params: { content: "Only #{price[:available]} left!", css_class: "highlight" }do lte price[:available], 2 end maps_to abstract: "availability", concrete_widget: "HTMLSpan", params: { content: "Available", css_class: "col3" } maps_to abstract: "book", concrete_widget: "HTMLFormButton", params: { content: "Book", css_class: "col4" } do gt price[:available], 0 has "user_agent", "mobile", true end maps_to abstract: "book", concrete_widget: "HTMLFormButton", params: { content: "Book Now", css_class: "col4" } do gt price[:available], 0 end # Search rates maps_to abstract: "search_rates", concrete_widget: "HTMLForm", params: { method: "get" } maps_to abstract: "search_rates_title", concrete_widget: "HTMLHeading", params: { size: 2, content: "When would you like to stay at #{hotel[:name]}?"} maps_to abstract: "label_checkin", concrete_widget: "HTMLLabel", params: { content: 'Check-in' } maps_to abstract: "checkin", concrete_widget: "JQueryDatePickerInput", params: { date_format: "d M, y", min_date: 0 } maps_to abstract: "label_checkout", concrete_widget: "HTMLLabel", params: {content: 'Check-out' } maps_to abstract: "checkout", concrete_widget: "JQueryDatePickerInput", params: { date_format: "d M, y", min_date: 0 } maps_to abstract: "search", concrete_widget: "HTMLFormButton", params: { content: "Check" } extend nodes: ['checkin'], extension: 'JQueryCopyDateTo', params: { target: "checkout", string_format: "d MMM, yy", add_days: 1 } #=== maps_to abstract: "main_page", concrete_widget: "HTMLPage" , params: { id: 'index', title: "Little Monk - Search Fights", include_css: '/stylesheets/airline_tickets.css'} maps_to abstract: "header", concrete_widget: "HTMLComposition" maps_to abstract: "title", concrete_widget: "HTMLAnchor", params: {url: "/execute/search_flights", content: "Little Monk!"} #== Legs maps_to abstract: "legs", concrete_widget: "HTMLComposition" maps_to abstract: "leg_go", concrete_widget: "HTMLComposition", params: { css_class: "current_leg" } maps_to abstract: "leg_go_from", concrete_widget: "HTMLText", params: {content: params[:airport_from] } maps_to abstract: "leg_go_depart", concrete_widget: "HTMLText", params: {content: params[:airport_to] } maps_to abstract: "leg_go_arrive", concrete_widget: "HTMLText", params: {content: params[:depart_date] } maps_to abstract: "leg_back", concrete_widget: "HTMLComposition", params: { } maps_to abstract: "leg_back_from", concrete_widget: "HTMLText", params: {content: params[:airport_to] } maps_to abstract: "leg_back_arrive", concrete_widget: "HTMLText", params: {content: params[:airport_from] } maps_to abstract: "leg_back_depart", concrete_widget: "HTMLText", params: {content: params[:return_date] } maps_to abstract: "content", concrete_widget: "HTMLComposition" #= Flights found maps_to abstract: "flights", concrete_widget: "DHTMLXSchedulerComposition", params: {css_style: "position:relative;width:100%;height:85%", skin: "glossy", collection: index.entries, as: :flight} maps_to abstract: "flight", concrete_widget: "DHTMLXSchedulerEntry" #= Best price! maps_to abstract: "flight_price", concrete_widget: "DHTMLXSchedulerLineHead", params: { css_class: "best_price", content: flight.price.label }do equal index.entries.min_by{ | x | x.price.label }, flight end #== Other prices maps_to abstract: "flight_price", concrete_widget: "DHTMLXSchedulerLineHead", params: {content: flight.price.label } #== Short Flights - The content is the flight number maps_to abstract: "flight_name", concrete_widget: "DHTMLXSchedulerAnchorAjaxDialog", params: {content: flight.io::flight, url: flight.context_anchor.target_url, dialog_id: "flight_info", title: "Flight Info", width: 300 }do lte flight.duration.label.to_i, 3 end #== Long Flights - The content is the text property maps_to abstract: "flight_name", concrete_widget: "DHTMLXSchedulerAnchorAjaxDialog", params: {content: flight.text.label, url: flight.context_anchor.target_url, dialog_id: "flight_info", title: "Flight Info", width: 300 } maps_to abstract: "flight_depart", concrete_widget: "DHTMLXSchedulerStartDate", params: {content: flight.start_date.label} maps_to abstract: "flight_arrive", concrete_widget: "DHTMLXSchedulerEndDate", params: {content: flight.end_date.label} #= No flights found maps_to abstract: "no_flights", concrete_widget: "HTMLComposition" maps_to abstract: "no_flights_msg", concrete_widget: "HTMLHeading", params: {size: 3, content: "Sorry no flights for your search"} maps_to abstract: "no_flights_anchor", concrete_widget: "HTMLAnchor", params: {url: "/execute/search_flights", content: "Please try another search"} #======== set "flights" do equal index.entries.empty?, false end set "no_flights" do equal index.entries.empty?, true end {name: "main_page", widget_type: "AbstractInterface", children:[ {name: "header", widget_type: "CompositeInterfaceElement", children: [ {name: "title", widget_type: "SimpleActivator"}, {name: "legs", widget_type: "CompositeInterfaceElement", children: [ {name: "leg_go", widget_type: "CompositeInterfaceElement", children:[ {name: "leg_go_from", widget_type: "ElementExhibitor"}, {name: "leg_go_depart", widget_type: "ElementExhibitor"}, {name: "leg_go_arrive", widget_type: "ElementExhibitor"}, ]}, {name: "leg_back", widget_type: "CompositeInterfaceElement", children:[ {name: "leg_back_from", widget_type: "ElementExhibitor"}, {name: "leg_back_arrive", widget_type: "ElementExhibitor"}, {name: "leg_back_depart", widget_type: "ElementExhibitor"}, ]} ]} ] }, {name: "content", widget_type: "CompositeInterfaceElement", children:[ {name: "flights", widget_type: "CompositeInterfaceElement", repeatable: true, children:[ {name: "flight", widget_type: "CompositeInterfaceElement", children:[ {name: "flight_price", widget_type: "ElementExhibitor"}, {name: "flight_name", widget_type: "ElementExhibitor"}, {name: "flight_depart", widget_type: "ElementExhibitor"}, {name: "flight_arrive", widget_type: "ElementExhibitor"} ]} ]}, {name: "no_flights", abstract: "CompositeInterfaceElement", children:[ {name: "no_flights_msg", widget_type: "ElementExhibitor"}, {name: "no_flights_anchor", widget_type: "SimpleActivator"} ]} ]} ]} set{ has :URI, "class", "SHDM::Index" has :URI, "index_title", "FlightsByAirportsIdx" has "params", "airport_from", :_ has "params", "airport_to", :_ } set{ has "params", "action", "search_flights" neg "params", "airport_from", :_ neg "params", "airport_to", :_ } {name: "main_page", widget_type: "AbstractInterface", children:[ {name: "header", widget_type: "CompositeInterfaceElement", children: [ {name: "title", widget_type: "ElementExhibitor"}] }, {name: "content", widget_type: "CompositeInterfaceElement", children:[ {name: "label_from", widget_type: "ElementExhibitor"}, {name: "airport_from", widget_type: "IndefiniteVariable"}, {name: "label_to", widget_type: "ElementExhibitor"}, {name: "airport_to", widget_type: "IndefiniteVariable"}, {name: "label_depart", widget_type: "ElementExhibitor"}, {name: "depart_date", widget_type: "IndefiniteVariable"}, {name: "label_return", widget_type: "ElementExhibitor"}, {name: "return_date", widget_type: "IndefiniteVariable"}, {name: "label_pax", widget_type: "ElementExhibitor"}, {name: "pax", widget_type: "IndefiniteVariable"}, {name: "search_button", widget_type: "SimpleActivator"} ]} ]} maps_to abstract: "main_page", concrete_widget: "HTMLPage" , params: { title: "Search Fights", css_class: "search_page", include_css: '/stylesheets/airline_tickets.css' } maps_to abstract: "header", concrete_widget: "HTMLComposition" maps_to abstract: "title", concrete_widget: "HTMLHeading", params: {content: "Little Monk!"} maps_to abstract: "content", concrete_widget: "HTMLForm", params: {css_class: "bounce-page", action: "/execute/search_flights", method: "get"} maps_to abstract: "label_from", concrete_widget: "HTMLLabel", params: {content: "From"} maps_to abstract: "airport_from", concrete_widget: "JQueryAjaxAutocomplete", params: { json_source_url: "/execute/airports" } maps_to abstract: "label_to", concrete_widget: "HTMLLabel", params: {content: "To"} maps_to abstract: "airport_to", concrete_widget: "JQueryAjaxAutocomplete", params: { json_source_url: "/execute/airports", params_from_elements: [ 'airport_from' ] } maps_to abstract: "label_depart", concrete_widget: "HTMLLabel", params: {content: "Depart"} maps_to abstract: "depart_date", concrete_widget: "JQueryDatePickerInput", params: { date_format: "d M, y", min_date: 0 } maps_to abstract: "label_return", concrete_widget: "HTMLLabel", params: {content: "Return"} maps_to abstract: "return_date", concrete_widget: "JQueryDatePickerInput", params: { date_format: "d M, y", min_date: 0 } maps_to abstract: "label_pax", concrete_widget: "HTMLLabel", params: {content: "Pax"} maps_to abstract: "pax", concrete_widget: "HTMLFormSelect", params: { options: ["1","2","3","4","5"] } maps_to abstract: "search_button", concrete_widget: "HTMLFormButton", params: { css_class: "darkbookingbutton", content: "Search"} extend nodes: ['depart_date'], extension: 'JQueryCopyTo', params: { target: 'return_date'} #=============== :FlightsByAirportsIdx a shdm:ContextIndex ; shdm:index_name "FlightsByAirportsIdx"; shdm:index_title "Flights by Airports Idx"; shdm:context_index_context :FlightsByAirports; shdm:context_anchor_attributes [ a shdm:ContextAnchorNavigationAttribute; shdm:navigation_attribute_name "context_anchor"; shdm:navigation_attribute_index_position "1"; shdm:context_anchor_label_expression "self.rdfs::label"; shdm:context_anchor_target_context :FlightsByAirports; shdm:context_anchor_target_node_expression "self"; shdm:index_navigation_attribute_index_parameters [ a shdm:NavigationAttributeParameter; shdm:navigation_attribute_parameter_name "airport_from"; shdm:navigation_attribute_parameter_value_expression "parameters[:airport_from]". a shdm:NavigationAttributeParameter; shdm:navigation_attribute_parameter_name "airport_to"; shdm:navigation_attribute_parameter_value_expression "parameters[:airport_to]". a shdm:NavigationAttributeParameter; shdm:navigation_attribute_parameter_name "depart_date"; shdm:navigation_attribute_parameter_value_expression "parameters[:depart_date]". a shdm:NavigationAttributeParameter; shdm:navigation_attribute_parameter_name "return_date"; shdm:navigation_attribute_parameter_value_expression "parameters[:return_date]". ]. ]; shdm:computed_attributes [ a shdm:ComputedNavigationAttribute; shdm:navigation_attribute_name "start_date"; shdm:navigation_attribute_index_position 1; shdm:computed_value_expression ' t = self.io::depart.to_s.match(/^([\d]{1,2}:[\d]{2}[ap]).*/) DateTime.parse( "#{parameters[:depart_date]} #{t[1]}m").strftime("%Y-%m-%d %H:%M")'. a shdm:ComputedNavigationAttribute; shdm:navigation_attribute_name "end_date"; shdm:navigation_attribute_index_position 2; shdm:computed_value_expression ' ta = self.io::arrive.to_s.match(/^([\d]{1,2}:[\d]{2}[ap])(.*)/) arrive = DateTime.parse( "#{parameters[:depart_date]} #{ta[1]}m") arrive = eval( "arrive #{ta[2]}") unless ta[2].nil? arrive.strftime("%Y-%m-%d %H:%M")'. a shdm:ComputedNavigationAttribute; shdm:navigation_attribute_name "price"; shdm:navigation_attribute_index_position 3; shdm:computed_value_expression ' price = self.io::miles.to_s.to_i * 0.1 + (500 / (self.duration.label * 1.5) ) "#{"%.2f" % (price)}"'. a shdm:ComputedNavigationAttribute; shdm:navigation_attribute_name "text"; shdm:navigation_attribute_index_position 4; shdm:computed_value_expression ' ta = self.io::arrive.to_s.match(/^([\d]{1,2}:[\d]{2}[ap])(.*)/) "#{self.io::depart.to_s}m - <b>#{self.io::flight.to_s} </b> #{ta[1]}m#{ta[2]}"'. ]. #contexts selects { a AIRPORT::Airport airport::name like name limit 30 } airport_from = AIRPORT::Airport.find("http://www.daml.ri.cmu.edu/ont/AirportCodes.daml\##{airport_from}") airport_to = AIRPORT::Airport.find("http://www.daml.ri.cmu.edu/ont/AirportCodes.daml\##{airport_to}") IO::Flight.find_by.fl::flightFromApCode(airport_from).fl::flightToApCode(airport_to).execute #============ #Sintaxe para Ruby 1.8 hash1 = { :first => { :a => 'value', :b => 2 }, :sec => Object.new} #Sintaxe para Ruby 1.9 hash2 = { first: { a: 'value', b: 2 }, sec: Object.new} [ "Alice", "friend", "Bob" ] [ "Alice", "age", 35 ] p = Person.new p.name = "Alice" p.age = 35 nav_params = { date_from: "Dec,10, 2012" } facts = { person: p, params: nav_params, flag: true } #TRIPLES [ "person", "name", "Alice" ] [ "person", "age", 35 ] [ "params", "date_from", "Dec,10, 2012" ] [ "flag", "literal", true ] <WME "person", "uri", "http://id" > <WME "person", "rdf:about", "http://id" > <WME "http://id", "name", "Alice" > <WME "http://id", "age" , 35 > <WME "http://id", "class", "FOAF::Person" > facts = { user_agent: request.env["HTTP_USER_AGENT"] } <WME "user_agent", "browser", "Chrome"> <WME "user_agent", "browser_version", "19.0.1084.56"> <WME "user_agent", "platform", "Windows"> <WME "user_agent", "mobile", false> ====================== <WME "person", "uri", "http://id" > <WME "person", "rdf:about", "http://id" > <WME "http://id", "name", "Alice" > <WME "http://id", "age" , 35 > <WME "http://id", "class", "FOAF::Person" > <WME "http://id", "rdf:type", "FOAF::Person" > <WME "params", "date_from", "Dec,10, 2012" > <WME "params", "total", 2 > <WME "flag" , "literal", true > =================================== idx = SHDM::Index.find(index_id) index = idx.new( params ) page_title = "#{index.index_title.first}" interface_data = { index: index, params: params } set{ has :_, "name", "Alice" } facts = { user_agent: request.env["HTTP_USER_AGENT"], params: params, nav_elem: index} <WME "user_agent" "browser" "Firefox"> <WME "user_agent" "platform" "Windows NT 6.1"> <WME "user_agent" "mobile" false> <WME "params" "controller" "execute"> <WME "params" "action" "search_flights"> <WME "nav_element" "uri" "http://base#1234"> <WME "http://base#1234" "class" "RDFS::Resource"> <WME "http://base#1234" "class" "SHDM::ContextIndex"> <WME "http://base#1234" "index_title" "My Idx Default"> <WME "http://base#1234" "index_name" "DefaultIDX"> {name: "main_page", widget_type: "AbstractInterface", children:[ {name: "header", widget_type: "CompositeInterfaceElement", children:[ {name: "logo", widget_type: "SimpleActivator"}, {name: "title", widget_type: "ElementExhibitor"} ]}, {name: "nodes", widget_type: "CompositeInterfaceElement", repeatable: true, children:[ {name: "link", widget_type: "SimpleActivator"} {name: "description", widget_type: "ElementExhibitor"} ]} {name: "main_page", widget_type: "AbstractInterface", children:[ {name: "header", widget_type: "CompositeInterfaceElement", children:[ {name: "logo", widget_type: "SimpleActivator"}, {name: "title", widget_type: "ElementExhibitor"} ]}, {name: "content", widget_type: "CompositeInterfaceElement", children:[ {name: "hotel_name", widget_type: "ElementExhibitor" }, {name: "hotel_city", widget_type: "ElementExhibitor" }, {name: "hotel_address", widget_type: "ElementExhibitor" }, {name: "hotel_prices", widget_type: "CompositeInterfaceElement", children:[ {name: "checkin", widget_type: "ElementExhibitor" }, {name: "checkout", widget_type: "ElementExhibitor" }, {name: "prices", widget_type: "CompositeInterfaceElement", repeatable: true, children:[ {name: "price", widget_type: "ElementExhibitor"} ]} ]}, {name: "search_rates", widget_type: "CompositeInterfaceElement", children:[ {name: "title_search", widget_type: "ElementExhibitor" }, {name: "checkin_field", widget_type: "IndefiniteVariable"}, {name: "checkout_field", widget_type: "IndefiniteVariable"}, {name: "send", widget_type: "ElementExhibitor"} ]}, ]}, ]} #== abstract rules set "search_box" do has :URI, "index_name", "AllPublicationsIdx" end set "search_box" do has "params", "checkin_field", :_ has "params", "checkout_field", :_ end maps_to abstract: "main_page", concrete_widget: "HTMLPage" , params: { title: index.index_title, css_class: 'page' } maps_to abstract: "checkin_dt", concrete_widget: "JQueryDatePickerInput" maps_to abstract: "attribute_label", concrete_widget: "HTMLLabel", params: {content: entry.label }do diff index.entries.first, entry end {name: "attributes", abstract_element: "CompositeInterfaceElement", repeatable: true, children:[ {name: "attribute_label", abstract_element: "ElementExhibitor"}, {name: "attribute_values", abstract_element: "SimpleActivator"} ]} maps_to abstract: "attributes", concrete_widget: "HTMLComposition", params: { collection: entry.attributes, as: "attribute" } maps_to abstract: "attribute_label", concrete_widget: "HTMLLabel", params: { content: attribute.label } maps_to abstract: "attribute_values", concrete_widget: "HTMLAnchor", params: { content: attribute.name, url: attribute.target_url, css_class: "highlight" } do eq entry.attributes.first, attribute end maps_to abstract: "attribute_values", concrete_widget: "HTMLAnchor", params: { content: attribute.name, url: attribute.target_url } #======== extend nodes: ['attribute_values'], extension: 'HTMLLineBreak' extend nodes: ['depart_date'], extension: 'JQueryCopyTo', params: { target: 'return_date'} extend nodes: ['leg_go_arrive', 'leg_back_depart'], extension: 'HTMLText', params: { content: " on ", insertion_position: "before"} /HTMLAnchor HTMLAnchor.rb template.erb MANIFEST.rb / #= def dependencies ["HTMLPage"] end def run_dependencies(obj) obj.include_js(["/_shared/js/jquery-1.7.2.min.js", "/_shared/js/jquery-ui-1.8.21.custom.min.js"]) obj.include_css(["/_shared/css/ui-lightness/jquery-ui-1.8.21.custom.css"]) end def render @parent.add_entry(@entries) if @parent.respond_to?(:add_entry) end { name: "HTMLAnchor", version: "0.0.1", description: "HTML Anchor", compatible_abstracts: [ "SimpleActivator" ], dependencies: [ ], parameters: [ {name: "content", mandatory: true, data_type: "string" }, {name: "url", mandatory: true, data_type: "string"}, {name: "css_class", mandatory: false, data_type: "string"}, {name: "id", mandatory: false, data_type: "string"}, ], examples: [ %q{ maps_to abstract: "link1", concrete_widget: "HTMLAnchor", params: { content: 'My link anchor', url: '/mypage.html' } maps_to abstract: "link2", concrete_widget: "HTMLAnchor", params: { content: variable.label, url: variable.url } do equal variable.label, "Home" end} ] } interface_schema = { :name => 'main_page', :node_content => {:concrete_widget => "HTMLPage", :params => {:title => "My Demo page", :include_css=> ["css/default_interface.css"] }}, :children => [ { :name => 'header', :node_content => {:concrete_widget => "HTMLComposition", :params => {:css_class => "header"}}, :children => [ { :name => "main_heading", :node_content => { :concrete_widget => "HTMLHeading", :params => {:number => 1, :content => "Twitts about Anything", :css_class => "heading2"}} } ] }, { :name => 'form_search', :node_content => { :concrete_widget => "HTMLForm", :params => {:css_class => "box center", :action => "http://search.twitter.com/search.json?&callback=?", :method => "get"} }, :children => [ { :name => 'label_search', :node_content => {:concrete_widget => "HTMLLabel", :params => {:content => "Search: "}}, }, { :name => 'query', :node_content => {:concrete_widget => "HTMLFormInput", :params => {:name => 'q', :css_class => "input", :content => "type query"}}, }, { :name => 'items_per_page_label', :node_content => {:concrete_widget => "HTMLLabel", :params => {:content => "Items per page: "}}, }, { :name => 'items_per_page', :node_content => {:concrete_widget => "HTMLFormSelect", :params => {:name => 'rpp', :css_class => "input", :options => ["5", "10", "15", "20", "25", "30"] }}, }, { :name => 'btn_send', :node_content => {:concrete_widget => "HTMLFormButton", :params => {:css_class => "input", :content => "Go"}}, } ] }, { :name => 'tweets', :node_content => { :concrete_widget => "JQueryTempoTemplateEngine", #:concrete_widget => "HTMLComposition", :params => { #:json_source_url => "http://search.twitter.com/search.json?q=web interfaces&rpp=20&callback=?", :url_from_element_id => 'url_search_twitter', :node_json_result_element => "['results']", :msg_error => "Sorry" } }, :children => [ { :name => 'twitt', :node_content => {:concrete_widget => "HTMLListItem", :params => {:css_class => "row"}}, :children => [ { :name => "columnA", :node_content => { :concrete_widget => "HTMLComposition", :params => {:css_class => "column grid_4 user"} }, :children => [ { :name => "profile_image_url", :node_content => { :concrete_widget => "HTMLImage", :params => {:content => "{{profile_image_url}}"}} }, { :name => "from_user", :node_content => { :concrete_widget => "HTMLHeading", :params => { :number => 3, :content => "{{from_user}}"}} }, ]}, { :name => "columnB", :node_content => { :concrete_widget => "HTMLParagraph", :params => {:content => "{{text}}", :css_class => "column grid_8"} }, :children => [ { :name => "created_at", :node_content => { :concrete_widget => "HTMLSpan", :params => {:content => ",{{created_at | date '\\at HH:mm on EEEE' }}", :css_class => "time"}} } ] }, ] } ] }, { :name => 'footer', :node_content => {:concrete_widget => "HTMLComposition", :params => {}}, :children => [ { :name => "footer_text", :node_content => { :concrete_widget => "HTMLParagraph", :params => {:css_class => "row", :content => "http://twigkit.github.com/tempo"}} } ] }, ] } extensions= [ {:name => 'ext2', :extension => 'JQueryFormAjax', :nodes => ['form_search'], :params => {:target => "tweets"}}, ] { :name => 'main_page', :node_content => {:concrete_widget => "HTMLPage", :params => {:title => "My Demo page", :include_css=> ["css/default_interface.css"] }}, :children => [ { :name => 'header', :node_content => {:concrete_widget => "HTMLComposition", :params => {:css_class => "header"}}, :children => [ { :name => "main_heading", :node_content => { :concrete_widget => "HTMLHeading", :params => {:number => 1, :content => "Twitts about Anything", :css_class => "heading2"}} } ] }, { :name => 'form_search', :node_content => { :concrete_widget => "HTMLForm", :params => {:css_class => "box center", :action => "http://search.twitter.com/search.json?&callback=?", :method => "get"} }, :children => [ { :name => 'label_search', :node_content => {:concrete_widget => "HTMLLabel", :params => {:content => "Search: "}}, }, { :name => 'query', :node_content => {:concrete_widget => "HTMLFormInput", :params => {:name => 'q', :css_class => "input", :content => "type query"}}, }, { :name => 'items_per_page_label', :node_content => {:concrete_widget => "HTMLLabel", :params => {:content => "Items per page: "}}, }, { :name => 'items_per_page', :node_content => {:concrete_widget => "HTMLFormSelect", :params => {:name => 'rpp', :css_class => "input", :options => ["5", "10", "15", "20", "25", "30"] }}, }, { :name => 'btn_send', :node_content => {:concrete_widget => "HTMLFormButton", :params => {:css_class => "input", :content => "Go"}}, } ] } }
Author
Highlight as C C++ CSS Clojure Delphi ERb Groovy (beta) HAML HTML JSON Java JavaScript PHP Plain text Python Ruby SQL XML YAML diff code