e9_vendors 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/app/models/vendor.rb +0 -3
- data/app/models/vendor_member.rb +0 -1
- data/app/views/e9_vendors/vendor_members/_form.html.haml +41 -41
- data/app/views/e9_vendors/vendor_proxies/_form.html.haml +3 -3
- data/app/views/e9_vendors/vendor_proxies/_table.html.haml +1 -1
- data/app/views/e9_vendors/vendor_proxies/_table_row.html.haml +1 -1
- data/app/views/e9_vendors/vendors/_form.html.haml +3 -49
- data/config/locales/e9_vendors.en.yml +2 -0
- data/lib/e9_vendors/version.rb +1 -1
- metadata +2 -2
data/app/models/vendor.rb
CHANGED
@@ -7,12 +7,9 @@ class Vendor < ActiveRecord::Base
|
|
7
7
|
|
8
8
|
validates :name, :presence => true
|
9
9
|
validates :logo, :presence => true
|
10
|
-
validates :contact_email, :presence => true, :email => { :allow_blank => true }
|
11
10
|
validates :sales_email, :presence => true, :email => { :allow_blank => true }
|
12
11
|
validates :short_description, :presence => true
|
13
12
|
validates :long_description, :presence => true
|
14
|
-
validates :discount_percentage, :presence => true, :numericality => { :allow_blank => true, :greater_than_or_equal_to => 0, :less_than => 100 }
|
15
|
-
validates :member_compensation, :presence => true, :numericality => { :allow_blank => true, :greater_than_or_equal_to => 0, :less_than => 100 }
|
16
13
|
validates :landing_page, :presence => true
|
17
14
|
|
18
15
|
mount_uploader :logo, LogoUploader
|
data/app/models/vendor_member.rb
CHANGED
@@ -3,47 +3,47 @@
|
|
3
3
|
.field
|
4
4
|
= f.label :name, nil, :class => :req
|
5
5
|
= f.text_field :name
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
6
|
+
-#.field
|
7
|
+
-#= upload_mount_field(resource.logo, :reset_path => true, :required => true)
|
8
|
+
-#.field
|
9
|
+
-#= f.label :nickname
|
10
|
+
-#= f.text_field :nickname
|
11
|
+
-#.field
|
12
|
+
-#= f.label :address_1
|
13
|
+
-#= f.text_field :address_1
|
14
|
+
-#.field
|
15
|
+
-#= f.label :address_2
|
16
|
+
-#= f.text_field :address_2
|
17
|
+
-#.field
|
18
|
+
-#= f.label :city
|
19
|
+
-#= f.text_field :city
|
20
|
+
-#.field
|
21
|
+
-#= f.label :state
|
22
|
+
-#= f.state_select :state
|
23
|
+
-#.field
|
24
|
+
-#= f.label :zipcode
|
25
|
+
-#= f.text_field :zipcode
|
26
|
+
-#.field
|
27
|
+
-#= f.label :country
|
28
|
+
-#= f.select :country, [["United States", "US"]]
|
29
|
+
-#.field
|
30
|
+
-#= f.label :website
|
31
|
+
-#= f.text_area :website
|
32
|
+
-#.field
|
33
|
+
-#= f.label :contact_email, nil, :class => :req
|
34
|
+
-#= f.text_field :contact_email
|
35
|
+
-#.field
|
36
|
+
-#= f.label :contact_full_name
|
37
|
+
-#= f.text_field :contact_full_name
|
38
|
+
-#.field
|
39
|
+
-#= f.label :contact_title
|
40
|
+
-#= f.text_field :contact_title
|
41
|
+
-#.field
|
42
|
+
-#= f.label :contact_phone
|
43
|
+
-#= f.text_field :contact_phone
|
44
|
+
-#.field
|
45
|
+
-#= f.label :admin_notes
|
46
|
+
-#= f.text_area :admin_notes
|
47
47
|
|
48
48
|
.actions
|
49
49
|
= f.submit
|
@@ -5,9 +5,9 @@
|
|
5
5
|
= f.text_field :discount_code
|
6
6
|
.instructions
|
7
7
|
= e9_t(:vendor_defaults_instructions)
|
8
|
-
|
9
|
-
|
10
|
-
|
8
|
+
-#.field
|
9
|
+
-#= f.label :discount_percentage, resource.label_with_default(:discount_percentage)
|
10
|
+
-#= f.text_field :discount_percentage, :value => resource.send(:read_attribute, :discount_percentage)
|
11
11
|
.field
|
12
12
|
= f.label :landing_page, resource.label_with_default(:landing_page)
|
13
13
|
= f.text_area :landing_page, :value => (resource.send(:read_attribute, :landing_page) || '')
|
@@ -4,7 +4,7 @@
|
|
4
4
|
%th= resource_humanize(:select)
|
5
5
|
%th= resource_humanize(:vendor)
|
6
6
|
%th= resource_humanize(:discount_code)
|
7
|
-
|
7
|
+
-#%th= resource_humanize(:discount_percentage)
|
8
8
|
%th= resource_humanize(:sales_info)
|
9
9
|
%th= e9_t(:actions)
|
10
10
|
%tbody
|
@@ -4,7 +4,7 @@
|
|
4
4
|
= f.check_box :display_on_widget, :class => 'vendor-proxy-widget-display'
|
5
5
|
%td= record.vendor_name
|
6
6
|
%td= record.discount_code
|
7
|
-
|
7
|
+
-#%td= record.discount_percentage
|
8
8
|
%td= record.sales_info_array.join('<br />').html_safe
|
9
9
|
%td.links
|
10
10
|
= link_to e9_t(:view_landing_page), record.landing_page_url, :rel => 'external', :class => 'landing-page'
|
@@ -3,6 +3,9 @@
|
|
3
3
|
.field
|
4
4
|
= f.label :name, nil, :class => :req
|
5
5
|
= f.text_field :name
|
6
|
+
.field
|
7
|
+
= f.label :nickname
|
8
|
+
= f.text_field :nickname
|
6
9
|
%fieldset.checkbox
|
7
10
|
%legend
|
8
11
|
= f.label :vendor_category_id, resource_class.human_attribute_name(:vendor_category), :class => :req
|
@@ -13,48 +16,9 @@
|
|
13
16
|
= label_tag "vendor_category_#{vc.id}", vc.name
|
14
17
|
.field
|
15
18
|
= upload_mount_field(resource.logo, :reset_path => true, :required => true)
|
16
|
-
.field
|
17
|
-
= f.label :nickname
|
18
|
-
= f.text_field :nickname
|
19
|
-
.field
|
20
|
-
= f.label :address_1
|
21
|
-
= f.text_field :address_1
|
22
|
-
.field
|
23
|
-
= f.label :address_2
|
24
|
-
= f.text_field :address_2
|
25
|
-
.field
|
26
|
-
= f.label :city
|
27
|
-
= f.text_field :city
|
28
|
-
.field
|
29
|
-
= f.label :state
|
30
|
-
= f.state_select :state
|
31
|
-
.field
|
32
|
-
= f.label :zipcode
|
33
|
-
= f.text_field :zipcode
|
34
|
-
.field
|
35
|
-
= f.label :country
|
36
|
-
= f.select :country, [["United States", "US"]]
|
37
|
-
.field
|
38
|
-
= f.label :website
|
39
|
-
= f.text_area :website
|
40
|
-
.field
|
41
|
-
= f.label :contact_email, nil, :class => :req
|
42
|
-
= f.text_field :contact_email
|
43
|
-
.field
|
44
|
-
= f.label :contact_full_name
|
45
|
-
= f.text_field :contact_full_name
|
46
|
-
.field
|
47
|
-
= f.label :contact_title
|
48
|
-
= f.text_field :contact_title
|
49
|
-
.field
|
50
|
-
= f.label :contact_phone
|
51
|
-
= f.text_field :contact_phone
|
52
19
|
|
53
20
|
%fieldset
|
54
21
|
%legend= e9_t(:widget_settings_legend)
|
55
|
-
.field.checkbox
|
56
|
-
= f.label :display_on_widget_contact_form
|
57
|
-
= f.check_box :display_on_widget_contact_form
|
58
22
|
.field
|
59
23
|
= f.label :sales_email, nil, :class => :req
|
60
24
|
= f.text_field :sales_email
|
@@ -73,19 +37,9 @@
|
|
73
37
|
.field
|
74
38
|
= help_label(f, :long_description, :key => :interpolation_instructions, :header => 'Variable Help')
|
75
39
|
= f.text_area :long_description
|
76
|
-
.field
|
77
|
-
= f.label :discount_percentage, nil, :class => :req
|
78
|
-
#{f.text_field :discount_percentage}%
|
79
|
-
.field
|
80
|
-
= f.label :member_compensation, nil, :class => :req
|
81
|
-
#{f.text_field :member_compensation}%
|
82
40
|
.field
|
83
41
|
= f.label :landing_page, nil, :class => :req
|
84
42
|
= f.text_area :landing_page
|
85
43
|
|
86
|
-
.field
|
87
|
-
= f.label :admin_notes
|
88
|
-
= f.text_area :admin_notes
|
89
|
-
|
90
44
|
.actions
|
91
45
|
= f.submit
|
data/lib/e9_vendors/version.rb
CHANGED
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: e9_vendors
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.0.
|
5
|
+
version: 0.0.4
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Travis Cox
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-08-
|
13
|
+
date: 2011-08-26 00:00:00 -04:00
|
14
14
|
default_executable:
|
15
15
|
dependencies: []
|
16
16
|
|