nitro 0.17.0 → 0.18.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (161) hide show
  1. data/CHANGELOG +124 -0
  2. data/README +2 -2
  3. data/Rakefile +4 -12
  4. data/bin/nitro +1 -1
  5. data/bin/nitrogen +47 -31
  6. data/doc/AUTHORS +3 -3
  7. data/doc/RELEASES +50 -1
  8. data/examples/README +7 -0
  9. data/lib/nitro.rb +5 -4
  10. data/lib/nitro/{adapters → adapter}/cgi.rb +2 -4
  11. data/lib/nitro/{adapters → adapter}/fastcgi.rb +1 -1
  12. data/lib/nitro/{adapters → adapter}/webrick.rb +5 -10
  13. data/lib/nitro/buffering.rb +6 -0
  14. data/lib/nitro/{builders → builder}/atom.rb +1 -5
  15. data/lib/nitro/{builders → builder}/form.rb +1 -5
  16. data/lib/nitro/{builders → builder}/rss.rb +3 -1
  17. data/lib/nitro/{builders → builder}/table.rb +2 -4
  18. data/lib/nitro/{builders → builder}/xhtml.rb +3 -5
  19. data/lib/nitro/{builders → builder}/xml.rb +2 -4
  20. data/lib/nitro/caching.rb +6 -4
  21. data/lib/nitro/caching/output.rb +18 -11
  22. data/lib/nitro/context.rb +3 -1
  23. data/lib/nitro/controller.rb +29 -18
  24. data/lib/nitro/dispatcher.rb +2 -4
  25. data/lib/nitro/element.rb +2 -0
  26. data/lib/nitro/environment.rb +2 -4
  27. data/lib/nitro/errors.rb +69 -0
  28. data/lib/nitro/mail.rb +2 -4
  29. data/lib/nitro/markup.rb +20 -3
  30. data/lib/nitro/output.rb +5 -9
  31. data/lib/nitro/part.rb +2 -3
  32. data/lib/nitro/render.rb +49 -30
  33. data/lib/nitro/request.rb +2 -1
  34. data/lib/nitro/runner.rb +23 -12
  35. data/lib/nitro/scaffold.rb +5 -3
  36. data/lib/nitro/service.rb +22 -0
  37. data/lib/nitro/service/xmlrpc.rb +42 -0
  38. data/lib/nitro/session.rb +2 -4
  39. data/lib/nitro/template.rb +8 -10
  40. data/lib/nitro/testing.rb +0 -4
  41. data/proto/public/error.xhtml +27 -2
  42. data/test/nitro/{adapters → adapter}/raw_post1.bin +0 -0
  43. data/test/nitro/{adapters → adapter}/tc_cgi.rb +1 -1
  44. data/test/nitro/{adapters → adapter}/tc_webrick.rb +1 -1
  45. data/test/nitro/{builders → builder}/tc_atom.rb +1 -1
  46. data/test/nitro/{builders → builder}/tc_rss.rb +1 -1
  47. data/test/nitro/{builders → builder}/tc_table.rb +1 -1
  48. data/test/nitro/{builders → builder}/tc_xhtml.rb +1 -1
  49. data/test/nitro/{builders → builder}/tc_xml.rb +1 -1
  50. data/test/nitro/tc_caching.rb +18 -0
  51. data/test/nitro/tc_controller.rb +1 -1
  52. data/test/nitro/tc_mail.rb +3 -1
  53. metadata +33 -168
  54. data/examples/README.windows +0 -9
  55. data/examples/ajax/controller.rb +0 -21
  56. data/examples/ajax/public/index.xhtml +0 -72
  57. data/examples/ajax/public/js/ajax.js +0 -64
  58. data/examples/ajax/run.rb +0 -14
  59. data/examples/blog/README +0 -70
  60. data/examples/blog/conf/apache.conf +0 -30
  61. data/examples/blog/conf/apache.conf.new +0 -53
  62. data/examples/blog/conf/lhttpd.conf +0 -79
  63. data/examples/blog/conf/locales/de.yml +0 -4
  64. data/examples/blog/conf/locales/en.yml +0 -4
  65. data/examples/blog/log/README +0 -3
  66. data/examples/blog/log/apache.error_log +0 -6647
  67. data/examples/blog/log/rewrite_log +0 -161
  68. data/examples/blog/public/base.xsl +0 -153
  69. data/examples/blog/public/fcgi.rb +0 -5
  70. data/examples/blog/public/m/bubbles.gif +0 -0
  71. data/examples/blog/public/m/comments_curve.gif +0 -0
  72. data/examples/blog/public/m/down.gif +0 -0
  73. data/examples/blog/public/m/footer_bg.gif +0 -0
  74. data/examples/blog/public/m/garrow.gif +0 -0
  75. data/examples/blog/public/m/gbull.gif +0 -0
  76. data/examples/blog/public/m/grbull.gif +0 -0
  77. data/examples/blog/public/m/h1_bg.gif +0 -0
  78. data/examples/blog/public/m/header_bg.gif +0 -0
  79. data/examples/blog/public/m/nitro.gif +0 -0
  80. data/examples/blog/public/m/obull.gif +0 -0
  81. data/examples/blog/public/m/page_bg.gif +0 -0
  82. data/examples/blog/public/m/rss.gif +0 -0
  83. data/examples/blog/public/m/side_title_bg.gif +0 -0
  84. data/examples/blog/public/m/sidebar_bg.gif +0 -0
  85. data/examples/blog/public/style.css +0 -305
  86. data/examples/blog/run.rb +0 -43
  87. data/examples/blog/src/blog.rb +0 -21
  88. data/examples/blog/src/controller.rb +0 -151
  89. data/examples/blog/src/mailer.rb +0 -23
  90. data/examples/blog/src/models/blog.rb +0 -33
  91. data/examples/blog/src/models/content.rb +0 -18
  92. data/examples/blog/src/views/blog_entry_email.xhtml +0 -16
  93. data/examples/blog/src/views/comments.xhtml +0 -36
  94. data/examples/blog/src/views/entry_form.xhtml +0 -22
  95. data/examples/blog/src/views/error.xhtml +0 -56
  96. data/examples/blog/src/views/index.xhtml +0 -49
  97. data/examples/blog/src/views/login.xhtml +0 -26
  98. data/examples/blog/src/views/recent_posts.xhtml +0 -14
  99. data/examples/blog/src/views/view_entry.xhtml +0 -37
  100. data/examples/blog/src/views/view_entry.xml +0 -12
  101. data/examples/blog/src/xsl/base.xsl +0 -160
  102. data/examples/blog/src/xsl/style.xsl +0 -143
  103. data/examples/blog/test/tc_blog.rb +0 -43
  104. data/examples/flash/log/README +0 -3
  105. data/examples/flash/root/index.xhtml +0 -16
  106. data/examples/flash/root/show_inline_text.xhtml +0 -17
  107. data/examples/flash/run.rb +0 -7
  108. data/examples/no_xsl_blog/README +0 -24
  109. data/examples/no_xsl_blog/conf/apache.conf +0 -30
  110. data/examples/no_xsl_blog/conf/lhttpd.conf +0 -79
  111. data/examples/no_xsl_blog/conf/locales/de.yml +0 -4
  112. data/examples/no_xsl_blog/conf/locales/en.yml +0 -4
  113. data/examples/no_xsl_blog/lib/blog.rb +0 -16
  114. data/examples/no_xsl_blog/lib/blog/controller.rb +0 -116
  115. data/examples/no_xsl_blog/lib/blog/model.rb +0 -35
  116. data/examples/no_xsl_blog/lib/blog/template.rb +0 -138
  117. data/examples/no_xsl_blog/lib/content.rb +0 -47
  118. data/examples/no_xsl_blog/log/README +0 -3
  119. data/examples/no_xsl_blog/log/apache.error_log +0 -473
  120. data/examples/no_xsl_blog/public/comments.xhtml +0 -36
  121. data/examples/no_xsl_blog/public/entry_form.xhtml +0 -22
  122. data/examples/no_xsl_blog/public/fcgi.rb +0 -5
  123. data/examples/no_xsl_blog/public/index.xhtml +0 -39
  124. data/examples/no_xsl_blog/public/login.xhtml +0 -21
  125. data/examples/no_xsl_blog/public/m/bubbles.gif +0 -0
  126. data/examples/no_xsl_blog/public/m/comments_curve.gif +0 -0
  127. data/examples/no_xsl_blog/public/m/down.gif +0 -0
  128. data/examples/no_xsl_blog/public/m/footer_bg.gif +0 -0
  129. data/examples/no_xsl_blog/public/m/garrow.gif +0 -0
  130. data/examples/no_xsl_blog/public/m/gbull.gif +0 -0
  131. data/examples/no_xsl_blog/public/m/grbull.gif +0 -0
  132. data/examples/no_xsl_blog/public/m/h1_bg.gif +0 -0
  133. data/examples/no_xsl_blog/public/m/header_bg.gif +0 -0
  134. data/examples/no_xsl_blog/public/m/nitro.gif +0 -0
  135. data/examples/no_xsl_blog/public/m/obull.gif +0 -0
  136. data/examples/no_xsl_blog/public/m/page_bg.gif +0 -0
  137. data/examples/no_xsl_blog/public/m/rss.gif +0 -0
  138. data/examples/no_xsl_blog/public/m/side_title_bg.gif +0 -0
  139. data/examples/no_xsl_blog/public/m/sidebar_bg.gif +0 -0
  140. data/examples/no_xsl_blog/public/recent_posts.xhtml +0 -14
  141. data/examples/no_xsl_blog/public/style.css +0 -299
  142. data/examples/no_xsl_blog/public/view_entry.xhtml +0 -25
  143. data/examples/no_xsl_blog/public/view_entry.xml +0 -12
  144. data/examples/no_xsl_blog/run.rb +0 -35
  145. data/examples/tiny/README +0 -14
  146. data/examples/tiny/conf/apache.conf +0 -30
  147. data/examples/tiny/conf/lhttpd.conf +0 -79
  148. data/examples/tiny/log/README +0 -3
  149. data/examples/tiny/log/apache.error_log +0 -154
  150. data/examples/tiny/public/deep/dir/hello.xhtml +0 -3
  151. data/examples/tiny/public/fcgi.rb +0 -5
  152. data/examples/tiny/public/include.xhtml +0 -3
  153. data/examples/tiny/public/index.xhtml +0 -55
  154. data/examples/tiny/public/nitro.png +0 -0
  155. data/examples/tiny/public/upload.xhtml +0 -21
  156. data/examples/tiny/run.rb +0 -7
  157. data/examples/wee_style/README +0 -10
  158. data/examples/wee_style/run.rb +0 -50
  159. data/examples/why_wiki/README +0 -5
  160. data/examples/why_wiki/run.rb +0 -59
  161. data/proto/public/js/ajax.js +0 -63
data/examples/blog/run.rb DELETED
@@ -1,43 +0,0 @@
1
- require 'nitro'
2
- require 'og'
3
-
4
- require 'blog'
5
-
6
- include Nitro
7
-
8
- Nitro.run do |conf|
9
- # Og.create_schema = false
10
- # Session.store_type = :drb
11
- Caching::Fragments.store = Caching::FileStore.new
12
-
13
- Localization.add(
14
- :en => 'conf/locales/en.yml',
15
- :de => 'conf/locales/de.yml'
16
- )
17
-
18
- Og.setup(
19
- :store => 'psql',
20
- :name => 'blog',
21
- :user => 'postgres',
22
- :password => 'navelrulez'
23
- )
24
-
25
- Rendering.shader = XSLTShader.new('src/xsl/style.xsl',
26
- LocalizationShader.new(
27
- RubyShader.new(
28
- CompressShader.new
29
- )
30
- )
31
- )
32
-
33
- conf.dispatcher = Dispatcher.new(
34
- :root => BlogController,
35
- 'xml' => XmlController
36
- )
37
-
38
- conf.set(
39
- :name => 'Nitro Blog',
40
- :host => '127.0.0.1',
41
- :port => 9999
42
- )
43
- end
@@ -1,21 +0,0 @@
1
- # * George Moschovitis <gm@navel.gr>
2
- # (c) 2004-2005 Navel, all rights reserved.
3
- # $Id: blog.rb 1 2005-04-11 11:04:30Z gmosx $
4
-
5
- # A simple blog to demonstrate the power of Nitro.
6
-
7
- class Blog
8
-
9
- # The administrator username.
10
-
11
- cattr_accessor :username, 'George Moschovitis'
12
-
13
- # The administrator password.
14
-
15
- cattr_accessor :password, 'mypassword'
16
-
17
- end
18
-
19
- require 'controller'
20
- require 'mailer'
21
- require 'models/blog'
@@ -1,151 +0,0 @@
1
- require 'nitro/controller'
2
- require 'nitro/ui/pager'
3
- require 'nitro/localization'
4
-
5
- require 'mailer'
6
- require 'models/blog'
7
-
8
- # The controller of the Blog part.
9
-
10
- class BlogController < Nitro::Controller
11
-
12
- pre :get_errors
13
- post :cache_invalidate, :on => [ :new_entry, :new_comment, :del_entry, :del_comment ]
14
- wrap Nitro::LocalizationAspect, :pre => :localize
15
-
16
- # generate default BlogEntry related actions.
17
-
18
- scaffold BlogEntry, :name => 'entry', :index => true # , :nosuffix => true
19
-
20
- # generate default Comment related actions.
21
-
22
- scaffold Comment
23
-
24
- # as an example of full page caching.
25
- # cache_output :index
26
-
27
- # Override the template root for this controller.
28
-
29
- @template_root = 'src/views'
30
-
31
- def list_entry
32
- @pager = UI::Pager.new('entries', request, 3)
33
- @entries = BlogEntry.all(:order => 'oid DESC', :extra => @pager.sql_limit)
34
- @pager.set(BlogEntry.count)
35
- end
36
-
37
- def new_entry
38
- entry = request.fill(BlogEntry.new)
39
- entry.author = session[:username]
40
-
41
- unless entry.valid?
42
- session[:errors] = entry.errors
43
- redirect_referer '#new_entry'
44
- end
45
- entry.save!
46
- end
47
-
48
- # An example route.
49
-
50
- # Example of action with parameter. The parameter
51
- # request['oid'] is referenced by the oid method
52
- # parameter. This also demonstrates implicit routing.
53
-
54
- def myview
55
- entry = BlogEntry[@oid]
56
- @out << entry.title
57
- end
58
- action :myview, :route => /view\/(.*)/, 'oid' => 1
59
-
60
- def mail_entry
61
- entry = BlogEntry[request['oid']]
62
- BlogMailer.deliver_blog_entry_email(request['to'], entry)
63
- end
64
-
65
- def new_comment
66
- comment = request.fill(Comment.new)
67
-
68
- unless comment.valid?
69
- session[:errors] = comment.errors
70
- redirect_referer '#new_comment'
71
- end
72
-
73
- comment.save!
74
- end
75
-
76
- def login
77
- if password = request['password']
78
- if password == Blog.password
79
- session[:owner] = true
80
- session[:username] = Blog.username
81
- request.add_cookie 'nauth', 'just an example, not used :)'
82
- redirect '/'
83
- else
84
- @error = 'Invalid password'
85
- end
86
- end
87
- end
88
-
89
- def logout
90
- session.delete(:owner)
91
- session.delete(:username)
92
- end
93
-
94
- def toggle_locale
95
- cache_invalidate
96
-
97
- if session[:LOCALE] == :de
98
- session[:LOCALE] = :en
99
- else
100
- session[:LOCALE] = :de
101
- end
102
- end
103
-
104
- private
105
-
106
- # A helper prefilter, autocleans session errors.
107
- # Used as an example.
108
-
109
- def get_errors
110
- # gmosx: should better implement top-level filters!
111
- if errors = session.delete(:errors)
112
- @errors = errors
113
- end
114
- end
115
-
116
- # Invalidates the cache.
117
-
118
- def cache_invalidate
119
- # gmosx: will be improved.
120
- expire_fragment('entriesadmin')
121
- expire_fragment('entriesadmintrue')
122
- end
123
- end
124
-
125
- # A special controller for that presents
126
- # the blog content using XML (RSS). This controller
127
- # reuses the BlogController actions but adds
128
- # XML templates.
129
-
130
- class XmlController < BlogController
131
- @base = 'xml'
132
- @content_type = 'text/xml'
133
- @template_root = 'src/views/xml'
134
-
135
- # This is the prefered way to add programmatically
136
- # generated output. The method list_entry_template is
137
- # called after list_entry.
138
-
139
- def list_entry_template
140
- o.build_rss(@entries, :description => 'Blog entries', :link => context.host_url)
141
- end
142
-
143
- # Another way to overload the method for RSS output.
144
- # Not that flexible though.
145
-
146
- def list_comment
147
- super
148
- o.build_rss(@comments, :description => 'Blog comments', :link => context.host_url)
149
- end
150
- end
151
-
@@ -1,23 +0,0 @@
1
- # * George Moschovitis <gm@navel.gr>
2
- # (c) 2004-2005 Navel, all rights reserved.
3
- # $Id: mailer.rb 1 2005-04-11 11:04:30Z gmosx $
4
-
5
- require 'nitro/mail'
6
-
7
- # A simple mailer.
8
-
9
- class BlogMailer < Nitro::Mailer
10
-
11
- def initialize(*p)
12
- super(*p)
13
- @template_root = 'src/views'
14
- end
15
-
16
- def blog_entry_email(to, entry)
17
- @from = 'system@blog.com'
18
- @to = to
19
- @subject = "Blog Entry: #{entry.title}"
20
- @body.entry = entry
21
- end
22
-
23
- end
@@ -1,33 +0,0 @@
1
- require 'models/content'
2
-
3
- # Forward reference to the Comment definition.
4
-
5
- class Comment; end
6
-
7
- # Common properties/methods for the other classes.
8
- # Since markup is required, automatically handles
9
- # the markup expanding/compacting for the body.
10
-
11
- module Common
12
- include BaseContent
13
- include CreateTime
14
-
15
- prop_accessor :author, String
16
- validate_value :body
17
- end
18
-
19
- # An entry in the Blog.
20
-
21
- class BlogEntry
22
- include Common
23
- has_many :comments, Comment, :foreign_name => 'entry'
24
- validate_value :title, :msg => 'Please provide a title'
25
- end
26
-
27
- # A comment to the blog entry.
28
-
29
- class Comment
30
- include Common
31
- belongs_to :entry, BlogEntry
32
- validate_value :author, :msg => 'Please enter your name'
33
- end
@@ -1,18 +0,0 @@
1
- require 'nitro/markup'
2
-
3
- # The foundamental Content Unit.
4
-
5
- module BaseContent
6
- include Nitro::Markup
7
- prop_accessor :title, String
8
- prop_accessor :body, String, :markup => true, :ui => :textarea
9
- end
10
-
11
- # CreateTime mixin.
12
-
13
- module CreateTime
14
- prop_accessor :create_time, Time
15
- prop_accessor :update_time, Time
16
- pre "@create_time = @update_time = Time.now", :on => :og_insert
17
- pre "@update_time = Time.now", :on => :og_update
18
- end
@@ -1,16 +0,0 @@
1
- Hello my friend,
2
-
3
-
4
- here is a nice blog entry with title:
5
-
6
- #{entry.title}
7
-
8
- and here is the actual text:
9
-
10
- #{entry.body}
11
-
12
-
13
- I hope you liked it!
14
-
15
- regards,
16
- George.
@@ -1,36 +0,0 @@
1
- <?xml version="1.0"?>
2
-
3
- <root xmlns:x="http://www.navel.gr/xml/shader.xsd">
4
-
5
- <h2>#{@entry.comments.size} Comments:</h2>
6
- <?r if @entry.comments.each do |comment| ?>
7
- <div class="comment">
8
- #{comment.body}
9
- <div class="footer">
10
- by #{comment.author} at #{comment.create_time.strftime('%R %p')}
11
- <?r if session[:owner] ?>
12
- [<a href="del_comment?oid=#{comment.oid}">del</a>]
13
- <?r end ?>
14
- </div>
15
- </div>
16
- <?r end.empty? then ?>
17
- no comments.
18
- <?r end ?>
19
-
20
- <form id="new_comment" action="new_comment" method="post">
21
- <input type="hidden" name="entry_oid" value="#{@entry.oid}" />
22
- <p>
23
- <b>Your name:</b><br />
24
- <input type="text" name="author" value="#{session[:username]}" />
25
- <x:error attr="author" />
26
- <x:error attr="title" />
27
- </p>
28
- <p>
29
- <b>Write your thoughts:</b><br />
30
- <textarea name="body" style="width: 90%; height: 100px">#{}</textarea>
31
- <x:error attr="body"><br /></x:error>
32
- </p>
33
- <input type="submit" value="Add comment" />
34
- </form>
35
-
36
- </root>
@@ -1,22 +0,0 @@
1
- <?xml version="1.0"?>
2
-
3
- <div id="comments" xmlns:x="http://www.navel.gr/xml/shader.xsd">
4
-
5
- <?r errors = session[:errors] ?>
6
-
7
- <h2>Post new entry:</h2>
8
-
9
- <form id="new_entry" action="new_entry" method="post">
10
- <p>
11
- <b>Title:</b><br />
12
- <input type="text" name="title" />
13
- <x:error attr="title" />
14
- </p>
15
- <p>
16
- <b>Body:</b><br />
17
- <textarea name="body" style="width: 90%; height: 100px">#{}</textarea>
18
- <x:error attr="body"><br /></x:error>
19
- </p>
20
- <input type="submit" value="Post" />
21
- </form>
22
- </div>
@@ -1,56 +0,0 @@
1
- <html>
2
- <head>
3
- <title>Error</title>
4
- <style>
5
- .path {
6
- padding: 5px;
7
- font-size: 140%;
8
- background: #ddd;
9
- }
10
- .error {
11
- padding: 5px;
12
- padding-top: 15px;
13
- font-size: 140%;
14
- color: #f00;
15
- }
16
- .load {
17
- padding: 5px;
18
- color: #555;
19
- }
20
- h2 {
21
- padding-left: 5px;
22
- background: #eee;
23
- }
24
- </style>
25
- </head>
26
- <body>
27
- <h1>Error</h1>
28
-
29
- <?r for error, path in @context.rendering_errors ?>
30
- <div class="path"><strong>Path:</strong> #{path}</div>
31
- <div class="error"><strong>#{error.class.name}:</strong> #{Nitro::Markup.expand(error.to_s)}</div>
32
- <div class="load">Click here to <strong><a href="#{request.uri}">reload</a></strong>.</div>
33
- <div class="load">Click here to go to the <strong><a href="#{request.referer}">referer</a></strong>.</div>
34
- <h2><a href="#" onclick="document.getElementById('trace').style.display = 'block'; return false">Stack Trace</a></h2>
35
- <p id="trace" style="display: none">#{error.backtrace.join('<br />')}</p>
36
- <?r end ?>
37
-
38
- <h2><a href="#" onclick="document.getElementById('request').style.display = 'block'; return false">Request</a></h2>
39
- <div id="request" style="display: none">
40
- <p><strong>Parameters:</strong> #{request.params.reject{ |k,v| k == :__RELOADED__ }.inspect}</p>
41
- <p><strong>Cookies:</strong> #{request.cookies.inspect}</p>
42
- <p><strong>Headers:</strong><br />#{request.headers.collect { |k, v| "#{k} => #{v}" }.join('<br />')}</p>
43
- </div>
44
-
45
- <h2><a href="#" onclick="document.getElementById('response').style.display = 'block'; return false">Response</a></h2>
46
- <div id="response" style="display: none">
47
- <p><strong>Headers:</strong> #{request.response_headers.inspect}</p>
48
- <p><strong>Cookies:</strong> #{request.response_cookies.inspect}</p>
49
- </div>
50
-
51
- <h2><a href="#" onclick="document.getElementById('session').style.display = 'block'; return false">Session</a></h2>
52
- <div id="session" style="display: none">
53
- <p><strong>Values:</strong> #{session.inspect}</p>
54
- </div>
55
- </body>
56
- </html>
@@ -1,49 +0,0 @@
1
- <?xml version="1.0"?>
2
-
3
- <x:page xmlns:x="http://www.navel.gr/xml/shader.xsd">
4
-
5
- <x:cell id="main">
6
- <?r cache('entries', :admin => session[:owner]) do ?>
7
- <?r
8
- if @entries
9
- for entry in @entries
10
- ?>
11
- <div class="entry">
12
- <h2 class="date">#{entry.create_time.strftime('%B %e, %G')}</h2>
13
- <div class="post">
14
- <h3 class="title">#{entry.title}</h3>
15
- #{entry.body}
16
- <div class="footer">
17
- [[posted by]] #{entry.author} at <a href="#{entry.to_href}">#{entry.create_time.strftime('%R %p')}</a> |
18
- <a href="#{entry.to_href}#comments">#{entry.comments.size} comments</a>.
19
- <?r if session[:owner] ?>
20
- [<a href="del_entry?oid=#{entry.oid}">del</a>]
21
- <?r end ?>
22
- </div>
23
- </div>
24
- </div>
25
- <?r
26
- end
27
- else
28
- ?>
29
- no entries
30
- <?r end ?>
31
-
32
- <div class="pager">
33
- #{@pager.navigation}
34
- <div class="clear">.</div>
35
- </div>
36
-
37
- <?r end ?>
38
-
39
- <?r if session[:owner] ?>
40
- <render href="entry_form" />
41
- <?r end ?>
42
-
43
- </x:cell>
44
-
45
- <x:cell id="side">
46
- <render href="recent_posts" />
47
- </x:cell>
48
-
49
- </x:page>