effective_style_guide 2.0.3 → 2.0.4
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/effective/style_guide_controller.rb +13 -6
- data/app/models/effective/style_guide.rb +0 -4
- data/app/views/effective/style_guide_bootstrap3/_form_horizontal.html.haml +0 -10
- data/app/views/effective/style_guide_bootstrap3/_form_vertical.html.haml +0 -8
- data/lib/effective_style_guide/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 488b4a3c26294b4efb95214be897f6674e1ac6f8
|
4
|
+
data.tar.gz: d4cfb01b66e04eac155b044fd92ea7071401fba6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c978e3908ed3fc060ac125066a6acd638341d9be4bc76c842ad960ceabf7c0127b4e650e2f8734fbf9a802106918c1d7c546f08861882f85bb73bc6372d6527b
|
7
|
+
data.tar.gz: 7721163f6b5263050c6230b7b0947bf2c484ed60c40b469de34ae0d7c8c687f363e45ef39934de5663ea04c7478c86c216de6a815bd0cd2d2fbca55ac836206f
|
@@ -3,16 +3,23 @@ module Effective
|
|
3
3
|
layout EffectiveStyleGuide.layout || 'application'
|
4
4
|
|
5
5
|
def show
|
6
|
-
@partials =
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
6
|
+
@partials = if defined?(EffectiveFormInputs)
|
7
|
+
view_paths.map { |path| Dir["#{path}/effective/style_guide_bootstrap3/_**"] }.flatten.map do |path|
|
8
|
+
name = File.basename(path)
|
9
|
+
name[1...name.index('.') || name.length] # remove the _ and .html.haml
|
10
|
+
end.uniq.sort
|
11
|
+
else
|
12
|
+
view_paths.map { |path| Dir["#{path}/effective/style_guide/_**"] }.flatten.map do |path|
|
13
|
+
name = File.basename(path)
|
14
|
+
name[1...name.index('.') || name.length] # remove the _ and .html.haml
|
15
|
+
end.uniq.sort
|
16
|
+
end.reject { |p| p.start_with?('_') } # Remove any double __ partials
|
12
17
|
|
13
18
|
@page_title ||= 'Style Guide'
|
14
19
|
|
15
20
|
EffectiveStyleGuide.authorize!(self, :show, Effective::StyleGuide.new())
|
21
|
+
|
22
|
+
render "effective/style_guide#{'_bootstrap3' if defined?(EffectiveFormInputs)}/show"
|
16
23
|
end
|
17
24
|
|
18
25
|
def bootstrap3
|
@@ -2,10 +2,6 @@ module Effective
|
|
2
2
|
class StyleGuide
|
3
3
|
include ActiveModel::Model
|
4
4
|
|
5
|
-
if defined?(EffectiveAssets)
|
6
|
-
acts_as_asset_box files: 1..6
|
7
|
-
end
|
8
|
-
|
9
5
|
ATTRIBUTES = [
|
10
6
|
:id, :title, :email, :password, :number, :range, :category, :content, :phone, :fax, :cell,
|
11
7
|
:url, :color, :option1, :option2, :option3, :details,
|
@@ -69,11 +69,6 @@
|
|
69
69
|
:collection => EffectiveStyleGuide.foods,
|
70
70
|
:hint => 'please select one food (this is a radio_buttons field)'
|
71
71
|
|
72
|
-
- if defined?(EffectiveAssets)
|
73
|
-
= f.input :files,
|
74
|
-
:as => :asset_box,
|
75
|
-
:hint => 'please upload one or more files (this is an asset_box field from EffectiveAssets)'
|
76
|
-
|
77
72
|
- if defined?(EffectiveFormInputs)
|
78
73
|
= f.input :updated_at,
|
79
74
|
:as => :effective_date_time_picker,
|
@@ -178,11 +173,6 @@
|
|
178
173
|
:collection => EffectiveStyleGuide.foods,
|
179
174
|
:hint => 'please select one food (this is a radio_buttons field)'
|
180
175
|
|
181
|
-
- if defined?(EffectiveAssets)
|
182
|
-
= f.input :files,
|
183
|
-
:as => :asset_box,
|
184
|
-
:hint => 'please upload one or more files (this is an asset_box field from EffectiveAssets)'
|
185
|
-
|
186
176
|
- if defined?(EffectiveFormInputs)
|
187
177
|
= f.input :updated_at,
|
188
178
|
:as => :effective_date_time_picker,
|
@@ -69,11 +69,6 @@
|
|
69
69
|
:collection => EffectiveStyleGuide.foods,
|
70
70
|
:hint => 'please select one food (this is a radio_buttons field)'
|
71
71
|
|
72
|
-
- if defined?(EffectiveAssets)
|
73
|
-
= f.input :files,
|
74
|
-
:as => :asset_box,
|
75
|
-
:hint => 'please upload one or more files (this is an asset_box field from EffectiveAssets)'
|
76
|
-
|
77
72
|
- if defined?(EffectiveFormInputs)
|
78
73
|
= f.input :updated_at,
|
79
74
|
:as => :effective_date_time_picker,
|
@@ -176,9 +171,6 @@
|
|
176
171
|
:collection => EffectiveStyleGuide.foods,
|
177
172
|
:hint => 'please select one food (this is a radio_buttons field)'
|
178
173
|
|
179
|
-
- if defined?(EffectiveAssets)
|
180
|
-
= f.input :files, :as => :asset_box, :hint => 'please upload one or more files (this is an asset_box field from EffectiveAssets)'
|
181
|
-
|
182
174
|
- if defined?(EffectiveFormInputs)
|
183
175
|
= f.input :updated_at,
|
184
176
|
:as => :effective_date_time_picker,
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: effective_style_guide
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.4
|
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: 2018-
|
11
|
+
date: 2018-04-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 4.1.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 4.1.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: faker
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|