effective_posts 0.5.6 → 0.5.7
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 +2 -2
- data/app/views/admin/posts/_actions.html.haml +1 -1
- data/app/views/admin/posts/_form.html.haml +1 -1
- data/config/effective_posts.rb +3 -0
- data/lib/effective_posts.rb +1 -0
- data/lib/effective_posts/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bcb8cf8da995fb0cb718b664bf18c6a5a30f812e
|
4
|
+
data.tar.gz: 0b6970aa6c71ed0e642dfc38a290021be6d9f474
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 307626bebff69addac93a6b65d6ce4f58f62caf7015ef13dc92b19eea875b3bc4c06d506f610ae0429b176a5202476af171b5c29dafef58ef9b971e4779f4dd7
|
7
|
+
data.tar.gz: 734e7f0110670d2d9b247e98915d45966b96f0d33c99de4ef36b90a3eb822f1c9f917a3a2f8fd3cb20c3509dc770ebb6ff15f1bc2f70dd167b7113f4262d9132
|
@@ -32,7 +32,7 @@ module Admin
|
|
32
32
|
authorize_effective_posts!
|
33
33
|
|
34
34
|
if @post.save
|
35
|
-
if params[:commit] == 'Save and Edit Content'
|
35
|
+
if params[:commit] == 'Save and Edit Content'
|
36
36
|
redirect_to effective_regions.edit_path(effective_posts.post_path(@post), :exit => effective_posts.edit_admin_post_path(@post))
|
37
37
|
elsif params[:commit] == 'Save and Add New'
|
38
38
|
flash[:success] = 'Successfully created post'
|
@@ -61,7 +61,7 @@ module Admin
|
|
61
61
|
authorize_effective_posts!
|
62
62
|
|
63
63
|
if @post.update_attributes(post_params)
|
64
|
-
if params[:commit] == 'Save and Edit Content'
|
64
|
+
if params[:commit] == 'Save and Edit Content'
|
65
65
|
redirect_to effective_regions.edit_path(effective_posts.post_path(@post), :exit => effective_posts.edit_admin_post_path(@post))
|
66
66
|
elsif params[:commit] == 'Save and Add New'
|
67
67
|
flash[:success] = 'Successfully updated post'
|
@@ -8,7 +8,7 @@
|
|
8
8
|
= link_to effective_post_path(post, (post.draft? ? {preview: true} : nil)), title: 'View', target: '_blank' do
|
9
9
|
%span.glyphicon.glyphicon-eye-open
|
10
10
|
|
11
|
-
- if
|
11
|
+
- if EffectivePosts.use_fullscreen_editor
|
12
12
|
= link_to effective_post_path(post, edit: true), title: 'Edit Content', 'data-no-turbolink': true, target: '_blank' do
|
13
13
|
%span.glyphicon.glyphicon-edit
|
14
14
|
|
@@ -29,7 +29,7 @@
|
|
29
29
|
|
30
30
|
.effective-post-actions.pull-right
|
31
31
|
= f.button :submit, 'Save', data: { disable_with: 'Saving...' }
|
32
|
-
- if
|
32
|
+
- if EffectivePosts.use_fullscreen_editor
|
33
33
|
= f.button :submit, 'Save and Edit Content', data: { disable_with: 'Saving...' }
|
34
34
|
= f.button :submit, 'Save and Add New', data: { disable_with: 'Saving...' }
|
35
35
|
= f.button :submit, 'Save and Duplicate', data: { disable_with: 'Saving...' }
|
data/config/effective_posts.rb
CHANGED
@@ -74,6 +74,9 @@ EffectivePosts.setup do |config|
|
|
74
74
|
# Display the effective roles 'choose roles' input when an admin creates a new post
|
75
75
|
config.use_effective_roles = true
|
76
76
|
|
77
|
+
# Hides the Save and Edit Content links from admin. They can just use the textarea input.
|
78
|
+
config.use_fullscreen_editor = true
|
79
|
+
|
77
80
|
# Submissions
|
78
81
|
# Allow users to submit posts (optionally for approval) to display on the website
|
79
82
|
config.submissions_enabled = true
|
data/lib/effective_posts.rb
CHANGED