e9_crm 0.1.28 → 0.1.29

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,10 +1,11 @@
1
- %fieldset.nested-associations
2
- %legend= f.label(:users)
3
- = render_record_attribute_association(:users, f)
4
- = link_to_add_record_attribute(:users)
5
- .field.checkbox
6
- = f.label :ok_to_email
7
- = f.check_box :ok_to_email
1
+ .email-wrapper
2
+ %fieldset.nested-associations
3
+ %legend= f.label(:users)
4
+ .field.checkbox
5
+ = f.label :ok_to_email
6
+ = f.check_box :ok_to_email
7
+ = render_record_attribute_association(:users, f)
8
+ = link_to_add_record_attribute(:users)
8
9
 
9
10
  %fieldset.contact-standard-fields
10
11
  %legend= e9_t(:form_legend_standard)
@@ -1,38 +1,44 @@
1
1
  - if resource.users.any?
2
2
  .contact-emails
3
- %label= Contact.human_attribute_name(:users)
4
- - resource.users.each do |user|
5
- .contact-email
6
- -#= '* ' if contact_user_subscribed_to_newsletter?(user)
7
- = link_to(user.email, "mailto:#{user.email}", 'data-contact-id' => resource.id, 'data-user-id' => user.id, :class => 'contact-mailto')
8
- = "(#{user.options.type})" if user.options.type
9
- = "(primary)" if user.primary?
3
+ %fieldset
4
+ %legend= Contact.human_attribute_name(:users)
5
+ - resource.users.each do |user|
6
+ .contact-email
7
+ -#= '* ' if contact_user_subscribed_to_newsletter?(user)
8
+ = link_to(user.email, "mailto:#{user.email}", 'data-contact-id' => resource.id, 'data-user-id' => user.id, :class => 'contact-mailto')
9
+ = "(#{user.options.type})" if user.options.type
10
+ = "(primary)" if user.primary?
10
11
 
11
12
  - if resource.phone_number_attributes.any?
12
13
  .contact-phone-numbers
13
- %label= Contact.human_attribute_name(:phone_number_attributes)
14
- - resource.phone_number_attributes.each do |phone_number_attribute|
15
- .contact-phone-number= phone_number_attribute
14
+ %fieldset
15
+ %legend= Contact.human_attribute_name(:phone_number_attributes)
16
+ - resource.phone_number_attributes.each do |phone_number_attribute|
17
+ .contact-phone-number= phone_number_attribute
16
18
 
17
19
  - if resource.instant_messaging_handle_attributes.any?
18
20
  .contact-im-handles
19
- %label= Contact.human_attribute_name(:instant_messaging_handle_attributes)
20
- - resource.instant_messaging_handle_attributes.each do |instant_messaging_handle_attribute|
21
- .contact-im-handle= instant_messaging_handle_attribute
21
+ %fieldset
22
+ %legend= Contact.human_attribute_name(:instant_messaging_handle_attributes)
23
+ - resource.instant_messaging_handle_attributes.each do |instant_messaging_handle_attribute|
24
+ .contact-im-handle= instant_messaging_handle_attribute
22
25
 
23
26
  - if resource.website_attributes.any?
24
27
  .contact-websites
25
- %label= Contact.human_attribute_name(:website_attributes)
26
- - resource.website_attributes.each do |website_attribute|
27
- .contact-website
28
- = website_attribute.to_s
28
+ %fieldset
29
+ %legend= Contact.human_attribute_name(:website_attributes)
30
+ - resource.website_attributes.each do |website_attribute|
31
+ .contact-website
32
+ = website_attribute.to_s
29
33
 
30
34
  - if resource.address_attributes.any?
31
35
  .contact-addresses
32
- %label= Contact.human_attribute_name(:address_attributes)
33
- - resource.address_attributes.each do |address_attribute|
34
- .contact-address
35
- .address
36
- = address_attribute.to_s
37
- .actions
38
- = address_attribute.link
36
+ %fieldset
37
+ %legend= Contact.human_attribute_name(:address_attributes)
38
+ - resource.address_attributes.each do |address_attribute|
39
+ .contact-address
40
+ .actions
41
+ = address_attribute.link
42
+ .address
43
+ = address_attribute.to_s
44
+
@@ -1,84 +1,90 @@
1
1
  .contact-body
2
2
  = title resource.name
3
+ .toolbar.showcontact
4
+ .toolbar-left
5
+ .contact-photo
6
+ %img{:src => resource.avatar_url, :alt => "Avatar for #{resource.name}"}
7
+ = render 'who', :record => resource, :hide_name => true
3
8
 
4
- .contact-photo
5
- %img{:src => resource.avatar_url, :alt => "Avatar for #{resource.name}"}
9
+ .toolbar-middle
10
+ %fieldset
11
+ %legend="Filters"#e9_t(:search_options_legend)
12
+ - if (tags = resource.tags(:show_all => true)).present?
13
+ .contact-tags
14
+ %label #{Tag.model_name.human.pluralize}:
15
+ = contact_tag_list(tags.sort)
6
16
 
7
- = render 'who', :record => resource, :hide_name => true
17
+ .toolbar-right
18
+ %fieldset
19
+ %legend="Manage"#e9_t(:search_options_legend)
20
+ .contact-links.actions
21
+ = link_to_edit_resource(resource)
22
+ = link_to "View Activity", page_views_url(:contact => resource.id)
23
+ = google_search_link(resource.name)
24
+ = google_news_link(resource.name)
8
25
 
9
- .contact-links.actions
10
- = link_to_edit_resource(resource)
11
- = link_to "View Activity", page_views_url(:contact => resource.id)
12
- = google_search_link(resource.name)
13
- = google_news_link(resource.name)
26
+ .admin-content-main
27
+ - if company = resource.company
28
+ .contact-company
29
+ %fieldset
30
+ %legend.contact-subheader= company.name
31
+ - if company.info.present?
32
+ = k(company.info)
14
33
 
15
- - if (tags = resource.tags(:show_all => true)).present?
16
- .contact-tags
17
- %label #{Tag.model_name.human.pluralize}:
18
- = contact_tag_list(tags.sort)
34
+ .contact-info
35
+ %fieldset
36
+ %legend #{Contact.human_attribute_name(:info)}:
37
+ = resource.info.present? && k(resource.info) || t(:none)
19
38
 
20
- .contact-info
21
- %label #{Contact.human_attribute_name(:info)}:
22
- = resource.info.present? && k(resource.info) || t(:none)
23
-
24
- - if company = resource.company
25
- .contact-company
39
+ .contact-deals
26
40
  %h2
27
- %span.contact-subheader= company.name
41
+ %span.contact-subheader Deals
28
42
  %span.contact-actions
29
- = google_search_link(company.name)
30
- = google_news_link(company.name)
31
- - if company.info.present?
32
- = k(company.info)
33
-
34
- .contact-deals
35
- %h2
36
- %span.contact-subheader Deals
37
- %span.contact-actions
38
- = link_to_new_resource(Deal, :deal => { :contact_ids => [resource.id] })
39
-
40
- %table
41
- %thead
42
- %tr
43
- %th= Deal.human_attribute_name(:status)
44
- %th= Deal.human_attribute_name(:name)
45
- %th= Deal.human_attribute_name(:value)
43
+ = link_to_new_resource(Deal, :deal => { :contact_ids => [resource.id] })
46
44
 
47
- %tbody
48
- - if (deals = resource.associated_deals.leads(false)).blank?
45
+ %table
46
+ %thead
49
47
  %tr
50
- %td{:colspan => 3}= resource_humanize(:no_deals)
51
- - else
52
- - deals.each do |deal|
48
+ %th= Deal.human_attribute_name(:status)
49
+ %th= Deal.human_attribute_name(:name)
50
+ %th= Deal.human_attribute_name(:value)
51
+
52
+ %tbody
53
+ - if (deals = resource.associated_deals.leads(false)).blank?
53
54
  %tr
54
- %td.contact-deal-name
55
- = link_to deal.name, deal
56
- %td.contact-deal-status
57
- = deal.status
58
- %td.contact-deal-value
59
- = deal.value.format
55
+ %td{:colspan => 3}= resource_humanize(:no_deals)
56
+ - else
57
+ - deals.each do |deal|
58
+ %tr
59
+ %td.contact-deal-name
60
+ = link_to deal.name, deal
61
+ %td.contact-deal-status
62
+ = deal.status
63
+ %td.contact-deal-value
64
+ = deal.value.format
60
65
 
61
- .contact.leads
62
- %h2
63
- %span.contact-subheader Leads
66
+ .contact.leads
67
+ %h2
68
+ %span.contact-subheader Leads
64
69
 
65
- %table
66
- %thead
67
- %tr
68
- %th= Deal.human_attribute_name(:created_at)
69
- %th= Deal.human_attribute_name(:offer_name)
70
-
71
- %tbody
72
- - if (leads = resource.associated_deals.leads).blank?
70
+ %table
71
+ %thead
73
72
  %tr
74
- %td{:colspan => 2}= resource_humanize(:no_leads)
75
- - else
76
- - leads.each do |lead|
73
+ %th= Deal.human_attribute_name(:created_at)
74
+ %th= Deal.human_attribute_name(:offer_name)
75
+
76
+ %tbody
77
+ - if (leads = resource.associated_deals.leads).blank?
77
78
  %tr
78
- %td.contact-lead-created-at
79
- = l(lead.created_at)
80
- %td.contact-lead-name
81
- = link_to lead.offer_name, edit_deal_path(lead)
79
+ %td{:colspan => 2}= resource_humanize(:no_leads)
80
+ - else
81
+ - leads.each do |lead|
82
+ %tr
83
+ %td.contact-lead-created-at
84
+ = l(lead.created_at)
85
+ %td.contact-lead-name
86
+ = link_to lead.offer_name, edit_deal_path(lead)
82
87
 
83
- .contact-sidebar
84
- = render 'sidebar'
88
+ .admin-sidebar-right
89
+ .contact-sidebar
90
+ = render 'sidebar'
@@ -1,24 +1,27 @@
1
1
  .record-attribute.nested-association
2
- = f.hidden_field :role
2
+ = f.fields_for f.object.options do |ff|
3
+
4
+ = f.hidden_field :role
5
+
6
+ .field.controls
7
+ .field.radio
8
+ = ff.hidden_field :primary, :value => false
9
+ = ff.label :primary_true, ff.object.class.human_attribute_name(:primary)
10
+ = ff.radio_button :primary, true
3
11
 
4
- - if f.object.persisted?
5
- = f.hidden_field :id
6
- = f.hidden_field :_destroy, :value => 0
7
- .field.contact-email
8
- <input type="hidden" value="#{f.object.email}"/>
9
- = f.object.email
10
- - else
11
- .field.contact-email
12
- = f.text_field :email
12
+ = link_to_destroy_record_attribute
13
+
14
+ - if f.object.persisted?
15
+ = f.hidden_field :id
16
+ = f.hidden_field :_destroy, :value => 0
17
+ .field.contact-email
18
+ <input type="hidden" value="#{f.object.email}"/>
19
+ = f.object.email
20
+ - else
21
+ .field.contact-email
22
+ = f.text_field :email
13
23
 
14
- = f.fields_for f.object.options do |ff|
24
+
15
25
  - if (types = User.email_types).present?
16
26
  .field
17
27
  = ff.select :type, types
18
- .field.radio
19
- = ff.hidden_field :primary, :value => false
20
- = ff.label :primary_true, ff.object.class.human_attribute_name(:primary)
21
- = ff.radio_button :primary, true
22
-
23
- -#- if f.object.prospect?
24
- = link_to_destroy_record_attribute
@@ -1,3 +1,3 @@
1
1
  module E9Crm
2
- VERSION = '0.1.28'
2
+ VERSION = '0.1.29'
3
3
  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.28
4
+ version: 0.1.29
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-07 00:00:00.000000000Z
12
+ date: 2011-10-11 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: money
16
- requirement: &10401800 !ruby/object:Gem::Requirement
16
+ requirement: &23190800 !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: *10401800
24
+ version_requirements: *23190800
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: kramdown
27
- requirement: &10401260 !ruby/object:Gem::Requirement
27
+ requirement: &23189200 !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: *10401260
35
+ version_requirements: *23189200
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