radiant-forum-extension 1.2.1 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (144) hide show
  1. data/README.md +37 -56
  2. data/VERSION +1 -1
  3. data/app/controllers/forum_base_controller.rb +78 -0
  4. data/app/controllers/forums_controller.rb +5 -34
  5. data/app/controllers/posts_controller.rb +61 -153
  6. data/app/controllers/topics_controller.rb +6 -63
  7. data/app/helpers/forum_helper.rb +24 -48
  8. data/app/models/forum.rb +5 -18
  9. data/app/models/post.rb +53 -55
  10. data/app/models/post_attachment.rb +9 -6
  11. data/app/models/topic.rb +20 -113
  12. data/app/views/admin/reader_configuration/_edit_forum.html.haml +4 -2
  13. data/app/views/admin/reader_configuration/_forum.html.haml +6 -2
  14. data/app/views/forums/_forum.html.haml +14 -20
  15. data/app/views/forums/_latest.html.haml +12 -0
  16. data/app/views/forums/_standard_parts.html.haml +49 -0
  17. data/app/views/forums/index.html.haml +16 -24
  18. data/app/views/forums/show.html.haml +18 -28
  19. data/app/views/pages/_comment.html.haml +1 -1
  20. data/app/views/posts/_attachments.html.haml +13 -0
  21. data/app/views/posts/_confirm_delete.html.haml +10 -0
  22. data/app/views/posts/_context.html.haml +16 -0
  23. data/app/views/posts/_edit_links.html.haml +11 -0
  24. data/app/views/posts/_form.html.haml +40 -2
  25. data/app/views/posts/_latest.html.haml +10 -17
  26. data/app/views/posts/_new_attachment.html.haml +2 -0
  27. data/app/views/posts/_post.html.haml +25 -60
  28. data/app/views/posts/{_search.html.haml → _search_form.html.haml} +1 -1
  29. data/app/views/posts/_uploader.html.haml +2 -2
  30. data/app/views/posts/edit.html.haml +26 -13
  31. data/app/views/posts/index.html.haml +19 -27
  32. data/app/views/posts/new.html.haml +27 -7
  33. data/app/views/posts/remove.html.haml +27 -0
  34. data/app/views/posts/show.html.haml +20 -7
  35. data/app/views/readers/_forum_messages.html.haml +20 -0
  36. data/app/views/readers/_messages_summary.html.haml +3 -0
  37. data/app/views/topics/_context.html.haml +12 -0
  38. data/app/views/topics/_latest.html.haml +14 -16
  39. data/app/views/topics/_locked.html.haml +1 -1
  40. data/app/views/topics/_replies.html.haml +6 -0
  41. data/app/views/topics/_reply.html.haml +23 -0
  42. data/app/views/topics/_topic.html.haml +14 -43
  43. data/app/views/topics/_voices.html.haml +5 -0
  44. data/app/views/topics/index.html.haml +11 -24
  45. data/app/views/topics/show.html.haml +25 -38
  46. data/config/initializers/radiant_config.rb +5 -1
  47. data/config/locales/en.yml +73 -27
  48. data/config/routes.rb +3 -4
  49. data/db/migrate/20101222160900_page_posts.rb +21 -0
  50. data/db/migrate/20101222163605_no_comment_forum.rb +10 -0
  51. data/db/migrate/20110105103827_topic_merely_associative.rb +23 -0
  52. data/db/migrate/20110111080550_detach_observer.rb +11 -0
  53. data/db/migrate/20110127113852_import_attachments.rb +9 -0
  54. data/forum_extension.rb +12 -13
  55. data/lib/commentable_model.rb +98 -0
  56. data/lib/forum_page.rb +2 -22
  57. data/lib/forum_reader_sessions_controller.rb +14 -0
  58. data/lib/forum_readers_controller.rb +2 -9
  59. data/lib/forum_red_cloth3.rb +23 -4
  60. data/lib/forum_red_cloth4.rb +23 -4
  61. data/lib/forum_tags.rb +298 -194
  62. data/lib/sanitize/config/forum.rb +47 -0
  63. data/public/images/furniture/blank.png +0 -0
  64. data/public/images/furniture/emoticons.png +0 -0
  65. data/public/javascripts/forum.js +349 -93
  66. data/public/javascripts/jquery.tools.min.js +195 -0
  67. data/public/punymce/blank.htm +1 -0
  68. data/public/punymce/css/content.css +4 -0
  69. data/public/punymce/css/editor.css +58 -0
  70. data/public/punymce/i18n/sv.js +28 -0
  71. data/public/punymce/img/icons.gif +0 -0
  72. data/public/punymce/img/icons_uncompressed.png +0 -0
  73. data/public/punymce/plugins/bbcode.js +1 -0
  74. data/public/punymce/plugins/bbcode_src.js +50 -0
  75. data/public/punymce/plugins/editsource/css/editor.css +3 -0
  76. data/public/punymce/plugins/editsource/editsource.js +1 -0
  77. data/public/punymce/plugins/editsource/editsource_src.js +81 -0
  78. data/public/punymce/plugins/editsource/img/icons.gif +0 -0
  79. data/public/punymce/plugins/emoticons/css/content.css +13 -0
  80. data/public/punymce/plugins/emoticons/css/editor.css +17 -0
  81. data/public/punymce/plugins/emoticons/emoticons.js +1 -0
  82. data/public/punymce/plugins/emoticons/emoticons_src.js +303 -0
  83. data/public/punymce/plugins/emoticons/img/emoticons.gif +0 -0
  84. data/public/punymce/plugins/emoticons/img/emoticons.png +0 -0
  85. data/public/punymce/plugins/emoticons/img/trans.gif +0 -0
  86. data/public/punymce/plugins/entities.js +1 -0
  87. data/public/punymce/plugins/entities_src.js +37 -0
  88. data/public/punymce/plugins/forceblocks.js +1 -0
  89. data/public/punymce/plugins/forceblocks_src.js +465 -0
  90. data/public/punymce/plugins/forcenl.js +1 -0
  91. data/public/punymce/plugins/forcenl_src.js +26 -0
  92. data/public/punymce/plugins/image/css/editor.css +1 -0
  93. data/public/punymce/plugins/image/image.js +1 -0
  94. data/public/punymce/plugins/image/image_src.js +30 -0
  95. data/public/punymce/plugins/image/img/icons.gif +0 -0
  96. data/public/punymce/plugins/link/css/editor.css +2 -0
  97. data/public/punymce/plugins/link/img/icons.gif +0 -0
  98. data/public/punymce/plugins/link/link.js +1 -0
  99. data/public/punymce/plugins/link/link_src.js +36 -0
  100. data/public/punymce/plugins/paste.js +1 -0
  101. data/public/punymce/plugins/paste_src.js +169 -0
  102. data/public/punymce/plugins/protect.js +1 -0
  103. data/public/punymce/plugins/protect_src.js +30 -0
  104. data/public/punymce/plugins/safari2x.js +1 -0
  105. data/public/punymce/plugins/safari2x_src.js +284 -0
  106. data/public/punymce/plugins/tabfocus.js +1 -0
  107. data/public/punymce/plugins/tabfocus_src.js +45 -0
  108. data/public/punymce/plugins/textcolor/css/editor.css +7 -0
  109. data/public/punymce/plugins/textcolor/img/icons.gif +0 -0
  110. data/public/punymce/plugins/textcolor/textcolor.js +1 -0
  111. data/public/punymce/plugins/textcolor/textcolor_src.js +73 -0
  112. data/public/punymce/puny_mce.js +1 -0
  113. data/public/punymce/puny_mce_full.js +1 -0
  114. data/public/punymce/puny_mce_src.js +1460 -0
  115. data/public/stylesheets/sass/forum.sass +175 -169
  116. data/radiant-forum-extension.gemspec +81 -19
  117. data/spec/controllers/admin/forums_controller_spec.rb +2 -2
  118. data/spec/controllers/forums_controller_spec.rb +3 -6
  119. data/spec/controllers/posts_controller_spec.rb +76 -59
  120. data/spec/controllers/topics_controller_spec.rb +4 -95
  121. data/spec/datasets/forum_readers_dataset.rb +1 -0
  122. data/spec/datasets/forums_dataset.rb +91 -10
  123. data/spec/lib/commentable_model_spec.rb +88 -0
  124. data/spec/lib/forum_page_spec.rb +2 -34
  125. data/spec/lib/forum_site_spec.rb +2 -3
  126. data/spec/lib/forum_tags_spec.rb +35 -0
  127. data/spec/models/forum_spec.rb +31 -20
  128. data/spec/models/post_spec.rb +40 -39
  129. data/spec/models/topic_spec.rb +29 -71
  130. data/spec/spec_helper.rb +10 -1
  131. metadata +84 -22
  132. data/app/views/posts/_reply.html.haml +0 -35
  133. data/app/views/posts/_upload.html.haml +0 -2
  134. data/app/views/posts/preview.html.haml +0 -32
  135. data/app/views/posts/search.html.haml +0 -63
  136. data/app/views/posts/search.rss.builder +0 -14
  137. data/app/views/topics/_form.html.haml +0 -30
  138. data/app/views/topics/_help.html.haml +0 -8
  139. data/app/views/topics/comments.html.haml +0 -6
  140. data/app/views/topics/edit.html.haml +0 -26
  141. data/app/views/topics/new.html.haml +0 -56
  142. data/spec/datasets/forum_pages_dataset.rb +0 -11
  143. data/spec/datasets/posts_dataset.rb +0 -31
  144. data/spec/datasets/topics_dataset.rb +0 -37
data/spec/spec_helper.rb CHANGED
@@ -41,4 +41,13 @@ Spec::Runner.configure do |config|
41
41
  #
42
42
  # If you declare global fixtures, be aware that they will be declared
43
43
  # for all of your examples, even those that don't use them.
44
- end
44
+ end
45
+
46
+ # class NilClass
47
+ # def method_missing(method, *args)
48
+ # p "NilClass##{method} called with args #{args.inspect}"
49
+ # p "Stack:"
50
+ # p caller.inspect
51
+ # raise
52
+ # end
53
+ # end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: radiant-forum-extension
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 15
5
5
  prerelease: false
6
6
  segments:
7
- - 1
8
7
  - 2
9
- - 1
10
- version: 1.2.1
8
+ - 0
9
+ - 0
10
+ version: 2.0.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - spanner
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-11-08 00:00:00 +00:00
18
+ date: 2011-01-27 00:00:00 +00:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -65,6 +65,7 @@ files:
65
65
  - app/controllers/admin/forums_controller.rb
66
66
  - app/controllers/admin/posts_controller.rb
67
67
  - app/controllers/admin/topics_controller.rb
68
+ - app/controllers/forum_base_controller.rb
68
69
  - app/controllers/forums_controller.rb
69
70
  - app/controllers/posts_controller.rb
70
71
  - app/controllers/topics_controller.rb
@@ -91,6 +92,8 @@ files:
91
92
  - app/views/admin/topics/edit.html.haml
92
93
  - app/views/admin/topics/index.html.haml
93
94
  - app/views/forums/_forum.html.haml
95
+ - app/views/forums/_latest.html.haml
96
+ - app/views/forums/_standard_parts.html.haml
94
97
  - app/views/forums/index.html.haml
95
98
  - app/views/forums/show.html.haml
96
99
  - app/views/forums/show.rss.builder
@@ -101,34 +104,36 @@ files:
101
104
  - app/views/pages/_comment.html.haml
102
105
  - app/views/pages/_comments.html.haml
103
106
  - app/views/posts/_attachment.html.haml
107
+ - app/views/posts/_attachments.html.haml
108
+ - app/views/posts/_confirm_delete.html.haml
109
+ - app/views/posts/_context.html.haml
110
+ - app/views/posts/_edit_links.html.haml
104
111
  - app/views/posts/_form.html.haml
105
112
  - app/views/posts/_latest.html.haml
113
+ - app/views/posts/_new_attachment.html.haml
106
114
  - app/views/posts/_post.html.haml
107
115
  - app/views/posts/_post.rss.builder
108
- - app/views/posts/_reply.html.haml
109
- - app/views/posts/_search.html.haml
110
- - app/views/posts/_upload.html.haml
116
+ - app/views/posts/_search_form.html.haml
111
117
  - app/views/posts/_uploader.html.haml
112
118
  - app/views/posts/edit.html.haml
113
119
  - app/views/posts/index.html.haml
114
120
  - app/views/posts/index.rss.builder
115
121
  - app/views/posts/new.html.haml
116
- - app/views/posts/preview.html.haml
117
- - app/views/posts/search.html.haml
118
- - app/views/posts/search.rss.builder
122
+ - app/views/posts/remove.html.haml
119
123
  - app/views/posts/show.html.haml
120
124
  - app/views/reader_notifier/post.rhtml
121
- - app/views/topics/_form.html.haml
122
- - app/views/topics/_help.html.haml
125
+ - app/views/readers/_forum_messages.html.haml
126
+ - app/views/readers/_messages_summary.html.haml
127
+ - app/views/topics/_context.html.haml
123
128
  - app/views/topics/_latest.html.haml
124
129
  - app/views/topics/_locked.html.haml
130
+ - app/views/topics/_replies.html.haml
131
+ - app/views/topics/_reply.html.haml
125
132
  - app/views/topics/_topic.html.haml
126
133
  - app/views/topics/_topic.rss.builder
127
- - app/views/topics/comments.html.haml
128
- - app/views/topics/edit.html.haml
134
+ - app/views/topics/_voices.html.haml
129
135
  - app/views/topics/index.html.haml
130
136
  - app/views/topics/index.rss.builder
131
- - app/views/topics/new.html.haml
132
137
  - app/views/topics/show.html.haml
133
138
  - app/views/topics/show.rss.builder
134
139
  - config/initializers/radiant_config.rb
@@ -143,16 +148,24 @@ files:
143
148
  - db/migrate/007_reader_ownership.rb
144
149
  - db/migrate/008_first_posts.rb
145
150
  - db/migrate/20090824111005_import_helpers.rb
151
+ - db/migrate/20101222160900_page_posts.rb
152
+ - db/migrate/20101222163605_no_comment_forum.rb
153
+ - db/migrate/20110105103827_topic_merely_associative.rb
154
+ - db/migrate/20110111080550_detach_observer.rb
155
+ - db/migrate/20110127113852_import_attachments.rb
146
156
  - forum_extension.rb
157
+ - lib/commentable_model.rb
147
158
  - lib/forum_admin_ui.rb
148
159
  - lib/forum_page.rb
149
160
  - lib/forum_reader.rb
150
161
  - lib/forum_reader_notifier.rb
162
+ - lib/forum_reader_sessions_controller.rb
151
163
  - lib/forum_readers_controller.rb
152
164
  - lib/forum_red_cloth3.rb
153
165
  - lib/forum_red_cloth4.rb
154
166
  - lib/forum_site.rb
155
167
  - lib/forum_tags.rb
168
+ - lib/sanitize/config/forum.rb
156
169
  - lib/tasks/radiant_forum_extension_tasks.rake
157
170
  - public/images/admin/forum.png
158
171
  - public/images/admin/new-forum.png
@@ -175,8 +188,10 @@ files:
175
188
  - public/images/furniture/attachment.png
176
189
  - public/images/furniture/attachment_link.png
177
190
  - public/images/furniture/attachment_over.png
191
+ - public/images/furniture/blank.png
178
192
  - public/images/furniture/chk_off.png
179
193
  - public/images/furniture/chk_on.png
194
+ - public/images/furniture/emoticons.png
180
195
  - public/images/furniture/feed_14.png
181
196
  - public/images/furniture/feed_28.png
182
197
  - public/images/furniture/post.png
@@ -185,6 +200,55 @@ files:
185
200
  - public/images/furniture/rdo_on.png
186
201
  - public/images/furniture/wait_16_grey.gif
187
202
  - public/javascripts/forum.js
203
+ - public/javascripts/jquery.tools.min.js
204
+ - public/punymce/blank.htm
205
+ - public/punymce/css/content.css
206
+ - public/punymce/css/editor.css
207
+ - public/punymce/i18n/sv.js
208
+ - public/punymce/img/icons.gif
209
+ - public/punymce/img/icons_uncompressed.png
210
+ - public/punymce/plugins/bbcode.js
211
+ - public/punymce/plugins/bbcode_src.js
212
+ - public/punymce/plugins/editsource/css/editor.css
213
+ - public/punymce/plugins/editsource/editsource.js
214
+ - public/punymce/plugins/editsource/editsource_src.js
215
+ - public/punymce/plugins/editsource/img/icons.gif
216
+ - public/punymce/plugins/emoticons/css/content.css
217
+ - public/punymce/plugins/emoticons/css/editor.css
218
+ - public/punymce/plugins/emoticons/emoticons.js
219
+ - public/punymce/plugins/emoticons/emoticons_src.js
220
+ - public/punymce/plugins/emoticons/img/emoticons.gif
221
+ - public/punymce/plugins/emoticons/img/emoticons.png
222
+ - public/punymce/plugins/emoticons/img/trans.gif
223
+ - public/punymce/plugins/entities.js
224
+ - public/punymce/plugins/entities_src.js
225
+ - public/punymce/plugins/forceblocks.js
226
+ - public/punymce/plugins/forceblocks_src.js
227
+ - public/punymce/plugins/forcenl.js
228
+ - public/punymce/plugins/forcenl_src.js
229
+ - public/punymce/plugins/image/css/editor.css
230
+ - public/punymce/plugins/image/image.js
231
+ - public/punymce/plugins/image/image_src.js
232
+ - public/punymce/plugins/image/img/icons.gif
233
+ - public/punymce/plugins/link/css/editor.css
234
+ - public/punymce/plugins/link/img/icons.gif
235
+ - public/punymce/plugins/link/link.js
236
+ - public/punymce/plugins/link/link_src.js
237
+ - public/punymce/plugins/paste.js
238
+ - public/punymce/plugins/paste_src.js
239
+ - public/punymce/plugins/protect.js
240
+ - public/punymce/plugins/protect_src.js
241
+ - public/punymce/plugins/safari2x.js
242
+ - public/punymce/plugins/safari2x_src.js
243
+ - public/punymce/plugins/tabfocus.js
244
+ - public/punymce/plugins/tabfocus_src.js
245
+ - public/punymce/plugins/textcolor/css/editor.css
246
+ - public/punymce/plugins/textcolor/img/icons.gif
247
+ - public/punymce/plugins/textcolor/textcolor.js
248
+ - public/punymce/plugins/textcolor/textcolor_src.js
249
+ - public/punymce/puny_mce.js
250
+ - public/punymce/puny_mce_full.js
251
+ - public/punymce/puny_mce_src.js
188
252
  - public/stylesheets/sass/forum.sass
189
253
  - radiant-forum-extension.gemspec
190
254
  - spec/controllers/admin/forums_controller_spec.rb
@@ -192,17 +256,16 @@ files:
192
256
  - spec/controllers/posts_controller_spec.rb
193
257
  - spec/controllers/topics_controller_spec.rb
194
258
  - spec/datasets/forum_layouts_dataset.rb
195
- - spec/datasets/forum_pages_dataset.rb
196
259
  - spec/datasets/forum_readers_dataset.rb
197
260
  - spec/datasets/forum_sites_dataset.rb
198
261
  - spec/datasets/forums_dataset.rb
199
- - spec/datasets/posts_dataset.rb
200
- - spec/datasets/topics_dataset.rb
262
+ - spec/lib/commentable_model_spec.rb
201
263
  - spec/lib/forum_admin_ui_spec.rb
202
264
  - spec/lib/forum_page_spec.rb
203
265
  - spec/lib/forum_reader_notification_spec.rb
204
266
  - spec/lib/forum_reader_spec.rb
205
267
  - spec/lib/forum_site_spec.rb
268
+ - spec/lib/forum_tags_spec.rb
206
269
  - spec/models/forum_spec.rb
207
270
  - spec/models/post_spec.rb
208
271
  - spec/models/topic_spec.rb
@@ -252,17 +315,16 @@ test_files:
252
315
  - spec/controllers/posts_controller_spec.rb
253
316
  - spec/controllers/topics_controller_spec.rb
254
317
  - spec/datasets/forum_layouts_dataset.rb
255
- - spec/datasets/forum_pages_dataset.rb
256
318
  - spec/datasets/forum_readers_dataset.rb
257
319
  - spec/datasets/forum_sites_dataset.rb
258
320
  - spec/datasets/forums_dataset.rb
259
- - spec/datasets/posts_dataset.rb
260
- - spec/datasets/topics_dataset.rb
321
+ - spec/lib/commentable_model_spec.rb
261
322
  - spec/lib/forum_admin_ui_spec.rb
262
323
  - spec/lib/forum_page_spec.rb
263
324
  - spec/lib/forum_reader_notification_spec.rb
264
325
  - spec/lib/forum_reader_spec.rb
265
326
  - spec/lib/forum_site_spec.rb
327
+ - spec/lib/forum_tags_spec.rb
266
328
  - spec/models/forum_spec.rb
267
329
  - spec/models/post_spec.rb
268
330
  - spec/models/topic_spec.rb
@@ -1,35 +0,0 @@
1
- - message_type = @page ? 'comment' : 'post'
2
-
3
- - if @topic.locked?
4
- %p.administrative
5
- This topic is closed.
6
-
7
- - else
8
- - if current_reader
9
- - if current_reader.activated?
10
- - formurl = @page ? page_posts_url(@page) : topic_posts_url(@topic)
11
- - @post ||= @topic.posts.build
12
-
13
- %div.reply#replyform
14
- %div.speaker
15
- %a{:href => reader_url(current_reader), :class => 'main'}
16
- = gravatar_for(current_reader, {:size => 40}, {:alt => current_reader.name, :class => 'gravatar', :width => '40', :height => '40'})
17
- .post_wrapper
18
- .post_header
19
- %h2
20
- = t('add_post', :message_type => message_type)
21
- %p.context
22
- = t('logged_in_as', :name => current_reader.name)
23
- = t('if_not_you')
24
- = link_to(t('log_out'), reader_logout_url) + '.'
25
-
26
- - form_for :post, :url => formurl, :html => {:id => 'reply_form', :multipart => true, :class => 'friendly inline'} do |f|
27
- = render :partial => 'posts/form', :object => f
28
- %p.buttons
29
- = f.submit t('post_post', :message_type => message_type)
30
-
31
- - else
32
- = render :partial => 'reader_activations/activation_required', :locals => {:purpose => t('to_add_post', :message_type => message_type)}
33
-
34
- - else
35
- = render :partial => 'reader_sessions/login_form', :locals => {:purpose => t('to_add_post', :message_type => message_type)}
@@ -1,2 +0,0 @@
1
- - if uf
2
- = uf.file_field :file, :class => 'filefield'
@@ -1,32 +0,0 @@
1
- / this template is generally only where you don't want a reply form on the page by default,
2
- / and instead bring it in with a remote call. most often this is for page comments, where
3
- / it has the advantage that the page can still be cached. that's why a login form might be returned.
4
-
5
- - message_type = @page ? 'comment' : 'message'
6
- - formurl = @page ? page_posts_url(@page) : posts_url(@forum, @topic)
7
-
8
- #forum
9
- - if response.layout
10
- %p
11
- Please check your message below. If it's ok, press 'post message' to add it to the site.
12
- %div.post
13
- %div{:class => 'reply'}
14
- %div.post_header
15
- %h2
16
- %a{:href => reader_url(@post.reader), :class => 'main'}
17
- = gravatar_for(@post.reader, {:size => 40}, {:alt => @post.reader.name, :class => 'gravatar', :width => '40', :height => '40'})
18
- = @post.reader.name
19
- %p.context
20
- replied
21
- = time_ago_in_words(@post.created_at)
22
- ago
23
- %div.post_body
24
- = clean_textilize(@post.body)
25
- %div.post_confirmation
26
- - form_for :post, :url => formurl, :html => {:id => 'reply_form', :class => 'friendly'} do |f|
27
- = f.hidden_field :body
28
- = submit_tag 'confirm', :class => 'confirm', :id => 'confirm'
29
- or
30
- = submit_tag 'revise', :class => 'revise', :id => 'revise'
31
- or
32
- = link_to 'cancel', @page ? @page.url : forum_topic_url(@topic.forum, @topic), :class => 'cancelform'
@@ -1,63 +0,0 @@
1
- - content_for :signals do
2
- = render :partial => 'readers/flasher'
3
-
4
- - content_for :messages do
5
- = render :partial => 'posts/post', :collection => @posts, :locals => {:with_context => true, :hide_author => false, :preview => true}
6
-
7
- - content_for :pagination do
8
- = pagination_and_summary_for @posts, t('post')
9
-
10
- - content_for :breadcrumbs do
11
- = link_to t('forum').titlecase, '/forum'
12
- = t('separator')
13
- = link_to t('posts').titlecase, '/forum/posts'
14
-
15
- - content_for :breadhead do
16
- = link_to t("Posts"), posts_url, :class => 'breadhead'
17
-
18
- - if @searching
19
- - content_for :title do
20
- = t('search_results')
21
-
22
- - content_for :thing_title do
23
- = t('search_results')
24
-
25
- - content_for :introduction do
26
- - if @posts.empty?
27
- %p
28
- =t('no_posts_found')
29
- - else
30
- %p
31
- = t('posts_found', :count => @posts.total_entries)
32
- - unless params[:q].blank?
33
- = t('matching')
34
- %strong
35
- = params[:q]
36
- - if @reader
37
- = t('from_reader', :name => @reader.name)
38
- - if @topic
39
- = t('filed_in', :name => @topic.name)
40
- - elsif @forum
41
- = t('filed_in', :name => @forum.name)
42
-
43
- - content_for :feed do
44
- = feed_link(search_posts_url(params.merge(:format => :rss)))
45
-
46
- - else
47
- - content_for :title do
48
- = t('search')
49
- - content_for :introduction do
50
- = t('search_introduction')
51
-
52
- - content_for :search do
53
- = render :partial => 'search'
54
-
55
-
56
-
57
- #forum
58
- #search
59
- = yield :search
60
- - if @searching
61
- = yield :pagination if @posts.previous_page
62
- = yield :messages
63
- = yield :pagination if @posts.next_page
@@ -1,14 +0,0 @@
1
- xml.channel do
2
- xml.atom :link, nil, {
3
- :href => search_posts_url(:rss),
4
- :rel => 'self', :type => 'application/rss+xml'
5
- }
6
-
7
- xml.title "#{@site_title} : forum search"
8
- xml.description @title
9
- xml.link search_posts_url(params)
10
- xml.language "en-us"
11
- xml.ttl "60"
12
-
13
- render :partial => "post", :collection => @posts, :locals => {:xm => xml}
14
- end
@@ -1,30 +0,0 @@
1
- %p.title
2
- = form.label :name, t('label.topic_name'), :class => 'required'
3
- %br
4
- = form.text_field :name, :class => 'titular'
5
- - if admin?
6
- %br
7
- %span.quiet
8
- = form.check_box :sticky
9
- %label{:for => 'topic_sticky', :class => 'admin'}
10
- = t('sticky')
11
- = form.check_box :locked
12
- %label{:for => 'topic_locked', :class => 'admin'}
13
- = t('locked')
14
-
15
- - @topic.first_post ||= @topic.posts.build
16
- - form.fields_for :first_post, @topic.first_post do |fp|
17
- %p.body
18
- = fp.label :body, t('label.topic_body')
19
- %br
20
- = fp.text_area :body, :class=> 'standard', :rows => 12
21
-
22
- - unless @topic.page && !Radiant::Config['forum.comments_have_attachments']
23
- = render :partial => 'posts/uploader', :locals => {:f => fp}
24
-
25
- - if @topic.new_record? || admin?
26
- %p.forum
27
- = form.label :forum_id, t('label.topic_category')
28
- %br
29
- = form.select :forum_id, Forum.visible.collect {|f| [ f.name, f.id ] }, :class=> 'standard'
30
-
@@ -1,8 +0,0 @@
1
- - if helpforum = Forum.find_by_name('Help')
2
- #marginalia
3
- %h3
4
- Help!
5
- %ul.helplist
6
- - helpforum.topics.find(:all, :limit => 10).each do |topic|
7
- %li
8
- = link_to topic.name, forum_topic_url(topic.forum, topic)
@@ -1,6 +0,0 @@
1
- #forum
2
- %h2
3
- =t('comments').titlecase
4
-
5
- = render :partial => 'posts/post', :collection => @posts, :locals => { :with_context => false }
6
- = render :partial => 'posts/reply'
@@ -1,26 +0,0 @@
1
- = render :partial => 'readers/flasher'
2
-
3
- #forum
4
- %h1
5
- = link_to "#{@forum.name} »", forum_url(@forum), {:class => 'breadhead'}
6
- %br
7
- Edit discussion
8
-
9
- #new_topic
10
- = form_for :topic, :url => forum_topic_path(@forum, @topic), :html => {:method => :put, :class => 'friendly'} do |f|
11
- = render :partial => "form", :object => f
12
- = submit_tag 'Save Changes'
13
- or
14
- = link_to('cancel', forum_topic_path(@forum, @topic))
15
-
16
- = render :partial => 'readers/controls'
17
-
18
- - content_for :breadcrumbs do
19
- = link_to 'Forum', topics_url
20
- \>
21
- = link_to @forum.name, forum_url(@forum)
22
- \>
23
- Edit Discussion
24
-
25
- - content_for :pagetitle do
26
- Edit Discussion