radiant-forum-extension 1.1.1 → 1.1.2

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.1.1
1
+ 1.1.2
@@ -7,7 +7,7 @@
7
7
  - content_for :preamble do
8
8
  %p
9
9
  = t('forums_introduction')
10
- = link_to t('latest_topics'), topics_url in any category.
10
+ = link_to t('latest_topics'), topics_url
11
11
 
12
12
  - content_for :new_topic do
13
13
  .newmessage
@@ -21,6 +21,9 @@
21
21
  %ul.main
22
22
  = render :partial => 'forums/forum', :collection => @forums
23
23
 
24
+ - content_for :sidebar do
25
+ = render :partial => "topics/latest"
26
+
24
27
  - content_for :pagination do
25
28
  = pagination_and_summary_for(@forums, t('forum'))
26
29
 
@@ -20,6 +20,9 @@
20
20
  %ul.main
21
21
  = render :partial => 'topics/topic', :collection => @topics, :locals => { :with_context => false }
22
22
 
23
+ - content_for :sidebar do
24
+ = render :partial => "topics/latest"
25
+
23
26
  - content_for :pagination do
24
27
  = pagination_and_summary_for @topics, 'topics'
25
28
 
@@ -16,6 +16,9 @@
16
16
  %ul.main
17
17
  = render :partial => 'posts/post', :collection => @posts, :locals => {:with_context => true}
18
18
 
19
+ - content_for :sidebar do
20
+ = render :partial => "topics/latest"
21
+
19
22
  - content_for :new_topic do
20
23
  .newmessage
21
24
  = link_to t('new_topic'), new_topic_url
@@ -0,0 +1,21 @@
1
+ %h2
2
+ = t('recent_topics')
3
+ %ul.recently
4
+ - Topic.latest(10).each do |topic|
5
+ - if topic.visible_to?(current_reader)
6
+ %li.topic
7
+ %span.subject
8
+ %a{:href => forum_topic_url(topic.forum, topic)}
9
+ - if topic.reader
10
+ = gravatar_for(topic.reader, {:size => 40}, {:alt => topic.reader.name, :class => 'gravatar'})
11
+ = topic.name
12
+ %span.context
13
+ = t('posted_by')
14
+ = link_to topic.reader.name + '.', reader_url(topic.reader)
15
+ = t('post_count_from', :count => topic.posts.count - 1)
16
+ - if topic.has_posts?
17
+ = link_to topic.replied_by.name, reader_url(topic.replied_by)
18
+ = friendly_date(topic.replied_at)
19
+ - else
20
+ = friendly_date(topic.created_at)
21
+
@@ -14,6 +14,17 @@
14
14
  %ul.main
15
15
  = render :partial => 'topics/topic', :collection => @topics, :locals => {:with_context => true}
16
16
 
17
+ - content_for :sidebar do
18
+ %h2
19
+ = t('forums')
20
+ %ul
21
+ - Forum.all.each do |forum|
22
+ %li
23
+ = link_to forum.name, forum_url(forum)
24
+ %br
25
+ = forum.topics.count
26
+ = t('topics')
27
+
17
28
  - content_for :new_topic do
18
29
  .newmessage
19
30
  = link_to t('new_topic'), new_topic_url
@@ -4,6 +4,9 @@
4
4
  - content_for :messages do
5
5
  = render :partial => 'posts/post', :collection => @posts, :locals => { :with_context => false }
6
6
 
7
+ - content_for :sidebar do
8
+ = render :partial => "latest"
9
+
7
10
  - content_for :new_topic do
8
11
  .newmessage
9
12
  = link_to t('new_topic_here'), new_forum_topic_url(@forum)
@@ -38,6 +38,7 @@ en:
38
38
  posted_on: "posted %{date}"
39
39
  posts_introduction: "This is a list of all forum posts by date."
40
40
  really_remove_post: "Are you sure you want to delete this comment?"
41
+ recent_topics: "Recent topics"
41
42
  remove_post: "delete comment"
42
43
  replied_on: "replied on %{date}"
43
44
  rss_feed: "RSS feed"
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 "1.1.1"
4
+ version "1.1.2"
5
5
  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."
6
6
  url "http://spanner.org/radiant/forum"
7
7
 
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{radiant-forum-extension}
8
- s.version = "1.1.1"
8
+ s.version = "1.1.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["spanner"]
@@ -70,6 +70,7 @@ Gem::Specification.new do |s|
70
70
  "app/views/readers/show_with_posts.html.haml",
71
71
  "app/views/topics/_form.html.haml",
72
72
  "app/views/topics/_help.html.haml",
73
+ "app/views/topics/_latest.html.haml",
73
74
  "app/views/topics/_locked.html.haml",
74
75
  "app/views/topics/_topic.html.haml",
75
76
  "app/views/topics/_topic.rss.builder",
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: 17
4
+ hash: 23
5
5
  prerelease: false
6
6
  segments:
7
7
  - 1
8
8
  - 1
9
- - 1
10
- version: 1.1.1
9
+ - 2
10
+ version: 1.1.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - spanner
@@ -113,6 +113,7 @@ files:
113
113
  - app/views/readers/show_with_posts.html.haml
114
114
  - app/views/topics/_form.html.haml
115
115
  - app/views/topics/_help.html.haml
116
+ - app/views/topics/_latest.html.haml
116
117
  - app/views/topics/_locked.html.haml
117
118
  - app/views/topics/_topic.html.haml
118
119
  - app/views/topics/_topic.rss.builder