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.
- data/README.md +37 -56
- data/VERSION +1 -1
- data/app/controllers/forum_base_controller.rb +78 -0
- data/app/controllers/forums_controller.rb +5 -34
- data/app/controllers/posts_controller.rb +61 -153
- data/app/controllers/topics_controller.rb +6 -63
- data/app/helpers/forum_helper.rb +24 -48
- data/app/models/forum.rb +5 -18
- data/app/models/post.rb +53 -55
- data/app/models/post_attachment.rb +9 -6
- data/app/models/topic.rb +20 -113
- data/app/views/admin/reader_configuration/_edit_forum.html.haml +4 -2
- data/app/views/admin/reader_configuration/_forum.html.haml +6 -2
- data/app/views/forums/_forum.html.haml +14 -20
- data/app/views/forums/_latest.html.haml +12 -0
- data/app/views/forums/_standard_parts.html.haml +49 -0
- data/app/views/forums/index.html.haml +16 -24
- data/app/views/forums/show.html.haml +18 -28
- data/app/views/pages/_comment.html.haml +1 -1
- data/app/views/posts/_attachments.html.haml +13 -0
- data/app/views/posts/_confirm_delete.html.haml +10 -0
- data/app/views/posts/_context.html.haml +16 -0
- data/app/views/posts/_edit_links.html.haml +11 -0
- data/app/views/posts/_form.html.haml +40 -2
- data/app/views/posts/_latest.html.haml +10 -17
- data/app/views/posts/_new_attachment.html.haml +2 -0
- data/app/views/posts/_post.html.haml +25 -60
- data/app/views/posts/{_search.html.haml → _search_form.html.haml} +1 -1
- data/app/views/posts/_uploader.html.haml +2 -2
- data/app/views/posts/edit.html.haml +26 -13
- data/app/views/posts/index.html.haml +19 -27
- data/app/views/posts/new.html.haml +27 -7
- data/app/views/posts/remove.html.haml +27 -0
- data/app/views/posts/show.html.haml +20 -7
- data/app/views/readers/_forum_messages.html.haml +20 -0
- data/app/views/readers/_messages_summary.html.haml +3 -0
- data/app/views/topics/_context.html.haml +12 -0
- data/app/views/topics/_latest.html.haml +14 -16
- data/app/views/topics/_locked.html.haml +1 -1
- data/app/views/topics/_replies.html.haml +6 -0
- data/app/views/topics/_reply.html.haml +23 -0
- data/app/views/topics/_topic.html.haml +14 -43
- data/app/views/topics/_voices.html.haml +5 -0
- data/app/views/topics/index.html.haml +11 -24
- data/app/views/topics/show.html.haml +25 -38
- data/config/initializers/radiant_config.rb +5 -1
- data/config/locales/en.yml +73 -27
- data/config/routes.rb +3 -4
- data/db/migrate/20101222160900_page_posts.rb +21 -0
- data/db/migrate/20101222163605_no_comment_forum.rb +10 -0
- data/db/migrate/20110105103827_topic_merely_associative.rb +23 -0
- data/db/migrate/20110111080550_detach_observer.rb +11 -0
- data/db/migrate/20110127113852_import_attachments.rb +9 -0
- data/forum_extension.rb +12 -13
- data/lib/commentable_model.rb +98 -0
- data/lib/forum_page.rb +2 -22
- data/lib/forum_reader_sessions_controller.rb +14 -0
- data/lib/forum_readers_controller.rb +2 -9
- data/lib/forum_red_cloth3.rb +23 -4
- data/lib/forum_red_cloth4.rb +23 -4
- data/lib/forum_tags.rb +298 -194
- data/lib/sanitize/config/forum.rb +47 -0
- data/public/images/furniture/blank.png +0 -0
- data/public/images/furniture/emoticons.png +0 -0
- data/public/javascripts/forum.js +349 -93
- data/public/javascripts/jquery.tools.min.js +195 -0
- data/public/punymce/blank.htm +1 -0
- data/public/punymce/css/content.css +4 -0
- data/public/punymce/css/editor.css +58 -0
- data/public/punymce/i18n/sv.js +28 -0
- data/public/punymce/img/icons.gif +0 -0
- data/public/punymce/img/icons_uncompressed.png +0 -0
- data/public/punymce/plugins/bbcode.js +1 -0
- data/public/punymce/plugins/bbcode_src.js +50 -0
- data/public/punymce/plugins/editsource/css/editor.css +3 -0
- data/public/punymce/plugins/editsource/editsource.js +1 -0
- data/public/punymce/plugins/editsource/editsource_src.js +81 -0
- data/public/punymce/plugins/editsource/img/icons.gif +0 -0
- data/public/punymce/plugins/emoticons/css/content.css +13 -0
- data/public/punymce/plugins/emoticons/css/editor.css +17 -0
- data/public/punymce/plugins/emoticons/emoticons.js +1 -0
- data/public/punymce/plugins/emoticons/emoticons_src.js +303 -0
- data/public/punymce/plugins/emoticons/img/emoticons.gif +0 -0
- data/public/punymce/plugins/emoticons/img/emoticons.png +0 -0
- data/public/punymce/plugins/emoticons/img/trans.gif +0 -0
- data/public/punymce/plugins/entities.js +1 -0
- data/public/punymce/plugins/entities_src.js +37 -0
- data/public/punymce/plugins/forceblocks.js +1 -0
- data/public/punymce/plugins/forceblocks_src.js +465 -0
- data/public/punymce/plugins/forcenl.js +1 -0
- data/public/punymce/plugins/forcenl_src.js +26 -0
- data/public/punymce/plugins/image/css/editor.css +1 -0
- data/public/punymce/plugins/image/image.js +1 -0
- data/public/punymce/plugins/image/image_src.js +30 -0
- data/public/punymce/plugins/image/img/icons.gif +0 -0
- data/public/punymce/plugins/link/css/editor.css +2 -0
- data/public/punymce/plugins/link/img/icons.gif +0 -0
- data/public/punymce/plugins/link/link.js +1 -0
- data/public/punymce/plugins/link/link_src.js +36 -0
- data/public/punymce/plugins/paste.js +1 -0
- data/public/punymce/plugins/paste_src.js +169 -0
- data/public/punymce/plugins/protect.js +1 -0
- data/public/punymce/plugins/protect_src.js +30 -0
- data/public/punymce/plugins/safari2x.js +1 -0
- data/public/punymce/plugins/safari2x_src.js +284 -0
- data/public/punymce/plugins/tabfocus.js +1 -0
- data/public/punymce/plugins/tabfocus_src.js +45 -0
- data/public/punymce/plugins/textcolor/css/editor.css +7 -0
- data/public/punymce/plugins/textcolor/img/icons.gif +0 -0
- data/public/punymce/plugins/textcolor/textcolor.js +1 -0
- data/public/punymce/plugins/textcolor/textcolor_src.js +73 -0
- data/public/punymce/puny_mce.js +1 -0
- data/public/punymce/puny_mce_full.js +1 -0
- data/public/punymce/puny_mce_src.js +1460 -0
- data/public/stylesheets/sass/forum.sass +175 -169
- data/radiant-forum-extension.gemspec +81 -19
- data/spec/controllers/admin/forums_controller_spec.rb +2 -2
- data/spec/controllers/forums_controller_spec.rb +3 -6
- data/spec/controllers/posts_controller_spec.rb +76 -59
- data/spec/controllers/topics_controller_spec.rb +4 -95
- data/spec/datasets/forum_readers_dataset.rb +1 -0
- data/spec/datasets/forums_dataset.rb +91 -10
- data/spec/lib/commentable_model_spec.rb +88 -0
- data/spec/lib/forum_page_spec.rb +2 -34
- data/spec/lib/forum_site_spec.rb +2 -3
- data/spec/lib/forum_tags_spec.rb +35 -0
- data/spec/models/forum_spec.rb +31 -20
- data/spec/models/post_spec.rb +40 -39
- data/spec/models/topic_spec.rb +29 -71
- data/spec/spec_helper.rb +10 -1
- metadata +84 -22
- data/app/views/posts/_reply.html.haml +0 -35
- data/app/views/posts/_upload.html.haml +0 -2
- data/app/views/posts/preview.html.haml +0 -32
- data/app/views/posts/search.html.haml +0 -63
- data/app/views/posts/search.rss.builder +0 -14
- data/app/views/topics/_form.html.haml +0 -30
- data/app/views/topics/_help.html.haml +0 -8
- data/app/views/topics/comments.html.haml +0 -6
- data/app/views/topics/edit.html.haml +0 -26
- data/app/views/topics/new.html.haml +0 -56
- data/spec/datasets/forum_pages_dataset.rb +0 -11
- data/spec/datasets/posts_dataset.rb +0 -31
- data/spec/datasets/topics_dataset.rb +0 -37
@@ -9,7 +9,7 @@
|
|
9
9
|
%ul.uploads
|
10
10
|
.selector
|
11
11
|
- new_attachment = post.attachments.build
|
12
|
-
- f.fields_for :attachments, new_attachment do |
|
13
|
-
= render :partial => 'posts/
|
12
|
+
- f.fields_for :attachments, new_attachment do |naf|
|
13
|
+
= render :partial => 'posts/new_attachment', :object => new_attachment, :locals => {:naf => naf}
|
14
14
|
.addfile
|
15
15
|
= link_to t('attach_file'), "#"
|
@@ -1,18 +1,31 @@
|
|
1
|
-
|
1
|
+
= render :partial => 'forums/standard_parts'
|
2
2
|
|
3
|
-
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
3
|
+
- content_for :form do
|
4
|
+
.post_wrapper
|
5
|
+
.post_header
|
6
|
+
.speaker
|
7
|
+
= standard_gravatar_for(@post.reader)
|
8
|
+
%h2.person
|
9
|
+
= current_reader.name
|
10
|
+
%p.context
|
11
|
+
= friendly_date(@post.created_at)
|
12
|
+
= render :partial => 'form', :locals => {:post => @post}
|
9
13
|
|
10
|
-
- content_for :
|
11
|
-
|
12
|
-
|
14
|
+
- content_for :title do
|
15
|
+
- if @post.page
|
16
|
+
= t('edit_comment')
|
17
|
+
- elsif @post.first?
|
18
|
+
= t('edit_topic')
|
19
|
+
- else
|
20
|
+
= t('edit_reply')
|
13
21
|
|
14
22
|
- content_for :breadhead do
|
15
|
-
|
23
|
+
- if @post.page
|
24
|
+
= link_to @page.title, @page.url, :class => 'breadhead'
|
25
|
+
- elsif @post.topic && !@post.first?
|
26
|
+
= link_to @post.topic.name, forum_topic_url(@topic.forum, @topic), :class => 'breadhead'
|
16
27
|
|
17
|
-
|
18
|
-
|
28
|
+
|
29
|
+
|
30
|
+
#forum
|
31
|
+
= yield :form
|
@@ -1,45 +1,37 @@
|
|
1
|
-
|
2
|
-
= render :partial => 'readers/flasher'
|
1
|
+
= render :partial => 'forums/standard_parts'
|
3
2
|
|
4
3
|
- content_for :title do
|
5
|
-
= t('
|
6
|
-
|
7
|
-
- content_for :messages do
|
8
|
-
- if @posts.empty?
|
9
|
-
%p
|
10
|
-
= t('no_posts')
|
11
|
-
- else
|
12
|
-
= render :partial => 'posts/post', :collection => @posts, :locals => {:with_context => true}
|
4
|
+
= t('posts_heading')
|
13
5
|
|
6
|
+
- content_for :introduction do
|
7
|
+
= t('posts_introduction')
|
8
|
+
|
14
9
|
- content_for :sidebar do
|
15
10
|
= render :partial => "topics/latest"
|
16
11
|
|
17
|
-
- content_for :
|
12
|
+
- content_for :newtopic do
|
18
13
|
.newmessage
|
19
|
-
= link_to t('new_topic'),
|
14
|
+
= link_to t('new_topic'), new_post_url
|
20
15
|
|
21
16
|
- content_for :pagination do
|
22
17
|
= pagination_and_summary_for(@posts, t('post'))
|
23
18
|
|
24
19
|
- content_for :breadcrumbs do
|
25
|
-
= link_to '
|
26
|
-
|
27
|
-
=
|
28
|
-
|
29
|
-
- content_for :breadhead do
|
30
|
-
= link_to "Forum", topics_url, :class => 'breadhead'
|
20
|
+
= link_to t('forum').titlecase, topics_url
|
21
|
+
= t('separator')
|
22
|
+
= yield :title
|
31
23
|
|
32
|
-
- content_for :
|
24
|
+
- content_for :feedlink do
|
33
25
|
= feed_link(posts_path(:format => :rss))
|
34
26
|
|
35
|
-
- content_for :
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
27
|
+
- content_for :messages do
|
28
|
+
- if @posts.empty?
|
29
|
+
%p
|
30
|
+
= t('no_posts')
|
31
|
+
- else
|
32
|
+
= yield :pagination if @posts.previous_page
|
33
|
+
= render :partial => 'posts/post', :collection => @posts, :locals => {:with_context => true}
|
34
|
+
= yield :pagination if @posts.next_page
|
41
35
|
|
42
36
|
#forum
|
43
|
-
= yield :pagination if @posts.previous_page
|
44
37
|
= yield :messages
|
45
|
-
= yield :pagination if @posts.next_page
|
@@ -1,14 +1,34 @@
|
|
1
|
-
|
1
|
+
= render :partial => 'forums/standard_parts'
|
2
2
|
|
3
|
-
|
4
|
-
|
3
|
+
- content_for :form do
|
4
|
+
.post
|
5
|
+
.post_wrapper
|
6
|
+
.post_header
|
7
|
+
.speaker
|
8
|
+
= standard_gravatar_for(current_reader)
|
9
|
+
%h2.person
|
10
|
+
= current_reader.name
|
11
|
+
%p.context
|
12
|
+
= t('if_you_not', :name => current_reader.name)
|
13
|
+
= link_to(t('log_out'), reader_logout_url) + '.'
|
14
|
+
= render :partial => 'form', :locals => {:post => @post}
|
15
|
+
|
16
|
+
- content_for :person do
|
17
|
+
- standard_gravatar_for(current_reader)
|
18
|
+
|
19
|
+
- content_for :title do
|
20
|
+
- if @page
|
21
|
+
= t('new_comment')
|
22
|
+
- elsif @topic
|
23
|
+
= t('new_reply')
|
24
|
+
- else
|
25
|
+
= t('new_topic')
|
5
26
|
|
6
27
|
- content_for :breadhead do
|
7
28
|
- if @page
|
8
29
|
= link_to @page.title, @page.url, :class => 'breadhead'
|
9
|
-
-
|
30
|
+
- elsif @topic
|
10
31
|
= link_to @topic.name, forum_topic_url(@topic.forum, @topic), :class => 'breadhead'
|
11
32
|
|
12
|
-
|
13
|
-
|
14
|
-
= message_type
|
33
|
+
#forum
|
34
|
+
= yield :form
|
@@ -0,0 +1,27 @@
|
|
1
|
+
= render :partial => 'forums/standard_parts'
|
2
|
+
|
3
|
+
- content_for :messages do
|
4
|
+
= render :partial => 'confirm_delete', :locals => {:post => @post}
|
5
|
+
|
6
|
+
- content_for :parent do
|
7
|
+
= link_to @post.topic.name, forum_topic_url(@post.topic, @post.topic.forum)
|
8
|
+
|
9
|
+
- content_for :breadhead do
|
10
|
+
= link_to t('forum').titlecase + t('separator'), topics_url
|
11
|
+
= link_to @post.topic.forum.name + t('separator'), forum_url(@post.topic.forum)
|
12
|
+
= yield :parent
|
13
|
+
|
14
|
+
- content_for :person do
|
15
|
+
= standard_gravatar_for(@post.reader)
|
16
|
+
|
17
|
+
- content_for :title do
|
18
|
+
- if @post.page
|
19
|
+
= t('confirm_remove_comment')
|
20
|
+
- elsif @post.first?
|
21
|
+
= t('confirm_remove_topic')
|
22
|
+
- else
|
23
|
+
= t('confirm_remove_post')
|
24
|
+
|
25
|
+
|
26
|
+
#forum
|
27
|
+
= yield :messages
|
@@ -1,18 +1,31 @@
|
|
1
|
+
= render :partial => 'forums/standard_parts'
|
2
|
+
|
1
3
|
- content_for :messages do
|
2
|
-
= render :partial => 'post', :object => @post
|
4
|
+
= render :partial => 'post', :object => @post
|
3
5
|
|
4
6
|
- content_for :parent do
|
5
7
|
= link_to @post.topic.name, forum_topic_url(@post.topic, @post.topic.forum)
|
6
8
|
|
7
9
|
- content_for :breadhead do
|
8
|
-
= link_to
|
10
|
+
= link_to t('forum').titlecase + t('separator'), topics_url
|
11
|
+
= link_to @post.topic.forum.name + t('separator'), forum_url(@post.topic.forum)
|
12
|
+
= yield :parent
|
13
|
+
|
14
|
+
- content_for :person do
|
15
|
+
= standard_gravatar_for(@post.reader)
|
16
|
+
|
17
|
+
- content_for :title do
|
18
|
+
-if @post.page
|
19
|
+
= t('comment_on') + @post.page.title
|
20
|
+
- elsif @post.first?
|
21
|
+
= @post.topic.name
|
22
|
+
- else
|
23
|
+
= t('reply_to') + @post.topic.name
|
24
|
+
|
25
|
+
- content_for :sidebar do
|
26
|
+
= render :partial => 'topics/latest'
|
9
27
|
|
10
|
-
- content_for :speaker do
|
11
|
-
= gravatar_for(@post.reader, {:size => 42}, {:alt => @post.reader.name, :class => 'gravatar'})
|
12
28
|
|
13
|
-
- content_for :thing_title do
|
14
|
-
= t('reply_to')
|
15
|
-
= @post.topic.name
|
16
29
|
|
17
30
|
#forum
|
18
31
|
= yield :messages
|
@@ -0,0 +1,20 @@
|
|
1
|
+
- reader ||= @reader
|
2
|
+
- posts ||= reader.posts.paginate(pagination_parameters)
|
3
|
+
|
4
|
+
#forum
|
5
|
+
%h2
|
6
|
+
=t('forum_messages', :name => reader.name)
|
7
|
+
|
8
|
+
- if posts.empty?
|
9
|
+
%p
|
10
|
+
= t('no_posts')
|
11
|
+
- else
|
12
|
+
= pagination_and_summary_for(posts, t('post')) if posts.previous_page
|
13
|
+
- posts.each do |post|
|
14
|
+
- if post.comment?
|
15
|
+
= render :partial => 'posts/post', :object => post, :locals => {:with_context => true}
|
16
|
+
- elsif post.first?
|
17
|
+
= render :partial => 'topics/topic', :object => post.topic
|
18
|
+
- else
|
19
|
+
= render :partial => 'posts/post', :object => post, :locals => {:with_context => true}
|
20
|
+
= pagination_and_summary_for(posts, t('post')) if posts.next_page
|
@@ -0,0 +1,12 @@
|
|
1
|
+
- topic ||= @topic
|
2
|
+
- post = topic.posts.first
|
3
|
+
|
4
|
+
= t('new_topic_started')
|
5
|
+
= t('on_date', :date => friendly_date(post.created_at))
|
6
|
+
- if topic.reader
|
7
|
+
= t('by')
|
8
|
+
= link_to post.reader.name, reader_url(post.reader), :class => 'person'
|
9
|
+
- if topic.forum
|
10
|
+
= t('under')
|
11
|
+
= link_to(topic.forum.name, forum_url(topic.forum), :class => 'forum')
|
12
|
+
|
@@ -1,19 +1,17 @@
|
|
1
1
|
%h2
|
2
2
|
= t('recent_topics')
|
3
|
-
%ul
|
3
|
+
%ul
|
4
4
|
- Topic.latest(10).each do |topic|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
=
|
12
|
-
=
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
= friendly_date(topic.created_at)
|
19
|
-
|
5
|
+
%li.topic
|
6
|
+
= link_to_post(topic.posts.last, :class => 'title')
|
7
|
+
%br
|
8
|
+
%span.context
|
9
|
+
- if topic.has_replies?
|
10
|
+
= t('new_reply_from')
|
11
|
+
= link_to topic.replied_by.name, reader_url(topic.replied_by)
|
12
|
+
= friendly_date(topic.replied_at)
|
13
|
+
- else
|
14
|
+
= t('started_by')
|
15
|
+
= link_to topic.reader.name, reader_url(topic.reader)
|
16
|
+
= friendly_date(topic.created_at)
|
17
|
+
|
@@ -1,2 +1,2 @@
|
|
1
1
|
%p
|
2
|
-
= t('
|
2
|
+
= t('topic_locked')
|
@@ -0,0 +1,23 @@
|
|
1
|
+
- topic ||= @topic
|
2
|
+
|
3
|
+
- if topic.locked?
|
4
|
+
%p.administrative
|
5
|
+
= t("topic_locked")
|
6
|
+
- else
|
7
|
+
- if current_reader
|
8
|
+
- if current_reader.activated?
|
9
|
+
.post
|
10
|
+
.post_wrapper.reply
|
11
|
+
.post_header
|
12
|
+
.speaker
|
13
|
+
= standard_gravatar_for(current_reader)
|
14
|
+
%h2.person
|
15
|
+
= t("add_reply")
|
16
|
+
%p.context
|
17
|
+
= t('if_you_not', :name => current_reader.name)
|
18
|
+
= link_to(t('log_out'), reader_logout_url) + '.'
|
19
|
+
= render :partial => 'posts/form', :locals => {:post => topic.posts.build, :omit_label => true}
|
20
|
+
- else
|
21
|
+
= render :partial => 'reader_activations/activation_required', :locals => {:purpose => t('to_reply')}
|
22
|
+
- else
|
23
|
+
= render :partial => 'reader_sessions/login_form', :locals => {:purpose => t('to_reply')}
|
@@ -1,53 +1,24 @@
|
|
1
|
-
-
|
2
|
-
- post = topic.first_post
|
3
|
-
%div.post{:id => post.dom_id}
|
4
|
-
.speaker
|
5
|
-
= link_to gravatar_for(topic.reader, {:size => 40}, {:alt => topic.reader.name, :class => 'gravatar offset', :width => '40', :height => '40'}), forum_topic_url(topic.forum, topic)
|
1
|
+
- post = topic.posts.first
|
6
2
|
|
3
|
+
%div{:id => topic.dom_id}
|
4
|
+
.post
|
7
5
|
.post_wrapper
|
6
|
+
.speaker
|
7
|
+
= standard_gravatar_for(post.reader, forum_topic_url(topic.forum, topic))
|
8
8
|
.post_header
|
9
|
-
%h2
|
10
|
-
|
11
|
-
|
12
|
-
|
9
|
+
%h2
|
10
|
+
= link_to topic.name, forum_topic_url(topic.forum, topic)
|
11
|
+
= render :partial => 'posts/edit_links', :locals => {:post => post}
|
13
12
|
%p.context
|
14
|
-
=
|
15
|
-
= t('in')
|
16
|
-
= link_to topic.forum.name, forum_url(topic.forum)
|
17
|
-
= t('by')
|
18
|
-
= link_to post.reader.name, reader_url(topic.reader), :class => 'person'
|
19
|
-
|
20
|
-
- if post.editable_by?(current_reader)
|
21
|
-
%br
|
22
|
-
%span.still_editable
|
23
|
-
- if post.editable_interval
|
24
|
-
= t('time_remaining_to_edit', :time => distance_of_time_in_words(post.still_editable_for))
|
25
|
-
= link_to t('edit_your_post'), edit_topic_post_url(topic, post), :class => 'edit_post', :id => "revise_post_#{post.id}"
|
26
|
-
- elsif admin?
|
27
|
-
= link_to t("edit_minimal"), edit_topic_post_url(topic, post), :class => 'edit_post', :id => "revise_post_#{post.id}"
|
28
|
-
= link_to t("remove_minimal"), topic_post_url(topic, post), :method => 'delete', :class => 'delete_post', :id => "delete_post_#{post.id}", :title => "remove post", :confirm => "Are you sure you want to delete this message?"
|
13
|
+
= render :partial => "topics/context", :locals => {:topic => topic}
|
29
14
|
|
30
15
|
.post_body
|
31
16
|
= truncate_and_textilize(post.body, 100)
|
17
|
+
= render :partial => 'posts/attachments', :locals => {:post => post}
|
32
18
|
|
33
|
-
|
34
|
-
|
35
|
-
%h4
|
36
|
-
attached:
|
37
|
-
- post.attachments.images.each do |att|
|
38
|
-
= link_to image_tag(att.thumbnail), att.file.url, :class => :thumbnail
|
39
|
-
- if post.attachments.non_images.any?
|
40
|
-
%ul.attachments
|
41
|
-
- post.attachments.non_images.each do |att|
|
42
|
-
%li
|
43
|
-
= link_to att.filename, att.file.url, :class => "attachment #{att.extension}"
|
44
|
-
|
45
|
-
- if topic.has_posts?
|
19
|
+
- if topic.has_replies?
|
20
|
+
.post_replies
|
46
21
|
%p.voices
|
47
|
-
|
48
|
-
= gravatar_for(reader, {:size => 16}, {:alt => reader.name, :class => 'gravatar tiny', :width => '16', :height => '16'})
|
22
|
+
= render :partial => 'topics/voices', :locals => {:topic => topic}
|
49
23
|
%p.replies
|
50
|
-
=
|
51
|
-
= link_to topic.replied_by.name, reader_url(topic.replied_by)
|
52
|
-
= friendly_date(topic.replied_at)
|
53
|
-
|
24
|
+
= render :partial => 'topics/replies', :locals => {:topic => topic}
|
@@ -0,0 +1,5 @@
|
|
1
|
+
- topic ||= @topic
|
2
|
+
- topic.other_voices.each do |reader|
|
3
|
+
- if reader
|
4
|
+
- gravatar = gravatar_for(reader, {:size => 16, :default => "#{request.protocol}#{request.host_with_port}/images/furniture/no_gravatar.png"}, {:alt => reader.name, :class => 'gravatar tiny', :width => '16', :height => '16'})
|
5
|
+
= link_to gravatar, reader_url(reader)
|
@@ -1,45 +1,32 @@
|
|
1
|
-
|
2
|
-
= render :partial => 'readers/flasher'
|
1
|
+
= render :partial => 'forums/standard_parts'
|
3
2
|
|
4
3
|
- content_for :messages do
|
5
4
|
- if @topics.empty?
|
6
5
|
%p
|
7
6
|
= t('no_topics')
|
8
7
|
- else
|
9
|
-
= render :partial => 'topics/topic', :collection => @topics
|
8
|
+
= render :partial => 'topics/topic', :collection => @topics
|
10
9
|
|
11
10
|
- content_for :sidebar do
|
12
|
-
|
13
|
-
= t('forums')
|
14
|
-
%ul
|
15
|
-
- Forum.all.each do |forum|
|
16
|
-
%li
|
17
|
-
= link_to forum.name, forum_url(forum)
|
18
|
-
%br
|
19
|
-
= forum.topics.count
|
20
|
-
= t('topics')
|
21
|
-
|
22
|
-
- content_for :new_topic do
|
23
|
-
.newmessage
|
24
|
-
= link_to t('new_topic'), new_topic_url
|
11
|
+
= render :partial => 'forums/latest'
|
25
12
|
|
26
13
|
- content_for :pagination do
|
27
14
|
= pagination_and_summary_for(@topics, t('topics'))
|
28
15
|
|
29
|
-
- content_for :breadhead do
|
30
|
-
= home_page_link
|
31
|
-
|
32
16
|
- content_for :breadcrumbs do
|
33
|
-
= t('forum').titlecase
|
17
|
+
= link_to t('forum').titlecase, topics_url
|
18
|
+
= t('separator')
|
19
|
+
= yield :title
|
34
20
|
|
35
21
|
- content_for :title do
|
36
|
-
= t('
|
22
|
+
= t('topics_heading')
|
37
23
|
|
38
|
-
- content_for :
|
24
|
+
- content_for :feedlink do
|
39
25
|
= feed_link(topics_path(:format => :rss))
|
40
26
|
|
41
|
-
- content_for :
|
42
|
-
|
27
|
+
- content_for :introduction do
|
28
|
+
%p
|
29
|
+
=t('topics_introduction')
|
43
30
|
|
44
31
|
#forum
|
45
32
|
= yield :pagination if @topics.previous_page
|