effective_posts 2.7.1 → 2.7.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3a1c81f231ae730f44dcbbfb64bead77d9a2530a3b6f4e2bdea6455f5ea78ca2
4
- data.tar.gz: 0ef00c73d74471e23a06c322444f209ab58fd21fce475a9783ecc93e8dadc011
3
+ metadata.gz: fb524b7de78941ff7ddc02bd3fed11f561ac7dc8bda6a0f46d093fc84c86de4a
4
+ data.tar.gz: b59781526ef9fef657ffd9eff3cf8e732896e0279cad97fede886b8e769da93f
5
5
  SHA512:
6
- metadata.gz: 4eb6a0e3530b97ba6cd1679c4bb137dfe91937806ca6284a016a930509e416e49fed55ec489af4753aec4d0fcd783e5bcf88ca9bc62c6f629fddaa3c4f2fc442
7
- data.tar.gz: 600dec645eb265e938d44315ecf2299755bbc678d8d0e8535fc690eff63867a0b884d3612b1b56c70403b6afeb844cf34c0b918be07020ae825458462598d8de
6
+ metadata.gz: 3413d26186e3df2707e43545a76f172e53fa063154f089fbca5699fbe7eebaa8e6f2f6136b1fccd160d8f525e0114e5ff77d7860ea86853411ef2d1ff6ac71e8
7
+ data.tar.gz: 990ecea8f2107abdcb4ea7090109c7b74dfc627ef5700fe3c72c26b94d359ba8e000ea3517d7197d09c5cde68779d6906a4e9eccb4da92d30e4bbe3af9004340
@@ -91,6 +91,8 @@ module Effective
91
91
  if defined?(EffectiveRoles) && EffectivePosts.use_effective_roles
92
92
  if user.present? && user.respond_to?(:roles)
93
93
  scope = scope.for_role(user.roles)
94
+ else
95
+ scope = scope.for_role([])
94
96
  end
95
97
  end
96
98
 
@@ -6,22 +6,8 @@
6
6
  - else
7
7
  = f.hidden_field :category, value: (EffectivePosts.categories.first || 'posts')
8
8
 
9
- -# acts_as_published
10
- = f.hide_if(:save_as_draft, true) do
11
- .row
12
- .col-md-6
13
- = f.datetime_field :published_start_at, label: 'Published start', hint: 'The page will appear on the website after this date and time. Leave blank to publish immediately'
14
- .col-md-6
15
- = f.datetime_field :published_end_at, label: 'Published end', hint: 'The page will not appear on the website after this date and time. Leave blank for no end date.', date_linked: false
16
-
17
- = f.check_box :save_as_draft, label: "Save as a draft. It will not appear on the website and can only be accessed by admin users."
18
-
19
- - # acts_as_slugged
20
- - if f.object.persisted? || f.object.errors.include?(:slug)
21
- - current_url = effective_posts.post_path(f.object)
22
-
23
- = f.text_field :slug, required: f.object.persisted?,
24
- hint: "The slug controls this post's internet address. Be careful, changing the slug will break links that other websites may have to the old address.<br>#{('This post is currently reachable via ' + link_to(current_url.gsub(f.object.slug, '<strong>' + f.object.slug + '</strong>').html_safe, current_url)) if current_url && f.object.slug.present? }".html_safe
9
+ = acts_as_published_fields(f)
10
+ = acts_as_slugged_fields(f, url: (effective_posts.post_url(f.object) rescue nil))
25
11
 
26
12
  - if EffectivePosts.use_description
27
13
  = f.text_field :description, label: "Meta description", input_html: { maxlength: 150 },
@@ -1,3 +1,3 @@
1
1
  module EffectivePosts
2
- VERSION = '2.7.1'.freeze
2
+ VERSION = '2.7.3'.freeze
3
3
  end
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: 2.7.1
4
+ version: 2.7.3
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: 2024-07-29 00:00:00.000000000 Z
11
+ date: 2024-11-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails