adminpanel 2.3.1 → 2.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/adminpanel/section.rb +1 -1
- data/lib/adminpanel/version.rb +1 -1
- data/lib/generators/adminpanel/initialize/templates/create_adminpanel_tables.rb +1 -0
- data/lib/tasks/adminpanel/adminpanel.rake +9 -1
- data/test/dummy/db/schema.rb +1 -0
- data/test/models/adminpanel/section_test.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1aafbc35eee8d10953a446e2e0a9c8f499d87d2a
|
4
|
+
data.tar.gz: 37dbeddb83a4a4a1b95b415bd3a9e8a9416ad24b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9d96d604d98c7fd68d23763cc2d267b0220f0db279566134f4fa210a452b7d9ca5079f9ef9d230a48969fb90c330d0dac9feb8db425f25e3f2c0d75cbcfc70d5
|
7
|
+
data.tar.gz: b77117eaa2fab041e598175d36ebbe4035692cb67c565cccbc4acac9c8f14964861759544ebf1c7b9206d2545d8f1d2f8a774ddfd93ba39040ca3d182089beff
|
data/lib/adminpanel/version.rb
CHANGED
@@ -4,16 +4,24 @@ namespace :adminpanel do
|
|
4
4
|
task :section, [:name, :section, :type] => :environment do |t, args|
|
5
5
|
args.with_defaults(:section => "home", :name => "greeting", :type => "")
|
6
6
|
puts "Creating #{args[:name]} in #{args[:section]} section" unless Rails.env.test?
|
7
|
+
page_name = args[:section].capitalize
|
8
|
+
order = Adminpanel::Section.find_by(:page => page_name)
|
7
9
|
|
8
10
|
s = Adminpanel::Section.new(
|
9
11
|
:name => args[:name].titleize,
|
10
12
|
:has_description => false,
|
11
13
|
:description => "",
|
12
14
|
:key => (args[:name].downcase.tr(' ','_')),
|
13
|
-
:page =>
|
15
|
+
:page => page_name,
|
14
16
|
:has_image => false
|
15
17
|
)
|
16
18
|
|
19
|
+
if order.nil?
|
20
|
+
s.order = Adminpanel::Section.count + 1
|
21
|
+
else
|
22
|
+
s.order = order.order
|
23
|
+
end
|
24
|
+
|
17
25
|
args[:type].split(" ").each do |type|
|
18
26
|
case type
|
19
27
|
when "wysiwyg" || "description"
|
data/test/dummy/db/schema.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: adminpanel
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jose Ramon Camacho
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-12-
|
12
|
+
date: 2014-12-29 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|