simple_discussion 0.9.4 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.github/FUNDING.yml +12 -0
- data/.github/workflows/ci.yml +44 -0
- data/Appraisals +16 -0
- data/CHANGELOG.md +13 -0
- data/Gemfile +8 -1
- data/README.md +5 -3
- data/Rakefile +25 -3
- data/app/assets/stylesheets/simple_discussion.scss +40 -2
- data/app/controllers/simple_discussion/application_controller.rb +15 -3
- data/app/controllers/simple_discussion/forum_categories_controller.rb +5 -5
- data/app/controllers/simple_discussion/forum_posts_controller.rb +20 -14
- data/app/controllers/simple_discussion/forum_threads_controller.rb +10 -10
- data/app/controllers/simple_discussion/notifications_controller.rb +3 -3
- data/app/helpers/simple_discussion/forum_posts_helper.rb +7 -1
- data/app/helpers/simple_discussion/forum_threads_helper.rb +4 -4
- data/app/jobs/simple_discussion/forum_post_notification_job.rb +3 -3
- data/app/jobs/simple_discussion/forum_thread_notification_job.rb +2 -2
- data/app/mailers/simple_discussion/user_mailer.rb +4 -4
- data/app/models/forum_category.rb +1 -1
- data/app/models/forum_post.rb +1 -2
- data/app/models/forum_subscription.rb +4 -4
- data/app/models/forum_thread.rb +12 -12
- data/app/views/layouts/simple_discussion.html.erb +61 -18
- data/app/views/simple_discussion/forum_posts/_form.html.erb +2 -2
- data/app/views/simple_discussion/forum_posts/_forum_post.html.erb +16 -9
- data/app/views/simple_discussion/forum_posts/edit.html.erb +7 -3
- data/app/views/simple_discussion/forum_threads/_form.html.erb +8 -8
- data/app/views/simple_discussion/forum_threads/_forum_thread.html.erb +5 -5
- data/app/views/simple_discussion/forum_threads/edit.html.erb +1 -1
- data/app/views/simple_discussion/forum_threads/index.html.erb +11 -9
- data/app/views/simple_discussion/forum_threads/new.html.erb +1 -1
- data/app/views/simple_discussion/forum_threads/show.html.erb +15 -10
- data/bin/rails +14 -0
- data/config/locales/en.yml +46 -0
- data/config/locales/es.yml +41 -0
- data/config/locales/fr.yml +47 -0
- data/db/migrate/20170417012930_create_forum_categories.rb +6 -6
- data/db/migrate/20170417012931_create_forum_threads.rb +1 -1
- data/db/migrate/20170417012932_create_forum_posts.rb +3 -3
- data/db/migrate/20170417012933_create_forum_subscriptions.rb +2 -2
- data/gemfiles/.bundle/config +2 -0
- data/gemfiles/rails_5_2.gemfile +12 -0
- data/gemfiles/rails_5_2.gemfile.lock +191 -0
- data/gemfiles/rails_6.gemfile +12 -0
- data/gemfiles/rails_6.gemfile.lock +207 -0
- data/gemfiles/rails_6_1.gemfile +12 -0
- data/gemfiles/rails_6_1.gemfile.lock +210 -0
- data/gemfiles/rails_master.gemfile +12 -0
- data/gemfiles/rails_master.gemfile.lock +222 -0
- data/lib/generators/simple_discussion/controllers_generator.rb +2 -2
- data/lib/generators/simple_discussion/helpers_generator.rb +2 -2
- data/lib/generators/simple_discussion/views_generator.rb +2 -2
- data/lib/simple_discussion.rb +8 -9
- data/lib/simple_discussion/engine.rb +1 -1
- data/lib/simple_discussion/slack.rb +6 -6
- data/lib/simple_discussion/version.rb +1 -1
- data/lib/simple_discussion/will_paginate.rb +12 -12
- data/simple_discussion.gemspec +15 -17
- metadata +27 -25
@@ -8,7 +8,7 @@ class SimpleDiscussion::ForumPostNotificationJob < ApplicationJob
|
|
8
8
|
|
9
9
|
def send_emails(forum_post)
|
10
10
|
forum_thread = forum_post.forum_thread
|
11
|
-
users
|
11
|
+
users = forum_thread.subscribed_users - [forum_post.user]
|
12
12
|
users.each do |user|
|
13
13
|
SimpleDiscussion::UserMailer.new_post(forum_post, user).deliver_later
|
14
14
|
end
|
@@ -31,8 +31,8 @@ class SimpleDiscussion::ForumPostNotificationJob < ApplicationJob
|
|
31
31
|
{
|
32
32
|
title: "Posted By",
|
33
33
|
value: forum_post.user.name,
|
34
|
-
short: true
|
35
|
-
}
|
34
|
+
short: true
|
35
|
+
}
|
36
36
|
],
|
37
37
|
ts: forum_post.created_at.to_i
|
38
38
|
}
|
@@ -6,8 +6,8 @@ class SimpleDiscussion::UserMailer < ApplicationMailer
|
|
6
6
|
|
7
7
|
def new_thread(forum_thread, recipient)
|
8
8
|
@forum_thread = forum_thread
|
9
|
-
@forum_post
|
10
|
-
@recipient
|
9
|
+
@forum_post = forum_thread.forum_posts.first
|
10
|
+
@recipient = recipient
|
11
11
|
|
12
12
|
mail(
|
13
13
|
to: "#{@recipient.name} <#{@recipient.email}>",
|
@@ -16,9 +16,9 @@ class SimpleDiscussion::UserMailer < ApplicationMailer
|
|
16
16
|
end
|
17
17
|
|
18
18
|
def new_post(forum_post, recipient)
|
19
|
-
@forum_post
|
19
|
+
@forum_post = forum_post
|
20
20
|
@forum_thread = forum_post.forum_thread
|
21
|
-
@recipient
|
21
|
+
@recipient = recipient
|
22
22
|
|
23
23
|
mail(
|
24
24
|
to: "#{@recipient.name} <#{@recipient.email}>",
|
data/app/models/forum_post.rb
CHANGED
@@ -1,11 +1,10 @@
|
|
1
1
|
class ForumPost < ApplicationRecord
|
2
2
|
belongs_to :forum_thread, counter_cache: true, touch: true
|
3
3
|
belongs_to :user
|
4
|
-
has_many :reactions, as: :reactable
|
5
4
|
|
6
5
|
validates :user_id, :body, presence: true
|
7
6
|
|
8
|
-
scope :sorted, ->{ order(:created_at) }
|
7
|
+
scope :sorted, -> { order(:created_at) }
|
9
8
|
|
10
9
|
after_update :solve_forum_thread, if: :solved?
|
11
10
|
|
@@ -2,11 +2,11 @@ class ForumSubscription < ApplicationRecord
|
|
2
2
|
belongs_to :forum_thread
|
3
3
|
belongs_to :user
|
4
4
|
|
5
|
-
scope :optin, ->{ where(subscription_type: :optin) }
|
6
|
-
scope :optout, ->{ where(subscription_type: :optout) }
|
5
|
+
scope :optin, -> { where(subscription_type: :optin) }
|
6
|
+
scope :optout, -> { where(subscription_type: :optout) }
|
7
7
|
|
8
|
-
validates :subscription_type, presence: true, inclusion: {
|
9
|
-
validates :user_id, uniqueness: {
|
8
|
+
validates :subscription_type, presence: true, inclusion: {in: %w[optin optout]}
|
9
|
+
validates :user_id, uniqueness: {scope: :forum_thread_id}
|
10
10
|
|
11
11
|
def toggle!
|
12
12
|
case subscription_type
|
data/app/models/forum_thread.rb
CHANGED
@@ -6,8 +6,8 @@ class ForumThread < ApplicationRecord
|
|
6
6
|
belongs_to :user
|
7
7
|
has_many :forum_posts
|
8
8
|
has_many :forum_subscriptions
|
9
|
-
has_many :optin_subscribers,
|
10
|
-
has_many :optout_subscribers, ->{ where(forum_subscriptions: {
|
9
|
+
has_many :optin_subscribers, -> { where(forum_subscriptions: {subscription_type: :optin}) }, through: :forum_subscriptions, source: :user
|
10
|
+
has_many :optout_subscribers, -> { where(forum_subscriptions: {subscription_type: :optout}) }, through: :forum_subscriptions, source: :user
|
11
11
|
has_many :users, through: :forum_posts
|
12
12
|
|
13
13
|
accepts_nested_attributes_for :forum_posts
|
@@ -16,11 +16,11 @@ class ForumThread < ApplicationRecord
|
|
16
16
|
validates :user_id, :title, presence: true
|
17
17
|
validates_associated :forum_posts
|
18
18
|
|
19
|
-
scope :pinned_first, ->{ order(pinned: :desc) }
|
20
|
-
scope :solved,
|
21
|
-
scope :sorted,
|
22
|
-
scope :unpinned,
|
23
|
-
scope :unsolved,
|
19
|
+
scope :pinned_first, -> { order(pinned: :desc) }
|
20
|
+
scope :solved, -> { where(solved: true) }
|
21
|
+
scope :sorted, -> { order(updated_at: :desc) }
|
22
|
+
scope :unpinned, -> { where.not(pinned: true) }
|
23
|
+
scope :unsolved, -> { where.not(solved: true) }
|
24
24
|
|
25
25
|
def subscribed_users
|
26
26
|
(users + optin_subscribers).uniq - optout_subscribers
|
@@ -56,20 +56,20 @@ class ForumThread < ApplicationRecord
|
|
56
56
|
end
|
57
57
|
|
58
58
|
def subscribed_reason(user)
|
59
|
-
return "
|
59
|
+
return I18n.t(".not_receiving_notifications") if user.nil?
|
60
60
|
|
61
61
|
subscription = subscription_for(user)
|
62
62
|
|
63
63
|
if subscription.present?
|
64
64
|
if subscription.subscription_type == "optout"
|
65
|
-
"
|
65
|
+
I18n.t(".ignoring_thread")
|
66
66
|
elsif subscription.subscription_type == "optin"
|
67
|
-
"
|
67
|
+
I18n.t(".receiving_notifications_because_subscribed")
|
68
68
|
end
|
69
69
|
elsif forum_posts.where(user_id: user.id).any?
|
70
|
-
"
|
70
|
+
I18n.t(".receiving_notifications_because_posted")
|
71
71
|
else
|
72
|
-
"
|
72
|
+
I18n.t(".not_receiving_notifications")
|
73
73
|
end
|
74
74
|
end
|
75
75
|
|
@@ -1,30 +1,68 @@
|
|
1
|
-
<div class="row">
|
2
|
-
<
|
1
|
+
<div class="row col-md-12">
|
2
|
+
<h1>
|
3
|
+
<%= t('community') %>
|
4
|
+
</h1>
|
5
|
+
</div>
|
6
|
+
|
7
|
+
<div class="row simple_discussion">
|
8
|
+
<div class="col-md-3 mb-3">
|
3
9
|
|
4
|
-
<div class="card card-
|
5
|
-
<%= link_to '
|
10
|
+
<div class="card card-body">
|
11
|
+
<%= link_to t('ask_a_question'), simple_discussion.new_forum_thread_path, class: "btn btn-outline-primary btn-block" %>
|
6
12
|
<hr />
|
7
13
|
|
8
14
|
<div class="forum-thread-filters">
|
9
|
-
<h5
|
10
|
-
|
15
|
+
<h5>
|
16
|
+
<strong>
|
17
|
+
<%= t('filters') %>
|
18
|
+
</strong>
|
19
|
+
</h5>
|
20
|
+
<div>
|
21
|
+
<%= forum_link_to simple_discussion.forum_threads_path, exact: true do %>
|
22
|
+
<%= icon "fa-fw fas", "bars" %>
|
23
|
+
<%= t('.all_threads') %>
|
24
|
+
<% end %>
|
25
|
+
</div>
|
11
26
|
<% if user_signed_in? %>
|
12
|
-
<div
|
13
|
-
|
27
|
+
<div>
|
28
|
+
<%= forum_link_to simple_discussion.mine_forum_threads_path do %><%= icon "fa-fw far", "user-circle" %>
|
29
|
+
<%= t('.my_questions') %>
|
30
|
+
<% end %>
|
31
|
+
</div>
|
32
|
+
<div>
|
33
|
+
<%= forum_link_to simple_discussion.participating_forum_threads_path do %>
|
34
|
+
<%= icon "fa-fw far", "comments" %>
|
35
|
+
<%= t('.participating') %>
|
36
|
+
<% end %>
|
37
|
+
</div>
|
14
38
|
<% end %>
|
15
|
-
<div
|
16
|
-
|
39
|
+
<div>
|
40
|
+
<%= forum_link_to simple_discussion.answered_forum_threads_path do %>
|
41
|
+
<%= icon "fa-fw fas", "check" %>
|
42
|
+
<%= t('.answered') %>
|
43
|
+
<% end %>
|
44
|
+
</div>
|
45
|
+
<div>
|
46
|
+
<%= forum_link_to simple_discussion.unanswered_forum_threads_path do %>
|
47
|
+
<%= icon "fa-fw fas", "question" %>
|
48
|
+
<%= t('.unanswered') %>
|
49
|
+
<% end %>
|
50
|
+
</div>
|
17
51
|
</div>
|
18
52
|
|
19
53
|
<hr />
|
20
54
|
|
21
55
|
<div class="forum-thread-filters">
|
22
|
-
<
|
23
|
-
|
56
|
+
<h6>
|
57
|
+
<strong>
|
58
|
+
<%= t('.by_category') %>
|
59
|
+
</strong>
|
60
|
+
</h6>
|
61
|
+
<div><%= forum_link_to simple_discussion.forum_threads_path, exact: true do %><%= icon "fa-fw fas", "circle" %> All<% end %></div>
|
24
62
|
<% ForumCategory.sorted.each do |category| %>
|
25
63
|
<div>
|
26
64
|
<%= forum_link_to simple_discussion.forum_category_forum_threads_path(category) do %>
|
27
|
-
<%= icon "circle", style: "color: #{category.color}" %>
|
65
|
+
<%= icon "fa-fw fas", "circle", style: "color: #{category.color}" %>
|
28
66
|
<%= category.name %>
|
29
67
|
<% end %>
|
30
68
|
</div>
|
@@ -35,13 +73,14 @@
|
|
35
73
|
<hr />
|
36
74
|
|
37
75
|
<%# User has not posted in the thread or subscribed %>
|
38
|
-
<h5
|
76
|
+
<h5><%= t('.notifications') %></h5>
|
39
77
|
|
40
78
|
<%= link_to simple_discussion.forum_thread_notifications_path(@forum_thread), method: :post, class: "btn btn-secondary btn-sm btn-block mb-2" do %>
|
41
79
|
<% if @forum_thread.subscribed? current_user %>
|
42
|
-
<%= icon "bell-slash" %>
|
80
|
+
<%= icon "fa-fw fas", "bell-slash" %> <%= t('.unsubscribe') %>
|
43
81
|
<% else %>
|
44
|
-
<%= icon "bell" %>
|
82
|
+
<%= icon "fa-fw fas", "bell" %>
|
83
|
+
<%= t('.suscribe') %>
|
45
84
|
<% end %>
|
46
85
|
<% end %>
|
47
86
|
|
@@ -51,8 +90,12 @@
|
|
51
90
|
|
52
91
|
</div>
|
53
92
|
|
54
|
-
<div class="col">
|
55
|
-
|
93
|
+
<div class="col-md-9 mb-3">
|
94
|
+
|
95
|
+
<div class="card card-body">
|
96
|
+
<%= yield %>
|
97
|
+
</div>
|
98
|
+
|
56
99
|
</div>
|
57
100
|
</div>
|
58
101
|
|
@@ -15,7 +15,7 @@
|
|
15
15
|
<% end %>
|
16
16
|
|
17
17
|
<div class="form-group">
|
18
|
-
<%= f.text_area :body, placeholder:
|
18
|
+
<%= f.text_area :body, placeholder: t('add_a_comment'), rows: 8, class: "form-control simplemde", data: { behavior: "comment-body" } %>
|
19
19
|
</div>
|
20
20
|
|
21
21
|
<div class="text-right">
|
@@ -26,7 +26,7 @@
|
|
26
26
|
</small>
|
27
27
|
</div>
|
28
28
|
|
29
|
-
<%= f.button "#{
|
29
|
+
<%= f.button "#{f.object.new_record? ? t('comment') : t('update_comment') }", class: "btn btn-primary", data: {disable_with: "<i class='fa fa-spinner fa-spin'></i> #{t('saving_comment')}"} %>
|
30
30
|
</div>
|
31
31
|
|
32
32
|
<% end %>
|
@@ -4,11 +4,18 @@
|
|
4
4
|
<div class="card-header">
|
5
5
|
|
6
6
|
<% if is_moderator_or_owner?(forum_post) %>
|
7
|
-
<div class="
|
8
|
-
<%= link_to icon("
|
7
|
+
<div class="float-right">
|
8
|
+
<%= link_to icon("fas","edit"), simple_discussion.edit_forum_thread_forum_post_path(@forum_thread, forum_post),
|
9
9
|
class: "text-muted",
|
10
10
|
data: { toggle: "tooltip", placement: "left" },
|
11
|
-
title:
|
11
|
+
title: t('edit_this_post')
|
12
|
+
%>
|
13
|
+
|
14
|
+
<%= link_to icon("fas","trash"), simple_discussion.forum_thread_forum_post_path(@forum_thread, forum_post),
|
15
|
+
class: "text-muted",
|
16
|
+
method: :delete,
|
17
|
+
data: { toggle: "tooltip", placement: "left", confirm: "Are you sure you want to delete this post?" },
|
18
|
+
title: t('delete_this_post')
|
12
19
|
%>
|
13
20
|
</div>
|
14
21
|
<% end %>
|
@@ -20,24 +27,24 @@
|
|
20
27
|
<%= forum_post.user.name %> <%= forum_user_badge(forum_post.user) %>
|
21
28
|
</strong>
|
22
29
|
<small>
|
23
|
-
|
30
|
+
<%= t('commented_on') %>
|
24
31
|
<%= link_to forum_post.created_at.strftime("%b %d, %Y"), simple_discussion.forum_thread_path(@forum_thread, anchor: "forum_post_#{forum_post.id}") %>:
|
25
32
|
</small>
|
26
33
|
</div>
|
27
34
|
</div>
|
28
35
|
|
29
|
-
<div class="card-
|
36
|
+
<div class="card-body">
|
30
37
|
<%= formatted_content forum_post.body %>
|
31
38
|
</div>
|
32
39
|
|
33
40
|
<% if @forum_thread.solved? && forum_post.solved? %>
|
34
41
|
<div class="card-footer">
|
35
42
|
<div class="pull-right">
|
36
|
-
<strong class="text-success"><%= icon("check") %>
|
43
|
+
<strong class="text-success"><%= icon("fas","check") %> <%= t('solved') %></strong>
|
37
44
|
|
38
45
|
<% if is_moderator_or_owner?(@forum_thread) %>
|
39
46
|
<small>
|
40
|
-
<%= link_to
|
47
|
+
<%= link_to t('undo'), simple_discussion.unsolved_forum_thread_forum_post_path(@forum_thread, forum_post), method: :put %>
|
41
48
|
</small>
|
42
49
|
<% end %>
|
43
50
|
</div>
|
@@ -48,8 +55,8 @@
|
|
48
55
|
<div class="pull-right">
|
49
56
|
<small>
|
50
57
|
<%= link_to simple_discussion.solved_forum_thread_forum_post_path(@forum_thread, forum_post), method: :put do %>
|
51
|
-
<%= icon("check") %>
|
52
|
-
|
58
|
+
<%= icon("fas","fas","check") %>
|
59
|
+
<%= t('this_solved_my_question') %>
|
53
60
|
<% end %>
|
54
61
|
</small>
|
55
62
|
</div>
|
@@ -4,7 +4,8 @@
|
|
4
4
|
|
5
5
|
<p class="thread-details">
|
6
6
|
<strong><%= category_link(@forum_thread.forum_category) %></strong>
|
7
|
-
•
|
7
|
+
• <%= t('asked_time_ago', time: time_ago_in_words(@forum_thread.created_at), author: @forum_thread.user.name) %>
|
8
|
+
</p>
|
8
9
|
</p>
|
9
10
|
|
10
11
|
<br />
|
@@ -14,11 +15,14 @@
|
|
14
15
|
<div>
|
15
16
|
<%= avatar_tag(@forum_post.user.email) %>
|
16
17
|
<strong class="forum-post-user"><%= @forum_post.user.name %></strong>
|
17
|
-
<small>
|
18
|
+
<small>
|
19
|
+
<%= t('commented_on')%>
|
20
|
+
<%= link_to @forum_post.created_at.strftime("%b %d, %Y"), simple_discussion.forum_thread_url(@forum_thread, anchor: "forum_post_#{@forum_post.id}") %>:
|
21
|
+
</small>
|
18
22
|
</div>
|
19
23
|
</div>
|
20
24
|
|
21
|
-
<div class="card-
|
25
|
+
<div class="card-body">
|
22
26
|
<%= render "form" %>
|
23
27
|
</div>
|
24
28
|
<% end %>
|
@@ -15,29 +15,29 @@
|
|
15
15
|
<% end %>
|
16
16
|
|
17
17
|
<div class="form-group">
|
18
|
-
<%= f.label :forum_category_id,
|
19
|
-
<%= f.collection_select :forum_category_id, ForumCategory.sorted, :id, :name, {include_blank:
|
18
|
+
<%= f.label :forum_category_id, t('choose_a_category') %>
|
19
|
+
<%= f.collection_select :forum_category_id, ForumCategory.sorted, :id, :name, {include_blank: t('pick_a_category')}, {autofocus: true, class: "form-control"} %>
|
20
20
|
</div>
|
21
21
|
|
22
22
|
<div class="form-group">
|
23
|
-
<%= f.label
|
24
|
-
<%= f.text_field :title, placeholder:
|
23
|
+
<%= f.label t('title') %>
|
24
|
+
<%= f.text_field :title, placeholder: t('how_do_i'), class: "form-control" %>
|
25
25
|
</div>
|
26
26
|
|
27
27
|
<% if local_assigns.fetch(:posts, true) %>
|
28
28
|
<%= f.fields_for :forum_posts do |p| %>
|
29
29
|
<div class="form-group">
|
30
|
-
<%= p.label :body,
|
31
|
-
<%= p.text_area :body, placeholder:
|
30
|
+
<%= p.label :body, t('what_help_needed') %>
|
31
|
+
<%= p.text_area :body, placeholder: t('add_a_comment'), rows: 10, class: "form-control simplemde", data: { behavior: "comment-body" } %>
|
32
32
|
</div>
|
33
33
|
<% end %>
|
34
34
|
<% end %>
|
35
35
|
|
36
36
|
<div class="form-group text-right">
|
37
37
|
<% if f.object.new_record? %>
|
38
|
-
<%= f.button
|
38
|
+
<%= f.button t('ask_your_question'), class: "btn btn-primary", data: {disable_with: "<i class='fa fa-spinner fa-spin'></i> #{t('saving')}"} %>
|
39
39
|
<% else %>
|
40
|
-
<%= f.button "Update Thread", class: "btn btn-primary", data: {disable_with: "<i class='fa fa-spinner fa-spin'></i>
|
40
|
+
<%= f.button "Update Thread", class: "btn btn-primary", data: {disable_with: "<i class='fa fa-spinner fa-spin'></i> #{t('saving')}"} %>
|
41
41
|
<% end %>
|
42
42
|
</div>
|
43
43
|
|
@@ -9,26 +9,26 @@
|
|
9
9
|
<div class="col">
|
10
10
|
<h4>
|
11
11
|
<% if forum_thread.solved? %>
|
12
|
-
<span class="text-success"><%= icon "check-circle" %></span>
|
12
|
+
<span class="text-success"><%= icon "fas", "check-circle" %></span>
|
13
13
|
<% end %>
|
14
14
|
|
15
15
|
<%= link_to simple_discussion.forum_thread_path(forum_thread) do %>
|
16
|
-
<%= icon "thumb-tack", class: "text-muted" if forum_thread.pinned? %> <%= forum_thread.title %>
|
16
|
+
<%= icon "fas", "thumb-tack", class: "text-muted" if forum_thread.pinned? %> <%= forum_thread.title %>
|
17
17
|
<% end %>
|
18
18
|
</h4>
|
19
19
|
|
20
20
|
<div class="thread-details">
|
21
21
|
<strong><%= category_link(forum_thread.forum_category) %></strong>
|
22
|
-
•
|
22
|
+
• <%= t('asked_time_ago', time: time_ago_in_words(forum_thread.created_at), author: forum_thread.user.name) %>
|
23
23
|
</div>
|
24
24
|
|
25
25
|
<p class="text-muted"><%= truncate(forum_thread.forum_posts.first.body, length: 200) %></p>
|
26
26
|
</div>
|
27
27
|
|
28
|
-
<div class="col-sm-
|
28
|
+
<div class="col-sm-2 text-center">
|
29
29
|
<%= link_to simple_discussion.forum_thread_path(forum_thread), class: "thread-posts-count" do %>
|
30
30
|
<span class="count"><%= forum_thread.forum_posts_count %></span>
|
31
|
-
<small><%= "post"
|
31
|
+
<small><%= t("post", count: forum_thread.forum_posts_count) %></small>
|
32
32
|
<% end %>
|
33
33
|
</div>
|
34
34
|
|