e9_crm 0.1.29 → 0.1.30
Sign up to get free protection for your applications and to get access to all the features.
- data/app/controllers/e9_crm/contacts_controller.rb +1 -0
- data/app/models/contact.rb +1 -0
- data/app/views/e9_crm/contacts/_sidebar_search_form.html.haml +6 -0
- data/app/views/record_attributes/_user.html.haml +4 -1
- data/lib/e9_crm/version.rb +1 -1
- data/lib/generators/e9_crm/templates/migration.rb +1 -1
- metadata +6 -6
@@ -16,6 +16,7 @@ class E9Crm::ContactsController < E9Crm::ResourcesController
|
|
16
16
|
has_scope :search, :by_title, :by_company, :only => :index
|
17
17
|
has_scope :tagged, :only => :index, :type => :array
|
18
18
|
has_scope :by_company, :as => :company, :only => :index
|
19
|
+
has_scope :bounced_primary_emails, :as => :bounced, :type => :boolean
|
19
20
|
|
20
21
|
# record attributes templates js
|
21
22
|
#caches_action :templates
|
data/app/models/contact.rb
CHANGED
@@ -152,6 +152,7 @@ class Contact < ActiveRecord::Base
|
|
152
152
|
scope :contacts, lambda { where(:status => Status::Contact) }
|
153
153
|
scope :ordered, lambda { order(arel_table[:first_name].asc) }
|
154
154
|
|
155
|
+
scope :bounced_primary_emails, lambda { joins(:users).merge(User.primary.has_bounced) }
|
155
156
|
scope :ok_to_email, lambda { where(:ok_to_email => true) }
|
156
157
|
scope :by_title, lambda {|val| where(:title => val) }
|
157
158
|
scope :by_company, lambda {|val| where(:company_id => val) }
|
@@ -11,6 +11,12 @@
|
|
11
11
|
%select{:name => 'company', :id => 'contact_company_select'}
|
12
12
|
= company_select_options
|
13
13
|
|
14
|
+
= form_tag(resource_class, :method => :get, :class => 'scope-selects field') do
|
15
|
+
= label_tag 'bounced_select', User.human_attribute_name(:has_bounced)
|
16
|
+
%select{:name => 'bounced', :id => 'bounced_select'}
|
17
|
+
%option{:value => nil} No
|
18
|
+
%option{:value => '1'} Yes
|
19
|
+
|
14
20
|
.field#contact_tag_list
|
15
21
|
%label{:for => 'contact_tag_autocomplete'} Tags
|
16
22
|
%input#contact_tag_autocomplete.list{:type => 'text', 'data-iname' => 'contact', 'data-field' => '[tagged]', :placeholder => t(:tag_search_placeholder)}
|
@@ -9,6 +9,10 @@
|
|
9
9
|
= ff.label :primary_true, ff.object.class.human_attribute_name(:primary)
|
10
10
|
= ff.radio_button :primary, true
|
11
11
|
|
12
|
+
- if f.object.has_bounced?
|
13
|
+
.field.radio.bad-email-flag
|
14
|
+
= User.human_attribute_name(:has_bounced_flag)
|
15
|
+
|
12
16
|
= link_to_destroy_record_attribute
|
13
17
|
|
14
18
|
- if f.object.persisted?
|
@@ -20,7 +24,6 @@
|
|
20
24
|
- else
|
21
25
|
.field.contact-email
|
22
26
|
= f.text_field :email
|
23
|
-
|
24
27
|
|
25
28
|
- if (types = User.email_types).present?
|
26
29
|
.field
|
data/lib/e9_crm/version.rb
CHANGED
@@ -56,7 +56,7 @@ class CreateE9CrmStructure < ActiveRecord::Migration
|
|
56
56
|
t.string :name
|
57
57
|
t.references :campaign_group, :affiliate, :sales_person
|
58
58
|
t.string :code, :limit => 32
|
59
|
-
t.integer :affiliate_fee, :sales_fee, :
|
59
|
+
t.integer :affiliate_fee, :sales_fee, :default => 0
|
60
60
|
t.boolean :active, :default => true
|
61
61
|
t.timestamps
|
62
62
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: e9_crm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.30
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2011-10-
|
12
|
+
date: 2011-10-12 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: money
|
16
|
-
requirement: &
|
16
|
+
requirement: &13982540 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *13982540
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: kramdown
|
27
|
-
requirement: &
|
27
|
+
requirement: &13981380 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ~>
|
@@ -32,7 +32,7 @@ dependencies:
|
|
32
32
|
version: '0.13'
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *13981380
|
36
36
|
description: ! "*NOTE his plugin requires the private e9_base CMS gem and WILL NOT
|
37
37
|
WORK without it.*\n\nCRM Plugin for the e9 CMS\n=========================\n\nTo
|
38
38
|
use, add as a gem and install by running:\n\n rails g e9_crm:install\n\nThen
|