effective_posts 0.2.5 → 0.2.6

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: 579841290e09b748845c8ae7579e9804abb3eb98
4
- data.tar.gz: 26f9819558a657cde932da4f0f9d3ae6b9089e99
3
+ metadata.gz: d28952399f3ca899b39e4ebf35db0c27f156e61b
4
+ data.tar.gz: 243b57d1bd9ad4f1b221c4e0ceace0d44a238c30
5
5
  SHA512:
6
- metadata.gz: 25e40384bbddf29e3f04c7fff34bf0cb5f9bede594296bf98fe991a9eacd9f67a95f53bbcd28d0dc5c8213a1f2bdeaba54a37f6344bc81f561422746ebccf4f3
7
- data.tar.gz: 1419866b4ac11195f7cfc493fc9f6feea94f382be9465c426280776cec90f38b70494254209fac175bb9273751a8ebd1066f329faebe6523046ce6cc67c815df
6
+ metadata.gz: 57a3333735eaa584289c39677672fb36fff21daa625d12436fd063c64395fc65e798ed29e7682f6720f62fdeee814f5474eb7e390175f760e65cad5cbcc28317
7
+ data.tar.gz: 2d1a7c0d4b272de5d3d4e469a440e32cfc9295d493803b9dda06b9e9eb6c6683612447a1a3469be83775c034c581414a1b9d5f2e75d9e88c7b1152f709851ae7
@@ -29,6 +29,8 @@ module Admin
29
29
  if @post.save
30
30
  if params[:commit] == 'Save and Edit Content' && defined?(EffectiveRegions)
31
31
  redirect_to effective_regions.edit_path(effective_posts.post_path(@post), :exit => effective_posts.edit_admin_post_path(@post))
32
+ elsif params[:commit] == 'Save and Add New'
33
+ redirect_to effective_posts.new_admin_post_path
32
34
  else
33
35
  flash[:success] = 'Successfully created post'
34
36
  redirect_to effective_posts.edit_admin_post_path(@post)
@@ -55,6 +57,8 @@ module Admin
55
57
  if @post.update_attributes(post_params)
56
58
  if params[:commit] == 'Save and Edit Content' && defined?(EffectiveRegions)
57
59
  redirect_to effective_regions.edit_path(effective_posts.post_path(@post), :exit => effective_posts.edit_admin_post_path(@post))
60
+ elsif params[:commit] == 'Save and Add New'
61
+ redirect_to effective_posts.new_admin_post_path
58
62
  else
59
63
  flash[:success] = 'Successfully updated post'
60
64
  redirect_to effective_posts.edit_admin_post_path(@post)
@@ -21,7 +21,8 @@
21
21
  .col-xs-12
22
22
  .form-group
23
23
  .pull-right
24
- = f.button :submit, 'Save'
24
+ = f.button :submit, 'Save', data: { disable_with: 'Saving...' }
25
25
  - if defined?(EffectiveRegions)
26
- = f.button :submit, 'Save and Edit Content'
26
+ = f.button :submit, 'Save and Edit Content', data: { disable_with: 'Saving...' }
27
+ = f.button :submit, 'Save and Add New', data: { disable_with: 'Saving...' }
27
28
  = link_to 'Cancel', effective_posts.admin_posts_path
@@ -1,6 +1,9 @@
1
1
  %h2= @page_title
2
2
 
3
+ %p.text-right= link_to 'New Post', effective_posts.new_admin_post_path, :class => 'btn btn-primary'
4
+
3
5
  = render_datatable @datatable do
4
6
  %p There are no posts
5
7
 
6
- %p= link_to 'New Post', effective_posts.new_admin_post_path, :class => 'btn btn-primary'
8
+ - if @datatable.present?
9
+ %p.text-right= link_to 'New Post', effective_posts.new_admin_post_path, :class => 'btn btn-primary'
@@ -1,3 +1,3 @@
1
1
  module EffectivePosts
2
- VERSION = '0.2.5'.freeze
2
+ VERSION = '0.2.6'.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: 0.2.5
4
+ version: 0.2.6
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: 2015-03-13 00:00:00.000000000 Z
11
+ date: 2015-03-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails