fat_free_crm 0.18.2 → 0.19.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/.rubocop_todo.yml +61 -160
- data/.travis.yml +27 -11
- data/CHANGELOG.md +40 -24
- data/CONTRIBUTORS.md +1 -0
- data/Dockerfile +45 -14
- data/Gemfile +16 -10
- data/Gemfile.lock +230 -222
- data/Procfile +1 -1
- data/README.md +2 -2
- data/Rakefile +1 -1
- data/app/assets/stylesheets/common.scss +1 -1
- data/app/controllers/admin/application_controller.rb +1 -1
- data/app/controllers/admin/field_groups_controller.rb +1 -3
- data/app/controllers/admin/tags_controller.rb +1 -3
- data/app/controllers/admin/users_controller.rb +5 -8
- data/app/controllers/application_controller.rb +11 -45
- data/app/controllers/comments_controller.rb +2 -5
- data/{config/initializers/authlogic.rb → app/controllers/confirmations_controller.rb} +4 -2
- data/app/controllers/emails_controller.rb +0 -2
- data/app/controllers/entities/accounts_controller.rb +1 -3
- data/app/controllers/entities/campaigns_controller.rb +1 -3
- data/app/controllers/entities/contacts_controller.rb +4 -24
- data/app/controllers/entities/leads_controller.rb +7 -10
- data/app/controllers/entities/opportunities_controller.rb +4 -14
- data/app/controllers/entities_controller.rb +21 -7
- data/app/controllers/home_controller.rb +2 -4
- data/app/controllers/passwords_controller.rb +3 -59
- data/{spec/features/support/maintain_sessions.rb → app/controllers/registrations_controller.rb} +12 -5
- data/{lib/development_tasks/gem.rake → app/controllers/sessions_controller.rb} +6 -6
- data/app/controllers/tasks_controller.rb +8 -17
- data/app/controllers/users_controller.rb +8 -29
- data/app/helpers/admin/users_helper.rb +1 -1
- data/app/helpers/application_helper.rb +27 -32
- data/app/helpers/campaigns_helper.rb +1 -1
- data/app/helpers/contacts_helper.rb +1 -3
- data/app/helpers/opportunities_helper.rb +4 -12
- data/app/helpers/tasks_helper.rb +1 -1
- data/app/helpers/users_helper.rb +1 -3
- data/{config/initializers/paper_trail.rb → app/mailers/devise_mailer.rb} +5 -1
- data/app/mailers/user_mailer.rb +0 -9
- data/app/models/entities/account.rb +10 -10
- data/app/models/entities/campaign.rb +4 -6
- data/app/models/entities/contact.rb +24 -12
- data/app/models/entities/lead.rb +7 -7
- data/app/models/entities/opportunity.rb +7 -9
- data/app/models/fields/custom_field.rb +1 -0
- data/app/models/fields/custom_field_date_pair.rb +2 -0
- data/app/models/fields/field.rb +1 -3
- data/app/models/list.rb +1 -1
- data/app/models/observers/entity_observer.rb +3 -7
- data/app/models/observers/lead_observer.rb +2 -4
- data/app/models/observers/opportunity_observer.rb +2 -4
- data/app/models/observers/task_observer.rb +1 -1
- data/app/models/polymorphic/email.rb +2 -2
- data/app/models/polymorphic/task.rb +13 -9
- data/app/models/polymorphic/version.rb +3 -2
- data/app/models/setting.rb +2 -0
- data/app/models/users/permission.rb +3 -3
- data/app/models/users/preference.rb +2 -1
- data/app/models/users/user.rb +67 -42
- data/app/views/accounts/_top_section.html.haml +1 -1
- data/app/views/accounts/edit.js.haml +1 -1
- data/app/views/accounts/update.js.haml +2 -2
- data/app/views/admin/users/_user.html.haml +4 -4
- data/app/views/contacts/_index_brief.html.haml +1 -1
- data/app/views/contacts/_index_full.html.haml +1 -1
- data/app/views/contacts/_index_long.html.haml +1 -1
- data/app/views/devise/confirmations/new.html.haml +9 -0
- data/app/views/devise/mailer/confirmation_instructions.html.haml +4 -0
- data/app/views/devise/mailer/password_change.html.haml +3 -0
- data/app/views/devise/mailer/reset_password_instructions.html.haml +6 -0
- data/app/views/devise/passwords/edit.html.haml +18 -0
- data/app/views/devise/passwords/new.html.haml +10 -0
- data/app/views/devise/registrations/new.html.haml +21 -0
- data/app/views/devise/sessions/new.html.haml +32 -0
- data/app/views/layouts/_about.html.haml +5 -5
- data/app/views/layouts/_header.html.haml +3 -3
- data/app/views/layouts/admin/_header.html.haml +1 -1
- data/app/views/shared/_address.html.haml +5 -5
- data/app/views/shared/_paginate_with_per_page.html.haml +1 -0
- data/app/views/users/_avatar.html.haml +1 -1
- data/bin/bundle +1 -1
- data/bin/rails +1 -1
- data/bin/setup +38 -0
- data/bin/update +33 -0
- data/bin/yarn +13 -0
- data/config/application.rb +8 -6
- data/config/boot.rb +1 -1
- data/config/brakeman.ignore +2 -2
- data/config/database.postgres.docker.yml +5 -5
- data/config/environment.rb +1 -1
- data/config/environments/development.rb +1 -0
- data/config/environments/test.rb +7 -0
- data/config/initializers/action_mailer.rb +1 -3
- data/config/initializers/application_controller_renderer.rb +9 -0
- data/config/initializers/assets.rb +6 -11
- data/config/initializers/backtrace_silencers.rb +0 -6
- data/config/initializers/content_security_policy.rb +26 -0
- data/config/initializers/cookies_serializer.rb +3 -6
- data/config/initializers/devise.rb +289 -0
- data/config/initializers/filter_parameter_logging.rb +0 -5
- data/config/initializers/gravatar.rb +0 -1
- data/config/initializers/inflections.rb +0 -6
- data/config/initializers/mime_types.rb +1 -9
- data/config/initializers/new_framework_defaults_5_2.rb +40 -0
- data/config/initializers/relative_url_root.rb +1 -3
- data/config/initializers/session_store.rb +1 -3
- data/config/initializers/wrap_parameters.rb +4 -9
- data/config/locales/fat_free_crm.en-GB.yml +5 -5
- data/config/locales/fat_free_crm.en-US.yml +5 -5
- data/config/locales/fat_free_crm.fr.yml +1 -1
- data/config/locales/fat_free_crm.ru.yml +1 -0
- data/config/routes.rb +20 -9
- data/db/demo/users.yml +62 -81
- data/db/migrate/20100928030620_remove_uuid.rb +1 -2
- data/db/migrate/20120316045804_activities_to_versions.rb +1 -0
- data/db/migrate/20120510025219_add_not_null_constraints_for_timestamp_columns.rb +1 -0
- data/db/migrate/20180107082701_authlogic_to_devise.rb +58 -0
- data/db/schema.rb +48 -43
- data/docker-compose.yml +10 -0
- data/fat_free_crm.gemspec +11 -13
- data/lib/development_tasks/license.rake +2 -2
- data/lib/fat_free_crm/callback.rb +2 -2
- data/lib/fat_free_crm/comment_extensions.rb +2 -4
- data/lib/fat_free_crm/core_ext/string.rb +1 -1
- data/lib/fat_free_crm/engine.rb +1 -1
- data/lib/fat_free_crm/errors.rb +1 -1
- data/lib/fat_free_crm/export_csv.rb +1 -0
- data/lib/fat_free_crm/exportable.rb +1 -1
- data/lib/fat_free_crm/fields.rb +1 -1
- data/lib/fat_free_crm/gem_dependencies.rb +1 -1
- data/lib/fat_free_crm/gem_ext/simple_form/action_view_extensions/form_helper.rb +1 -3
- data/lib/fat_free_crm/i18n.rb +2 -2
- data/lib/fat_free_crm/mail_processor/base.rb +4 -10
- data/lib/fat_free_crm/mail_processor/dropbox.rb +5 -15
- data/lib/fat_free_crm/permissions.rb +7 -4
- data/lib/fat_free_crm/sortable.rb +1 -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 +7 -8
- data/lib/missing_translation_detector.rb +1 -0
- data/lib/tasks/ffcrm/missing_translations.rake +1 -0
- data/lib/tasks/ffcrm/setup.rake +10 -1
- data/lib/tasks/ffcrm/update_data.rake +2 -2
- data/script/rails +2 -2
- data/spec/controllers/admin/users_controller_spec.rb +0 -56
- data/spec/controllers/comments_controller_spec.rb +6 -6
- data/spec/controllers/entities/campaigns_controller_spec.rb +1 -1
- data/spec/controllers/entities/contacts_controller_spec.rb +2 -1
- data/spec/controllers/entities/leads_controller_spec.rb +2 -2
- data/spec/controllers/entities/opportunities_controller_spec.rb +1 -1
- data/spec/controllers/entities_controller_spec.rb +5 -0
- data/spec/controllers/home_controller_spec.rb +5 -5
- data/spec/controllers/tasks_controller_spec.rb +6 -4
- data/spec/controllers/users_controller_spec.rb +28 -98
- data/spec/factories/account_factories.rb +5 -5
- data/spec/factories/campaign_factories.rb +3 -3
- data/spec/factories/contact_factories.rb +8 -8
- data/spec/factories/field_factories.rb +4 -3
- data/spec/factories/lead_factories.rb +5 -5
- data/spec/factories/list_factories.rb +2 -2
- data/spec/factories/opportunity_factories.rb +3 -3
- data/spec/factories/setting_factories.rb +2 -2
- data/spec/factories/shared_factories.rb +11 -9
- data/spec/factories/task_factories.rb +7 -7
- data/spec/factories/user_factories.rb +16 -19
- data/spec/features/admin/groups_spec.rb +1 -1
- data/spec/features/admin/users_spec.rb +3 -1
- data/spec/features/campaigns_spec.rb +1 -1
- data/spec/features/contacts_spec.rb +1 -1
- data/spec/features/dashboard_spec.rb +1 -1
- data/spec/features/devise/sign_in_spec.rb +58 -0
- data/spec/features/devise/sign_up_spec.rb +36 -0
- data/spec/features/leads_spec.rb +1 -1
- data/spec/features/opportunities_overview_spec.rb +1 -1
- data/spec/features/opportunities_spec.rb +3 -3
- data/spec/features/support/browser.rb +2 -1
- data/spec/features/tasks_spec.rb +1 -1
- data/spec/helpers/admin/field_groups_helper_spec.rb +1 -1
- data/spec/helpers/users_helper_spec.rb +4 -4
- data/spec/lib/comment_extensions_spec.rb +10 -4
- data/spec/lib/errors_spec.rb +2 -2
- data/spec/lib/mail_processor/dropbox_spec.rb +1 -1
- data/spec/lib/mail_processor/sample_emails/dropbox.rb +8 -8
- data/spec/lib/permissions_spec.rb +8 -3
- data/spec/mailers/devise_mailer_spec.rb +35 -0
- data/spec/mailers/user_mailer_spec.rb +0 -26
- data/spec/models/entities/account_spec.rb +27 -0
- data/spec/models/entities/contact_spec.rb +96 -1
- data/spec/models/fields/custom_field_date_pair_spec.rb +4 -2
- data/spec/models/fields/custom_field_spec.rb +4 -2
- data/spec/models/observers/entity_observer_spec.rb +1 -1
- data/spec/models/polymorphic/version_spec.rb +7 -7
- data/spec/models/users/user_spec.rb +22 -26
- data/spec/routing/users_routing_spec.rb +30 -8
- data/spec/shared/controllers.rb +3 -9
- data/spec/spec_helper.rb +10 -2
- data/spec/support/assert_select.rb +1 -0
- data/spec/support/devise_helpers.rb +28 -0
- data/spec/{features/support/helpers.rb → support/feature_helpers.rb} +10 -10
- data/spec/support/macros.rb +4 -1
- data/spec/views/contacts/update.js.haml_spec.rb +1 -1
- data/spec/views/opportunities/update.js.haml_spec.rb +1 -1
- data/vendor/gems/ransack_ui-1.3.4/.gitignore +17 -0
- data/vendor/gems/ransack_ui-1.3.4/Gemfile +7 -0
- data/vendor/gems/ransack_ui-1.3.4/LICENSE.txt +22 -0
- data/vendor/gems/ransack_ui-1.3.4/README.md +57 -0
- data/vendor/gems/ransack_ui-1.3.4/Rakefile +1 -0
- data/vendor/gems/ransack_ui-1.3.4/app/assets/images/ransack_ui/calendar.png +0 -0
- data/vendor/gems/ransack_ui-1.3.4/app/assets/images/ransack_ui/delete.png +0 -0
- data/vendor/gems/ransack_ui-1.3.4/app/assets/javascripts/ransack/predicates.js.coffee +41 -0
- data/vendor/gems/ransack_ui-1.3.4/app/assets/javascripts/ransack_ui_bootstrap/button_group_select.js.coffee +26 -0
- data/vendor/gems/ransack_ui-1.3.4/app/assets/javascripts/ransack_ui_bootstrap/index.js.coffee +2 -0
- data/vendor/gems/ransack_ui-1.3.4/app/assets/javascripts/ransack_ui_jquery/index.js +2 -0
- data/vendor/gems/ransack_ui-1.3.4/app/assets/javascripts/ransack_ui_jquery/search_form.js.coffee.erb +499 -0
- data/vendor/gems/ransack_ui-1.3.4/app/assets/stylesheets/ransack_ui_bootstrap/index.css +3 -0
- data/vendor/gems/ransack_ui-1.3.4/app/assets/stylesheets/ransack_ui_bootstrap/search.css.scss +41 -0
- data/vendor/gems/ransack_ui-1.3.4/app/views/ransack_ui/_condition_fields.html.erb +15 -0
- data/vendor/gems/ransack_ui-1.3.4/app/views/ransack_ui/_grouping_fields.html.erb +16 -0
- data/vendor/gems/ransack_ui-1.3.4/app/views/ransack_ui/_search.html.erb +29 -0
- data/vendor/gems/ransack_ui-1.3.4/app/views/ransack_ui/_sort_fields.html.erb +4 -0
- data/vendor/gems/ransack_ui-1.3.4/config/locales/en.yml +24 -0
- data/vendor/gems/ransack_ui-1.3.4/lib/ransack_ui.rb +9 -0
- data/vendor/gems/ransack_ui-1.3.4/lib/ransack_ui/adapters/active_record.rb +6 -0
- data/vendor/gems/ransack_ui-1.3.4/lib/ransack_ui/adapters/active_record/base.rb +46 -0
- data/vendor/gems/ransack_ui-1.3.4/lib/ransack_ui/controller_helpers.rb +18 -0
- data/vendor/gems/ransack_ui-1.3.4/lib/ransack_ui/rails/engine.rb +21 -0
- data/vendor/gems/ransack_ui-1.3.4/lib/ransack_ui/ransack_overrides/adapters/active_record/base.rb +47 -0
- data/vendor/gems/ransack_ui-1.3.4/lib/ransack_ui/ransack_overrides/configuration.rb +15 -0
- data/vendor/gems/ransack_ui-1.3.4/lib/ransack_ui/ransack_overrides/context.rb +9 -0
- data/vendor/gems/ransack_ui-1.3.4/lib/ransack_ui/ransack_overrides/helpers/form_builder.rb +262 -0
- data/vendor/gems/ransack_ui-1.3.4/lib/ransack_ui/ransack_overrides/nodes/attribute.rb +13 -0
- data/vendor/gems/ransack_ui-1.3.4/lib/ransack_ui/ransack_overrides/nodes/condition.rb +13 -0
- data/vendor/gems/ransack_ui-1.3.4/lib/ransack_ui/ransack_overrides/nodes/grouping.rb +20 -0
- data/vendor/gems/ransack_ui-1.3.4/lib/ransack_ui/version.rb +3 -0
- data/vendor/gems/ransack_ui-1.3.4/lib/ransack_ui/view_helpers.rb +30 -0
- data/vendor/gems/ransack_ui-1.3.4/ransack_ui.gemspec +23 -0
- metadata +79 -67
- data/app/controllers/authentications_controller.rb +0 -53
- data/app/models/users/authentication.rb +0 -56
- data/app/views/authentications/new.html.haml +0 -19
- data/app/views/passwords/edit.html.haml +0 -15
- data/app/views/passwords/new.html.haml +0 -10
- data/app/views/user_mailer/password_reset_instructions.html.haml +0 -6
- data/app/views/users/new.html.haml +0 -19
- data/spec/controllers/authentications_controller_spec.rb +0 -150
- data/spec/controllers/passwords_controller_spec.rb +0 -32
- data/spec/models/users/authentication_spec.rb +0 -19
- data/spec/support/auth_macros.rb +0 -49
- data/spec/views/authentications/new.haml_spec.rb +0 -31
@@ -14,7 +14,7 @@
|
|
14
14
|
%li= link_to_delete(contact)
|
15
15
|
|
16
16
|
.indentslim
|
17
|
-
= link_to_if can?(:read, contact), contact.full_name(
|
17
|
+
= link_to_if can?(:read, contact), contact.full_name(current_user.preference[:contacts_naming]), contact
|
18
18
|
%tt
|
19
19
|
= brief_account_info(contact)
|
20
20
|
|
@@ -14,7 +14,7 @@
|
|
14
14
|
%li= link_to_delete(contact)
|
15
15
|
|
16
16
|
.indentslim
|
17
|
-
= link_to_if can?(:read, contact), contact.full_name(
|
17
|
+
= link_to_if can?(:read, contact), contact.full_name(current_user.preference[:contacts_naming]), contact
|
18
18
|
%tt
|
19
19
|
- if contact.title? && contact.department?
|
20
20
|
== #{contact.title}, #{contact.department}
|
@@ -14,7 +14,7 @@
|
|
14
14
|
%li= link_to_delete(contact)
|
15
15
|
|
16
16
|
.indentslim
|
17
|
-
= link_to_if can?(:read, contact), contact.full_name(
|
17
|
+
= link_to_if can?(:read, contact), contact.full_name(current_user.preference[:contacts_naming]), contact
|
18
18
|
%tt
|
19
19
|
= brief_account_info(contact)
|
20
20
|
|
@@ -0,0 +1,9 @@
|
|
1
|
+
.standalone#standalone
|
2
|
+
= simple_form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { method: :post }) do |f|
|
3
|
+
.title= t('devise.confirmations.new.resend_confirmation_instructions')
|
4
|
+
.section
|
5
|
+
.label= t(:email)
|
6
|
+
= f.input_field :email, required: true, autofocus: true
|
7
|
+
%br
|
8
|
+
.buttonbar
|
9
|
+
= f.button :submit, t('devise.confirmations.new.resend_confirmation_instructions')
|
@@ -0,0 +1,18 @@
|
|
1
|
+
.standalone
|
2
|
+
= simple_form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put }) do |f|
|
3
|
+
.title= t(:reset_password)
|
4
|
+
|
5
|
+
= f.error_messages object_name: t('password')
|
6
|
+
|
7
|
+
.intro= t(:confirm_password_intro)
|
8
|
+
|
9
|
+
= f.input :reset_password_token, as: :hidden, input_html: { value: params[:reset_password_token] }
|
10
|
+
|
11
|
+
.section
|
12
|
+
.label= t(:new_password)
|
13
|
+
= f.input_field :password, required: true, autofocus: true
|
14
|
+
.label= t(:password_confirmation)
|
15
|
+
= f.input_field :password_confirmation, required: true
|
16
|
+
%br
|
17
|
+
.buttonbar
|
18
|
+
= f.submit t(:update_password_and_login)
|
@@ -0,0 +1,10 @@
|
|
1
|
+
.standalone#standalone
|
2
|
+
= simple_form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post }) do |f|
|
3
|
+
.title= t(:forgot_password)
|
4
|
+
.intro= t(:password_intro)
|
5
|
+
.section
|
6
|
+
.label= t(:email)
|
7
|
+
= f.input_field :email, required: true, autofocus: true
|
8
|
+
%br
|
9
|
+
.buttonbar
|
10
|
+
= f.button :submit, t(:reset_password), id: 'passwords_submit'
|
@@ -0,0 +1,21 @@
|
|
1
|
+
.standalone
|
2
|
+
= simple_form_for(@user, html: one_submit_only) do |f|
|
3
|
+
.title_tools
|
4
|
+
= t(:already_signed_up)
|
5
|
+
= link_to t(:login_now_link), new_session_path(resource_name)
|
6
|
+
.title= t(:sign_up)
|
7
|
+
|
8
|
+
= f.error_messages object_name: t('user')
|
9
|
+
|
10
|
+
.section
|
11
|
+
.label= t(:username)
|
12
|
+
= f.input_field :username, minlength: 1
|
13
|
+
.label= t(:email)
|
14
|
+
= f.input_field :email
|
15
|
+
.label= t(:password)
|
16
|
+
= f.input_field :password
|
17
|
+
.label= t(:password_confirmation)
|
18
|
+
= f.input_field :password_confirmation
|
19
|
+
|
20
|
+
.buttonbar
|
21
|
+
= f.submit t(:sign_up_button)
|
@@ -0,0 +1,32 @@
|
|
1
|
+
= content_for(:javascript_epilogue) do
|
2
|
+
:plain
|
3
|
+
document.observe("dom:loaded", function() {
|
4
|
+
new Effect.Move("standalone", { x:0, y:-16, mode:"relative", fps:100, duration:0.15, afterFinishInternal: function(effect) {
|
5
|
+
new Effect.Move("standalone", { x:0, y:16, mode:"relative", fps:100, duration:0.15, afterFinishInternal: function(effect) {
|
6
|
+
new Effect.Move("standalone", { x:0, y:-8, mode:"relative", fps:100, duration:0.15, afterFinishInternal: function(effect) {
|
7
|
+
new Effect.Move("standalone", { x:0, y:8, mode:"relative", fps:100, duration:0.15 });
|
8
|
+
}});
|
9
|
+
}});
|
10
|
+
}});
|
11
|
+
});
|
12
|
+
|
13
|
+
.standalone#standalone
|
14
|
+
= simple_form_for(resource, as: resource_name, url: session_path(resource_name)) do |f|
|
15
|
+
- if User.can_signup?
|
16
|
+
.title_tools
|
17
|
+
= t(:no_account)
|
18
|
+
= link_to(t(:sign_up_now), new_registration_path(resource_name))
|
19
|
+
.title= t(:login)
|
20
|
+
.section
|
21
|
+
.label= t(:username)
|
22
|
+
= f.input_field :email, as: :string
|
23
|
+
.label= t(:password)
|
24
|
+
= f.input_field :password
|
25
|
+
|
26
|
+
%div(style="margin-left:12px")
|
27
|
+
= f.input :remember_me, as: :boolean, inline_label: t('remember_me')
|
28
|
+
%br
|
29
|
+
.buttonbar
|
30
|
+
= f.submit t(:login)
|
31
|
+
= t(:or)
|
32
|
+
= link_to t(:forgot_password) + '?', new_password_path(resource_name)
|
@@ -9,9 +9,9 @@
|
|
9
9
|
#{t :about_ffc_resources}:
|
10
10
|
%ul
|
11
11
|
%li== » #{link_to t(:about_home_page), "http://www.fatfreecrm.com", :"data-popup" => true}
|
12
|
-
%li== » #{link_to t(:about_project_page), "
|
13
|
-
%li== » #{link_to t(:about_features), "
|
14
|
-
%li== » #{link_to t(:about_twitter), "
|
15
|
-
%li== » #{link_to t(:about_user_group), "
|
16
|
-
%li== » #{link_to t(:about_dev_group), "
|
12
|
+
%li== » #{link_to t(:about_project_page), "https://github.com/fatfreecrm/fat_free_crm/tree/master", :"data-popup" => true}
|
13
|
+
%li== » #{link_to t(:about_features), "https://github.com/fatfreecrm/fat_free_crm/issues", :"data-popup" => true}
|
14
|
+
%li== » #{link_to t(:about_twitter), "https://twitter.com/fatfreecrm", :"data-popup" => true}
|
15
|
+
%li== » #{link_to t(:about_user_group), "https://groups.google.com/group/fat-free-crm-users", :"data-popup" => true}
|
16
|
+
%li== » #{link_to t(:about_dev_group), "https://groups.google.com/group/fat-free-crm-dev", :"data-popup" => true}
|
17
17
|
%br
|
@@ -10,11 +10,11 @@
|
|
10
10
|
= link_to(t(:profile), profile_path) << " |"
|
11
11
|
- if current_user.admin?
|
12
12
|
= link_to(t(:admin), admin_path) << " |"
|
13
|
-
= link_to(t(:logout),
|
13
|
+
= link_to(t(:logout), destroy_user_session_path, method: :delete)
|
14
14
|
= render "/layouts/jumpbox"
|
15
15
|
- else
|
16
|
-
= link_to(t(:login),
|
17
|
-
= link_to(t(:sign_up),
|
16
|
+
= link_to(t(:login), new_user_session_path) << " |"
|
17
|
+
= link_to(t(:sign_up), new_user_registration_path) << " |" if User.can_signup?
|
18
18
|
= link_to(t(:about), "#", title: t(:about_ffc), onclick: "$('#about').dialog({ title: this.title, modal: true }); return false;")
|
19
19
|
%h3
|
20
20
|
= link_to("Fat Free CRM", root_path)
|
@@ -8,7 +8,7 @@
|
|
8
8
|
= link_to(t(:quick_find), "#", id: "jumper") << " |"
|
9
9
|
= link_to(t(:profile), profile_path) << " |"
|
10
10
|
= link_to(t(:back_to_crm), root_path) << " |"
|
11
|
-
= link_to(t(:logout),
|
11
|
+
= link_to(t(:logout), destroy_user_session_path, method: :delete)
|
12
12
|
= render "/layouts/jumpbox"
|
13
13
|
%h3
|
14
14
|
= link_to(t(:crm_admin_page), admin_path)
|
@@ -26,19 +26,19 @@
|
|
26
26
|
.label #{t title}:
|
27
27
|
- else
|
28
28
|
.label #{t title}:
|
29
|
-
= address_field(a,
|
30
|
-
= address_field(a,
|
29
|
+
= address_field(a, :street1, "width:240px; margin-top:3px")
|
30
|
+
= address_field(a, :street2, "width:240px;")
|
31
31
|
%table.address(cellpadding="0" cellspacing="0")
|
32
32
|
%tr
|
33
33
|
%td
|
34
|
-
= address_field(a,
|
34
|
+
= address_field(a, :city, "width:165px;")
|
35
35
|
%td= spacer
|
36
36
|
%td
|
37
|
-
= address_field(a,
|
37
|
+
= address_field(a, :state, "width:60px;")
|
38
38
|
%table.address(cellpadding="0" cellspacing="0")
|
39
39
|
%tr
|
40
40
|
%td
|
41
|
-
= address_field(a,
|
41
|
+
= address_field(a, :zipcode, "width:80px;")
|
42
42
|
%td= spacer
|
43
43
|
%td
|
44
44
|
= a.country_select(:country, priority_countries, { include_blank: "" }, {:"data-placeholder" => t(:select_a_country), style: "width:150px; margin-top:6px", class: 'select2'})
|
@@ -11,7 +11,7 @@
|
|
11
11
|
%div= a.file_field :image
|
12
12
|
|
13
13
|
.buttonbar
|
14
|
-
%small.cool{style: "float:right"}== #{t :gravatar_help} #{link_to(t(:here), "
|
14
|
+
%small.cool{style: "float:right"}== #{t :gravatar_help} #{link_to(t(:here), "https://en.gravatar.com", :"data-popup" => true)}.
|
15
15
|
= f.submit t(:upload_picture), id: "user_avatar_submit"
|
16
16
|
#{t :or}
|
17
17
|
= link_to(t(:use_gravatar), upload_avatar_user_path(@user) + '?gravatar=1', method: :put, remote: true)
|
data/bin/bundle
CHANGED
data/bin/rails
CHANGED
data/bin/setup
ADDED
@@ -0,0 +1,38 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
require 'fileutils'
|
5
|
+
include FileUtils
|
6
|
+
|
7
|
+
# path to your application root.
|
8
|
+
APP_ROOT = File.expand_path('..', __dir__)
|
9
|
+
|
10
|
+
def system!(*args)
|
11
|
+
system(*args) || abort("\n== Command #{args} failed ==")
|
12
|
+
end
|
13
|
+
|
14
|
+
chdir APP_ROOT do
|
15
|
+
# This script is a starting point to setup your application.
|
16
|
+
# Add necessary setup steps to this file.
|
17
|
+
|
18
|
+
puts '== Installing dependencies =='
|
19
|
+
system! 'gem install bundler --conservative'
|
20
|
+
system('bundle check') || system!('bundle install')
|
21
|
+
|
22
|
+
# Install JavaScript dependencies if using Yarn
|
23
|
+
# system('bin/yarn')
|
24
|
+
|
25
|
+
# puts "\n== Copying sample files =="
|
26
|
+
# unless File.exist?('config/database.yml')
|
27
|
+
# cp 'config/database.yml.sample', 'config/database.yml'
|
28
|
+
# end
|
29
|
+
|
30
|
+
puts "\n== Preparing database =="
|
31
|
+
system! 'bin/rails db:setup'
|
32
|
+
|
33
|
+
puts "\n== Removing old logs and tempfiles =="
|
34
|
+
system! 'bin/rails log:clear tmp:clear'
|
35
|
+
|
36
|
+
puts "\n== Restarting application server =="
|
37
|
+
system! 'bin/rails restart'
|
38
|
+
end
|
data/bin/update
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
require 'fileutils'
|
5
|
+
include FileUtils
|
6
|
+
|
7
|
+
# path to your application root.
|
8
|
+
APP_ROOT = File.expand_path('..', __dir__)
|
9
|
+
|
10
|
+
def system!(*args)
|
11
|
+
system(*args) || abort("\n== Command #{args} failed ==")
|
12
|
+
end
|
13
|
+
|
14
|
+
chdir APP_ROOT do
|
15
|
+
# This script is a way to update your development environment automatically.
|
16
|
+
# Add necessary update steps to this file.
|
17
|
+
|
18
|
+
puts '== Installing dependencies =='
|
19
|
+
system! 'gem install bundler --conservative'
|
20
|
+
system('bundle check') || system!('bundle install')
|
21
|
+
|
22
|
+
# Install JavaScript dependencies if using Yarn
|
23
|
+
# system('bin/yarn')
|
24
|
+
|
25
|
+
puts "\n== Updating database =="
|
26
|
+
system! 'bin/rails db:migrate'
|
27
|
+
|
28
|
+
puts "\n== Removing old logs and tempfiles =="
|
29
|
+
system! 'bin/rails log:clear tmp:clear'
|
30
|
+
|
31
|
+
puts "\n== Restarting application server =="
|
32
|
+
system! 'bin/rails restart'
|
33
|
+
end
|
data/bin/yarn
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
APP_ROOT = File.expand_path('..', __dir__)
|
5
|
+
Dir.chdir(APP_ROOT) do
|
6
|
+
begin
|
7
|
+
exec "yarnpkg", *ARGV
|
8
|
+
rescue Errno::ENOENT
|
9
|
+
warn "Yarn executable was not detected in the system."
|
10
|
+
warn "Download Yarn at https://yarnpkg.com/en/docs/install"
|
11
|
+
exit 1
|
12
|
+
end
|
13
|
+
end
|
data/config/application.rb
CHANGED
@@ -5,9 +5,10 @@
|
|
5
5
|
# Fat Free CRM is freely distributable under the terms of MIT license.
|
6
6
|
# See MIT-LICENSE file or http://www.opensource.org/licenses/mit-license.php
|
7
7
|
#------------------------------------------------------------------------------
|
8
|
-
|
8
|
+
require_relative 'boot'
|
9
9
|
|
10
10
|
require 'rubygems'
|
11
|
+
require 'rails/all'
|
11
12
|
|
12
13
|
# Pick the frameworks you want:
|
13
14
|
require "active_record/railtie"
|
@@ -27,6 +28,9 @@ require 'fat_free_crm/gem_ext/rails/engine'
|
|
27
28
|
|
28
29
|
module FatFreeCRM
|
29
30
|
class Application < Rails::Application
|
31
|
+
# Initialize configuration defaults for originally generated Rails version.
|
32
|
+
config.load_defaults 5.0
|
33
|
+
|
30
34
|
# Settings in config/environments/* take precedence over those specified here.
|
31
35
|
# Application configuration should go into files in config/initializers
|
32
36
|
# -- all .rb files in that directory are automatically loaded.
|
@@ -36,12 +40,10 @@ module FatFreeCRM
|
|
36
40
|
Dir[Rails.root.join("app/controllers/entities")]
|
37
41
|
|
38
42
|
# Prevent Field class from being reloaded more than once as this clears registered customfields
|
39
|
-
config.autoload_once_paths += [File.expand_path(
|
43
|
+
config.autoload_once_paths += [File.expand_path('app/models/fields/field.rb', __dir__)]
|
40
44
|
|
41
45
|
# Activate observers that should always be running.
|
42
|
-
unless ARGV.join.include?('assets:precompile')
|
43
|
-
config.active_record.observers = :lead_observer, :opportunity_observer, :task_observer, :entity_observer
|
44
|
-
end
|
46
|
+
config.active_record.observers = :lead_observer, :opportunity_observer, :task_observer, :entity_observer unless ARGV.join.include?('assets:precompile')
|
45
47
|
|
46
48
|
# Load development rake tasks (RSpec, Gem packaging, etc.)
|
47
49
|
rake_tasks do
|
@@ -69,7 +71,7 @@ module FatFreeCRM
|
|
69
71
|
config.encoding = "utf-8"
|
70
72
|
|
71
73
|
# Configure sensitive parameters which will be filtered from the log file.
|
72
|
-
config.filter_parameters += %i[password
|
74
|
+
config.filter_parameters += %i[password encrypted_password password_salt password_confirmation]
|
73
75
|
end
|
74
76
|
end
|
75
77
|
|
data/config/boot.rb
CHANGED
@@ -7,7 +7,7 @@
|
|
7
7
|
#------------------------------------------------------------------------------
|
8
8
|
|
9
9
|
# Set up gems listed in the Gemfile.
|
10
|
-
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('
|
10
|
+
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
|
11
11
|
|
12
12
|
require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE'])
|
13
13
|
|
data/config/brakeman.ignore
CHANGED
@@ -47,13 +47,13 @@
|
|
47
47
|
"file": "app/views/admin/users/_user.html.haml",
|
48
48
|
"line": 44,
|
49
49
|
"link": "https://brakemanscanner.org/docs/warning_types/cross_site_scripting",
|
50
|
-
"code": "t(:last_logged_in, timeago((Unresolved Model).new.
|
50
|
+
"code": "t(:last_logged_in, timeago((Unresolved Model).new.current_sign_in_at))",
|
51
51
|
"render_path": [{"type":"template","name":"admin/users/index","line":11,"file":"app/views/admin/users/index.html.haml"}],
|
52
52
|
"location": {
|
53
53
|
"type": "template",
|
54
54
|
"template": "admin/users/_user"
|
55
55
|
},
|
56
|
-
"user_input": "(Unresolved Model).new.
|
56
|
+
"user_input": "(Unresolved Model).new.current_sign_in_at",
|
57
57
|
"confidence": "Weak",
|
58
58
|
"note": ""
|
59
59
|
},
|
@@ -2,10 +2,10 @@
|
|
2
2
|
development: &development
|
3
3
|
adapter: postgresql
|
4
4
|
database: fat_free_crm_development
|
5
|
-
username:
|
6
|
-
password:
|
7
|
-
host:
|
8
|
-
port:
|
5
|
+
username: <%= ENV['DB_USERNAME'] %>
|
6
|
+
password: <%= ENV['DB_PASSWORD'] %>
|
7
|
+
host: <%= ENV['DB_HOST'] %>
|
8
|
+
port: <%= ENV['DB_PORT'] %>
|
9
9
|
schema_search_path: public
|
10
10
|
min_messages: warning
|
11
11
|
|
@@ -18,7 +18,7 @@ test:
|
|
18
18
|
|
19
19
|
production:
|
20
20
|
<<: *development
|
21
|
-
database:
|
21
|
+
database: <%= ENV['DB_DATABASE'] %>
|
22
22
|
|
23
23
|
staging:
|
24
24
|
<<: *development
|
data/config/environment.rb
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
# See MIT-LICENSE file or http://www.opensource.org/licenses/mit-license.php
|
7
7
|
#------------------------------------------------------------------------------
|
8
8
|
# Load the rails application
|
9
|
-
|
9
|
+
require_relative 'application'
|
10
10
|
|
11
11
|
# Initialize the rails application
|
12
12
|
FatFreeCRM::Application.initialize!
|