effective_style_guide 1.2.0 → 1.3.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/effective/style_guide.rb +6 -1
- data/app/views/effective/style_guide/_form_horizontal.html.haml +22 -8
- data/app/views/effective/style_guide/_form_inline.html.haml +11 -2
- data/app/views/effective/style_guide/_form_vertical.html.haml +24 -10
- data/lib/effective_style_guide/version.rb +1 -1
- data/lib/effective_style_guide.rb +8 -0
- 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: e9247fa86e4242f37a1bf4fc04b11443e6f395ba
|
4
|
+
data.tar.gz: 4bef82aeac5e7335224371463172a210d7649897
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d52e2ad4df0adcd1fe20b89c87fcdf43cca58ba237e8c561a8cbf1de82ef24ec422cbf9fb48f712fbf0ae4c474694deff58432d556f0f772b9b1eb3a6d3d0fc7
|
7
|
+
data.tar.gz: 7b50f30022917b85a8becdf96edcb33a9bd011e0e7d64e6d23d01d3794269c9adc9023885b7036d370c0b61bc036271dea2548962a0e3bbfb66b56f182b500bd
|
@@ -7,7 +7,12 @@ module Effective
|
|
7
7
|
end
|
8
8
|
|
9
9
|
def self.column(name, sql_type = nil, default = nil, null = true)
|
10
|
-
|
10
|
+
if Rails.version >= '4.2.0'
|
11
|
+
cast_type = "ActiveRecord::Type::#{sql_type.to_s.titleize.sub('Datetime', 'DateTime')}".constantize.new()
|
12
|
+
columns << ::ActiveRecord::ConnectionAdapters::Column.new(name.to_s, default, cast_type, sql_type.to_s, null)
|
13
|
+
else
|
14
|
+
columns << ::ActiveRecord::ConnectionAdapters::Column.new(name.to_s, default, sql_type.to_s, null)
|
15
|
+
end
|
11
16
|
end
|
12
17
|
|
13
18
|
column :id, :integer
|
@@ -4,13 +4,20 @@
|
|
4
4
|
= f.input :password, :hint => 'please enter a password (this is a password field)'
|
5
5
|
= f.input :number, :hint => 'please enter a number (this is a number field)'
|
6
6
|
= f.input :range, :as => :range, :hint => 'please enter a number range (this is a range field)'
|
7
|
-
|
8
|
-
|
9
|
-
|
7
|
+
|
8
|
+
- if defined?(EffectiveFormInputs)
|
9
|
+
= f.input :category, :as => :effective_select, :collection => EffectiveStyleGuide.colors, :hint => 'please select a category (this is an effective_select from EffectiveFormInputs)', :placeholder => 'Please choose a category'
|
10
|
+
= f.input :category, :as => :effective_select, :collection => EffectiveStyleGuide.colors, :hint => 'please select multiple categories (this is an effective_select from EffectiveFormInputs)', :placeholder => 'Please choose multiple categories', :multiple => true
|
11
|
+
= f.input :category, :as => :effective_select, :collection => EffectiveStyleGuide.colors, :hint => 'please create or select multiple tags (this is an effective_select from EffectiveFormInputs)', :placeholder => 'Create or select multiple tags', :multiple => true, :tags => true
|
12
|
+
- else
|
13
|
+
= f.input :category, :as => :select, :collection => EffectiveStyleGuide.colors, :hint => 'please select a category (this is a select field)'
|
14
|
+
|
15
|
+
= f.input :drink, :as => :check_boxes, :wrapper => :horizontal_inline_radio_and_checkboxes, :collection => EffectiveStyleGuide.foods, :hint => 'please select one or more drinks (this is a check_boxes :wrapper => :horizontal_inline_radio_and_checkboxes field)'
|
16
|
+
= f.input :food, :as => :radio_buttons, :wrapper => :horizontal_inline_radio_and_checkboxes, :collection => EffectiveStyleGuide.foods, :hint => 'please select one food (this is a radio_buttons :wrapper => :horizontal_inline_radio_and_checkboxes field)'
|
10
17
|
= f.input :content, :hint => 'please enter a whole bunch of content (this is a textarea)'
|
11
18
|
= f.input :archived, :hint => 'please select true or false (this is a boolean field)'
|
12
|
-
= f.input :drink, :as => :check_boxes, :collection =>
|
13
|
-
= f.input :food, :as => :radio_buttons, :collection =>
|
19
|
+
= f.input :drink, :as => :check_boxes, :collection => EffectiveStyleGuide.foods, :hint => 'please select one or more drinks (this is a check_boxes field)'
|
20
|
+
= f.input :food, :as => :radio_buttons, :collection => EffectiveStyleGuide.foods, :hint => 'please select one food (this is a radio_buttons field)'
|
14
21
|
|
15
22
|
- if defined?(EffectiveAssets)
|
16
23
|
= f.input :files, :as => :asset_box, :hint => 'please upload one or more files (this is an asset_box field from EffectiveAssets)'
|
@@ -38,13 +45,20 @@
|
|
38
45
|
= f.input :password, :hint => 'please enter a password (this is a password field)'
|
39
46
|
= f.input :number, :hint => 'please enter a number (this is a number field)'
|
40
47
|
= f.input :range, :as => :range, :hint => 'please enter a number range (this is a range field)'
|
41
|
-
|
48
|
+
|
49
|
+
- if defined?(EffectiveFormInputs)
|
50
|
+
= f.input :category, :as => :effective_select, :collection => EffectiveStyleGuide.colors, :hint => 'please select a category (this is an effective_select from EffectiveFormInputs)', :placeholder => 'Please choose a category'
|
51
|
+
= f.input :category, :as => :effective_select, :collection => EffectiveStyleGuide.colors, :hint => 'please select multiple categories (this is an effective_select from EffectiveFormInputs)', :placeholder => 'Please choose multiple categories', :multiple => true
|
52
|
+
= f.input :category, :as => :effective_select, :collection => EffectiveStyleGuide.colors, :hint => 'please create or select multiple tags (this is an effective_select from EffectiveFormInputs)', :placeholder => 'Create or select multiple tags', :multiple => true, :tags => true
|
53
|
+
- else
|
54
|
+
= f.input :category, :as => :select, :collection => EffectiveStyleGuide.colors, :hint => 'please select a category (this is a select field)'
|
55
|
+
|
42
56
|
= f.input :drink, :as => :check_boxes, :wrapper => :horizontal_inline_radio_and_checkboxes, :collection => ['Water', 'Tea', 'Coffee', 'Soda'], :hint => 'please select one or more drinks (this is a check_boxes :wrapper => :horizontal_inline_radio_and_checkboxes field)'
|
43
57
|
= f.input :food, :as => :radio_buttons, :wrapper => :horizontal_inline_radio_and_checkboxes, :collection => ['Pasta', 'Rice', 'Potato', 'Couscous'], :hint => 'please select one food (this is a radio_buttons :wrapper => :horizontal_inline_radio_and_checkboxes field)'
|
44
58
|
= f.input :content, :hint => 'please enter a whole bunch of content (this is a textarea)'
|
45
59
|
= f.input :archived, :wrapper => :horizontal_boolean, :hint => 'please select true or false (this is a boolean field)'
|
46
|
-
= f.input :drink, :wrapper => :horizontal_radio_and_checkboxes, :as => :check_boxes, :collection =>
|
47
|
-
= f.input :food, :wrapper => :horizontal_radio_and_checkboxes, :as => :radio_buttons, :collection =>
|
60
|
+
= f.input :drink, :wrapper => :horizontal_radio_and_checkboxes, :as => :check_boxes, :collection => EffectiveStyleGuide.foods, :hint => 'please select one or more drinks (this is a check_boxes field)'
|
61
|
+
= f.input :food, :wrapper => :horizontal_radio_and_checkboxes, :as => :radio_buttons, :collection => EffectiveStyleGuide.foods, :hint => 'please select one food (this is a radio_buttons field)'
|
48
62
|
|
49
63
|
- if defined?(EffectiveAssets)
|
50
64
|
= f.input :files, :as => :asset_box, :hint => 'please upload one or more files (this is an asset_box field from EffectiveAssets)'
|
@@ -1,7 +1,10 @@
|
|
1
1
|
= simple_form_for Effective::StyleGuide.new(), :html => {:class => 'form-inline'}, :wrapper => :inline_form, :url => '/' do |f|
|
2
2
|
= f.input :title, :placeholder => 'Enter title'
|
3
3
|
= f.input :email, :placeholder => 'Enter email'
|
4
|
-
|
4
|
+
- if defined?(EffectiveFormInputs)
|
5
|
+
= f.input :category, :as => :effective_select, :collection => EffectiveStyleGuide.colors
|
6
|
+
- else
|
7
|
+
= f.input :category, :as => :select, :collection => EffectiveStyleGuide.colors
|
5
8
|
= f.input :archived
|
6
9
|
= f.button :submit
|
7
10
|
|
@@ -11,6 +14,12 @@
|
|
11
14
|
= simple_form_for Effective::StyleGuide.new().tap { |s| s.valid? }, :html => {:class => 'form-inline'}, :wrapper => :inline_form, :url => '/' do |f|
|
12
15
|
= f.input :title, :placeholder => 'Enter title'
|
13
16
|
= f.input :email, :placeholder => 'Enter email'
|
14
|
-
|
17
|
+
- if defined?(EffectiveFormInputs)
|
18
|
+
= f.input :category, :as => :effective_select, :collection => EffectiveStyleGuide.colors
|
19
|
+
- else
|
20
|
+
= f.input :category, :as => :select, :collection => EffectiveStyleGuide.colors
|
15
21
|
= f.input :archived
|
16
22
|
= f.button :submit
|
23
|
+
|
24
|
+
|
25
|
+
|
@@ -4,13 +4,20 @@
|
|
4
4
|
= f.input :password, :hint => 'please enter a password (this is a password field)'
|
5
5
|
= f.input :number, :hint => 'please enter a number (this is a number field)'
|
6
6
|
= f.input :range, :as => :range, :hint => 'please enter a number range (this is a range field)'
|
7
|
-
|
8
|
-
|
9
|
-
|
7
|
+
|
8
|
+
- if defined?(EffectiveFormInputs)
|
9
|
+
= f.input :category, :as => :effective_select, :collection => EffectiveStyleGuide.colors, :hint => 'please select a category (this is an effective_select from EffectiveFormInputs)', :placeholder => 'Please choose a category'
|
10
|
+
= f.input :category, :as => :effective_select, :collection => EffectiveStyleGuide.colors, :hint => 'please select multiple categories (this is an effective_select from EffectiveFormInputs)', :placeholder => 'Please choose multiple categories', :multiple => true
|
11
|
+
= f.input :category, :as => :effective_select, :collection => EffectiveStyleGuide.colors, :hint => 'please create or select multiple tags (this is an effective_select from EffectiveFormInputs)', :placeholder => 'Create or select multiple tags', :multiple => true, :tags => true
|
12
|
+
- else
|
13
|
+
= f.input :category, :as => :select, :collection => EffectiveStyleGuide.colors, :hint => 'please select a category (this is a select field)'
|
14
|
+
|
15
|
+
= f.input :drink, :as => :check_boxes, :wrapper => :vertical_inline_radio_and_checkboxes, :collection => EffectiveStyleGuide.foods, :hint => 'please select one or more drinks (this is a check_boxes :wrapper => :vertical_inline_radio_and_checkboxes field)'
|
16
|
+
= f.input :food, :as => :radio_buttons, :wrapper => :vertical_inline_radio_and_checkboxes, :collection => EffectiveStyleGuide.foods, :hint => 'please select one food (this is a radio_buttons :wrapper => :vertical_inline_radio_and_checkboxes field)'
|
10
17
|
= f.input :content, :hint => 'please enter a whole bunch of content (this is a textarea)'
|
11
18
|
= f.input :archived, :hint => 'please select true or false (this is a boolean field)'
|
12
|
-
= f.input :drink, :as => :check_boxes, :collection =>
|
13
|
-
= f.input :food, :as => :radio_buttons, :collection =>
|
19
|
+
= f.input :drink, :as => :check_boxes, :collection => EffectiveStyleGuide.foods, :hint => 'please select one or more drinks (this is a check_boxes field)'
|
20
|
+
= f.input :food, :as => :radio_buttons, :collection => EffectiveStyleGuide.foods, :hint => 'please select one food (this is a radio_buttons field)'
|
14
21
|
|
15
22
|
- if defined?(EffectiveAssets)
|
16
23
|
= f.input :files, :as => :asset_box, :hint => 'please upload one or more files (this is an asset_box field from EffectiveAssets)'
|
@@ -37,13 +44,20 @@
|
|
37
44
|
= f.input :password, :hint => 'please enter a password (this is a password field)'
|
38
45
|
= f.input :number, :hint => 'please enter a number (this is a number field)'
|
39
46
|
= f.input :range, :as => :range, :hint => 'please enter a number range (this is a range field)'
|
40
|
-
|
41
|
-
|
42
|
-
|
47
|
+
|
48
|
+
- if defined?(EffectiveFormInputs)
|
49
|
+
= f.input :category, :as => :effective_select, :collection => EffectiveStyleGuide.colors, :hint => 'please select a category (this is an effective_select from EffectiveFormInputs)', :placeholder => 'Please choose a category'
|
50
|
+
= f.input :category, :as => :effective_select, :collection => EffectiveStyleGuide.colors, :hint => 'please select multiple categories (this is an effective_select from EffectiveFormInputs)', :placeholder => 'Please choose multiple categories', :multiple => true
|
51
|
+
= f.input :category, :as => :effective_select, :collection => EffectiveStyleGuide.colors, :hint => 'please create or select multiple tags (this is an effective_select from EffectiveFormInputs)', :placeholder => 'Create or select multiple tags', :multiple => true, :tags => true
|
52
|
+
- else
|
53
|
+
= f.input :category, :as => :select, :collection => EffectiveStyleGuide.colors, :hint => 'please select a category (this is a select field)'
|
54
|
+
|
55
|
+
= f.input :drink, :as => :check_boxes, :wrapper => :vertical_inline_radio_and_checkboxes, :collection => EffectiveStyleGuide.foods, :hint => 'please select one or more drinks (this is a check_boxes :wrapper => :vertical_inline_radio_and_checkboxes field)'
|
56
|
+
= f.input :food, :as => :radio_buttons, :wrapper => :vertical_inline_radio_and_checkboxes, :collection => EffectiveStyleGuide.foods, :hint => 'please select one food (this is a radio_buttons :wrapper => :vertical_inline_radio_and_checkboxes field)'
|
43
57
|
= f.input :content, :hint => 'please enter a whole bunch of content (this is a textarea)'
|
44
58
|
= f.input :archived, :hint => 'please select true or false (this is a boolean field)'
|
45
|
-
= f.input :drink, :as => :check_boxes, :collection =>
|
46
|
-
= f.input :food, :as => :radio_buttons, :collection =>
|
59
|
+
= f.input :drink, :as => :check_boxes, :collection => EffectiveStyleGuide.foods, :hint => 'please select one or more drinks (this is a check_boxes field)'
|
60
|
+
= f.input :food, :as => :radio_buttons, :collection => EffectiveStyleGuide.foods, :hint => 'please select one food (this is a radio_buttons field)'
|
47
61
|
|
48
62
|
- if defined?(EffectiveAssets)
|
49
63
|
= f.input :files, :as => :asset_box, :hint => 'please upload one or more files (this is an asset_box field from EffectiveAssets)'
|
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: 1.
|
4
|
+
version: 1.3.0
|
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-
|
11
|
+
date: 2015-05-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|