radiant-forum-extension 0.6.1 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (52) hide show
  1. data/Rakefile +1 -3
  2. data/VERSION +1 -1
  3. data/app/controllers/forums_controller.rb +13 -5
  4. data/app/controllers/posts_controller.rb +9 -3
  5. data/app/controllers/topics_controller.rb +10 -3
  6. data/app/helpers/forum_helper.rb +105 -0
  7. data/app/models/post_attachment.rb +20 -12
  8. data/app/models/topic.rb +1 -1
  9. data/app/views/admin/forums/index.html.haml +63 -65
  10. data/app/views/admin/reader_configuration/_edit_forum.html.haml +6 -0
  11. data/app/views/admin/reader_configuration/_forum.html.haml +6 -0
  12. data/app/views/forums/_forum.html.haml +1 -2
  13. data/app/views/forums/index.html.haml +27 -25
  14. data/app/views/forums/show.html.haml +31 -19
  15. data/app/views/posts/_attachment.html.haml +5 -2
  16. data/app/views/posts/_form.html.haml +3 -5
  17. data/app/views/posts/_post.html.haml +32 -29
  18. data/app/views/posts/_uploader.html.haml +2 -3
  19. data/app/views/posts/index.html.haml +27 -11
  20. data/app/views/topics/_form.html.haml +3 -3
  21. data/app/views/topics/_topic.html.haml +10 -11
  22. data/app/views/topics/index.html.haml +28 -22
  23. data/app/views/topics/new.html.haml +32 -27
  24. data/app/views/topics/show.html.haml +25 -10
  25. data/config/locales/en.yml +58 -0
  26. data/config/routes.rb +5 -5
  27. data/forum_extension.rb +18 -11
  28. data/lib/forum_readers_controller.rb +1 -0
  29. data/lib/tasks/radiant_forum_extension_tasks.rake +54 -31
  30. data/public/images/{forum → furniture}/attachment.png +0 -0
  31. data/public/images/{forum → furniture}/attachment_link.png +0 -0
  32. data/public/images/{forum → furniture}/attachment_over.png +0 -0
  33. data/public/images/{forum → furniture}/chk_off.png +0 -0
  34. data/public/images/{forum → furniture}/chk_on.png +0 -0
  35. data/public/images/{forum → furniture}/feed_14.png +0 -0
  36. data/public/images/{forum → furniture}/feed_28.png +0 -0
  37. data/public/images/furniture/post.png +0 -0
  38. data/public/images/furniture/post_over.png +0 -0
  39. data/public/images/{forum → furniture}/rdo_off.png +0 -0
  40. data/public/images/{forum → furniture}/rdo_on.png +0 -0
  41. data/public/images/{forum → furniture}/wait_16_grey.gif +0 -0
  42. data/public/javascripts/forum.js +198 -0
  43. data/public/stylesheets/sass/forum.sass +247 -0
  44. data/radiant-forum-extension.gemspec +21 -28
  45. metadata +26 -53
  46. data/lib/forum_helper.rb +0 -109
  47. data/public/images/forum/post_14.png +0 -0
  48. data/public/images/forum/post_14_over.png +0 -0
  49. data/public/javascripts/platform/forum.js +0 -175
  50. data/public/javascripts/platform/remotecontent.js +0 -89
  51. data/public/stylesheets/admin/forum.css +0 -87
  52. data/public/stylesheets/platform/forum.css +0 -70
@@ -0,0 +1,247 @@
1
+ @import reader.sass
2
+
3
+ div#forum
4
+ h1, h2
5
+ margin-bottom: 24px
6
+ line-height: 1.2
7
+ a.floating
8
+ float: right
9
+ margin: 0 0 10px 20px
10
+ a.feedlink
11
+ background: url(/images/furniture/feed_14.png) no-repeat 0 4px
12
+ padding-left: 18px
13
+ color: #f58822
14
+ div.reply, div.first_post
15
+ margin-left: 0
16
+ div.post_header a.replied
17
+ color: #cacac8
18
+ div.newmessage
19
+ float: right
20
+ margin: 0 0 12px 16px
21
+ +border-radius
22
+ &:hover
23
+ +box-shadow(#333, 1px, 2px)
24
+ background: white url(/images/admin/buttons_background.png) repeat-x top left
25
+ &:active
26
+ +box-shadow(#666,1px, 1px)
27
+ background-position: bottom left
28
+ a
29
+ display: block
30
+ overflow: hidden
31
+ margin: 6px
32
+ +functionalfonts
33
+ color: $dark
34
+ line-height: 1.1
35
+ background: transparent url(/images/furniture/post.png) no-repeat 0 4px
36
+ padding-left: 14px
37
+ div.post
38
+ position: relative
39
+ clear: left
40
+ margin: 10px 0 50px 0
41
+ div.first_post
42
+ margin-top: 30px
43
+ clear: both
44
+ div.post_header h2
45
+ margin: 0
46
+ line-height: 1.1
47
+ a.speaker
48
+ font-weight: bold
49
+ div.post_body
50
+ position: relative
51
+ p
52
+ margin-top: .25em
53
+ div.post blockquote
54
+ color: #cacac8
55
+ border-left-width: 5px
56
+ border-left-style: solid
57
+ border-left-color: #cacac8
58
+ margin: 0
59
+ padding-left: 20px
60
+ div.over
61
+ background-color: #e2e1dc
62
+ div.post_control
63
+ font-size: 85%
64
+ color: #cacac8
65
+ p
66
+ margin: 0
67
+ p.post_admin
68
+ float: right
69
+ a, a:visited
70
+ font-family: helvetica,arial,sans-serif
71
+ font-size: 0.8em
72
+ line-height: 1
73
+ padding: 4px
74
+ color: white
75
+ background-color: #e2e1dd
76
+ +border-radius
77
+ &.edit_post:hover
78
+ background-color: #1c8064
79
+ &.delete_post:hover
80
+ background-color: #c00
81
+ a
82
+ color: #1bb68b
83
+ &.edit_post
84
+ color: #d1005d
85
+ &.delete_post
86
+ padding-left: 5px
87
+ color: #d1005d
88
+ &:hover
89
+ color: #1bb68b
90
+ &.waiting
91
+ color: #cacac8
92
+ padding-left: 18px
93
+ background: transparent url(/images/furniture/wait_16_grey.gif) no-repeat left top
94
+ p.waiting
95
+ color: #cacac8
96
+ padding-left: 18px
97
+ background: transparent url(/images/furniture/wait_16_grey.gif) no-repeat left top
98
+ div.post_wrapper
99
+ position: relative
100
+ overflow: hidden
101
+ div.post_form
102
+ margin: 0 0 20px 0
103
+ padding: 0
104
+ background: white url(/images/furniture/wait_16_grey.gif) no-repeat center center
105
+ form
106
+ background-color: #ffffff
107
+ margin: 0
108
+ label
109
+ display: none
110
+ textarea
111
+ left: 0
112
+ right: 0
113
+ color: #559dc4
114
+ border-color: #cacac8
115
+ font-size: normal
116
+ font-size: 1em
117
+ p
118
+ margin: 0
119
+
120
+ img.smiley
121
+ margin: 3px 3px 0 3px
122
+
123
+ div.upload_stack, div.post_attachments
124
+ margin: 0 0 30px 0
125
+ border-left-width: 5px
126
+ border-left-style: solid
127
+ border-left-color: #cacac8
128
+ padding-left: 20px
129
+ h4
130
+ margin: 0
131
+ font-family: helvetica,arial,sans-serif
132
+ font-size: 0.8em
133
+ line-height: 1.4
134
+ color: #cacac8
135
+ margin: -3px 0 2px -10px
136
+ ul
137
+ margin: 0
138
+ list-style: none
139
+ padding: 0
140
+ li
141
+ clear: none
142
+ margin: 0
143
+ a.attachment
144
+ background: url(/images/furniture/attachment_link.png) no-repeat 0 2px
145
+ padding-left: 18px
146
+ a.attachment:hover
147
+ background-image: url(/images/furniture/attachment_over.png)
148
+ a.remove
149
+ font-family: helvetica,arial,sans-serif
150
+ font-size: 60%
151
+ color: #d1005d
152
+ padding: 3px
153
+ a.thumbnail
154
+ img
155
+ background-color: white
156
+ padding: 4px
157
+ margin: 4px
158
+ +box-shadow
159
+
160
+ a.cancel:hover, a.remove:hover
161
+ background-color: #d1005d
162
+ color: #ffffff
163
+
164
+ div.upload_stack
165
+ ul.attachments input, ul.uploads input
166
+ display: none
167
+ ul li a
168
+ color: #4d4e53
169
+ div.selector
170
+ position: relative
171
+ cursor: pointer
172
+ input.filefield
173
+ position: relative
174
+ z-index: 100
175
+ opacity: 0
176
+ div.addfile
177
+ position: absolute
178
+ z-index: 99
179
+ top: 0
180
+ a
181
+ background: url(/images/furniture/attachment_link.png) no-repeat 0 2px
182
+ padding-left: 18px
183
+
184
+ div#forum_search
185
+ margin: 40px 0 0 0
186
+ h2, p
187
+ margin: 0
188
+ input
189
+ &.standard
190
+ width: 80%
191
+ &.button
192
+ font-size: 1.2em
193
+ line-height: 1
194
+ color: #4d4e53
195
+ padding: 5px
196
+ margin: 0 0 0 6px
197
+
198
+ p.administrative
199
+ font-family: helvetica,arial,sans-serif
200
+ color: #cacac8
201
+
202
+ img.feedicon
203
+ margin: 8px 0
204
+
205
+ div.activation_required
206
+ color: #d1005d
207
+
208
+ ul.main
209
+ list-style: none
210
+ margin: 20px 0 50px 0
211
+ padding: 0
212
+ li
213
+ clear: left
214
+ margin: 30px 0
215
+ .subject a
216
+ font-family: helvetica,arial,sans-serif
217
+ font-size: 160%
218
+ font-weight: bold
219
+ line-height: 1
220
+ &:visited
221
+ font-family: helvetica,arial,sans-serif
222
+ font-size: 160%
223
+ font-weight: bold
224
+ line-height: 1
225
+ div.preview
226
+ font-size: 85%
227
+ color: #4d4e53
228
+ p
229
+ margin-top: 5px
230
+ &.sticky .subject a
231
+ color: #d1005d
232
+ &:visited
233
+ color: #d1005d
234
+ &.locked .subject a
235
+ color: #4d4e53
236
+ &:visited
237
+ color: #4d4e53
238
+
239
+ .context, .updatenote
240
+ display: block
241
+ font-family: helvetica,arial,sans-serif
242
+ font-size: 0.8em
243
+ line-height: 1.4
244
+ color: $mid
245
+ margin: 0
246
+ .still_editable
247
+ color: $dark
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{radiant-forum-extension}
8
- s.version = "0.6.1"
8
+ s.version = "1.1.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["spanner"]
12
- s.date = %q{2010-10-19}
12
+ s.date = %q{2010-11-01}
13
13
  s.description = %q{Nice clean forums and page comments for inclusion in your radiant site. Derived long ago from beast. Requires the reader extension and share_layouts.}
14
14
  s.email = %q{will@spanner.org}
15
15
  s.extra_rdoc_files = [
@@ -23,6 +23,7 @@ Gem::Specification.new do |s|
23
23
  "app/controllers/forums_controller.rb",
24
24
  "app/controllers/posts_controller.rb",
25
25
  "app/controllers/topics_controller.rb",
26
+ "app/helpers/forum_helper.rb",
26
27
  "app/models/forum.rb",
27
28
  "app/models/moderatorship.rb",
28
29
  "app/models/post.rb",
@@ -79,6 +80,7 @@ Gem::Specification.new do |s|
79
80
  "app/views/topics/new.html.haml",
80
81
  "app/views/topics/show.html.haml",
81
82
  "app/views/topics/show.rss.builder",
83
+ "config/locales/en.yml",
82
84
  "config/routes.rb",
83
85
  "db/migrate/001_create_forum_tables.rb",
84
86
  "db/migrate/002_pages_commentable.rb",
@@ -91,7 +93,6 @@ Gem::Specification.new do |s|
91
93
  "db/migrate/20090824111005_import_helpers.rb",
92
94
  "forum_extension.rb",
93
95
  "lib/forum_admin_ui.rb",
94
- "lib/forum_helper.rb",
95
96
  "lib/forum_page.rb",
96
97
  "lib/forum_reader.rb",
97
98
  "lib/forum_reader_notifier.rb",
@@ -119,22 +120,20 @@ Gem::Specification.new do |s|
119
120
  "public/images/emoticons/surprised.gif",
120
121
  "public/images/emoticons/tongue.gif",
121
122
  "public/images/emoticons/wink.gif",
122
- "public/images/forum/attachment.png",
123
- "public/images/forum/attachment_link.png",
124
- "public/images/forum/attachment_over.png",
125
- "public/images/forum/chk_off.png",
126
- "public/images/forum/chk_on.png",
127
- "public/images/forum/feed_14.png",
128
- "public/images/forum/feed_28.png",
129
- "public/images/forum/post_14.png",
130
- "public/images/forum/post_14_over.png",
131
- "public/images/forum/rdo_off.png",
132
- "public/images/forum/rdo_on.png",
133
- "public/images/forum/wait_16_grey.gif",
134
- "public/javascripts/platform/forum.js",
135
- "public/javascripts/platform/remotecontent.js",
136
- "public/stylesheets/admin/forum.css",
137
- "public/stylesheets/platform/forum.css",
123
+ "public/images/furniture/attachment.png",
124
+ "public/images/furniture/attachment_link.png",
125
+ "public/images/furniture/attachment_over.png",
126
+ "public/images/furniture/chk_off.png",
127
+ "public/images/furniture/chk_on.png",
128
+ "public/images/furniture/feed_14.png",
129
+ "public/images/furniture/feed_28.png",
130
+ "public/images/furniture/post.png",
131
+ "public/images/furniture/post_over.png",
132
+ "public/images/furniture/rdo_off.png",
133
+ "public/images/furniture/rdo_on.png",
134
+ "public/images/furniture/wait_16_grey.gif",
135
+ "public/javascripts/forum.js",
136
+ "public/stylesheets/sass/forum.sass",
138
137
  "radiant-forum-extension.gemspec",
139
138
  "spec/controllers/admin/forums_controller_spec.rb",
140
139
  "spec/controllers/forums_controller_spec.rb",
@@ -196,20 +195,14 @@ Gem::Specification.new do |s|
196
195
 
197
196
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
198
197
  s.add_runtime_dependency(%q<radiant>, [">= 0.9.0"])
199
- s.add_runtime_dependency(%q<radiant-reader-extension>, [">= 0"])
200
- s.add_runtime_dependency(%q<paperclip>, [">= 0"])
201
- s.add_runtime_dependency(%q<will_paginate>, [">= 0"])
198
+ s.add_runtime_dependency(%q<radiant-reader-extension>, ["~> 1.1.0"])
202
199
  else
203
200
  s.add_dependency(%q<radiant>, [">= 0.9.0"])
204
- s.add_dependency(%q<radiant-reader-extension>, [">= 0"])
205
- s.add_dependency(%q<paperclip>, [">= 0"])
206
- s.add_dependency(%q<will_paginate>, [">= 0"])
201
+ s.add_dependency(%q<radiant-reader-extension>, ["~> 1.1.0"])
207
202
  end
208
203
  else
209
204
  s.add_dependency(%q<radiant>, [">= 0.9.0"])
210
- s.add_dependency(%q<radiant-reader-extension>, [">= 0"])
211
- s.add_dependency(%q<paperclip>, [">= 0"])
212
- s.add_dependency(%q<will_paginate>, [">= 0"])
205
+ s.add_dependency(%q<radiant-reader-extension>, ["~> 1.1.0"])
213
206
  end
214
207
  end
215
208
 
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: 5
4
+ hash: 19
5
5
  prerelease: false
6
6
  segments:
7
- - 0
8
- - 6
9
7
  - 1
10
- version: 0.6.1
8
+ - 1
9
+ - 0
10
+ version: 1.1.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-10-19 00:00:00 +01:00
18
+ date: 2010-11-01 00:00:00 +00:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -40,42 +40,16 @@ dependencies:
40
40
  requirement: &id002 !ruby/object:Gem::Requirement
41
41
  none: false
42
42
  requirements:
43
- - - ">="
43
+ - - ~>
44
44
  - !ruby/object:Gem::Version
45
- hash: 3
45
+ hash: 19
46
46
  segments:
47
+ - 1
48
+ - 1
47
49
  - 0
48
- version: "0"
50
+ version: 1.1.0
49
51
  type: :runtime
50
52
  version_requirements: *id002
51
- - !ruby/object:Gem::Dependency
52
- name: paperclip
53
- prerelease: false
54
- requirement: &id003 !ruby/object:Gem::Requirement
55
- none: false
56
- requirements:
57
- - - ">="
58
- - !ruby/object:Gem::Version
59
- hash: 3
60
- segments:
61
- - 0
62
- version: "0"
63
- type: :runtime
64
- version_requirements: *id003
65
- - !ruby/object:Gem::Dependency
66
- name: will_paginate
67
- prerelease: false
68
- requirement: &id004 !ruby/object:Gem::Requirement
69
- none: false
70
- requirements:
71
- - - ">="
72
- - !ruby/object:Gem::Version
73
- hash: 3
74
- segments:
75
- - 0
76
- version: "0"
77
- type: :runtime
78
- version_requirements: *id004
79
53
  description: Nice clean forums and page comments for inclusion in your radiant site. Derived long ago from beast. Requires the reader extension and share_layouts.
80
54
  email: will@spanner.org
81
55
  executables: []
@@ -92,6 +66,7 @@ files:
92
66
  - app/controllers/forums_controller.rb
93
67
  - app/controllers/posts_controller.rb
94
68
  - app/controllers/topics_controller.rb
69
+ - app/helpers/forum_helper.rb
95
70
  - app/models/forum.rb
96
71
  - app/models/moderatorship.rb
97
72
  - app/models/post.rb
@@ -148,6 +123,7 @@ files:
148
123
  - app/views/topics/new.html.haml
149
124
  - app/views/topics/show.html.haml
150
125
  - app/views/topics/show.rss.builder
126
+ - config/locales/en.yml
151
127
  - config/routes.rb
152
128
  - db/migrate/001_create_forum_tables.rb
153
129
  - db/migrate/002_pages_commentable.rb
@@ -160,7 +136,6 @@ files:
160
136
  - db/migrate/20090824111005_import_helpers.rb
161
137
  - forum_extension.rb
162
138
  - lib/forum_admin_ui.rb
163
- - lib/forum_helper.rb
164
139
  - lib/forum_page.rb
165
140
  - lib/forum_reader.rb
166
141
  - lib/forum_reader_notifier.rb
@@ -188,22 +163,20 @@ files:
188
163
  - public/images/emoticons/surprised.gif
189
164
  - public/images/emoticons/tongue.gif
190
165
  - public/images/emoticons/wink.gif
191
- - public/images/forum/attachment.png
192
- - public/images/forum/attachment_link.png
193
- - public/images/forum/attachment_over.png
194
- - public/images/forum/chk_off.png
195
- - public/images/forum/chk_on.png
196
- - public/images/forum/feed_14.png
197
- - public/images/forum/feed_28.png
198
- - public/images/forum/post_14.png
199
- - public/images/forum/post_14_over.png
200
- - public/images/forum/rdo_off.png
201
- - public/images/forum/rdo_on.png
202
- - public/images/forum/wait_16_grey.gif
203
- - public/javascripts/platform/forum.js
204
- - public/javascripts/platform/remotecontent.js
205
- - public/stylesheets/admin/forum.css
206
- - public/stylesheets/platform/forum.css
166
+ - public/images/furniture/attachment.png
167
+ - public/images/furniture/attachment_link.png
168
+ - public/images/furniture/attachment_over.png
169
+ - public/images/furniture/chk_off.png
170
+ - public/images/furniture/chk_on.png
171
+ - public/images/furniture/feed_14.png
172
+ - public/images/furniture/feed_28.png
173
+ - public/images/furniture/post.png
174
+ - public/images/furniture/post_over.png
175
+ - public/images/furniture/rdo_off.png
176
+ - public/images/furniture/rdo_on.png
177
+ - public/images/furniture/wait_16_grey.gif
178
+ - public/javascripts/forum.js
179
+ - public/stylesheets/sass/forum.sass
207
180
  - radiant-forum-extension.gemspec
208
181
  - spec/controllers/admin/forums_controller_spec.rb
209
182
  - spec/controllers/forums_controller_spec.rb