fat_free_crm 0.18.1 → 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.

Files changed (385) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/brakeman-analysis.yml +46 -0
  3. data/.github/workflows/rubocop-analysis.yml +40 -0
  4. data/.github/workflows/ruby.yml +52 -0
  5. data/.rubocop_todo.yml +80 -173
  6. data/.travis.yml +17 -20
  7. data/CHANGELOG.md +63 -3
  8. data/CONTRIBUTORS.md +1 -0
  9. data/Dockerfile +45 -14
  10. data/Gemfile +21 -11
  11. data/Gemfile.lock +315 -263
  12. data/Procfile +1 -1
  13. data/README.md +6 -5
  14. data/Rakefile +1 -1
  15. data/SECURITY.md +11 -0
  16. data/app/assets/javascripts/application.js.erb +3 -0
  17. data/app/assets/stylesheets/application.css.erb +1 -0
  18. data/app/assets/stylesheets/base.scss +9 -2
  19. data/app/assets/stylesheets/bootstrap-custom.scss +206 -0
  20. data/app/assets/stylesheets/common.scss +88 -68
  21. data/app/assets/stylesheets/header.scss +0 -8
  22. data/app/controllers/admin/application_controller.rb +1 -1
  23. data/app/controllers/admin/field_groups_controller.rb +2 -4
  24. data/app/controllers/admin/fields_controller.rb +1 -1
  25. data/app/controllers/admin/groups_controller.rb +1 -1
  26. data/app/controllers/admin/tags_controller.rb +3 -5
  27. data/app/controllers/admin/users_controller.rb +7 -9
  28. data/app/controllers/application_controller.rb +21 -45
  29. data/app/controllers/comments_controller.rb +3 -6
  30. data/{config/initializers/authlogic.rb → app/controllers/confirmations_controller.rb} +4 -2
  31. data/app/controllers/emails_controller.rb +0 -2
  32. data/app/controllers/entities/accounts_controller.rb +2 -4
  33. data/app/controllers/entities/campaigns_controller.rb +2 -4
  34. data/app/controllers/entities/contacts_controller.rb +4 -24
  35. data/app/controllers/entities/leads_controller.rb +7 -10
  36. data/app/controllers/entities/opportunities_controller.rb +4 -14
  37. data/app/controllers/entities_controller.rb +21 -7
  38. data/app/controllers/home_controller.rb +5 -5
  39. data/app/controllers/lists_controller.rb +1 -1
  40. data/app/controllers/passwords_controller.rb +3 -59
  41. data/{spec/features/support/maintain_sessions.rb → app/controllers/registrations_controller.rb} +12 -5
  42. data/{lib/development_tasks/gem.rake → app/controllers/sessions_controller.rb} +6 -6
  43. data/app/controllers/tasks_controller.rb +11 -20
  44. data/app/controllers/users_controller.rb +11 -30
  45. data/app/helpers/accounts_helper.rb +12 -0
  46. data/app/helpers/admin/users_helper.rb +1 -1
  47. data/app/helpers/application_helper.rb +30 -37
  48. data/app/helpers/campaigns_helper.rb +1 -1
  49. data/app/helpers/contacts_helper.rb +1 -3
  50. data/app/helpers/opportunities_helper.rb +4 -12
  51. data/app/helpers/tasks_helper.rb +3 -3
  52. data/app/helpers/users_helper.rb +1 -3
  53. data/{config/initializers/paper_trail.rb → app/mailers/devise_mailer.rb} +5 -1
  54. data/app/mailers/user_mailer.rb +0 -9
  55. data/app/models/entities/account.rb +11 -11
  56. data/app/models/entities/account_contact.rb +1 -1
  57. data/app/models/entities/account_opportunity.rb +1 -1
  58. data/app/models/entities/campaign.rb +5 -7
  59. data/app/models/entities/contact.rb +25 -13
  60. data/app/models/entities/lead.rb +8 -8
  61. data/app/models/entities/opportunity.rb +8 -10
  62. data/app/models/fields/custom_field.rb +1 -0
  63. data/app/models/fields/custom_field_date_pair.rb +2 -0
  64. data/app/models/fields/custom_field_pair.rb +2 -2
  65. data/app/models/fields/field.rb +1 -3
  66. data/app/models/list.rb +1 -1
  67. data/app/models/observers/entity_observer.rb +3 -7
  68. data/app/models/observers/lead_observer.rb +2 -4
  69. data/app/models/observers/opportunity_observer.rb +3 -5
  70. data/app/models/observers/task_observer.rb +1 -1
  71. data/app/models/polymorphic/address.rb +1 -1
  72. data/app/models/polymorphic/comment.rb +1 -1
  73. data/app/models/polymorphic/email.rb +3 -3
  74. data/app/models/polymorphic/task.rb +14 -10
  75. data/app/models/polymorphic/version.rb +3 -2
  76. data/app/models/setting.rb +5 -1
  77. data/app/models/users/permission.rb +3 -3
  78. data/app/models/users/preference.rb +4 -3
  79. data/app/models/users/user.rb +67 -42
  80. data/app/views/accounts/_edit.html.haml +2 -2
  81. data/app/views/accounts/_new.html.haml +2 -2
  82. data/app/views/accounts/_sidebar_index.html.haml +2 -2
  83. data/app/views/accounts/_sidebar_show.html.haml +19 -19
  84. data/app/views/accounts/_top_section.html.haml +1 -1
  85. data/app/views/accounts/create.js.haml +1 -2
  86. data/app/views/accounts/destroy.js.haml +1 -1
  87. data/app/views/accounts/edit.js.haml +1 -1
  88. data/app/views/accounts/show.html.haml +1 -0
  89. data/app/views/accounts/update.js.haml +4 -5
  90. data/app/views/admin/field_groups/create.js.haml +0 -1
  91. data/app/views/admin/field_groups/destroy.js.haml +0 -1
  92. data/app/views/admin/field_groups/update.js.haml +0 -1
  93. data/app/views/admin/fields/create.js.haml +0 -1
  94. data/app/views/admin/fields/destroy.js.haml +0 -1
  95. data/app/views/admin/fields/update.js.haml +0 -1
  96. data/app/views/admin/groups/create.js.haml +0 -1
  97. data/app/views/admin/groups/destroy.js.haml +0 -1
  98. data/app/views/admin/groups/update.js.haml +0 -1
  99. data/app/views/admin/tags/create.js.haml +0 -1
  100. data/app/views/admin/tags/destroy.js.haml +0 -1
  101. data/app/views/admin/tags/update.js.haml +0 -1
  102. data/app/views/admin/users/_user.html.haml +4 -4
  103. data/app/views/admin/users/create.js.haml +0 -1
  104. data/app/views/admin/users/destroy.js.haml +0 -1
  105. data/app/views/admin/users/update.js.haml +0 -1
  106. data/app/views/campaigns/_edit.html.haml +1 -1
  107. data/app/views/campaigns/_new.html.haml +1 -1
  108. data/app/views/campaigns/_sidebar_index.html.haml +2 -2
  109. data/app/views/campaigns/_sidebar_show.html.haml +68 -67
  110. data/app/views/campaigns/create.js.haml +1 -2
  111. data/app/views/campaigns/destroy.js.haml +1 -1
  112. data/app/views/campaigns/show.html.haml +1 -0
  113. data/app/views/campaigns/update.js.haml +3 -4
  114. data/app/views/comments/_edit.html.haml +1 -1
  115. data/app/views/comments/_new.html.haml +1 -1
  116. data/app/views/comments/update.js.haml +0 -1
  117. data/app/views/contacts/_edit.html.haml +1 -1
  118. data/app/views/contacts/_index_brief.html.haml +1 -1
  119. data/app/views/contacts/_index_full.html.haml +1 -1
  120. data/app/views/contacts/_index_long.html.haml +1 -1
  121. data/app/views/contacts/_new.html.haml +1 -1
  122. data/app/views/contacts/_sidebar_show.html.haml +18 -18
  123. data/app/views/contacts/create.js.haml +0 -1
  124. data/app/views/contacts/destroy.js.haml +1 -1
  125. data/app/views/contacts/show.html.haml +1 -0
  126. data/app/views/contacts/update.js.haml +2 -3
  127. data/app/views/devise/confirmations/new.html.haml +9 -0
  128. data/app/views/devise/mailer/confirmation_instructions.html.haml +4 -0
  129. data/app/views/devise/mailer/password_change.html.haml +3 -0
  130. data/app/views/devise/mailer/reset_password_instructions.html.haml +6 -0
  131. data/app/views/devise/passwords/edit.html.haml +18 -0
  132. data/app/views/devise/passwords/new.html.haml +10 -0
  133. data/app/views/devise/registrations/new.html.haml +21 -0
  134. data/app/views/devise/sessions/new.html.haml +32 -0
  135. data/app/views/entities/_title_bar.html.haml +1 -1
  136. data/app/views/entities/attach.js.haml +2 -2
  137. data/app/views/entities/discard.js.haml +2 -2
  138. data/app/views/home/_opportunity.html.haml +1 -1
  139. data/app/views/home/_task.html.haml +1 -1
  140. data/app/views/home/index.xls.builder +51 -0
  141. data/app/views/layouts/_about.html.haml +5 -5
  142. data/app/views/layouts/_header.html.haml +3 -3
  143. data/app/views/layouts/_sidebar.html.haml +2 -2
  144. data/app/views/layouts/_tabbed.html.haml +14 -11
  145. data/app/views/layouts/admin/_header.html.haml +1 -1
  146. data/app/views/layouts/application.html.haml +2 -2
  147. data/app/views/leads/_edit.html.haml +2 -2
  148. data/app/views/leads/_new.html.haml +2 -2
  149. data/app/views/leads/_sidebar_index.html.haml +2 -2
  150. data/app/views/leads/_sidebar_show.html.haml +30 -30
  151. data/app/views/leads/create.js.haml +2 -3
  152. data/app/views/leads/destroy.js.haml +2 -2
  153. data/app/views/leads/promote.js.haml +3 -4
  154. data/app/views/leads/reject.js.haml +3 -3
  155. data/app/views/leads/show.html.haml +1 -1
  156. data/app/views/leads/update.js.haml +4 -5
  157. data/app/views/lists/create.js.haml +0 -1
  158. data/app/views/opportunities/_edit.html.haml +1 -1
  159. data/app/views/opportunities/_index_brief.html.haml +1 -1
  160. data/app/views/opportunities/_index_long.html.haml +1 -1
  161. data/app/views/opportunities/_new.html.haml +1 -1
  162. data/app/views/opportunities/_sidebar_index.html.haml +2 -2
  163. data/app/views/opportunities/_sidebar_show.html.haml +47 -46
  164. data/app/views/opportunities/create.js.haml +3 -4
  165. data/app/views/opportunities/destroy.js.haml +3 -3
  166. data/app/views/opportunities/show.html.haml +1 -0
  167. data/app/views/opportunities/update.js.haml +5 -6
  168. data/app/views/shared/_address.html.haml +5 -5
  169. data/app/views/shared/_empty.html.haml +1 -1
  170. data/app/views/shared/_inline_styles.html.haml +0 -26
  171. data/app/views/shared/_paginate_with_per_page.html.haml +1 -0
  172. data/app/views/tasks/_assigned.html.haml +1 -1
  173. data/app/views/tasks/_completed.html.haml +1 -1
  174. data/app/views/tasks/_edit.html.haml +1 -1
  175. data/app/views/tasks/_new.html.haml +1 -1
  176. data/app/views/tasks/_pending.html.haml +1 -1
  177. data/app/views/tasks/_related.html.haml +1 -1
  178. data/app/views/tasks/_selector.html.haml +7 -8
  179. data/app/views/tasks/_sidebar_index.html.haml +2 -2
  180. data/app/views/tasks/_title.html.haml +1 -1
  181. data/app/views/tasks/complete.js.haml +1 -1
  182. data/app/views/tasks/create.js.haml +1 -2
  183. data/app/views/tasks/destroy.js.haml +1 -1
  184. data/app/views/tasks/uncomplete.js.haml +1 -2
  185. data/app/views/tasks/update.js.haml +0 -1
  186. data/app/views/users/_avatar.html.haml +1 -1
  187. data/app/views/users/change_password.js.haml +0 -1
  188. data/app/views/users/update.js.haml +0 -1
  189. data/app/views/users/upload_avatar.js.haml +0 -1
  190. data/app/views/versions/_version_item.html.haml +1 -1
  191. data/bin/bundle +1 -1
  192. data/bin/rails +1 -1
  193. data/bin/setup +38 -0
  194. data/bin/update +33 -0
  195. data/bin/yarn +13 -0
  196. data/config/application.rb +8 -6
  197. data/config/boot.rb +1 -1
  198. data/config/brakeman.ignore +2 -2
  199. data/config/database.postgres.docker.yml +5 -5
  200. data/config/environment.rb +2 -2
  201. data/config/environments/development.rb +1 -0
  202. data/config/environments/test.rb +7 -0
  203. data/config/initializers/action_mailer.rb +1 -3
  204. data/config/initializers/application_controller_renderer.rb +9 -0
  205. data/config/initializers/assets.rb +6 -11
  206. data/config/initializers/backtrace_silencers.rb +0 -6
  207. data/config/initializers/content_security_policy.rb +31 -0
  208. data/config/initializers/cookies_serializer.rb +3 -6
  209. data/config/initializers/devise.rb +289 -0
  210. data/config/initializers/filter_parameter_logging.rb +0 -5
  211. data/config/initializers/gravatar.rb +0 -1
  212. data/config/initializers/inflections.rb +0 -6
  213. data/config/initializers/mime_types.rb +1 -9
  214. data/config/initializers/new_framework_defaults_6_0.rb +46 -0
  215. data/config/initializers/relative_url_root.rb +1 -3
  216. data/config/initializers/session_store.rb +1 -3
  217. data/config/initializers/simple_form.rb +135 -55
  218. data/config/initializers/simple_form_bootstrap.rb +433 -0
  219. data/config/initializers/wrap_parameters.rb +4 -9
  220. data/config/locales/fat_free_crm.cs.yml +86 -47
  221. data/config/locales/fat_free_crm.en-GB.yml +5 -5
  222. data/config/locales/fat_free_crm.en-US.yml +5 -5
  223. data/config/locales/fat_free_crm.fr.yml +1 -1
  224. data/config/locales/fat_free_crm.ru.yml +2 -0
  225. data/config/routes.rb +20 -9
  226. data/config/settings.default.yml +0 -41
  227. data/db/demo/users.yml +62 -81
  228. data/db/migrate/20100928030620_remove_uuid.rb +1 -2
  229. data/db/migrate/20120316045804_activities_to_versions.rb +1 -0
  230. data/db/migrate/20120510025219_add_not_null_constraints_for_timestamp_columns.rb +1 -0
  231. data/db/migrate/20180107082701_authlogic_to_devise.rb +58 -0
  232. data/db/migrate/20200806004152_add_pattern_to_fields.rb +7 -0
  233. data/db/migrate/20200806004459_add_html5_to_fields.rb +10 -0
  234. data/db/schema.rb +58 -48
  235. data/docker-compose.yml +10 -0
  236. data/fat_free_crm.gemspec +13 -15
  237. data/lib/development_tasks/license.rake +2 -2
  238. data/lib/fat_free_crm/callback.rb +2 -2
  239. data/lib/fat_free_crm/comment_extensions.rb +2 -4
  240. data/lib/fat_free_crm/core_ext/string.rb +1 -1
  241. data/lib/fat_free_crm/core_ext.rb +1 -1
  242. data/lib/fat_free_crm/engine.rb +1 -1
  243. data/lib/fat_free_crm/errors.rb +1 -1
  244. data/lib/fat_free_crm/export_csv.rb +1 -0
  245. data/lib/fat_free_crm/exportable.rb +1 -1
  246. data/lib/fat_free_crm/fields.rb +1 -1
  247. data/lib/fat_free_crm/gem_dependencies.rb +1 -1
  248. data/lib/fat_free_crm/gem_ext.rb +0 -1
  249. data/lib/fat_free_crm/i18n.rb +2 -2
  250. data/lib/fat_free_crm/mail_processor/base.rb +4 -10
  251. data/lib/fat_free_crm/mail_processor/dropbox.rb +5 -15
  252. data/lib/fat_free_crm/permissions.rb +7 -4
  253. data/lib/fat_free_crm/sortable.rb +1 -1
  254. data/lib/fat_free_crm/tabs.rb +2 -2
  255. data/lib/fat_free_crm/version.rb +2 -2
  256. data/lib/gravatar_image_tag.rb +8 -9
  257. data/lib/missing_translation_detector.rb +1 -0
  258. data/lib/tasks/ffcrm/missing_translations.rake +1 -0
  259. data/lib/tasks/ffcrm/preference_update.rake +19 -0
  260. data/lib/tasks/ffcrm/setup.rake +11 -2
  261. data/lib/tasks/ffcrm/update_data.rake +2 -2
  262. data/lib/templates/erb/scaffold/_form.html.erb +4 -2
  263. data/script/rails +2 -2
  264. data/spec/controllers/admin/users_controller_spec.rb +0 -56
  265. data/spec/controllers/comments_controller_spec.rb +12 -12
  266. data/spec/controllers/entities/campaigns_controller_spec.rb +1 -1
  267. data/spec/controllers/entities/contacts_controller_spec.rb +2 -1
  268. data/spec/controllers/entities/leads_controller_spec.rb +2 -2
  269. data/spec/controllers/entities/opportunities_controller_spec.rb +1 -1
  270. data/spec/controllers/entities_controller_spec.rb +5 -0
  271. data/spec/controllers/home_controller_spec.rb +8 -8
  272. data/spec/controllers/tasks_controller_spec.rb +6 -4
  273. data/spec/controllers/users_controller_spec.rb +41 -99
  274. data/spec/factories/account_factories.rb +5 -5
  275. data/spec/factories/campaign_factories.rb +3 -3
  276. data/spec/factories/contact_factories.rb +8 -8
  277. data/spec/factories/field_factories.rb +4 -3
  278. data/spec/factories/lead_factories.rb +5 -5
  279. data/spec/factories/list_factories.rb +2 -2
  280. data/spec/factories/opportunity_factories.rb +3 -3
  281. data/spec/factories/setting_factories.rb +2 -2
  282. data/spec/factories/shared_factories.rb +11 -9
  283. data/spec/factories/task_factories.rb +7 -7
  284. data/spec/factories/user_factories.rb +21 -21
  285. data/spec/features/acceptance_helper.rb +1 -1
  286. data/spec/features/accounts_spec.rb +2 -2
  287. data/spec/features/admin/groups_spec.rb +2 -2
  288. data/spec/features/admin/users_spec.rb +4 -2
  289. data/spec/features/campaigns_spec.rb +3 -3
  290. data/spec/features/contacts_spec.rb +3 -6
  291. data/spec/features/dashboard_spec.rb +1 -1
  292. data/spec/features/devise/sign_in_spec.rb +58 -0
  293. data/spec/features/devise/sign_up_spec.rb +36 -0
  294. data/spec/features/leads_spec.rb +12 -8
  295. data/spec/features/opportunities_overview_spec.rb +1 -1
  296. data/spec/features/opportunities_spec.rb +7 -7
  297. data/spec/features/support/browser.rb +8 -3
  298. data/spec/features/support/selector_helpers.rb +10 -1
  299. data/spec/features/tasks_spec.rb +7 -7
  300. data/spec/helpers/accounts_helper_spec.rb +57 -0
  301. data/spec/helpers/admin/field_groups_helper_spec.rb +1 -1
  302. data/spec/helpers/users_helper_spec.rb +4 -4
  303. data/spec/lib/comment_extensions_spec.rb +10 -4
  304. data/spec/lib/errors_spec.rb +2 -2
  305. data/spec/lib/mail_processor/dropbox_spec.rb +1 -1
  306. data/spec/lib/mail_processor/sample_emails/dropbox.rb +8 -8
  307. data/spec/lib/permissions_spec.rb +8 -3
  308. data/spec/mailers/devise_mailer_spec.rb +35 -0
  309. data/spec/mailers/user_mailer_spec.rb +0 -26
  310. data/spec/models/entities/account_spec.rb +27 -0
  311. data/spec/models/entities/contact_spec.rb +96 -1
  312. data/spec/models/entities/opportunity_spec.rb +2 -2
  313. data/spec/models/fields/custom_field_date_pair_spec.rb +4 -2
  314. data/spec/models/fields/custom_field_pair_spec.rb +2 -2
  315. data/spec/models/fields/custom_field_spec.rb +4 -2
  316. data/spec/models/observers/entity_observer_spec.rb +4 -4
  317. data/spec/models/polymorphic/task_spec.rb +11 -11
  318. data/spec/models/polymorphic/version_spec.rb +9 -9
  319. data/spec/models/users/preference_spec.rb +1 -1
  320. data/spec/models/users/user_spec.rb +22 -26
  321. data/spec/routing/users_routing_spec.rb +30 -8
  322. data/spec/shared/controllers.rb +3 -9
  323. data/spec/spec_helper.rb +10 -2
  324. data/spec/support/assert_select.rb +1 -0
  325. data/spec/support/devise_helpers.rb +28 -0
  326. data/spec/{features/support/helpers.rb → support/feature_helpers.rb} +10 -10
  327. data/spec/support/macros.rb +4 -1
  328. data/spec/views/accounts/_edit.haml_spec.rb +1 -1
  329. data/spec/views/accounts/_new.haml_spec.rb +1 -1
  330. data/spec/views/accounts/create.js.haml_spec.rb +1 -2
  331. data/spec/views/accounts/update.js.haml_spec.rb +2 -5
  332. data/spec/views/admin/field_groups/create.js.haml_spec.rb +0 -1
  333. data/spec/views/admin/field_groups/update.js.haml_spec.rb +0 -1
  334. data/spec/views/admin/users/create.js.haml_spec.rb +0 -1
  335. data/spec/views/admin/users/destroy.js.haml_spec.rb +0 -6
  336. data/spec/views/admin/users/update.js.haml_spec.rb +1 -2
  337. data/spec/views/campaigns/_edit.haml_spec.rb +1 -1
  338. data/spec/views/campaigns/_new.haml_spec.rb +1 -1
  339. data/spec/views/campaigns/create.js.haml_spec.rb +1 -2
  340. data/spec/views/campaigns/destroy.js.haml_spec.rb +0 -1
  341. data/spec/views/campaigns/edit.js.haml_spec.rb +2 -2
  342. data/spec/views/campaigns/index.js.haml_spec.rb +1 -1
  343. data/spec/views/campaigns/update.js.haml_spec.rb +3 -7
  344. data/spec/views/contacts/_edit.haml_spec.rb +1 -1
  345. data/spec/views/contacts/_new.haml_spec.rb +1 -1
  346. data/spec/views/contacts/create.js.haml_spec.rb +1 -2
  347. data/spec/views/contacts/edit.js.haml_spec.rb +1 -1
  348. data/spec/views/contacts/index.js.html_spec.rb +1 -1
  349. data/spec/views/contacts/update.js.haml_spec.rb +6 -10
  350. data/spec/views/home/index.haml_spec.rb +2 -2
  351. data/spec/views/leads/_edit.haml_spec.rb +1 -1
  352. data/spec/views/leads/_new.haml_spec.rb +1 -1
  353. data/spec/views/leads/create.js.haml_spec.rb +0 -3
  354. data/spec/views/leads/destroy.js.haml_spec.rb +0 -2
  355. data/spec/views/leads/promote.js.haml_spec.rb +3 -11
  356. data/spec/views/leads/reject.js.haml_spec.rb +0 -3
  357. data/spec/views/leads/update.js.haml_spec.rb +3 -11
  358. data/spec/views/opportunities/_edit.haml_spec.rb +1 -1
  359. data/spec/views/opportunities/_new.haml_spec.rb +1 -1
  360. data/spec/views/opportunities/create.js.haml_spec.rb +0 -2
  361. data/spec/views/opportunities/destroy.js.haml_spec.rb +0 -3
  362. data/spec/views/opportunities/update.js.haml_spec.rb +4 -12
  363. data/spec/views/tasks/_edit.haml_spec.rb +1 -1
  364. data/spec/views/tasks/complete.js.haml_spec.rb +0 -1
  365. data/spec/views/tasks/create.js.haml_spec.rb +0 -2
  366. data/spec/views/tasks/destroy.js.haml_spec.rb +0 -1
  367. data/spec/views/tasks/uncomplete.js.haml_spec.rb +0 -1
  368. data/spec/views/tasks/update.js.haml_spec.rb +1 -4
  369. data/spec/views/users/change_password.js.haml_spec.rb +1 -2
  370. data/spec/views/users/update.js.haml_spec.rb +1 -2
  371. data/spec/views/users/upload_avatar.js.haml_spec.rb +1 -2
  372. metadata +63 -77
  373. data/app/controllers/authentications_controller.rb +0 -53
  374. data/app/models/users/authentication.rb +0 -56
  375. data/app/views/authentications/new.html.haml +0 -19
  376. data/app/views/passwords/edit.html.haml +0 -15
  377. data/app/views/passwords/new.html.haml +0 -10
  378. data/app/views/user_mailer/password_reset_instructions.html.haml +0 -6
  379. data/app/views/users/new.html.haml +0 -19
  380. data/lib/fat_free_crm/gem_ext/simple_form/action_view_extensions/form_helper.rb +0 -26
  381. data/spec/controllers/authentications_controller_spec.rb +0 -150
  382. data/spec/controllers/passwords_controller_spec.rb +0 -32
  383. data/spec/models/users/authentication_spec.rb +0 -19
  384. data/spec/support/auth_macros.rb +0 -49
  385. data/spec/views/authentications/new.haml_spec.rb +0 -31
@@ -1,82 +1,83 @@
1
1
  .panel#summary
2
2
  .caption #{t :campaign_summary}
3
- %li
4
- %dt= @campaign.starts_on ? l(@campaign.starts_on, format: :mmdd) : t(:n_a)
5
- %tt #{t :start_date}:
6
- %li
7
- %dt= @campaign.ends_on ? l(@campaign.ends_on, format: :mmdd) : t(:n_a)
8
- %tt #{t :end_date}:
9
- %li
10
- %dt= @campaign.status ? t(@campaign.status) : t(:n_a)
11
- %tt #{t :status}:
12
- %li.last
13
- %dt= number_to_currency(@campaign.budget, precision: 0) || t(:n_a)
14
- %tt #{t :budget}:
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
- -# Target Leads.
19
- -#---------------------------------------------------------------------------
20
- %li
21
- %dt= @campaign.target_leads || t(:n_a)
22
- %tt #{t :leads}:
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
- -# Target Opportunities: calculated based on target number of leads and
31
- -# expected conversion ratio.
32
- -#---------------------------------------------------------------------------
33
- %li
34
- - if @campaign.target_leads.to_i > 0 && @campaign.target_conversion.to_i > 0
35
- - opportunities = @campaign.target_leads * @campaign.target_conversion / 100
36
- %dt= opportunities.to_i
37
- - else
38
- %dt N/A
39
- %tt #{t :opportunities}:
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
- -# Target Revenue.
42
- -#---------------------------------------------------------------------------
43
- %li.last
44
- %dt= number_to_currency(@campaign.target_revenue, precision: 0) || t(:n_a)
45
- %tt #{t :revenue}:
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
- -# Actual Number of Leads.
50
- -#---------------------------------------------------------------------------
51
- %li
52
- %dt= @campaign.leads_count || t(:n_a)
53
- %tt== #{t :leads}: #{performance(@campaign.leads_count, @campaign.target_leads)}
54
-
55
- -# Actual Conversion Ratio: calculated based on actual number of leads
56
- -# and opportunities.
57
- -#---------------------------------------------------------------------------
58
- %li
59
- - if @campaign.opportunities_count.to_i > 0 && @campaign.leads_count.to_i > 0
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
- -# Actual Opportunities.
68
- -#---------------------------------------------------------------------------
69
- %li
70
- %dt= @campaign.opportunities_count || t(:n_a)
71
- %tt
72
- #{t :opportunities}:
73
- = performance(@campaign.opportunities_count, opportunities)
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
- -# Actual Revenue.
76
- -#---------------------------------------------------------------------------
77
- %li.last
78
- %dt= number_to_currency(@campaign.revenue, precision: 0) || t(:n_a)
79
- %tt== #{t :revenue}: #{performance(@campaign.revenue, @campaign.target_revenue)}
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, :filters)
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, :filters)
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, :summary)
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, :filters)
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))}
@@ -5,5 +5,4 @@
5
5
  $('##{id}').effect("highlight", { duration:1500 });
6
6
  - else
7
7
  $('##{id}').html('#{ j render(partial: "edit") }');
8
- $('##{id}').effect("shake", { duration:250, distance: 6 });
9
8
  $('#comment_comment').focus();
@@ -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)
@@ -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(@current_user.preference[:contacts_naming]), contact
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(@current_user.preference[:contacts_naming]), contact
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(@current_user.preference[:contacts_naming]), contact
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
 
@@ -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
- %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}:
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, :filters)
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,6 +7,7 @@
7
7
  = styles_for :task, :opportunity
8
8
 
9
9
  = render 'contacts/title_bar', contact: @contact
10
+ = render 'contacts/sidebar_show', contact: @contact
10
11
 
11
12
  = render "comments/new", commentable: @contact
12
13
  = render partial: "shared/timeline", collection: @timeline
@@ -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, :summary)
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})
@@ -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,4 @@
1
+ - require 'devise/version'
2
+ %p= t('.greeting', recipient: @resource.email)
3
+ %p= t('.instruction')
4
+ %p= link_to t('.action'), confirmation_url(@resource, confirmation_token: @token)
@@ -0,0 +1,3 @@
1
+ - require 'devise/version'
2
+ %p= t('.greeting', recipient: @resource.email)
3
+ %p= t('.message')
@@ -0,0 +1,6 @@
1
+ - require 'devise/version'
2
+ %p= t('.greeting', recipient: @resource.email)
3
+ %p= t('.instruction')
4
+ %p= link_to t('.action'), edit_password_url(@resource, reset_password_token: @token)
5
+ %p= t('.instruction_2')
6
+ %p= t('.instruction_3')
@@ -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)
@@ -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, :summary)
17
+ = refresh_sidebar_for(:accounts, :show)
18
18
  - elsif called_from_landing_page?(:campaigns)
19
- = refresh_sidebar_for(:campaigns, :show, :summary)
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, :summary)
4
+ = refresh_sidebar_for(:accounts, :show)
5
5
  - elsif called_from_landing_page?(:campaigns)
6
- = refresh_sidebar_for(:campaigns, :show, :summary)
6
+ = refresh_sidebar_for(:campaigns, :show)
@@ -2,7 +2,7 @@
2
2
  - if opportunity.stage
3
3
  .strip{class: opportunity.stage}= t(opportunity.stage)
4
4
  - else
5
- .strip.white #{t :other}
5
+ .strip.other #{t :other}
6
6
 
7
7
  .indent
8
8
  = link_to(h(opportunity.name), opportunity)
@@ -2,7 +2,7 @@
2
2
  - unless task.category.blank?
3
3
  .strip{class: task.category}= t(task.category)
4
4
  - else
5
- .strip.white #{t :other}
5
+ .strip.other #{t :other}
6
6
  .indent
7
7
  %label{ id: dom_id(task, :name) }
8
8
  - if task.user.id != current_user.id
@@ -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
@@ -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), "http://github.com/fatfreecrm/fat_free_crm/tree/master", :"data-popup" => true}
13
- %li== » #{link_to t(:about_features), "http://github.com/fatfreecrm/fat_free_crm/issues", :"data-popup" => true}
14
- %li== » #{link_to t(:about_twitter), "http://twitter.com/fatfreecrm", :"data-popup" => true}
15
- %li== » #{link_to t(:about_user_group), "http://groups.google.com/group/fat-free-crm-users", :"data-popup" => true}
16
- %li== » #{link_to t(:about_dev_group), "http://groups.google.com/group/fat-free-crm-dev", :"data-popup" => true}
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), logout_path, method: :delete)
13
+ = link_to(t(:logout), destroy_user_session_path, method: :delete)
14
14
  = render "/layouts/jumpbox"
15
15
  - else
16
- = link_to(t(:login), login_path) << " |"
17
- = link_to(t(:sign_up), signup_path) << " |" if can_signup?
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)