effective_posts 0.5.7 → 0.6.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/app/helpers/effective_posts_helper.rb +1 -1
- data/app/models/effective/post.rb +1 -2
- data/app/models/effective/snippets/read_more_divider.rb +4 -1
- data/app/views/admin/posts/_form.html.haml +8 -8
- data/app/views/effective/posts/_form.html.haml +4 -4
- data/app/views/effective/posts/show.html.haml +2 -2
- data/app/views/effective/posts_mailer/post_submitted_to_admin.html.haml +2 -2
- data/lib/effective_posts/version.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: d24520205ad7c50a0c2b87db4f98973823d6ce0019121100552f5f6e9acb37ba
|
4
|
+
data.tar.gz: b741010f991174f86dec40373f44d62e82c58112adf8bed342a7cb01e10a6826
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 28729dbb2aea8030f3c558e986c2002de9c40b6b7566e40ab07a9d8f7b8c16c13aa29ffa815f2cf9c8843e44fa86c9be0ed69c54b637ba56e93a1f9121404298
|
7
|
+
data.tar.gz: 1399466d936f9210462d3f07cdd7f49b994ad897be35ea34f32355bc04f151287e51425063dd5b4e14b84421886d41cda5c311f2588f2ecba501d14a5e2ee205
|
@@ -8,7 +8,7 @@ module EffectivePostsHelper
|
|
8
8
|
if EffectivePosts.use_category_routes
|
9
9
|
effective_posts.post_path(post, opts).sub('/posts', "/#{category}")
|
10
10
|
else
|
11
|
-
effective_posts.post_path(post, opts
|
11
|
+
effective_posts.post_path(post, opts)
|
12
12
|
end
|
13
13
|
end
|
14
14
|
|
@@ -33,7 +33,6 @@ module Effective
|
|
33
33
|
|
34
34
|
scope :drafts, -> { where(draft: true) }
|
35
35
|
scope :published, -> { where(draft: false).where("#{EffectivePosts.posts_table_name}.published_at < ?", Time.zone.now) }
|
36
|
-
scope :with_category, -> (category) { where(category: category.to_s.downcase) }
|
37
36
|
|
38
37
|
scope :posts, -> (user: nil, category: nil, drafts: false) {
|
39
38
|
scope = (Rails::VERSION::MAJOR > 3 ? all : scoped)
|
@@ -48,7 +47,7 @@ module Effective
|
|
48
47
|
end
|
49
48
|
|
50
49
|
if category.present?
|
51
|
-
scope = scope.
|
50
|
+
scope = scope.where(category: category)
|
52
51
|
end
|
53
52
|
|
54
53
|
if drafts.blank?
|
@@ -1,13 +1,13 @@
|
|
1
1
|
= simple_form_for(post, (EffectivePosts.admin_simple_form_options || {}).merge(:url => (post.persisted? ? effective_posts.admin_post_path(post.id) : effective_posts.admin_posts_path))) do |f|
|
2
2
|
= f.input :title, hint: 'The title of your post.'
|
3
3
|
|
4
|
-
- if Array(EffectivePosts.categories).length >
|
4
|
+
- if Array(EffectivePosts.categories).length > 1
|
5
5
|
= f.input :category,
|
6
6
|
as: (defined?(EffectiveFormInputs) ? :effective_select : :select),
|
7
7
|
collection: EffectivePosts.categories,
|
8
8
|
include_blank: false
|
9
9
|
- else
|
10
|
-
= f.input :category, as: :hidden, input_html: { value: 'posts' }
|
10
|
+
= f.input :category, as: :hidden, input_html: { value: (EffectivePosts.categories.first || 'posts') }
|
11
11
|
|
12
12
|
= render partial: '/effective/posts/additional_fields', locals: { post: post, form: f, f: f }
|
13
13
|
|
@@ -21,16 +21,16 @@
|
|
21
21
|
= f.input :body,
|
22
22
|
as: (defined?(EffectiveFormInputs) ? :effective_ckeditor_text_area : :text),
|
23
23
|
hint: 'The body of your post.',
|
24
|
-
toolbar: '
|
24
|
+
toolbar: 'full',
|
25
25
|
required: true
|
26
26
|
|
27
27
|
- if defined?(EffectiveRoles) and f.object.respond_to?(:roles) && EffectivePosts.use_effective_roles
|
28
28
|
= f.input :roles, collection: EffectiveRoles.roles_collection(f.object), as: :check_boxes, hint: '* leave blank for a regular public post that anyone can view'
|
29
29
|
|
30
|
-
.effective-post-actions
|
31
|
-
= f.button :submit, 'Save', data: { disable_with: 'Saving...' }
|
30
|
+
.form-actions.effective-post-actions
|
31
|
+
= f.button :submit, 'Save', data: { disable_with: 'Saving...' }, class: 'btn btn-primary'
|
32
32
|
- if EffectivePosts.use_fullscreen_editor
|
33
|
-
= f.button :submit, 'Save and Edit Content', data: { disable_with: 'Saving...' }
|
34
|
-
= f.button :submit, 'Save and Add New', data: { disable_with: 'Saving...' }
|
35
|
-
= f.button :submit, 'Save and Duplicate', data: { disable_with: 'Saving...' }
|
33
|
+
= f.button :submit, 'Save and Edit Content', data: { disable_with: 'Saving...' }, class: 'btn btn-primary'
|
34
|
+
= f.button :submit, 'Save and Add New', data: { disable_with: 'Saving...' }, class: 'btn btn-default'
|
35
|
+
= f.button :submit, 'Save and Duplicate', data: { disable_with: 'Saving...' }, class: 'btn btn-default'
|
36
36
|
= link_to 'Cancel', effective_posts.admin_posts_path
|
@@ -1,13 +1,13 @@
|
|
1
1
|
= simple_form_for(post, (EffectivePosts.simple_form_options || {}).merge(url: (post.persisted? ? effective_posts.post_path(post.id) : effective_posts.posts_path))) do |f|
|
2
2
|
= f.input :title, hint: 'The title of your post.'
|
3
3
|
|
4
|
-
- if Array(EffectivePosts.categories).length >
|
4
|
+
- if Array(EffectivePosts.categories).length > 1
|
5
5
|
= f.input :category,
|
6
6
|
as: (defined?(EffectiveFormInputs) ? :effective_select : :select),
|
7
7
|
collection: EffectivePosts.categories,
|
8
8
|
include_blank: false
|
9
9
|
- else
|
10
|
-
= f.input :category, as: :hidden, input_html: { value: 'posts' }
|
10
|
+
= f.input :category, as: :hidden, input_html: { value: (EffectivePosts.categories.first || 'posts') }
|
11
11
|
|
12
12
|
= render partial: '/effective/posts/additional_fields', locals: { post: post, form: f, f: f }
|
13
13
|
|
@@ -22,6 +22,6 @@
|
|
22
22
|
toolbar: 'simple',
|
23
23
|
required: true
|
24
24
|
|
25
|
-
|
26
|
-
= f.button :submit, 'Save', data: { disable_with: 'Saving...' }
|
25
|
+
.form-actions
|
26
|
+
= f.button :submit, 'Save', data: { disable_with: 'Saving...' }, class: 'btn btn-primary'
|
27
27
|
= link_to 'Cancel', effective_posts.posts_path
|
@@ -9,12 +9,12 @@
|
|
9
9
|
- if @post.start_at.present?
|
10
10
|
%tr
|
11
11
|
%th Starts
|
12
|
-
%td= @post.start_at
|
12
|
+
%td= @post.start_at.stftime('%F %H:%M')
|
13
13
|
|
14
14
|
- if @post.end_at.present?
|
15
15
|
%tr
|
16
16
|
%th Ends
|
17
|
-
%td= @post.
|
17
|
+
%td= @post.end_at.stftime('%F %H:%M')
|
18
18
|
|
19
19
|
- if @post.location.present?
|
20
20
|
%tr
|
@@ -1,6 +1,6 @@
|
|
1
1
|
%p A new post has been submitted and needs your approval before it may be displayed on the website:
|
2
2
|
|
3
|
-
%p= link_to 'Approve Post', effective_posts.
|
3
|
+
%p= link_to 'Approve Post', effective_posts.admin_approve_post_url(@post)
|
4
4
|
|
5
5
|
%hr
|
6
6
|
|
@@ -19,4 +19,4 @@
|
|
19
19
|
|
20
20
|
%hr
|
21
21
|
|
22
|
-
%p= link_to 'Approve Post', effective_posts.
|
22
|
+
%p= link_to 'Approve Post', effective_posts.admin_approve_post_url(@post)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: effective_posts
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Code and Effect
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-06-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -203,8 +203,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
203
203
|
- !ruby/object:Gem::Version
|
204
204
|
version: '0'
|
205
205
|
requirements: []
|
206
|
-
|
207
|
-
rubygems_version: 2.4.5.1
|
206
|
+
rubygems_version: 3.1.2
|
208
207
|
signing_key:
|
209
208
|
specification_version: 4
|
210
209
|
summary: A blog implementation with WYSIWYG content editing, post scheduling, pagination
|