Changeset 149
- Timestamp:
- 08/18/2006 11:02:29 (2 years ago)
- Location:
- trunk/examples
- Files:
-
- 2 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/examples/blog.rb
r146 r149 242 242 p post.body 243 243 p do 244 a "Edit", :href => R(Edit, post) 245 text " | " 246 a "View", :href => R(View, post) 244 [a("Edit", :href => R(Edit, post)), a("View", :href => R(View, post))].join " | " 247 245 end 248 246 end 249 247 250 248 def _form(post, opts) 251 p do 252 text "You are logged in as #{@user.username} | " 253 a 'Logout', :href => R(Logout) 254 end 249 p { "You are logged in as #{@user.username} | #{a 'Logout', :href => R(Logout)}" } 255 250 form({:method => 'post'}.merge(opts)) do 256 251 label 'Title', :for => 'post_title'; br -
trunk/examples/tepee.rb
r146 r149 72 72 title 'test' 73 73 end 74 style <<-END, :type => 'text/css' 75 body { 76 font-family: verdana, arial, sans-serif; 77 } 78 h1, h2, h3, h4, h5 { 79 font-weight: normal; 80 } 81 p.actions a { 82 margin-right: 6px; 83 } 84 END 74 85 body do 75 86 p do … … 90 101 h1 @page.title 91 102 div { _markup @version.body } 92 p do103 p.actions do 93 104 a 'edit', :href => R(Edit, @version.title, @version.version) 94 105 a 'back', :href => R(Show, @version.title, @version.version-1) unless @version.version == 1
