radiant-forum-extension 2.0.3 → 2.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/VERSION +1 -1
- data/app/views/forums/_statistics.html.haml +0 -14
- data/app/views/topics/_busiest.html.haml +12 -0
- data/app/views/topics/index.html.haml +1 -1
- data/config/locales/en.yml +3 -2
- data/forum_extension.rb +1 -1
- data/lib/forum_tags.rb +18 -22
- data/radiant-forum-extension.gemspec +2 -1
- metadata +4 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.0.
|
1
|
+
2.0.4
|
@@ -1,17 +1,3 @@
|
|
1
|
-
%h2
|
2
|
-
= t('busy_topics')
|
3
|
-
%ul
|
4
|
-
- Topic.most_commented(10).each do |topic|
|
5
|
-
%li
|
6
|
-
= link_to topic.name, forum_topic_url(topic.forum, topic), :class => 'title'
|
7
|
-
= t('started_by')
|
8
|
-
= link_to(topic.reader.name, reader_url(topic.reader))
|
9
|
-
%br
|
10
|
-
= topic.posts.count
|
11
|
-
= t('posts') + ','
|
12
|
-
= t('most_recently')
|
13
|
-
= friendly_date(topic.replied_at) + '.'
|
14
|
-
|
15
1
|
%h2
|
16
2
|
= t('busy_readers')
|
17
3
|
%ul
|
@@ -0,0 +1,12 @@
|
|
1
|
+
%h2
|
2
|
+
= t('busy_topics')
|
3
|
+
%ul
|
4
|
+
- Topic.most_commented(10).each do |topic|
|
5
|
+
%li
|
6
|
+
= link_to topic.name, forum_topic_url(topic.forum, topic), :class => 'title'
|
7
|
+
%br
|
8
|
+
= t('started_by')
|
9
|
+
= link_to(topic.reader.name, reader_url(topic.reader)) + ', '
|
10
|
+
= t('now_has')
|
11
|
+
= topic.posts.count
|
12
|
+
= t('posts') + '.'
|
data/config/locales/en.yml
CHANGED
@@ -10,8 +10,8 @@ en:
|
|
10
10
|
attach_file: "attach a file"
|
11
11
|
author: "author"
|
12
12
|
begun_on: "begun on %{date}"
|
13
|
-
busy_topics: "
|
14
|
-
busy_readers: "
|
13
|
+
busy_topics: "Busy topics"
|
14
|
+
busy_readers: "Busiest people"
|
15
15
|
by: "by"
|
16
16
|
by_content_and_author: "by content, author or category."
|
17
17
|
comment: "comment"
|
@@ -105,6 +105,7 @@ en:
|
|
105
105
|
notice:
|
106
106
|
topic_deleted: "Topic '%{name}' was deleted."
|
107
107
|
post_deleted: "Post deleted."
|
108
|
+
now_has: "now has"
|
108
109
|
of: "of"
|
109
110
|
on_date: "on %{date}"
|
110
111
|
post: "comment"
|
data/forum_extension.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
require_dependency 'application_controller'
|
2
2
|
|
3
3
|
class ForumExtension < Radiant::Extension
|
4
|
-
version "2.0.
|
4
|
+
version "2.0.4"
|
5
5
|
description "Nice clean forums and page comments for inclusion in your radiant site. Requires the reader extension and share_layouts."
|
6
6
|
url "http://spanner.org/radiant/forum"
|
7
7
|
|
data/lib/forum_tags.rb
CHANGED
@@ -98,14 +98,6 @@ module ForumTags
|
|
98
98
|
tag 'link' do |tag|
|
99
99
|
end
|
100
100
|
|
101
|
-
desc %{
|
102
|
-
Renders a standard gravatar block (as found in the forum pages) for the reader who
|
103
|
-
started the current topic.
|
104
|
-
}
|
105
|
-
tag 'forum:topic:gravatar' do |tag|
|
106
|
-
%{<div class="speaker">#{standard_gravatar_for(tag.locals.topic.reader)}</div>}
|
107
|
-
end
|
108
|
-
|
109
101
|
desc %{
|
110
102
|
Renders the name of the reader who started the current topic.
|
111
103
|
}
|
@@ -128,23 +120,35 @@ module ForumTags
|
|
128
120
|
end
|
129
121
|
|
130
122
|
desc %{
|
131
|
-
Renders the
|
123
|
+
Renders the usual context line for the current topic, but with no date.
|
132
124
|
}
|
133
125
|
tag 'forum:topic:context' do |tag|
|
134
126
|
output = []
|
135
|
-
|
136
|
-
|
137
|
-
|
127
|
+
topic = tag.locals.topic
|
128
|
+
if tag.locals.topic.has_replies?
|
129
|
+
output << I18n.t('reply_from')
|
130
|
+
output << %{<a href="#{reader_path(tag.locals.topic.replied_by)}">#{tag.locals.topic.replied_by.name}</a>}
|
131
|
+
else
|
132
|
+
output << I18n.t('started_by')
|
133
|
+
output << %{<a href="#{reader_path(tag.locals.topic.reader)}">#{tag.render('forum:topic:author')}</a>}
|
134
|
+
end
|
138
135
|
output.join(' ')
|
139
136
|
end
|
140
137
|
|
141
138
|
desc %{
|
142
|
-
Renders the creation date of the current topic in a
|
139
|
+
Renders the creation date of the current topic in a colloquial form.
|
143
140
|
}
|
144
141
|
tag 'forum:topic:date' do |tag|
|
145
142
|
I18n.l tag.locals.topic.created_at, :format => :standard
|
146
143
|
end
|
147
144
|
|
145
|
+
desc %{
|
146
|
+
Renders the reply date of the current topic in a colloquial form.
|
147
|
+
}
|
148
|
+
tag 'forum:topic:date' do |tag|
|
149
|
+
I18n.l tag.locals.topic.replied_at, :format => :standard
|
150
|
+
end
|
151
|
+
|
148
152
|
tag 'forum:posts' do |tag|
|
149
153
|
tag.expand
|
150
154
|
end
|
@@ -177,7 +181,7 @@ module ForumTags
|
|
177
181
|
This tag is generally used in double form or as a silent prefix, where it will just expand:
|
178
182
|
|
179
183
|
<pre><code>
|
180
|
-
<r:forum:post><r:
|
184
|
+
<r:forum:post><r:link /></r:forum:post>
|
181
185
|
# or just
|
182
186
|
<r:forum:post:link />
|
183
187
|
</code></pre>
|
@@ -223,13 +227,6 @@ module ForumTags
|
|
223
227
|
link_to tag.render('forum:post:name'), tag.render('forum:post:url')
|
224
228
|
end
|
225
229
|
|
226
|
-
desc %{
|
227
|
-
Renders a standard gravatar block (as in the forum pages) for the author of this post.
|
228
|
-
}
|
229
|
-
tag 'forum:post:gravatar' do |tag|
|
230
|
-
%{<div class="speaker">#{standard_gravatar_for(tag.locals.post.reader)}</div>}
|
231
|
-
end
|
232
|
-
|
233
230
|
desc %{
|
234
231
|
Renders the name of the author of this post.
|
235
232
|
}
|
@@ -375,7 +372,6 @@ module ForumTags
|
|
375
372
|
tag.expand
|
376
373
|
else
|
377
374
|
output = %{<div class="post"><div class="post_wrapper">}
|
378
|
-
output << tag.render("forum:post:gravatar")
|
379
375
|
output << %{<div class="post_header">}
|
380
376
|
output << %{<h2>#{tag.render("forum:post:reader")}</h2>}
|
381
377
|
output << %{<p class="context">#{tag.render("forum:post:context")}</p>}
|
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{radiant-forum-extension}
|
8
|
-
s.version = "2.0.
|
8
|
+
s.version = "2.0.4"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["spanner"]
|
@@ -80,6 +80,7 @@ Gem::Specification.new do |s|
|
|
80
80
|
"app/views/reader_notifier/post.rhtml",
|
81
81
|
"app/views/readers/_forum_messages.html.haml",
|
82
82
|
"app/views/readers/_messages_summary.html.haml",
|
83
|
+
"app/views/topics/_busiest.html.haml",
|
83
84
|
"app/views/topics/_context.html.haml",
|
84
85
|
"app/views/topics/_latest.html.haml",
|
85
86
|
"app/views/topics/_locked.html.haml",
|
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:
|
4
|
+
hash: 7
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 2
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 2.0.
|
9
|
+
- 4
|
10
|
+
version: 2.0.4
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- spanner
|
@@ -123,6 +123,7 @@ files:
|
|
123
123
|
- app/views/reader_notifier/post.rhtml
|
124
124
|
- app/views/readers/_forum_messages.html.haml
|
125
125
|
- app/views/readers/_messages_summary.html.haml
|
126
|
+
- app/views/topics/_busiest.html.haml
|
126
127
|
- app/views/topics/_context.html.haml
|
127
128
|
- app/views/topics/_latest.html.haml
|
128
129
|
- app/views/topics/_locked.html.haml
|