alchemy_crm 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (240) hide show
  1. data/.gitignore +22 -0
  2. data/.travis.yml +12 -0
  3. data/Gemfile +21 -0
  4. data/Guardfile +13 -0
  5. data/LICENSE +24 -0
  6. data/README.md +82 -0
  7. data/Rakefile +27 -0
  8. data/alchemy_crm.gemspec +31 -0
  9. data/app/assets/images/.DS_Store +0 -0
  10. data/app/assets/images/alchemy_crm/.DS_Store +0 -0
  11. data/app/assets/images/alchemy_crm/contact-icons.png +0 -0
  12. data/app/assets/images/alchemy_crm/fill_content.gif +0 -0
  13. data/app/assets/images/alchemy_crm/group-icons.png +0 -0
  14. data/app/assets/images/alchemy_crm/mailing-icons.png +0 -0
  15. data/app/assets/images/alchemy_crm/module_icon.png +0 -0
  16. data/app/assets/images/alchemy_crm/newsletter-icons.png +0 -0
  17. data/app/assets/images/alchemy_crm/statistic.png +0 -0
  18. data/app/assets/images/alchemy_crm/tag-icons.png +0 -0
  19. data/app/assets/javascripts/alchemy_crm/alchemy_crm.base.js +65 -0
  20. data/app/assets/javascripts/alchemy_crm/scripts.js +2 -0
  21. data/app/assets/stylesheets/alchemy_crm/base.css.scss +473 -0
  22. data/app/assets/stylesheets/alchemy_crm/styles.css +3 -0
  23. data/app/controllers/alchemy_crm/admin/base_controller.rb +7 -0
  24. data/app/controllers/alchemy_crm/admin/contact_groups_controller.rb +23 -0
  25. data/app/controllers/alchemy_crm/admin/contacts_controller.rb +112 -0
  26. data/app/controllers/alchemy_crm/admin/deliveries_controller.rb +80 -0
  27. data/app/controllers/alchemy_crm/admin/elements_controller_extension.rb +32 -0
  28. data/app/controllers/alchemy_crm/admin/mailings_controller.rb +47 -0
  29. data/app/controllers/alchemy_crm/admin/newsletters_controller.rb +24 -0
  30. data/app/controllers/alchemy_crm/admin/tags_controller.rb +62 -0
  31. data/app/controllers/alchemy_crm/base_controller.rb +5 -0
  32. data/app/controllers/alchemy_crm/contacts_controller.rb +103 -0
  33. data/app/controllers/alchemy_crm/mailings_controller.rb +20 -0
  34. data/app/controllers/alchemy_crm/recipients_controller.rb +35 -0
  35. data/app/controllers/alchemy_crm/subscriptions_controller.rb +57 -0
  36. data/app/helpers/alchemy/pages_helper_extension.rb +18 -0
  37. data/app/helpers/alchemy_crm/admin/base_helper.rb +12 -0
  38. data/app/helpers/alchemy_crm/mailings_helper.rb +190 -0
  39. data/app/mailers/alchemy_crm/bounce_receiver.rb +13 -0
  40. data/app/mailers/alchemy_crm/contacts_mailer.rb +26 -0
  41. data/app/mailers/alchemy_crm/mailings_mailer.rb +48 -0
  42. data/app/mailers/alchemy_crm/subscriptions_mailer.rb +17 -0
  43. data/app/models/alchemy/essence_element_teaser.rb +19 -0
  44. data/app/models/alchemy_crm/contact.rb +264 -0
  45. data/app/models/alchemy_crm/contact_group.rb +26 -0
  46. data/app/models/alchemy_crm/contact_group_filter.rb +26 -0
  47. data/app/models/alchemy_crm/delivery.rb +57 -0
  48. data/app/models/alchemy_crm/element_extension.rb +28 -0
  49. data/app/models/alchemy_crm/mailing.rb +93 -0
  50. data/app/models/alchemy_crm/newsletter.rb +48 -0
  51. data/app/models/alchemy_crm/reaction.rb +9 -0
  52. data/app/models/alchemy_crm/recipient.rb +48 -0
  53. data/app/models/alchemy_crm/subscription.rb +8 -0
  54. data/app/views/alchemy/admin/elements/_view_not_found.text.erb +0 -0
  55. data/app/views/alchemy/admin/elements/fill.js.erb +13 -0
  56. data/app/views/alchemy/admin/elements/link.js.erb +1 -0
  57. data/app/views/alchemy/elements/_newsletter_article_editor.html.erb +4 -0
  58. data/app/views/alchemy/elements/_newsletter_article_view.html.erb +16 -0
  59. data/app/views/alchemy/elements/_newsletter_article_view.text.erb +5 -0
  60. data/app/views/alchemy/elements/_newsletter_greeting_editor.html.erb +3 -0
  61. data/app/views/alchemy/elements/_newsletter_greeting_view.html.erb +11 -0
  62. data/app/views/alchemy/elements/_newsletter_greeting_view.text.erb +6 -0
  63. data/app/views/alchemy/elements/_newsletter_signout_form_editor.html.erb +3 -0
  64. data/app/views/alchemy/elements/_newsletter_signout_form_view.html.erb +32 -0
  65. data/app/views/alchemy/elements/_newsletter_signout_mail_editor.html.erb +4 -0
  66. data/app/views/alchemy/elements/_newsletter_signup_form_editor.html.erb +6 -0
  67. data/app/views/alchemy/elements/_newsletter_signup_form_view.html.erb +78 -0
  68. data/app/views/alchemy/elements/_newsletter_signup_mail_editor.html.erb +4 -0
  69. data/app/views/alchemy/essences/_essence_date_view.text.erb +3 -0
  70. data/app/views/alchemy/essences/_essence_element_teaser_editor.html.erb +31 -0
  71. data/app/views/alchemy/essences/_essence_element_teaser_view.html.erb +1 -0
  72. data/app/views/alchemy/essences/_essence_element_teaser_view.text.erb +3 -0
  73. data/app/views/alchemy/essences/_essence_richtext_view.text.erb +1 -0
  74. data/app/views/alchemy/essences/_essence_text_view.text.erb +1 -0
  75. data/app/views/alchemy/newsletter_layouts/_standard.html.erb +39 -0
  76. data/app/views/alchemy/newsletter_layouts/_standard.text.erb +5 -0
  77. data/app/views/alchemy_crm/admin/contact_groups/_contact_group.html.erb +32 -0
  78. data/app/views/alchemy_crm/admin/contact_groups/_filter.html.erb +30 -0
  79. data/app/views/alchemy_crm/admin/contact_groups/_form.html.erb +47 -0
  80. data/app/views/alchemy_crm/admin/contact_groups/_tag.html.erb +6 -0
  81. data/app/views/alchemy_crm/admin/contact_groups/add_filter.js.erb +9 -0
  82. data/app/views/alchemy_crm/admin/contact_groups/destroy.rjs +1 -0
  83. data/app/views/alchemy_crm/admin/contact_groups/edit.html.erb +1 -0
  84. data/app/views/alchemy_crm/admin/contact_groups/index.html.erb +41 -0
  85. data/app/views/alchemy_crm/admin/contact_groups/new.html.erb +1 -0
  86. data/app/views/alchemy_crm/admin/contacts/_contact.html.erb +44 -0
  87. data/app/views/alchemy_crm/admin/contacts/_form.html.erb +86 -0
  88. data/app/views/alchemy_crm/admin/contacts/destroy.rjs +1 -0
  89. data/app/views/alchemy_crm/admin/contacts/edit.html.erb +1 -0
  90. data/app/views/alchemy_crm/admin/contacts/import.html.erb +33 -0
  91. data/app/views/alchemy_crm/admin/contacts/import.js.erb +2 -0
  92. data/app/views/alchemy_crm/admin/contacts/index.html.erb +51 -0
  93. data/app/views/alchemy_crm/admin/contacts/new.html.erb +1 -0
  94. data/app/views/alchemy_crm/admin/contacts/vcf_import_result.html.erb +49 -0
  95. data/app/views/alchemy_crm/admin/deliveries/_delivery.html.erb +41 -0
  96. data/app/views/alchemy_crm/admin/deliveries/_form.html.erb +65 -0
  97. data/app/views/alchemy_crm/admin/deliveries/_recipient.html.erb +40 -0
  98. data/app/views/alchemy_crm/admin/deliveries/edit.html.erb +1 -0
  99. data/app/views/alchemy_crm/admin/deliveries/index.html.erb +29 -0
  100. data/app/views/alchemy_crm/admin/deliveries/new.html.erb +1 -0
  101. data/app/views/alchemy_crm/admin/deliveries/show.html.erb +66 -0
  102. data/app/views/alchemy_crm/admin/elements/link.rjs +4 -0
  103. data/app/views/alchemy_crm/admin/elements/teasables.html.erb +57 -0
  104. data/app/views/alchemy_crm/admin/mailings/_form.html.erb +43 -0
  105. data/app/views/alchemy_crm/admin/mailings/_mailing.html.erb +75 -0
  106. data/app/views/alchemy_crm/admin/mailings/edit.html.erb +1 -0
  107. data/app/views/alchemy_crm/admin/mailings/edit_content.html.erb +194 -0
  108. data/app/views/alchemy_crm/admin/mailings/import_result.html.erb +37 -0
  109. data/app/views/alchemy_crm/admin/mailings/index.html.erb +39 -0
  110. data/app/views/alchemy_crm/admin/mailings/new.html.erb +1 -0
  111. data/app/views/alchemy_crm/admin/mailings/show.html.erb +1 -0
  112. data/app/views/alchemy_crm/admin/mailings/show.text.erb +1 -0
  113. data/app/views/alchemy_crm/admin/newsletters/_form.html.erb +54 -0
  114. data/app/views/alchemy_crm/admin/newsletters/_newsletter.html.erb +42 -0
  115. data/app/views/alchemy_crm/admin/newsletters/_tag_with_radiobutton.html.erb +7 -0
  116. data/app/views/alchemy_crm/admin/newsletters/destroy.rjs +1 -0
  117. data/app/views/alchemy_crm/admin/newsletters/edit.html.erb +1 -0
  118. data/app/views/alchemy_crm/admin/newsletters/index.html.erb +42 -0
  119. data/app/views/alchemy_crm/admin/newsletters/new.html.erb +10 -0
  120. data/app/views/alchemy_crm/admin/tags/_radio_tag.html.erb +6 -0
  121. data/app/views/alchemy_crm/admin/tags/_tag.html.erb +32 -0
  122. data/app/views/alchemy_crm/admin/tags/edit.html.erb +40 -0
  123. data/app/views/alchemy_crm/admin/tags/index.html.erb +35 -0
  124. data/app/views/alchemy_crm/admin/tags/new.html.erb +16 -0
  125. data/app/views/alchemy_crm/contacts_mailer/signout_mail.html.erb +8 -0
  126. data/app/views/alchemy_crm/contacts_mailer/signout_mail.text.erb +4 -0
  127. data/app/views/alchemy_crm/contacts_mailer/signup_mail.html.erb +11 -0
  128. data/app/views/alchemy_crm/contacts_mailer/signup_mail.text.erb +4 -0
  129. data/app/views/alchemy_crm/mailings/show.html.erb +1 -0
  130. data/app/views/alchemy_crm/mailings_mailer/verification_mail.html.erb +11 -0
  131. data/app/views/alchemy_crm/subscriptions/index.html.erb +23 -0
  132. data/app/views/alchemy_crm/subscriptions_mailer/overview_mail.html.erb +27 -0
  133. data/app/views/alchemy_crm/subscriptions_mailer/overview_mail.text.erb +19 -0
  134. data/app/views/csv_magic/import_errors.html.erb +44 -0
  135. data/app/views/csv_magic/mapper.html.erb +62 -0
  136. data/app/views/layouts/alchemy_crm/mailings.html.erb +212 -0
  137. data/app/views/layouts/alchemy_crm/mailings.text.erb +3 -0
  138. data/config/alchemy_crm.config.yml +21 -0
  139. data/config/authorization_rules.rb +37 -0
  140. data/config/initializers/assets.rb +4 -0
  141. data/config/initializers/delayed_job.rb +6 -0
  142. data/config/locales/alchemy.de.yml +55 -0
  143. data/config/locales/alchemy.en.yml +52 -0
  144. data/config/locales/alchemy_crm.de.yml +196 -0
  145. data/config/locales/alchemy_crm.en.yml +53 -0
  146. data/config/locales/localized_country_select.de.rb +268 -0
  147. data/config/locales/localized_country_select.en.rb +282 -0
  148. data/config/module_definition.yml +30 -0
  149. data/config/routes.rb +71 -0
  150. data/db/migrate/20100708220434_create_mailings.rb +19 -0
  151. data/db/migrate/20100708220534_create_contacts.rb +27 -0
  152. data/db/migrate/20100708220812_create_contact_groups.rb +13 -0
  153. data/db/migrate/20100708221009_create_newsletters.rb +15 -0
  154. data/db/migrate/20100708221319_create_sent_mailings.rb +15 -0
  155. data/db/migrate/20100708221529_create_recipients.rb +21 -0
  156. data/db/migrate/20100708222620_acts_as_taggable_migration.rb +28 -0
  157. data/db/migrate/20100708223324_create_contact_group_filters.rb +17 -0
  158. data/db/migrate/20100708223727_create_newsletter_subscriptions.rb +14 -0
  159. data/db/migrate/20100708223922_create_essence_element_teasers.rb +15 -0
  160. data/db/migrate/20100714172207_create_contact_groups_newsletters.rb +12 -0
  161. data/db/migrate/20100927152601_create_reactions.rb +14 -0
  162. data/db/migrate/20111028091722_acts_as_taggable_on_migration.rb +15 -0
  163. data/db/migrate/20111028200710_add_counter_cache_columns_for_tags.rb +11 -0
  164. data/db/migrate/20111030204931_create_delayed_jobs.rb +21 -0
  165. data/db/migrate/20111104105854_add_deliver_at_to_sent_mailings.rb +9 -0
  166. data/db/migrate/20111104125306_remove_sent_mailing_pdf_id_from_sent_mailings.rb +9 -0
  167. data/db/migrate/20111104131912_add_delivered_at_to_sent_mailings.rb +9 -0
  168. data/db/migrate/20111124145923_namespace_alchemy_crm_models.rb +17 -0
  169. data/db/migrate/20120306115555_add_disabled_to_alchemy_crm_contacts.rb +5 -0
  170. data/db/migrate/20120307160721_rename_alchemy_crm_recipients_sent_mailing_id.rb +5 -0
  171. data/db/migrate/20120315113522_add_url_to_alchemy_crm_reactions.rb +5 -0
  172. data/db/migrate/20120316161333_add_sha1_and_salt_to_alchemy_crm_recipients.rb +6 -0
  173. data/db/migrate/20120320103412_add_indexes_to_alchemy_crm_sha1_columns.rb +7 -0
  174. data/db/migrate/20120321105455_add_queue_to_delayed_jobs.rb +9 -0
  175. data/db/migrate/20120327174301_add_more_indexes_to_alchemy_crm_tables.rb +12 -0
  176. data/lib/alchemy_crm.rb +18 -0
  177. data/lib/alchemy_crm/bounced_delivery.rb +46 -0
  178. data/lib/alchemy_crm/config.rb +28 -0
  179. data/lib/alchemy_crm/engine.rb +40 -0
  180. data/lib/alchemy_crm/i18n_helpers.rb +35 -0
  181. data/lib/alchemy_crm/newsletter_layout.rb +40 -0
  182. data/lib/alchemy_crm/seeder.rb +30 -0
  183. data/lib/alchemy_crm/version.rb +3 -0
  184. data/lib/generators/alchemy_crm/scaffold/files/_standard.html.erb +1 -0
  185. data/lib/generators/alchemy_crm/scaffold/files/_standard.text.erb +1 -0
  186. data/lib/generators/alchemy_crm/scaffold/files/elements.yml +51 -0
  187. data/lib/generators/alchemy_crm/scaffold/files/newsletter_layouts.yml +3 -0
  188. data/lib/generators/alchemy_crm/scaffold/files/newsletters.html.erb +22 -0
  189. data/lib/generators/alchemy_crm/scaffold/files/newsletters.text.erb +4 -0
  190. data/lib/generators/alchemy_crm/scaffold/files/page_layouts.yml +19 -0
  191. data/lib/generators/alchemy_crm/scaffold/scaffold_generator.rb +26 -0
  192. data/lib/tasks/alchemy_crm.rake +28 -0
  193. data/lib/tasks/routes.rake +29 -0
  194. data/rails/init.rb +1 -0
  195. data/recipes/alchemy-mailings-capistrano-tasks.rb +12 -0
  196. data/spec/alchemy_mailings_spec.rb +7 -0
  197. data/spec/config_spec.rb +28 -0
  198. data/spec/controllers/alchemy_crm/contacts_controller_spec.rb +210 -0
  199. data/spec/controllers/alchemy_crm/mailings_controller_spec.rb +89 -0
  200. data/spec/controllers/alchemy_crm/recipients_controller_spec.rb +155 -0
  201. data/spec/dummy/Rakefile +7 -0
  202. data/spec/dummy/app/controllers/application_controller.rb +3 -0
  203. data/spec/dummy/app/helpers/application_helper.rb +2 -0
  204. data/spec/dummy/app/views/layouts/application.html.erb +14 -0
  205. data/spec/dummy/config.ru +4 -0
  206. data/spec/dummy/config/alchemy/config.yml +142 -0
  207. data/spec/dummy/config/alchemy/elements.yml +79 -0
  208. data/spec/dummy/config/alchemy/newsletter_layouts.yml +4 -0
  209. data/spec/dummy/config/alchemy/page_layouts.yml +55 -0
  210. data/spec/dummy/config/application.rb +43 -0
  211. data/spec/dummy/config/boot.rb +10 -0
  212. data/spec/dummy/config/database.yml +22 -0
  213. data/spec/dummy/config/environment.rb +5 -0
  214. data/spec/dummy/config/environments/development.rb +30 -0
  215. data/spec/dummy/config/environments/production.rb +60 -0
  216. data/spec/dummy/config/environments/test.rb +39 -0
  217. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  218. data/spec/dummy/config/initializers/inflections.rb +10 -0
  219. data/spec/dummy/config/initializers/mime_types.rb +5 -0
  220. data/spec/dummy/config/initializers/secret_token.rb +7 -0
  221. data/spec/dummy/config/initializers/session_store.rb +8 -0
  222. data/spec/dummy/config/locales/en.yml +5 -0
  223. data/spec/dummy/config/routes.rb +4 -0
  224. data/spec/dummy/db/schema.rb +452 -0
  225. data/spec/dummy/public/404.html +26 -0
  226. data/spec/dummy/public/422.html +26 -0
  227. data/spec/dummy/public/500.html +26 -0
  228. data/spec/dummy/public/favicon.ico +0 -0
  229. data/spec/dummy/script/rails +6 -0
  230. data/spec/helpers/alchemy_crm/mailings_helper_spec.rb +169 -0
  231. data/spec/mailers/alchemy_crm/contacts_mailer_spec.rb +88 -0
  232. data/spec/mailers/alchemy_crm/mailings_mailer_spec.rb +42 -0
  233. data/spec/models/alchemy_crm/contact_group_spec.rb +41 -0
  234. data/spec/models/alchemy_crm/contact_spec.rb +108 -0
  235. data/spec/models/alchemy_crm/delivery_spec.rb +55 -0
  236. data/spec/models/alchemy_crm/mailing_spec.rb +63 -0
  237. data/spec/models/alchemy_crm/newsletter_spec.rb +45 -0
  238. data/spec/spec_helper.rb +58 -0
  239. data/vendor/assets/javascripts/autocomplete-rails.js +16 -0
  240. metadata +438 -0
data/.gitignore ADDED
@@ -0,0 +1,22 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/dummy/db/*.sqlite3
15
+ spec/dummy/log/*.log
16
+ spec/dummy/tmp/
17
+ spec/dummy/index/
18
+ .svn
19
+
20
+ .rvmrc
21
+ .rspec
22
+ spec/dummy/log/development.log
data/.travis.yml ADDED
@@ -0,0 +1,12 @@
1
+ language: ruby
2
+ rvm:
3
+ - 1.8.7
4
+ - 1.9.2
5
+ - 1.9.3
6
+ - ree
7
+ branches:
8
+ only:
9
+ - master
10
+ before_script:
11
+ - "sh -c 'cd spec/dummy && RAILS_ENV=test bundle exec rake db:schema:load'"
12
+ script: "bundle exec rspec spec"
data/Gemfile ADDED
@@ -0,0 +1,21 @@
1
+ source 'http://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in alchemy_crm.gemspec
4
+ gemspec
5
+
6
+ group :development do
7
+ gem 'alchemy_cms', :git => 'git://github.com/magiclabs/alchemy_cms'
8
+ gem 'guard-spork'
9
+ if !ENV["CI"]
10
+ gem 'ruby-debug-base19', '~> 0.11.26', :platform => :ruby_19
11
+ gem 'linecache19', '~> 0.5.13', :platform => :ruby_19
12
+ gem 'ruby-debug19', '~> 0.11.6', :require => 'ruby-debug', :platform => :ruby_19
13
+ gem 'ruby-debug', :platform => :ruby_18
14
+ end
15
+ end
16
+
17
+ group :test do
18
+ gem 'sqlite3'
19
+ gem "database_cleaner"
20
+ gem 'email_spec'
21
+ end
data/Guardfile ADDED
@@ -0,0 +1,13 @@
1
+ # A sample Guardfile
2
+ # More info at https://github.com/guard/guard#readme
3
+
4
+ guard 'spork', :cucumber_env => { 'RAILS_ENV' => 'test' }, :rspec_env => { 'RAILS_ENV' => 'test' } do
5
+ watch(%r{^lib/})
6
+ watch('spec/dummy/config/application.rb')
7
+ watch('spec/dummy/config/environment.rb')
8
+ watch(%r{^spec/dummy/config/environments/.+\.rb$})
9
+ watch(%r{^spec/dummy/config/initializers/.+\.rb$})
10
+ watch('Gemfile')
11
+ watch('Gemfile.lock')
12
+ watch('spec/spec_helper.rb') { :rspec }
13
+ end
data/LICENSE ADDED
@@ -0,0 +1,24 @@
1
+ Copyright (c) 2011, magic labs*
2
+ All rights reserved.
3
+
4
+ Redistribution and use in source and binary forms, with or without modification,
5
+ are permitted provided that the following conditions are met:
6
+
7
+ * Redistributions of source code must retain the above copyright notice,
8
+ this list of conditions and the following disclaimer.
9
+
10
+ * Redistributions in binary form must reproduce the above copyright notice,
11
+ this list of conditions and the following disclaimer in the documentation and/or
12
+ other materials provided with the distribution.
13
+
14
+ * Neither the name of magic labs* nor the names of its contributors may be used to
15
+ endorse or promote products derived from this software without specific prior written permission.
16
+
17
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
18
+ IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
19
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS
20
+ BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
22
+ OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
23
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
24
+ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
data/README.md ADDED
@@ -0,0 +1,82 @@
1
+ Alchemy CRM Module
2
+ ==================
3
+
4
+ Building and sending Newsletters has never been easier!
5
+
6
+ About
7
+ -----
8
+
9
+ A fully featured CRM / Newsletter and Mailings Module for Alchemy CMS.
10
+
11
+ For more Information please visit [http://alchemy-cms.com](http://alchemy-cms.com)
12
+
13
+ Install
14
+ -------
15
+
16
+ 1. Install Alchemy CMS:
17
+
18
+ http://guides.alchemy-cms.com/getting_started.html
19
+
20
+ 2. Put this line into your projects `Gemfile`:
21
+
22
+ # Gemfile
23
+ gem "alchemy_crm", :git => 'git://github.com/magiclabs/alchemy_crm'
24
+
25
+ Or install it via Rubygems:
26
+
27
+ $ gem install alchemy_crm
28
+
29
+ 3. Update your bundle:
30
+
31
+ $ bundle
32
+
33
+ 4. Mount the Alchemy CRM Engine into your app:
34
+
35
+ # config/routes.rb
36
+ ...
37
+ mount AlchemyCrm::Engine => '/newsletter'
38
+ mount Alchemy::Engine => '/'
39
+
40
+ NOTE: It is **strongly** recommended to mount this module before you mount Alchemy CMS
41
+
42
+ 5. Copy the migrations into your app and migrate the database:
43
+
44
+ $ rake alchemy_crm:install:migrations
45
+ $ rake db:migrate
46
+
47
+ 6. Seed the database:
48
+
49
+ 1. Put this line into your projects `db/seeds.rb` file:
50
+
51
+ AlchemyCrm::Seeder.seed!
52
+
53
+ 2. And run this rake task:
54
+
55
+ $ rake db:seed
56
+
57
+ 7. Generate files and folders:
58
+
59
+ 1. Run scaffold generator
60
+
61
+ $ rails g alchemy_crm:scaffold
62
+
63
+ 2. Run copy elements rake task
64
+
65
+ $ rake alchemy_crm:elements:copy
66
+
67
+ Resources
68
+ ---------
69
+
70
+ * Homepage: <https://github.com/magiclabs/alchemy_crm>
71
+ * Issue-Tracker: <https://github.com/magiclabs/alchemy_crm/issues>
72
+ * Sourcecode: <https://github.com/magiclabs/alchemy_crm>
73
+
74
+ Authors
75
+ ---------
76
+
77
+ * Thomas von Deyen: <https://github.com/tvdeyen>
78
+
79
+ License
80
+ -------
81
+
82
+ * BSD: <https://raw.github.com/magiclabs/alchemy_crm/LICENSE>
data/Rakefile ADDED
@@ -0,0 +1,27 @@
1
+ # encoding: UTF-8
2
+ require 'rubygems'
3
+ begin
4
+ require 'bundler/setup'
5
+ rescue LoadError
6
+ puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
7
+ end
8
+
9
+ require 'rake'
10
+ require 'rdoc/task'
11
+
12
+ require 'rspec/core'
13
+ require 'rspec/core/rake_task'
14
+
15
+ RSpec::Core::RakeTask.new(:spec)
16
+
17
+ task :default => :spec
18
+
19
+ Rake::RDocTask.new(:rdoc) do |rdoc|
20
+ rdoc.rdoc_dir = 'rdoc'
21
+ rdoc.title = 'Alchemy CRM'
22
+ rdoc.options << '--line-numbers' << '--inline-source'
23
+ rdoc.rdoc_files.include('README.rdoc')
24
+ rdoc.rdoc_files.include('lib/**/*.rb')
25
+ end
26
+
27
+ Bundler::GemHelper.install_tasks
@@ -0,0 +1,31 @@
1
+ # -*- encoding: utf-8 -*-
2
+ require File.expand_path('../lib/alchemy_crm/version', __FILE__)
3
+
4
+ Gem::Specification.new do |gem|
5
+
6
+ gem.authors = ["Thomas von Deyen"]
7
+ gem.email = ["tvd@magiclabs.de"]
8
+ gem.description = %q{A fully featured CRM / Newsletter and Mailings Module for Alchemy CMS. Building and sending Newsletters has never been easier!}
9
+ gem.summary = %q{A fully featured CRM / Newsletter and Mailings Module for Alchemy CMS.}
10
+ gem.homepage = "http://alchemy-cms.com"
11
+ gem.license = 'BSD New'
12
+
13
+ gem.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
14
+ gem.files = `git ls-files`.split("\n")
15
+ gem.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
16
+ gem.name = "alchemy_crm"
17
+ gem.require_paths = ["lib"]
18
+ gem.version = AlchemyCrm::VERSION
19
+
20
+ gem.add_dependency 'alchemy_cms', ["~> 2.1.7"]
21
+ gem.add_dependency 'vcard', ['~> 0.1.1']
22
+ gem.add_dependency 'csv_magic', ['~> 0.2.2']
23
+ gem.add_dependency 'delayed_job_active_record', ["~> 0.3.2"]
24
+ gem.add_dependency 'acts-as-taggable-on', ['~> 2.1.0']
25
+ gem.add_dependency 'rails3-jquery-autocomplete', ['~> 1.0.4']
26
+ gem.add_dependency "magic-localized_country_select", ["~> 0.2.0"]
27
+
28
+ gem.add_development_dependency 'rspec-rails', ["~> 2.8.0"]
29
+ gem.add_development_dependency 'sqlite3', ["~> 1.3.5"]
30
+
31
+ end
Binary file
@@ -0,0 +1,65 @@
1
+ var AlchemyCrm = {};
2
+ (function($) {
3
+
4
+ AlchemyCrm = {
5
+
6
+ toggleLabel : function(link, hidetext, showtext) {
7
+ if ($(link).text() === showtext) {
8
+ $(link).text(hidetext);
9
+ } else {
10
+ $(link).text(showtext);
11
+ }
12
+ },
13
+
14
+ removeContactGroupFilter : function(element, id, count) {
15
+ $(element).parent().parent('.filter').remove();
16
+ $(
17
+ '#filter_container'
18
+ ).append(
19
+ '<input type="hidden" name="contact_group[filters_attributes]['+count+'][_destroy]" value=1>'
20
+ ).append(
21
+ '<input type="hidden" name="contact_group[filters_attributes]['+count+'][id]" value='+id+'>'
22
+ );
23
+ },
24
+
25
+ teasablesFilter : function(value) {
26
+ var teasables = $('#teasable_elements .teasable_page');
27
+ if (value === '') {
28
+ teasables.each(function(t) { t.show(); });
29
+ }
30
+ else {
31
+ teasables.each(function(el) {
32
+ if (el.attr('id').replace('teasable_page_', '') != value) {
33
+ el.hide();
34
+ } else {
35
+ el.show();
36
+ }
37
+ });
38
+ }
39
+ },
40
+
41
+ text_view_active : false,
42
+
43
+ togglePreviewFrame : function(btn, text_url, html_url) {
44
+ var $frame = $('iframe#alchemyPreviewWindow');
45
+ var $btn = $(btn).parent();
46
+ var $spin = $('#preview_load_info');
47
+ $frame.load(function() {
48
+ $spin.hide();
49
+ });
50
+ if (AlchemyCrm.text_view_active) {
51
+ $frame.attr('src', html_url);
52
+ AlchemyCrm.text_view_active = false;
53
+ $btn.removeClass('active');
54
+ } else {
55
+ $frame.attr('src', text_url);
56
+ AlchemyCrm.text_view_active = true;
57
+ $btn.addClass('active');
58
+ }
59
+ $spin.show();
60
+ return false;
61
+ }
62
+
63
+ }
64
+
65
+ })(jQuery);
@@ -0,0 +1,2 @@
1
+ //= require alchemy_crm/alchemy_crm.base
2
+ //= require autocomplete-rails
@@ -0,0 +1,473 @@
1
+ span.icon.mailing_add {
2
+ background: image-url('alchemy_crm/mailing-icons.png') -48px 0;
3
+ }
4
+
5
+ span.icon.mailing {
6
+ background: image-url('alchemy_crm/mailing-icons.png') 0 0;
7
+ }
8
+
9
+ span.icon.mailing_copy {
10
+ background: image-url('alchemy_crm/mailing-icons.png') -80px 0;
11
+ }
12
+
13
+ span.icon.mailing_edit {
14
+ background: image-url('alchemy_crm/mailing-icons.png') -32px 0;
15
+ }
16
+
17
+ span.icon.mailing_delete {
18
+ background: image-url('alchemy_crm/mailing-icons.png') -16px 0;
19
+ }
20
+
21
+ span.icon.delivery {
22
+ background: image-url('alchemy_crm/mailing-icons.png') -64px 0;
23
+ }
24
+
25
+ span.icon.group_add {
26
+ background: image-url('alchemy_crm/group-icons.png') -48px 0;
27
+ }
28
+
29
+ span.icon.send_mailing {
30
+ background: image-url('alchemy_crm/mailing-icons.png') -96px 0;
31
+ }
32
+
33
+ span.icon.plain_text_view {
34
+ background-position: -448px -136px;
35
+ }
36
+
37
+ span.icon.group {
38
+ background: image-url('alchemy_crm/group-icons.png') 0 0;
39
+ }
40
+
41
+ a.icon.group_edit {
42
+ background: image-url('alchemy_crm/group-icons.png') -32px 0;
43
+ }
44
+
45
+ a.icon.group_delete {
46
+ background: image-url('alchemy_crm/group-icons.png') -16px 0;
47
+ }
48
+
49
+ span.icon.tag_add {
50
+ background: image-url('alchemy_crm/tag-icons.png') -48px 0;
51
+ }
52
+
53
+ span.icon.tag {
54
+ background: image-url('alchemy_crm/tag-icons.png') 0 0;
55
+ margin-right: 0;
56
+ }
57
+
58
+ a.icon.tag_edit {
59
+ background: image-url('alchemy_crm/tag-icons.png') -32px 0;
60
+ }
61
+
62
+ a.icon.tag_delete {
63
+ background: image-url('alchemy_crm/tag-icons.png') -16px 0;
64
+ }
65
+
66
+ span.icon.contact_add {
67
+ background: image-url('alchemy_crm/contact-icons.png') -48px 0;
68
+ }
69
+
70
+ span.icon.contact {
71
+ background: image-url('alchemy_crm/contact-icons.png') 0 0;
72
+ }
73
+
74
+ a.icon.contact_export {
75
+ background: image-url('alchemy_crm/contact-icons.png') -64px 0;
76
+ }
77
+
78
+ span.icon.contact_import {
79
+ background: image-url('alchemy_crm/contact-icons.png') -80px 0;
80
+ }
81
+
82
+ a.icon.contact_delete {
83
+ background: image-url('alchemy_crm/contact-icons.png') -16px 0;
84
+ }
85
+
86
+ a.icon.contact_edit {
87
+ background: image-url('alchemy_crm/contact-icons.png') -32px 0;
88
+ }
89
+
90
+ span.icon.format_add {
91
+ background: image-url('alchemy_crm/newsletter-icons.png') -48px 0;
92
+ }
93
+
94
+ span.icon.format {
95
+ background: image-url('alchemy_crm/newsletter-icons.png') 0 0;
96
+ }
97
+
98
+ span.icon.format_delete {
99
+ background: image-url('alchemy_crm/newsletter-icons.png') -16px 0;
100
+ }
101
+
102
+ span.icon.format_edit {
103
+ background: image-url('alchemy_crm/newsletter-icons.png') -32px 0;
104
+ }
105
+
106
+ span.icon.fill_from_element {
107
+ background: image-url('alchemy/icons.png') -256px -40px;
108
+ }
109
+
110
+ span.icon.statistics {
111
+ background-image: image-url('alchemy_crm/statistic.png');
112
+ width: 18px;
113
+ height: 18px;
114
+ }
115
+
116
+ div.deliveries {
117
+ padding: 8px;
118
+ height: 400px;
119
+ overflow-y: auto;
120
+ overflow-x: none;
121
+ }
122
+
123
+ div.deliveries ol,
124
+ div.deliveries ul {
125
+ padding: 0;
126
+ margin: 0;
127
+ }
128
+
129
+ li.delivery {
130
+ clear: both;
131
+ line-height: 25px;
132
+ padding: 4px;
133
+ margin-bottom: 4px;
134
+ }
135
+
136
+ li.delivery.even:hover,
137
+ li.delivery.odd:hover {
138
+ background-color: #fffdef;
139
+ }
140
+
141
+ li.delivery.even {
142
+ background-color: #fff;
143
+ }
144
+
145
+ li.delivery.odd {
146
+ background-color: #dedede;
147
+ }
148
+
149
+ div.recipient_group {
150
+ margin-bottom: 8px;
151
+ background-color: #eef1f7;
152
+ padding: 8px;
153
+ border: 1px solid #d5d9e1;
154
+ border-radius: 3px;
155
+ -webkit-border-radius: 3px;
156
+ -moz-border-radius: 3px;
157
+ }
158
+
159
+ #delivery div.recipient_group p {
160
+ margin: 0;
161
+ }
162
+
163
+ #read div.recipient table tbody tr td {
164
+ padding-right: 8px;
165
+ }
166
+
167
+ #delivery div.recipients table.recipients_table {
168
+ font-size: 10px;
169
+ border-style: none;
170
+ border-width: 0;
171
+ border-spacing: 0;
172
+ width: 100%;
173
+ }
174
+
175
+ div.recipients {
176
+ margin-top: 8px;
177
+ max-height: 144px;
178
+ overflow: auto;
179
+ position: relative;
180
+ }
181
+
182
+ div.recipients table.recipients_table th,
183
+ div.recipients table.recipients_table td {
184
+ padding: 6px 4px 4px;
185
+ border-bottom: 4px solid #eef1f7;
186
+ text-align: left;
187
+ vertical-align: top;
188
+ line-height: 15px;
189
+ }
190
+
191
+ div.recipients table.recipients_table thead tr {
192
+
193
+ }
194
+
195
+ #delivery div.recipients table.recipients_table td {
196
+ background-color: #f7f7f7;
197
+ }
198
+
199
+ #delivery h2 span {
200
+ font-weight: normal;
201
+ font-style: normal;
202
+ }
203
+
204
+ span.delivery_text {
205
+ float: left;
206
+ position: relative;
207
+ top: 4px;
208
+ }
209
+
210
+ #main_content ul.mailing.list li div.list_row span.list_3rdcol {
211
+ width: 130px;
212
+ }
213
+
214
+ #main_content ul.mailing.list li div.list_row span.list_4thcol {
215
+ width: 64px;
216
+ }
217
+
218
+ div#tag_links {
219
+ clear: both;
220
+ margin-bottom: 5px;
221
+ background-color: rgba(58,255,63,0.35);
222
+ }
223
+
224
+ div#tag_links a {
225
+ font-style: italic;
226
+ margin-right: 2px;
227
+ margin-left: 2px;
228
+ }
229
+
230
+ div#other_links {
231
+ float: left;
232
+ background-color: rgba(249,12,21,0.5);
233
+ }
234
+
235
+ div#other_links a {
236
+ font-style: italic;
237
+ margin-right: 2px;
238
+ margin-left: 2px;
239
+ }
240
+
241
+ div#tag_container {
242
+ float: left;
243
+ }
244
+
245
+ #main_content ul.contacts.list li div.list_row span.list_1stcol img {
246
+ position: relative;
247
+ right: 1px;
248
+ }
249
+
250
+ div.tag_and_radio_list {
251
+ float: left;
252
+ clear: both;
253
+ width: 100%;
254
+ margin-bottom: 8px;
255
+ }
256
+
257
+ span.tag_with_radio_button {
258
+ margin-right: 12px;
259
+ float: left;
260
+ }
261
+
262
+ div.tag_list {
263
+ padding-bottom: 8px;
264
+ overflow: auto;
265
+ }
266
+
267
+ .tag_with_radio_button input, .tag_with_radio_button label.tag {
268
+ padding: 0;
269
+ width: auto;
270
+ }
271
+
272
+ #all_contacts {
273
+
274
+ padding: 2px 4px;
275
+ margin: 0;
276
+ list-style-type: none;
277
+ overflow: auto;
278
+ height: 8em;
279
+ background-color: white;
280
+
281
+ li {
282
+ padding: 4px;
283
+ margin: 2px 0;
284
+ }
285
+ }
286
+
287
+ form.send_mailing_form {
288
+ float: left;
289
+ clear: both;
290
+ width: 100%;
291
+ margin-top: 20px;
292
+ }
293
+
294
+ img.unverified_contact {
295
+ position: absolute;
296
+ left: 2px;
297
+ z-index: 1;
298
+ top: 1px;
299
+ }
300
+
301
+ #contact_list li div.list_row span.list_1stcol {
302
+ position: relative;
303
+ }
304
+
305
+ #contact_list li div.list_row span.list_4thcol {
306
+ margin-left: 4px;
307
+ width: 42px;
308
+ }
309
+
310
+ .contact_details {
311
+ float: left;
312
+ clear: both;
313
+ width: 367px;
314
+ background-color: #ddd;
315
+ padding: 4px 4px 2px;
316
+ }
317
+
318
+ .contact_details div {
319
+ margin-bottom: 2px;
320
+ }
321
+
322
+ #contact_list li div span.user_edit_tools {
323
+ width: 41px;
324
+ }
325
+
326
+ ul.mailing.list span.list_1stcol img {
327
+ position: relative;
328
+ right: 1px;
329
+ }
330
+
331
+ a.delete_mailing_button:hover {
332
+ background-position: right;
333
+ text-decoration: none;
334
+ }
335
+
336
+ .with_padding {
337
+ position: relative;
338
+ }
339
+
340
+ div#please_wait {
341
+ position: absolute;
342
+ width: 99%;
343
+ height: 99%;
344
+ text-align: center;
345
+ background-color: #ededed;
346
+ z-index: 1;
347
+ opacity: 0.85;
348
+ }
349
+
350
+ #please_wait p {
351
+ margin-top: 30%;
352
+ }
353
+
354
+ #please_wait p img {
355
+ position: relative;
356
+ top: 12px;
357
+ }
358
+
359
+ .full_width {
360
+ width: 100% !important;
361
+ }
362
+
363
+ div.emulate_table span.value_with_top_padding {
364
+ padding-top: 2px;
365
+ float: left;
366
+ }
367
+
368
+ a.send_mailing_button {
369
+ width: 19px;
370
+ height: 19px;
371
+ display: block;
372
+ background: image-url('alchemy_crm/mailing_send.gif') no-repeat left center;
373
+ float: right;
374
+ }
375
+
376
+ #teasable_elements a.link_only {
377
+ float: right;
378
+ }
379
+
380
+ a.send_mailing_button:hover {
381
+ background-position: right;
382
+ text-decoration: none;
383
+ }
384
+
385
+ .send_mailing_button_disabled {
386
+ width: 19px;
387
+ height: 19px;
388
+ display: block;
389
+ background: image-url('alchemy_crm/mailing_send.gif') no-repeat left center;
390
+ float: right;
391
+ background-position: right;
392
+ text-decoration: none;
393
+ }
394
+
395
+ span.tag {
396
+ margin-right: 12px;
397
+ float: left;
398
+ }
399
+
400
+ #filter_container {
401
+ margin-bottom: 8px;
402
+
403
+ .thin_border {
404
+ bottom: 8px;
405
+ position: relative;
406
+ }
407
+
408
+ span.remove_filter {
409
+ float: right;
410
+ position: relative;
411
+ top: 2px;
412
+ }
413
+
414
+ div.filter {
415
+ margin-bottom: 8px;
416
+ }
417
+ }
418
+
419
+ #alchemy input#contact_city, #alchemy input#contact_title {
420
+ width: 182px;
421
+ }
422
+
423
+ #alchemy input#contact_zip {
424
+ width: 59px;
425
+ }
426
+
427
+ #alchemy table#contact td.label.right {
428
+ width: 40px;
429
+ }
430
+
431
+ #alchemy .selectbox .display.very_short {
432
+ width: 39px;
433
+ }
434
+
435
+ #alchemy .selectbox.items.very_short {
436
+ width: auto;
437
+ }
438
+
439
+ #alchemy .selectbox .display.time_select {
440
+ width: 19px;
441
+ }
442
+
443
+ #alchemy .selectbox.items.time_select {
444
+ width: 47px;
445
+ }
446
+
447
+ table tr.disabled td {
448
+ color: #592e2e;
449
+ background-color: #efd3d3;
450
+ }
451
+
452
+ div#archive_all form.contact_import {
453
+ width: 550px;
454
+ margin: 8px;
455
+ }
456
+
457
+ td.delivery_time {
458
+ white-space: nowrap;
459
+
460
+ div.alchemy_selectbox, label, input.thin_border {
461
+ float: left;
462
+ }
463
+
464
+ label {
465
+ line-height: 23px;
466
+ margin: 0 8px;
467
+ }
468
+
469
+ input.thin_border {
470
+ position: relative;
471
+ top: -2px;
472
+ }
473
+ }