fat_free_crm 0.19.2 → 0.20.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of fat_free_crm might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/.github/workflows/brakeman-analysis.yml +46 -0
- data/.github/workflows/rubocop-analysis.yml +40 -0
- data/.github/workflows/ruby.yml +52 -0
- data/.rubocop_todo.yml +49 -43
- data/.travis.yml +1 -20
- data/CHANGELOG.md +13 -0
- data/Gemfile +9 -5
- data/Gemfile.lock +163 -119
- data/README.md +4 -3
- data/SECURITY.md +11 -0
- data/app/assets/javascripts/application.js.erb +3 -0
- data/app/assets/stylesheets/application.css.erb +1 -0
- data/app/assets/stylesheets/base.scss +9 -2
- data/app/assets/stylesheets/bootstrap-custom.scss +206 -0
- data/app/assets/stylesheets/common.scss +87 -67
- data/app/assets/stylesheets/header.scss +0 -8
- data/app/controllers/admin/field_groups_controller.rb +1 -1
- data/app/controllers/admin/fields_controller.rb +1 -1
- data/app/controllers/admin/groups_controller.rb +1 -1
- data/app/controllers/admin/tags_controller.rb +2 -2
- data/app/controllers/admin/users_controller.rb +2 -1
- data/app/controllers/application_controller.rb +10 -0
- data/app/controllers/comments_controller.rb +1 -1
- data/app/controllers/entities/accounts_controller.rb +1 -1
- data/app/controllers/entities/campaigns_controller.rb +1 -1
- data/app/controllers/home_controller.rb +3 -1
- data/app/controllers/lists_controller.rb +1 -1
- data/app/controllers/tasks_controller.rb +3 -3
- data/app/controllers/users_controller.rb +3 -1
- data/app/helpers/accounts_helper.rb +12 -0
- data/app/helpers/application_helper.rb +3 -5
- data/app/helpers/tasks_helper.rb +2 -2
- data/app/models/entities/account.rb +1 -1
- data/app/models/entities/account_contact.rb +1 -1
- data/app/models/entities/account_opportunity.rb +1 -1
- data/app/models/entities/campaign.rb +1 -1
- data/app/models/entities/contact.rb +1 -1
- data/app/models/entities/lead.rb +1 -1
- data/app/models/entities/opportunity.rb +1 -1
- data/app/models/fields/custom_field_pair.rb +2 -2
- data/app/models/observers/opportunity_observer.rb +1 -1
- data/app/models/polymorphic/address.rb +1 -1
- data/app/models/polymorphic/comment.rb +1 -1
- data/app/models/polymorphic/email.rb +1 -1
- data/app/models/polymorphic/task.rb +1 -1
- data/app/models/setting.rb +4 -2
- data/app/models/users/preference.rb +2 -2
- data/app/models/users/user.rb +2 -2
- data/app/views/accounts/_edit.html.haml +2 -2
- data/app/views/accounts/_new.html.haml +2 -2
- data/app/views/accounts/_sidebar_index.html.haml +2 -2
- data/app/views/accounts/_sidebar_show.html.haml +19 -19
- data/app/views/accounts/create.js.haml +1 -2
- data/app/views/accounts/destroy.js.haml +1 -1
- data/app/views/accounts/show.html.haml +1 -0
- data/app/views/accounts/update.js.haml +2 -3
- data/app/views/admin/field_groups/create.js.haml +0 -1
- data/app/views/admin/field_groups/destroy.js.haml +0 -1
- data/app/views/admin/field_groups/update.js.haml +0 -1
- data/app/views/admin/fields/create.js.haml +0 -1
- data/app/views/admin/fields/destroy.js.haml +0 -1
- data/app/views/admin/fields/update.js.haml +0 -1
- data/app/views/admin/groups/create.js.haml +0 -1
- data/app/views/admin/groups/destroy.js.haml +0 -1
- data/app/views/admin/groups/update.js.haml +0 -1
- data/app/views/admin/tags/create.js.haml +0 -1
- data/app/views/admin/tags/destroy.js.haml +0 -1
- data/app/views/admin/tags/update.js.haml +0 -1
- data/app/views/admin/users/create.js.haml +0 -1
- data/app/views/admin/users/destroy.js.haml +0 -1
- data/app/views/admin/users/update.js.haml +0 -1
- data/app/views/campaigns/_edit.html.haml +1 -1
- data/app/views/campaigns/_new.html.haml +1 -1
- data/app/views/campaigns/_sidebar_index.html.haml +2 -2
- data/app/views/campaigns/_sidebar_show.html.haml +68 -67
- data/app/views/campaigns/create.js.haml +1 -2
- data/app/views/campaigns/destroy.js.haml +1 -1
- data/app/views/campaigns/show.html.haml +1 -0
- data/app/views/campaigns/update.js.haml +3 -4
- data/app/views/comments/_edit.html.haml +1 -1
- data/app/views/comments/_new.html.haml +1 -1
- data/app/views/comments/update.js.haml +0 -1
- data/app/views/contacts/_edit.html.haml +1 -1
- data/app/views/contacts/_new.html.haml +1 -1
- data/app/views/contacts/_sidebar_show.html.haml +18 -18
- data/app/views/contacts/create.js.haml +0 -1
- data/app/views/contacts/destroy.js.haml +1 -1
- data/app/views/contacts/show.html.haml +1 -0
- data/app/views/contacts/update.js.haml +2 -3
- data/app/views/entities/_title_bar.html.haml +1 -1
- data/app/views/entities/attach.js.haml +2 -2
- data/app/views/entities/discard.js.haml +2 -2
- data/app/views/home/_opportunity.html.haml +1 -1
- data/app/views/home/_task.html.haml +1 -1
- data/app/views/home/index.xls.builder +51 -0
- data/app/views/layouts/_sidebar.html.haml +2 -2
- data/app/views/layouts/_tabbed.html.haml +14 -11
- data/app/views/layouts/application.html.haml +2 -2
- data/app/views/leads/_edit.html.haml +2 -2
- data/app/views/leads/_new.html.haml +2 -2
- data/app/views/leads/_sidebar_index.html.haml +2 -2
- data/app/views/leads/_sidebar_show.html.haml +30 -30
- data/app/views/leads/create.js.haml +2 -3
- data/app/views/leads/destroy.js.haml +2 -2
- data/app/views/leads/promote.js.haml +3 -4
- data/app/views/leads/reject.js.haml +3 -3
- data/app/views/leads/show.html.haml +1 -1
- data/app/views/leads/update.js.haml +4 -5
- data/app/views/lists/create.js.haml +0 -1
- data/app/views/opportunities/_edit.html.haml +1 -1
- data/app/views/opportunities/_index_brief.html.haml +1 -1
- data/app/views/opportunities/_index_long.html.haml +1 -1
- data/app/views/opportunities/_new.html.haml +1 -1
- data/app/views/opportunities/_sidebar_index.html.haml +2 -2
- data/app/views/opportunities/_sidebar_show.html.haml +47 -46
- data/app/views/opportunities/create.js.haml +3 -4
- data/app/views/opportunities/destroy.js.haml +3 -3
- data/app/views/opportunities/show.html.haml +1 -0
- data/app/views/opportunities/update.js.haml +5 -6
- data/app/views/shared/_inline_styles.html.haml +0 -26
- data/app/views/tasks/_assigned.html.haml +1 -1
- data/app/views/tasks/_completed.html.haml +1 -1
- data/app/views/tasks/_edit.html.haml +1 -1
- data/app/views/tasks/_new.html.haml +1 -1
- data/app/views/tasks/_pending.html.haml +1 -1
- data/app/views/tasks/_related.html.haml +1 -1
- data/app/views/tasks/_selector.html.haml +7 -8
- data/app/views/tasks/_sidebar_index.html.haml +2 -2
- data/app/views/tasks/_title.html.haml +1 -1
- data/app/views/tasks/complete.js.haml +1 -1
- data/app/views/tasks/create.js.haml +1 -2
- data/app/views/tasks/destroy.js.haml +1 -1
- data/app/views/tasks/uncomplete.js.haml +1 -2
- data/app/views/tasks/update.js.haml +0 -1
- data/app/views/users/change_password.js.haml +0 -1
- data/app/views/users/update.js.haml +0 -1
- data/app/views/users/upload_avatar.js.haml +0 -1
- data/app/views/versions/_version_item.html.haml +1 -1
- data/bin/setup +6 -6
- data/config/application.rb +1 -1
- data/config/environment.rb +1 -1
- data/config/initializers/content_security_policy.rb +5 -0
- data/config/initializers/new_framework_defaults_6_0.rb +46 -0
- data/config/initializers/simple_form.rb +135 -55
- data/config/initializers/simple_form_bootstrap.rb +433 -0
- data/config/locales/fat_free_crm.cs.yml +86 -47
- data/config/locales/fat_free_crm.ru.yml +1 -0
- data/config/settings.default.yml +0 -41
- data/db/migrate/20200806004152_add_pattern_to_fields.rb +7 -0
- data/db/migrate/20200806004459_add_html5_to_fields.rb +10 -0
- data/db/schema.rb +11 -6
- data/fat_free_crm.gemspec +4 -4
- data/lib/fat_free_crm/core_ext.rb +1 -1
- data/lib/fat_free_crm/gem_ext.rb +0 -1
- data/lib/fat_free_crm/tabs.rb +2 -2
- data/lib/fat_free_crm/version.rb +2 -2
- data/lib/gravatar_image_tag.rb +1 -1
- data/lib/tasks/ffcrm/preference_update.rake +19 -0
- data/lib/tasks/ffcrm/setup.rake +1 -1
- data/lib/templates/erb/scaffold/_form.html.erb +4 -2
- data/spec/controllers/comments_controller_spec.rb +6 -6
- data/spec/controllers/home_controller_spec.rb +3 -3
- data/spec/controllers/users_controller_spec.rb +13 -1
- data/spec/factories/user_factories.rb +5 -2
- data/spec/features/acceptance_helper.rb +1 -1
- data/spec/features/accounts_spec.rb +2 -2
- data/spec/features/admin/groups_spec.rb +1 -1
- data/spec/features/admin/users_spec.rb +1 -1
- data/spec/features/campaigns_spec.rb +2 -2
- data/spec/features/contacts_spec.rb +2 -5
- data/spec/features/leads_spec.rb +11 -7
- data/spec/features/opportunities_spec.rb +4 -4
- data/spec/features/support/browser.rb +6 -2
- data/spec/features/support/selector_helpers.rb +10 -1
- data/spec/features/tasks_spec.rb +6 -6
- data/spec/helpers/accounts_helper_spec.rb +57 -0
- data/spec/models/entities/opportunity_spec.rb +2 -2
- data/spec/models/fields/custom_field_pair_spec.rb +2 -2
- data/spec/models/observers/entity_observer_spec.rb +3 -3
- data/spec/models/polymorphic/task_spec.rb +11 -11
- data/spec/models/polymorphic/version_spec.rb +2 -2
- data/spec/models/users/preference_spec.rb +1 -1
- data/spec/views/accounts/_edit.haml_spec.rb +1 -1
- data/spec/views/accounts/_new.haml_spec.rb +1 -1
- data/spec/views/accounts/create.js.haml_spec.rb +0 -1
- data/spec/views/accounts/update.js.haml_spec.rb +2 -5
- data/spec/views/admin/field_groups/create.js.haml_spec.rb +0 -1
- data/spec/views/admin/field_groups/update.js.haml_spec.rb +0 -1
- data/spec/views/admin/users/create.js.haml_spec.rb +0 -1
- data/spec/views/admin/users/destroy.js.haml_spec.rb +0 -6
- data/spec/views/admin/users/update.js.haml_spec.rb +1 -2
- data/spec/views/campaigns/_edit.haml_spec.rb +1 -1
- data/spec/views/campaigns/_new.haml_spec.rb +1 -1
- data/spec/views/campaigns/create.js.haml_spec.rb +0 -1
- data/spec/views/campaigns/destroy.js.haml_spec.rb +0 -1
- data/spec/views/campaigns/update.js.haml_spec.rb +2 -6
- data/spec/views/contacts/_edit.haml_spec.rb +1 -1
- data/spec/views/contacts/_new.haml_spec.rb +1 -1
- data/spec/views/contacts/create.js.haml_spec.rb +0 -1
- data/spec/views/contacts/update.js.haml_spec.rb +3 -7
- data/spec/views/home/index.haml_spec.rb +2 -2
- data/spec/views/leads/_edit.haml_spec.rb +1 -1
- data/spec/views/leads/_new.haml_spec.rb +1 -1
- data/spec/views/leads/create.js.haml_spec.rb +0 -3
- data/spec/views/leads/destroy.js.haml_spec.rb +0 -2
- data/spec/views/leads/promote.js.haml_spec.rb +3 -11
- data/spec/views/leads/reject.js.haml_spec.rb +0 -3
- data/spec/views/leads/update.js.haml_spec.rb +3 -11
- data/spec/views/opportunities/_edit.haml_spec.rb +1 -1
- data/spec/views/opportunities/_new.haml_spec.rb +1 -1
- data/spec/views/opportunities/create.js.haml_spec.rb +0 -2
- data/spec/views/opportunities/destroy.js.haml_spec.rb +0 -3
- data/spec/views/opportunities/update.js.haml_spec.rb +3 -11
- data/spec/views/tasks/_edit.haml_spec.rb +1 -1
- data/spec/views/tasks/complete.js.haml_spec.rb +0 -1
- data/spec/views/tasks/create.js.haml_spec.rb +0 -2
- data/spec/views/tasks/destroy.js.haml_spec.rb +0 -1
- data/spec/views/tasks/uncomplete.js.haml_spec.rb +0 -1
- data/spec/views/tasks/update.js.haml_spec.rb +1 -4
- data/spec/views/users/change_password.js.haml_spec.rb +1 -2
- data/spec/views/users/update.js.haml_spec.rb +1 -2
- data/spec/views/users/upload_avatar.js.haml_spec.rb +1 -2
- metadata +23 -14
- data/config/initializers/new_framework_defaults_5_2.rb +0 -40
- data/lib/fat_free_crm/gem_ext/simple_form/action_view_extensions/form_helper.rb +0 -24
@@ -1,82 +1,83 @@
|
|
1
1
|
.panel#summary
|
2
2
|
.caption #{t :campaign_summary}
|
3
|
-
%
|
4
|
-
%
|
5
|
-
|
6
|
-
|
7
|
-
%
|
8
|
-
|
9
|
-
|
10
|
-
%
|
11
|
-
|
12
|
-
|
13
|
-
%
|
14
|
-
|
3
|
+
%dl
|
4
|
+
%li
|
5
|
+
%dt= @campaign.starts_on ? l(@campaign.starts_on, format: :mmdd) : t(:n_a)
|
6
|
+
%tt #{t :start_date}:
|
7
|
+
%li
|
8
|
+
%dt= @campaign.ends_on ? l(@campaign.ends_on, format: :mmdd) : t(:n_a)
|
9
|
+
%tt #{t :end_date}:
|
10
|
+
%li
|
11
|
+
%dt= @campaign.status ? t(@campaign.status) : t(:n_a)
|
12
|
+
%tt #{t :status}:
|
13
|
+
%li.last
|
14
|
+
%dt= number_to_currency(@campaign.budget, precision: 0) || t(:n_a)
|
15
|
+
%tt #{t :budget}:
|
15
16
|
|
16
17
|
.caption #{t :campaign_targets}
|
18
|
+
%dl
|
19
|
+
-# Target Leads.
|
20
|
+
-#---------------------------------------------------------------------------
|
21
|
+
%li
|
22
|
+
%dt= @campaign.target_leads || t(:n_a)
|
23
|
+
%tt #{t :leads}:
|
17
24
|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
-# Target Conversion Ratio.
|
25
|
-
-#---------------------------------------------------------------------------
|
26
|
-
%li
|
27
|
-
%dt= number_to_percentage(@campaign.target_conversion, precision: 1) || t(:n_a)
|
28
|
-
%tt #{t :conversion}:
|
25
|
+
-# Target Conversion Ratio.
|
26
|
+
-#---------------------------------------------------------------------------
|
27
|
+
%li
|
28
|
+
%dt= number_to_percentage(@campaign.target_conversion, precision: 1) || t(:n_a)
|
29
|
+
%tt #{t :conversion}:
|
29
30
|
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
31
|
+
-# Target Opportunities: calculated based on target number of leads and
|
32
|
+
-# expected conversion ratio.
|
33
|
+
-#---------------------------------------------------------------------------
|
34
|
+
%li
|
35
|
+
- if @campaign.target_leads.to_i > 0 && @campaign.target_conversion.to_i > 0
|
36
|
+
- opportunities = @campaign.target_leads * @campaign.target_conversion / 100
|
37
|
+
%dt= opportunities.to_i
|
38
|
+
- else
|
39
|
+
%dt N/A
|
40
|
+
%tt #{t :opportunities}:
|
40
41
|
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
42
|
+
-# Target Revenue.
|
43
|
+
-#---------------------------------------------------------------------------
|
44
|
+
%li.last
|
45
|
+
%dt= number_to_currency(@campaign.target_revenue, precision: 0) || t(:n_a)
|
46
|
+
%tt #{t :revenue}:
|
46
47
|
|
47
48
|
.caption #{t :actual_performance}
|
49
|
+
%dl
|
50
|
+
-# Actual Number of Leads.
|
51
|
+
-#---------------------------------------------------------------------------
|
52
|
+
%li
|
53
|
+
%dt= @campaign.leads_count || t(:n_a)
|
54
|
+
%tt== #{t :leads}: #{performance(@campaign.leads_count, @campaign.target_leads)}
|
48
55
|
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
%
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
- conversion = @campaign.opportunities_count * 100 / @campaign.leads_count
|
61
|
-
%dt= number_to_percentage(conversion, precision: 1)
|
62
|
-
%tt== #{t :conversion}: #{performance(conversion, @campaign.target_conversion)}
|
63
|
-
- else
|
64
|
-
%dt #{t :n_a}
|
65
|
-
%tt #{t :conversion}:
|
56
|
+
-# Actual Conversion Ratio: calculated based on actual number of leads
|
57
|
+
-# and opportunities.
|
58
|
+
-#---------------------------------------------------------------------------
|
59
|
+
%li
|
60
|
+
- if @campaign.opportunities_count.to_i > 0 && @campaign.leads_count.to_i > 0
|
61
|
+
- conversion = @campaign.opportunities_count * 100 / @campaign.leads_count
|
62
|
+
%dt= number_to_percentage(conversion, precision: 1)
|
63
|
+
%tt== #{t :conversion}: #{performance(conversion, @campaign.target_conversion)}
|
64
|
+
- else
|
65
|
+
%dt #{t :n_a}
|
66
|
+
%tt #{t :conversion}:
|
66
67
|
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
68
|
+
-# Actual Opportunities.
|
69
|
+
-#---------------------------------------------------------------------------
|
70
|
+
%li
|
71
|
+
%dt= @campaign.opportunities_count || t(:n_a)
|
72
|
+
%tt
|
73
|
+
#{t :opportunities}:
|
74
|
+
= performance(@campaign.opportunities_count, opportunities)
|
74
75
|
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
76
|
+
-# Actual Revenue.
|
77
|
+
-#---------------------------------------------------------------------------
|
78
|
+
%li.last
|
79
|
+
%dt= number_to_currency(@campaign.revenue, precision: 0) || t(:n_a)
|
80
|
+
%tt== #{t :revenue}: #{performance(@campaign.revenue, @campaign.target_revenue)}
|
80
81
|
|
81
82
|
- unless @campaign.background_info.blank?
|
82
83
|
.caption #{t :background_info}
|
@@ -8,12 +8,11 @@
|
|
8
8
|
$('##{create_id}').slideUp(250);
|
9
9
|
$('##{entity_name.pluralize}').prepend('#{ j render(partial: entity_name, collection: [ @entity ]) }');
|
10
10
|
$('##{dom_id(@entity)}').effect("highlight", { duration:1500 });
|
11
|
-
= refresh_sidebar(:index
|
11
|
+
= refresh_sidebar(:index)
|
12
12
|
$('#paginate').html('#{ j render(partial: "shared/paginate_with_per_page") }');
|
13
13
|
crm.flick('empty', 'remove');
|
14
14
|
- else
|
15
15
|
$('##{create_id}').html('#{ j render(partial: "new") }');
|
16
|
-
$('##{create_id}').effect("shake", { duration:250, distance: 6 });
|
17
16
|
- if @entity.errors[:name].blank? and @entity.errors[:ends_on].present?
|
18
17
|
$('#campaign_ends_on').focus();
|
19
18
|
- else
|
@@ -2,5 +2,5 @@
|
|
2
2
|
- @entity = instance_variable_get("@#{entity_name}")
|
3
3
|
|
4
4
|
$('##{dom_id(@entity)}').css('background-color', '#ffe4e1').slideUp(250)
|
5
|
-
= refresh_sidebar(:index
|
5
|
+
= refresh_sidebar(:index)
|
6
6
|
$('#paginate').replaceWith('#{ j render(partial: "shared/paginate_with_per_page") }');
|
@@ -7,6 +7,7 @@
|
|
7
7
|
= styles_for :task, :lead, :opportunity
|
8
8
|
|
9
9
|
= render 'campaigns/title_bar', campaign: @campaign
|
10
|
+
= render 'campaigns/sidebar_show', campaign: @campaign
|
10
11
|
|
11
12
|
= render "comments/new", commentable: @campaign
|
12
13
|
= render partial: "shared/timeline", collection: @timeline
|
@@ -6,17 +6,16 @@
|
|
6
6
|
- if called_from_landing_page?
|
7
7
|
crm.flip_form('edit_#{entity_name}');
|
8
8
|
crm.set_title('edit_#{entity_name}', '#{h @entity.name}');
|
9
|
-
= refresh_sidebar(:show
|
9
|
+
= refresh_sidebar(:show)
|
10
10
|
- else
|
11
11
|
$('##{id}').replaceWith('#{ j render(partial: entity_name, collection: [ @entity ]) }');
|
12
12
|
$('##{id}').effect("highlight", { duration:1500 });
|
13
|
-
= refresh_sidebar(:index
|
13
|
+
= refresh_sidebar(:index)
|
14
14
|
- else
|
15
15
|
$('##{id}').html('#{ j render(partial: "edit") }');
|
16
|
-
$('##{id}').effect("shake", { duration:250, distance: 6 });
|
17
16
|
- if @campaign.errors[:name].blank? and @campaign.errors[:ends_on].present?
|
18
17
|
$('#campaign_ends_on').focus();
|
19
18
|
- else
|
20
19
|
$('##{dom_id(@entity, :edit)} input[type!=hidden]').first().focus();
|
21
20
|
|
22
|
-
= hook(:entity_update, self, {entity: @entity})
|
21
|
+
= hook(:entity_update, self, {entity: @entity})
|
@@ -6,6 +6,6 @@
|
|
6
6
|
= hidden_field_tag "comment[commentable_type]", class_name.classify
|
7
7
|
= f.text_area :comment, id: dom_id(@comment, :text)
|
8
8
|
.buttons
|
9
|
-
= f.submit t(:save_note)
|
9
|
+
= f.submit t(:save_note), class: 'btn btn-primary'
|
10
10
|
#{t :or}
|
11
11
|
= link_to(t(:cancel), edit_comment_path(@comment, "#{class_name}_id" => commentable.id, cancel: true), remote: true)
|
@@ -25,7 +25,7 @@
|
|
25
25
|
= f.text_area :comment, id: "#{id_prefix}_comment_comment"
|
26
26
|
.buttons
|
27
27
|
= image_tag("loading.gif", size: :thumb, class: "spinner", style: "display: none;")
|
28
|
-
= f.submit t(:add_note), id: "#{id_prefix}_comment_submit"
|
28
|
+
= f.submit t(:add_note), id: "#{id_prefix}_comment_submit", class: 'btn btn-primary'
|
29
29
|
#{t :or}
|
30
30
|
= link_to(t(:cancel), '#', class: 'cancel')
|
31
31
|
%div{ {id: "#{id_prefix}_ask"}.merge(hidden_if(false))}
|
@@ -14,6 +14,6 @@
|
|
14
14
|
= hook(:entity_form, self, {f: f, entity: @contact})
|
15
15
|
|
16
16
|
.buttonbar
|
17
|
-
= f.submit t(:save_contact), onclick: "crm.save_contact()"
|
17
|
+
= f.submit t(:save_contact), onclick: "crm.save_contact()", class: 'btn btn-primary'
|
18
18
|
#{t :or}
|
19
19
|
= link_to_cancel edit_contact_path(@contact)
|
@@ -15,6 +15,6 @@
|
|
15
15
|
= hook(:entity_form, self, {f: f, entity: @contact})
|
16
16
|
|
17
17
|
.buttonbar
|
18
|
-
= f.submit t(:create_contact), onclick: "crm.create_contact()"
|
18
|
+
= f.submit t(:create_contact), onclick: "crm.create_contact()", class: 'btn btn-primary'
|
19
19
|
#{t :or}
|
20
20
|
= link_to_cancel new_contact_path
|
@@ -1,6 +1,5 @@
|
|
1
1
|
.panel#summary
|
2
2
|
%span{style: "float:right"}= avatar_for(@contact, size: "50x50")
|
3
|
-
%h4= h(@contact.full_name)
|
4
3
|
= account_with_title_and_department(@contact)
|
5
4
|
|
6
5
|
%div= render "shared/address_show", asset: @contact, type: 'business', title: :address
|
@@ -21,23 +20,24 @@
|
|
21
20
|
= web_presence_icons(@contact)
|
22
21
|
|
23
22
|
.caption #{t :contact_summary}
|
24
|
-
%
|
25
|
-
%
|
26
|
-
|
27
|
-
|
28
|
-
%
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
%
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
23
|
+
%dl
|
24
|
+
%li
|
25
|
+
%dt= @contact.assigned_to ? truncate(@contact.assignee.full_name, length: 16) : nil
|
26
|
+
%tt #{t :assigned_to}:
|
27
|
+
%li
|
28
|
+
%dt
|
29
|
+
- if @contact.lead
|
30
|
+
= link_to(truncate(@contact.lead.name, length: 16), @contact.lead, title: @contact.lead.name)
|
31
|
+
- else
|
32
|
+
#{t :n_a}
|
33
|
+
%tt #{t :lead}:
|
34
|
+
%li
|
35
|
+
%dt
|
36
|
+
- if @contact.lead.try(:campaign)
|
37
|
+
= link_to(truncate(@contact.lead.campaign.name, length: 16), @contact.lead.campaign, title: @contact.lead.campaign.name)
|
38
|
+
- else
|
39
|
+
#{t :n_a}
|
40
|
+
%tt #{t :campaign}:
|
41
41
|
|
42
42
|
- unless @contact.background_info.blank?
|
43
43
|
.caption #{t :background_info}
|
@@ -19,5 +19,4 @@
|
|
19
19
|
- else
|
20
20
|
$('##{create_id}').html('#{ j render(partial: "new") }');
|
21
21
|
crm.create_or_select_account(#{ request.referer =~ /\/accounts\// || @account.id.blank? });
|
22
|
-
$('##{create_id}').effect("shake", { duration:250, distance: 6 });
|
23
22
|
$('#new_#{entity_name} input[type!=hidden]').first().focus();
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
$('##{dom_id(@entity)}').css('background-color', '#ffe4e1').slideUp(250);
|
5
5
|
- if called_from_index_page?
|
6
|
-
= refresh_sidebar(:index
|
6
|
+
= refresh_sidebar(:index)
|
7
7
|
$('#paginate').html('#{ j render(partial: "shared/paginate_with_per_page") }');
|
8
8
|
- else
|
9
9
|
$('#recently').replaceWith('#{ j render(partial: "shared/recently") }');
|
@@ -7,7 +7,7 @@
|
|
7
7
|
- if called_from_landing_page?
|
8
8
|
crm.flip_form('edit_#{entity_name}');
|
9
9
|
crm.set_title('edit_#{entity_name}', '#{h @entity.full_name}');
|
10
|
-
= refresh_sidebar(:show
|
10
|
+
= refresh_sidebar(:show)
|
11
11
|
- else
|
12
12
|
$('##{id}').replaceWith('#{ j render(partial: entity_name, collection: [ @entity ]) }');
|
13
13
|
$('##{id}').effect("highlight", { duration:1500 });
|
@@ -18,7 +18,6 @@
|
|
18
18
|
- else
|
19
19
|
$('##{id}').html('#{ j render(partial: "edit") }');
|
20
20
|
crm.create_or_select_account(#{ request.referer =~ /\/accounts\// || @account.id.blank? });
|
21
|
-
$('##{id}').effect("shake", { duration:250, distance: 6 });
|
22
21
|
$('##{dom_id(@entity, :edit)} input[type!=hidden]').first().focus();
|
23
22
|
|
24
|
-
= hook(:entity_update, self, {entity: @entity})
|
23
|
+
= hook(:entity_update, self, {entity: @entity})
|
@@ -5,7 +5,7 @@
|
|
5
5
|
#buttons
|
6
6
|
= view_buttons
|
7
7
|
.create_asset
|
8
|
-
= link_to_inline("create_#{model_name}".to_sym, send("new_#{model_name}_path"), text: t("create_#{model_name}".to_sym))
|
8
|
+
= link_to_inline("create_#{model_name}".to_sym, send("new_#{model_name}_path"), {text: t("create_#{model_name}".to_sym), class: 'btn-sm btn-primary'})
|
9
9
|
|
10
10
|
.title
|
11
11
|
%span{id: "create_#{model_name}_title"} #{t controller_name.to_sym}
|
@@ -14,8 +14,8 @@
|
|
14
14
|
- else
|
15
15
|
$('##{h params[:assets]}').prepend('#{ j render(partial: "#{params[:assets]}/#{partial}", collection: [ @attachment ]) }');
|
16
16
|
- if called_from_landing_page?(:accounts)
|
17
|
-
= refresh_sidebar_for(:accounts, :show
|
17
|
+
= refresh_sidebar_for(:accounts, :show)
|
18
18
|
- elsif called_from_landing_page?(:campaigns)
|
19
|
-
= refresh_sidebar_for(:campaigns, :show
|
19
|
+
= refresh_sidebar_for(:campaigns, :show)
|
20
20
|
|
21
21
|
$('##{partial}_#{h params[:asset_id]}').effect("highlight", { duration:1500 });
|
@@ -1,6 +1,6 @@
|
|
1
1
|
$('##{dom_id(@attachment)}').slideUp(250);
|
2
2
|
|
3
3
|
- if called_from_landing_page?(:accounts)
|
4
|
-
= refresh_sidebar_for(:accounts, :show
|
4
|
+
= refresh_sidebar_for(:accounts, :show)
|
5
5
|
- elsif called_from_landing_page?(:campaigns)
|
6
|
-
= refresh_sidebar_for(:campaigns, :show
|
6
|
+
= refresh_sidebar_for(:campaigns, :show)
|
@@ -0,0 +1,51 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
xml.Worksheet 'ss:Name' => I18n.t(:tab_dashboard) do
|
3
|
+
xml.Table do
|
4
|
+
unless @activities.empty?
|
5
|
+
|
6
|
+
xml.Row do
|
7
|
+
heads = ["Id",
|
8
|
+
"Item type",
|
9
|
+
"Item",
|
10
|
+
"Event",
|
11
|
+
"Whodunnit",
|
12
|
+
"Object",
|
13
|
+
"Created at",
|
14
|
+
"Object changes",
|
15
|
+
"Related",
|
16
|
+
"Related type",
|
17
|
+
"Transaction"]
|
18
|
+
|
19
|
+
heads.each do |head|
|
20
|
+
xml.Cell do
|
21
|
+
xml.Data head,
|
22
|
+
'ss:Type' => 'String'
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
@activities.each do |activity|
|
28
|
+
xml.Row do
|
29
|
+
data = [activity.id,
|
30
|
+
activity.item_type,
|
31
|
+
activity.item_id,
|
32
|
+
activity.event,
|
33
|
+
activity.whodunnit,
|
34
|
+
activity.object,
|
35
|
+
activity.created_at,
|
36
|
+
activity.object_changes,
|
37
|
+
activity.related_id,
|
38
|
+
activity.related_type,
|
39
|
+
activity.transaction_id]
|
40
|
+
|
41
|
+
data.each do |value|
|
42
|
+
xml.Cell do
|
43
|
+
xml.Data value,
|
44
|
+
'ss:Type' => (value.respond_to?(:abs) ? 'Number' : 'String').to_s
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
@@ -1,11 +1,11 @@
|
|
1
1
|
- view ||= controller.controller_name
|
2
2
|
- action ||= controller.action_name
|
3
|
-
- sidebar = "#{view}/sidebar_#{action}"
|
3
|
+
- sidebar = "#{view}/sidebar_#{action}" unless action.to_s == 'show'
|
4
4
|
- sidebar = "admin/#{sidebar}" if controller.class.to_s.starts_with?("Admin::")
|
5
5
|
|
6
6
|
= content_for :sidebar
|
7
7
|
- begin
|
8
|
-
= render sidebar
|
8
|
+
= render sidebar if sidebar
|
9
9
|
- rescue MissingTemplate
|
10
10
|
|
11
11
|
= render "lists/lists"
|
@@ -1,15 +1,18 @@
|
|
1
|
-
.tabs
|
2
|
-
|
3
|
-
-
|
4
|
-
%
|
5
|
-
|
6
|
-
|
7
|
-
|
1
|
+
.navbar.navbar-expand-lg.tabs
|
2
|
+
.container-fluid
|
3
|
+
%button{"class" => "navbar-toggler", "type" => "button", "data-bs-toggle" => "collapse", "data-bs-target" => "#navbarNav", "aria-controls" => "navbarNav", "aria-expanded" => "false", "aria-label" => "Toggle navigation"}
|
4
|
+
%span.navbar-toggler-icon
|
5
|
+
%ul.navbar-nav.collapse.navbar-collapse.me-auto.mb-2.mg-lg-0{id:"navbarNav"}
|
6
|
+
- tabs.each do |tab|
|
7
|
+
%li.nav-item
|
8
|
+
= link_to(tab[:url], class: tab[:active] ? "nav-link active" : "nav-link") do
|
9
|
+
%i.fa{class: tab[:icon]}
|
10
|
+
= t(tab[:text])
|
8
11
|
|
9
12
|
= show_flash
|
10
|
-
%
|
11
|
-
%
|
12
|
-
%
|
13
|
+
%div{ id: 'primary-application-pane' }
|
14
|
+
%div{ class: 'row' }
|
15
|
+
%div{ class: 'sidebar', id: :sidebar }
|
13
16
|
= render "layouts/sidebar"
|
14
|
-
%
|
17
|
+
%div{ class: 'main', id: :main }
|
15
18
|
= yield
|
@@ -13,8 +13,8 @@
|
|
13
13
|
= javascript_include_tag :application
|
14
14
|
|
15
15
|
- unless tabless_layout? || %w(en-US en-GB).include?(I18n.locale.to_s)
|
16
|
-
= javascript_include_tag "jquery_ui_datepicker/jquery.ui.datepicker-#{I18n.locale}"
|
17
|
-
= javascript_include_tag "jquery_ui_datepicker/jquery-ui-timepicker-#{I18n.locale}"
|
16
|
+
= javascript_include_tag "vendor/jquery_ui_datepicker/jquery.ui.datepicker-#{I18n.locale}"
|
17
|
+
= javascript_include_tag "vendor/jquery_ui_datepicker/jquery-ui-timepicker-#{I18n.locale}"
|
18
18
|
|
19
19
|
= csrf_meta_tag
|
20
20
|
= hook(:javascript_includes, self)
|
@@ -16,8 +16,8 @@
|
|
16
16
|
|
17
17
|
.buttonbar
|
18
18
|
- if Setting.compound_address
|
19
|
-
= f.submit t(:save_lead), onclick: "crm.clear_all_hints()"
|
19
|
+
= f.submit t(:save_lead), onclick: "crm.clear_all_hints()", class: 'btn btn-primary'
|
20
20
|
- else
|
21
|
-
= f.submit t(:save_lead)
|
21
|
+
= f.submit t(:save_lead), class: 'btn btn-primary'
|
22
22
|
#{t :or}
|
23
23
|
= link_to_cancel edit_lead_path(@lead)
|
@@ -17,8 +17,8 @@
|
|
17
17
|
|
18
18
|
.buttonbar
|
19
19
|
- if Setting.compound_address
|
20
|
-
= f.submit t(:create_lead), onclick: "crm.clear_all_hints()"
|
20
|
+
= f.submit t(:create_lead), onclick: "crm.clear_all_hints()", class: 'btn btn-primary'
|
21
21
|
- else
|
22
|
-
= f.submit t(:create_lead)
|
22
|
+
= f.submit t(:create_lead), class: 'btn btn-primary'
|
23
23
|
#{t :or}
|
24
24
|
= link_to_cancel new_lead_path
|
@@ -1,13 +1,13 @@
|
|
1
1
|
.filters#filters
|
2
2
|
.caption= t :lead_statuses
|
3
3
|
- Setting.lead_status.each do |key|
|
4
|
-
.check_box
|
4
|
+
.check_box
|
5
5
|
%div{style: "float:right;"}
|
6
6
|
= @lead_status_total[key]
|
7
7
|
= lead_status_checkbox(key, @lead_status_total[key])
|
8
8
|
= label_tag(key, t(key))
|
9
9
|
|
10
|
-
.check_box
|
10
|
+
.check_box
|
11
11
|
%div{style: "float:right;"}
|
12
12
|
= @lead_status_total[:other]
|
13
13
|
= lead_status_checkbox("other", @lead_status_total[:other])
|
@@ -1,6 +1,5 @@
|
|
1
1
|
.panel#summary
|
2
2
|
%span{style: "float:right"}= avatar_for(@lead, size: "50x50")
|
3
|
-
%h4= h(@lead.full_name)
|
4
3
|
- if !@lead.title.blank? && !@lead.company.blank?
|
5
4
|
-# works_at: "{{job_title}} at {{company}}"
|
6
5
|
%div= t(:works_at, job_title: @lead.title, company: @lead.company)
|
@@ -22,35 +21,36 @@
|
|
22
21
|
= web_presence_icons(@lead)
|
23
22
|
|
24
23
|
.caption #{t :lead_summary}
|
25
|
-
%
|
26
|
-
%
|
27
|
-
|
28
|
-
|
29
|
-
%
|
30
|
-
|
31
|
-
|
32
|
-
%
|
33
|
-
|
34
|
-
|
35
|
-
%
|
36
|
-
|
37
|
-
|
38
|
-
%
|
39
|
-
|
40
|
-
|
41
|
-
%
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
%
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
24
|
+
%dl
|
25
|
+
%li
|
26
|
+
%dt= t(@lead.status, default: :n_a)
|
27
|
+
%tt #{t :status}:
|
28
|
+
%li
|
29
|
+
%dt= t(@lead.source, default: :n_a)
|
30
|
+
%tt #{t :source}:
|
31
|
+
%li
|
32
|
+
%span{style: "float:right;"}= stars_for(@lead)
|
33
|
+
%tt #{t :rating}:
|
34
|
+
%li
|
35
|
+
%dt= @lead.referred_by ? truncate(@lead.referred_by, length: 16) : t(:n_a)
|
36
|
+
%tt #{t :referred_by}:
|
37
|
+
%li
|
38
|
+
%dt= @lead.assigned_to ? truncate(@lead.assignee.full_name, length: 16) : nil
|
39
|
+
%tt #{t :assigned_to}:
|
40
|
+
%li
|
41
|
+
%dt
|
42
|
+
- if @lead.campaign
|
43
|
+
= link_to(truncate(@lead.campaign.name, length: 16), @lead.campaign, title: @lead.campaign.name)
|
44
|
+
- else
|
45
|
+
#{t :n_a}
|
46
|
+
%tt #{t :campaign}:
|
47
|
+
%li
|
48
|
+
%dt
|
49
|
+
- if @lead.contact
|
50
|
+
= link_to(truncate(@lead.contact.name, length: 16), @lead.contact, title: @lead.contact.name)
|
51
|
+
- else
|
52
|
+
#{t :n_a}
|
53
|
+
%tt #{t :contact}:
|
54
54
|
|
55
55
|
- unless @lead.background_info.blank?
|
56
56
|
.caption #{t :background_info}
|
@@ -9,13 +9,12 @@
|
|
9
9
|
$('##{entity_name.pluralize}').prepend('#{ j render(partial: entity_name, collection: [ @entity ]) }');
|
10
10
|
$('##{dom_id(@entity)}').effect("highlight", { duration:1500 });
|
11
11
|
- if called_from_index_page?
|
12
|
-
= refresh_sidebar(:index
|
12
|
+
= refresh_sidebar(:index)
|
13
13
|
$('#paginate').html('#{ j render(partial: "shared/paginate_with_per_page") }');
|
14
14
|
- elsif called_from_landing_page?("campaigns")
|
15
15
|
- @campaign.reload
|
16
|
-
= refresh_sidebar_for(:campaigns, :show
|
16
|
+
= refresh_sidebar_for(:campaigns, :show)
|
17
17
|
crm.flick('empty', 'remove');
|
18
18
|
- else
|
19
19
|
$('##{create_id}').html('#{ j render(partial: "new") }');
|
20
|
-
$('##{create_id}').effect("shake", { duration:250, distance: 6 });
|
21
20
|
$('#new_#{entity_name} input[type!=hidden]').first().focus();
|