thredded 0.12.0 → 0.12.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +4 -4
- data/app/helpers/thredded/application_helper.rb +2 -2
- data/app/views/thredded/posts/_post.html.erb +1 -1
- data/app/views/thredded/posts_common/_actions.html.erb +5 -4
- data/app/views/thredded/private_posts/_private_post.html.erb +1 -1
- data/app/views/thredded/private_topics/show.html.erb +2 -1
- data/app/views/thredded/topics/show.html.erb +4 -1
- data/lib/thredded/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 72449d853f031c774bc914127754b165c39212e9
|
4
|
+
data.tar.gz: 16594c731eba3115e424cf58d3fe687945b0750e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 32b007d694cc9c51a8262afdf59a92e5d2369ba6e4632e113eba8190cca34e286aa400a667e99b62534625b7e0e6cf51d5ea23afb54d628a7b1218f6e6e6e390
|
7
|
+
data.tar.gz: fdb3249473023e280f11fd05e00dcc9f21f6b39029bb296377d7da580df00fe8e91a288e94e27ed2cee1663967a589a1fb43f786baa0282684e06eaf709019a2
|
data/README.md
CHANGED
@@ -99,7 +99,7 @@ Then, see the rest of this Readme for more information about using and customizi
|
|
99
99
|
Add the gem to your Gemfile:
|
100
100
|
|
101
101
|
```ruby
|
102
|
-
gem 'thredded', '~> 0.12.
|
102
|
+
gem 'thredded', '~> 0.12.1'
|
103
103
|
```
|
104
104
|
|
105
105
|
Add the Thredded [initializer] to your parent app by running the install generator.
|
@@ -148,11 +148,11 @@ rails g thredded:install
|
|
148
148
|
|
149
149
|
But then compare this with the previous version to decide what to keep.
|
150
150
|
|
151
|
-
2) To upgrade the database (in this example from v0.
|
151
|
+
2) To upgrade the database (in this example from v0.11 to v0.12):
|
152
152
|
|
153
153
|
```console
|
154
|
-
# Note that for guaranteed best results you will want to run this with the gem
|
155
|
-
cp
|
154
|
+
# Note that for guaranteed best results you will want to run this with the thredded gem at v0.12
|
155
|
+
cp "$(bundle show thredded)"/db/upgrade_migrations/20170420163138_upgrade_thredded_v0_11_to_v0_12.rb db/migrate
|
156
156
|
rake db:migrate
|
157
157
|
```
|
158
158
|
|
@@ -72,11 +72,11 @@ module Thredded
|
|
72
72
|
# @param posts [Thredded::PostsPageView, Array<Thredded::PostView>]
|
73
73
|
# @param partial [String]
|
74
74
|
# @param content_partial [String]
|
75
|
-
def render_posts(posts, partial: 'thredded/posts/post', content_partial: 'thredded/posts/content')
|
75
|
+
def render_posts(posts, partial: 'thredded/posts/post', content_partial: 'thredded/posts/content', locals: {})
|
76
76
|
posts_with_contents = render_collection_to_strings_with_cache(
|
77
77
|
partial: content_partial, collection: posts, as: :post, expires_in: 1.week
|
78
78
|
)
|
79
|
-
render partial: partial, collection: posts_with_contents, as: :post_and_content
|
79
|
+
render partial: partial, collection: posts_with_contents, as: :post_and_content, locals: locals
|
80
80
|
end
|
81
81
|
|
82
82
|
def paginate(collection, args = {})
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<% post, content = post_and_content if local_assigns.key?(:post_and_content) %>
|
2
2
|
<%= content_tag :article, id: dom_id(post), class: "thredded--post thredded--#{post.read_state}--post" do %>
|
3
|
-
<%= render 'thredded/posts_common/actions', post: post %>
|
3
|
+
<%= render 'thredded/posts_common/actions', post: post, actions: local_assigns[:actions] %>
|
4
4
|
<%= render 'thredded/posts_common/header', post: post %>
|
5
5
|
<%= content || render('thredded/posts/content', post: post) %>
|
6
6
|
<% if post.pending_moderation? && !Thredded.content_visible_while_pending_moderation %>
|
@@ -1,6 +1,7 @@
|
|
1
|
-
<% actions
|
1
|
+
<% actions ||= {} %>
|
2
|
+
<% actions_html = capture do %>
|
2
3
|
<%= view_hooks.post_common.actions.render self, post: post do %>
|
3
|
-
<% if post.can_reply? %>
|
4
|
+
<% if actions[:quote] && post.can_reply? %>
|
4
5
|
<%= render 'thredded/posts_common/actions/quote', post: post %>
|
5
6
|
<% end %>
|
6
7
|
<% if post.can_update? %>
|
@@ -17,11 +18,11 @@
|
|
17
18
|
<% end %>
|
18
19
|
<% end %>
|
19
20
|
|
20
|
-
<%- if
|
21
|
+
<%- if actions_html.present? %>
|
21
22
|
<div class='thredded--post--dropdown'>
|
22
23
|
<%= inline_svg 'thredded/three-dot-menu.svg', class: 'thredded--post--dropdown--toggle' %>
|
23
24
|
<div class='thredded--post--dropdown--actions'>
|
24
|
-
<%=
|
25
|
+
<%= actions_html %>
|
25
26
|
</div>
|
26
27
|
</div>
|
27
28
|
<% end %>
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<% private_post, content = post_and_content if local_assigns.key?(:post_and_content) %>
|
2
2
|
<%= content_tag :article, id: dom_id(private_post), class: 'thredded--post' do %>
|
3
|
-
<%= render 'thredded/posts_common/actions', post: private_post %>
|
3
|
+
<%= render 'thredded/posts_common/actions', post: private_post, actions: local_assigns[:actions] %>
|
4
4
|
<%= render 'thredded/posts_common/header', post: private_post %>
|
5
5
|
<%= content || render('thredded/private_posts/content', post: post) %>
|
6
6
|
<% end %>
|
@@ -13,7 +13,8 @@
|
|
13
13
|
<% end %>
|
14
14
|
<%= render_posts @posts,
|
15
15
|
partial: 'thredded/private_posts/private_post',
|
16
|
-
content_partial: 'thredded/private_posts/content'
|
16
|
+
content_partial: 'thredded/private_posts/content',
|
17
|
+
locals: { actions: { quote: true } } %>
|
17
18
|
<%= view_hooks.posts_common.pagination_bottom.render(self, posts: @posts) do %>
|
18
19
|
<footer class="thredded--pagination-bottom"><%= paginate @posts %></footer>
|
19
20
|
<% end %>
|
@@ -12,7 +12,10 @@
|
|
12
12
|
<%= view_hooks.posts_common.pagination_top.render(self, posts: @posts) do %>
|
13
13
|
<footer class="thredded--pagination-top"><%= paginate @posts %></footer>
|
14
14
|
<% end %>
|
15
|
-
<%= render_posts @posts,
|
15
|
+
<%= render_posts @posts,
|
16
|
+
partial: 'thredded/posts/post',
|
17
|
+
content_partial: 'thredded/posts/content',
|
18
|
+
locals: { actions: { quote: true } } %>
|
16
19
|
<%= view_hooks.posts_common.pagination_bottom.render(self, posts: @posts) do %>
|
17
20
|
<footer class="thredded--pagination-bottom"><%= paginate @posts %></footer>
|
18
21
|
<% end %>
|
data/lib/thredded/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: thredded
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.12.
|
4
|
+
version: 0.12.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joel Oliveira
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2017-05-
|
12
|
+
date: 2017-05-05 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: pundit
|
@@ -1057,7 +1057,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
1057
1057
|
version: '0'
|
1058
1058
|
requirements: []
|
1059
1059
|
rubyforge_project:
|
1060
|
-
rubygems_version: 2.6.
|
1060
|
+
rubygems_version: 2.6.12
|
1061
1061
|
signing_key:
|
1062
1062
|
specification_version: 4
|
1063
1063
|
summary: The best Rails forums engine ever.
|