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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d28952399f3ca899b39e4ebf35db0c27f156e61b
|
4
|
+
data.tar.gz: 243b57d1bd9ad4f1b221c4e0ceace0d44a238c30
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
8
|
+
- if @datatable.present?
|
9
|
+
%p.text-right= link_to 'New Post', effective_posts.new_admin_post_path, :class => 'btn btn-primary'
|
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.
|
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-
|
11
|
+
date: 2015-03-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|