effective_posts 1.1.4 → 1.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/controllers/admin/posts_controller.rb +1 -1
- data/app/models/effective/datatables/posts.rb +1 -1
- data/app/models/effective/post.rb +1 -0
- data/app/views/admin/posts/_form.html.haml +3 -3
- data/app/views/effective/posts/_form.html.haml +2 -2
- data/lib/effective_posts/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6e75ef03c3fbb14f1770a332ff3963df4f065ae653fa3c9bcf476e66bff581bd
|
4
|
+
data.tar.gz: 618cac368b24754d447df9d65446355f18c9d2e1c3d26006398e94723043ed70
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a1fdf0cf42896d884c75ef94a87776dd55b4a3ef74878345e4100ac2b78945f8f7d2ba65bb0f730daec3eb8f3e6eb6b9335033e30d203da4f43ec56aea3952b8
|
7
|
+
data.tar.gz: 2e618b276e175bf0d18b5e686d94abc9ef72f9fd16be3507ef4d0163cae87efd675b3793290bab54d5fdcf30bc6b91ef004719612deb36334b54f7c4e0280984
|
@@ -69,7 +69,7 @@ module Admin
|
|
69
69
|
begin
|
70
70
|
post = @post.duplicate!
|
71
71
|
flash[:success] = 'Successfully saved and duplicated post.'
|
72
|
-
flash[:info] = "You are now
|
72
|
+
flash[:info] = "You are now editing the duplicated post. This new post has been created as a Draft."
|
73
73
|
rescue => e
|
74
74
|
flash.delete(:success)
|
75
75
|
flash[:danger] = "Unable to duplicate post: #{e.message}"
|
@@ -9,7 +9,7 @@ if Gem::Version.new(EffectiveDatatables::VERSION) < Gem::Version.new('3.0')
|
|
9
9
|
table_column :id, visible: false
|
10
10
|
|
11
11
|
table_column :title
|
12
|
-
|
12
|
+
col :slug, visible: false
|
13
13
|
table_column :category, filter: { type: :select, values: EffectivePosts.categories }
|
14
14
|
|
15
15
|
if EffectivePosts.submissions_enabled
|
@@ -1,9 +1,9 @@
|
|
1
1
|
= effective_form_with(model: post, url: post.persisted? ? effective_posts.admin_post_path(post.id) : effective_posts.admin_posts_path) do |f|
|
2
2
|
= f.text_field :title, hint: 'The title of your post.'
|
3
|
-
|
3
|
+
|
4
4
|
- if f.object.persisted? || f.object.errors.include?(:slug)
|
5
|
-
- current_url =
|
6
|
-
|
5
|
+
- current_url = effective_posts.post_path(f.object)
|
6
|
+
= f.text_field :slug, 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
|
7
7
|
|
8
8
|
- if Array(EffectivePosts.categories).length > 1
|
9
9
|
= f.select :category, EffectivePosts.categories
|
@@ -2,8 +2,8 @@
|
|
2
2
|
= f.text_field :title, hint: 'The title of your post.'
|
3
3
|
|
4
4
|
- if f.object.persisted? || f.object.errors.include?(:slug)
|
5
|
-
- current_url =
|
6
|
-
|
5
|
+
- current_url = effective_posts.post_path(f.object)
|
6
|
+
= f.text_field :slug, 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
|
7
7
|
|
8
8
|
- if Array(EffectivePosts.categories).length > 1
|
9
9
|
= f.select :category, EffectivePosts.categories
|
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: 1.1.
|
4
|
+
version: 1.1.5
|
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: 2019-06-
|
11
|
+
date: 2019-06-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|