effective_posts 0.5.6 → 0.5.7

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
  SHA1:
3
- metadata.gz: dc73e6efc1dae59e17429ce395a76dc3217eff18
4
- data.tar.gz: d317017ac8c3956a5325152e7ade91108e8c915f
3
+ metadata.gz: bcb8cf8da995fb0cb718b664bf18c6a5a30f812e
4
+ data.tar.gz: 0b6970aa6c71ed0e642dfc38a290021be6d9f474
5
5
  SHA512:
6
- metadata.gz: ea3271eacf7ec10f19406aa763b2f1b3391076389fbe759c3a7e581b022fe70424b3caf65165e9e0ea360863e123b6a8ac2d24ce4ab8f97adc2cfcfd0cda382f
7
- data.tar.gz: e7e0ced1e4cf15ad530affcfd8e620456366b4d6e49b05fda965a25460607dd73011bd8710c92037d98713461f8ceade4827aba57806b51083473a982773951c
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' && defined?(EffectiveRegions)
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' && defined?(EffectiveRegions)
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 defined?(EffectiveRegions)
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 defined?(EffectiveRegions)
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...' }
@@ -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
@@ -19,6 +19,7 @@ module EffectivePosts
19
19
  mattr_accessor :use_category_routes
20
20
 
21
21
  mattr_accessor :use_effective_roles
22
+ mattr_accessor :use_fullscreen_editor
22
23
 
23
24
  mattr_accessor :per_page
24
25
  mattr_accessor :post_meta_author
@@ -1,3 +1,3 @@
1
1
  module EffectivePosts
2
- VERSION = '0.5.6'.freeze
2
+ VERSION = '0.5.7'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_posts
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.6
4
+ version: 0.5.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Code and Effect