mail_engine 0.0.1 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.yardoc/checksums +12 -11
- data/.yardoc/objects/ActionMailer.dat +0 -0
- data/.yardoc/objects/ActionMailer/Base.dat +0 -0
- data/.yardoc/objects/ActionMailer/Base/collect_responses_and_parts_order_i.dat +0 -0
- data/.yardoc/objects/ActionMailer/Base/mail_i.dat +0 -0
- data/.yardoc/objects/ActionMailer/Base/origin_mail_i.dat +0 -0
- data/.yardoc/objects/ActionMailer/Base/set_layout_and_partials_i.dat +0 -0
- data/.yardoc/objects/ActionMailer/Collector.dat +0 -0
- data/.yardoc/objects/ActionMailer/Collector/custom_i.dat +0 -0
- data/.yardoc/objects/MailEngine.dat +0 -0
- data/.yardoc/objects/MailEngine/ActsAsMailReceiver.dat +0 -0
- data/.yardoc/objects/MailEngine/ActsAsMailReceiver/ClassMethods.dat +0 -0
- data/.yardoc/objects/MailEngine/ActsAsMailReceiver/ClassMethods/acts_as_mail_receiver_i.dat +0 -0
- data/.yardoc/objects/MailEngine/ActsAsMailReceiver/ClassMethods/check_method_existance_21_i.dat +0 -0
- data/.yardoc/objects/MailEngine/Base.dat +0 -0
- data/.yardoc/objects/MailEngine/Base/_40_40configurations.dat +0 -0
- data/.yardoc/objects/MailEngine/Base/current_config_c.dat +0 -0
- data/.yardoc/objects/MailEngine/Base/send_marketing_mail_c.dat +0 -0
- data/.yardoc/objects/MailEngine/Configuration.dat +0 -0
- data/.yardoc/objects/MailEngine/Configuration/load_c.dat +0 -0
- data/.yardoc/objects/MailEngine/CopyMigrations.dat +0 -0
- data/.yardoc/objects/MailEngine/CopyMigrations/copy_migrations_i.dat +0 -0
- data/.yardoc/objects/MailEngine/CopyResources.dat +0 -0
- data/.yardoc/objects/MailEngine/CopyResources/copy_resources_i.dat +0 -0
- data/.yardoc/objects/MailEngine/CreateConfig.dat +0 -0
- data/.yardoc/objects/MailEngine/CreateConfig/create_config_file_i.dat +0 -0
- data/.yardoc/objects/MailEngine/Engine.dat +0 -0
- data/.yardoc/objects/MailEngine/HtmlDocumentAssetsReplacer.dat +0 -0
- data/.yardoc/objects/MailEngine/HtmlDocumentAssetsReplacer/check_21_c.dat +0 -0
- data/.yardoc/objects/MailEngine/HtmlDocumentAssetsReplacer/get_resource_url_c.dat +0 -0
- data/.yardoc/objects/MailEngine/HtmlDocumentAssetsReplacer/process_c.dat +0 -0
- data/.yardoc/objects/MailEngine/HtmlDocumentAssetsReplacer/replace_resource_in_html_c.dat +0 -0
- data/.yardoc/objects/MailEngine/Install.dat +0 -0
- data/.yardoc/objects/MailEngine/Install/copy_migrations_i.dat +0 -0
- data/.yardoc/objects/MailEngine/Install/copy_resources_i.dat +0 -0
- data/.yardoc/objects/MailEngine/Install/create_config_i.dat +0 -0
- data/.yardoc/objects/MailEngine/MailLogSubscriber.dat +0 -0
- data/.yardoc/objects/MailEngine/MailLogSubscriber/deliver_i.dat +0 -0
- data/.yardoc/objects/MailEngine/PLACEHOLDERS_IN_LAYOUT.dat +0 -0
- data/.yardoc/objects/MailEngine/Sendgrid.dat +0 -0
- data/.yardoc/objects/MailEngine/Sendgrid/Base.dat +0 -0
- data/.yardoc/objects/MailEngine/Sendgrid/Base/ClassMethods.dat +0 -0
- data/.yardoc/objects/MailEngine/Sendgrid/Base/ClassMethods/sendgrid_header_i.dat +0 -0
- data/.yardoc/objects/MailEngine/Sendgrid/Base/InstanceMethods.dat +0 -0
- data/.yardoc/objects/MailEngine/Sendgrid/FilterSetting.dat +0 -0
- data/.yardoc/objects/MailEngine/Sendgrid/FilterSetting/data_3D_i.dat +0 -0
- data/.yardoc/objects/MailEngine/Sendgrid/FilterSetting/data_i.dat +0 -0
- data/.yardoc/objects/MailEngine/Sendgrid/FilterSetting/initialize_i.dat +0 -0
- data/.yardoc/objects/MailEngine/Sendgrid/FilterSetting/validate_config_21_i.dat +0 -0
- data/.yardoc/objects/MailEngine/Sendgrid/RestApi.dat +0 -0
- data/.yardoc/objects/MailEngine/Sendgrid/RestApi/blocks_c.dat +0 -0
- data/.yardoc/objects/MailEngine/Sendgrid/RestApi/bounces_c.dat +0 -0
- data/.yardoc/objects/MailEngine/Sendgrid/RestApi/invalidemails_c.dat +0 -0
- data/.yardoc/objects/MailEngine/Sendgrid/RestApi/spamreports_c.dat +0 -0
- data/.yardoc/objects/MailEngine/Sendgrid/RestApi/stats_c.dat +0 -0
- data/.yardoc/objects/MailEngine/Sendgrid/RestApiError.dat +0 -0
- data/.yardoc/objects/MailEngine/Sendgrid/SmtpApi.dat +0 -0
- data/.yardoc/objects/MailEngine/Sendgrid/SmtpApi/add_sub_val_i.dat +0 -0
- data/.yardoc/objects/MailEngine/Sendgrid/SmtpApi/add_to_i.dat +0 -0
- data/.yardoc/objects/MailEngine/Sendgrid/SmtpApi/category_i.dat +0 -0
- data/.yardoc/objects/MailEngine/Sendgrid/SmtpApi/filters_i.dat +0 -0
- data/.yardoc/objects/MailEngine/Sendgrid/SmtpApi/initialize_i.dat +0 -0
- data/.yardoc/objects/MailEngine/Sendgrid/SmtpApi/set_unique_args_i.dat +0 -0
- data/.yardoc/objects/MailEngine/Sendgrid/SmtpApi/to_hash_i.dat +0 -0
- data/.yardoc/objects/MailEngine/Sendgrid/SmtpApi/to_json_i.dat +0 -0
- data/.yardoc/objects/MailEngine/Sendgrid/SmtpApi/to_s_i.dat +0 -0
- data/.yardoc/objects/MailEngine/VERSION.dat +0 -0
- data/.yardoc/objects/MailEngine/ZipProcessor.dat +0 -0
- data/.yardoc/objects/MailEngine/ZipProcessor/extract_all_files_c.dat +0 -0
- data/.yardoc/objects/root.dat +0 -0
- data/Gemfile +16 -13
- data/Gemfile.lock +69 -46
- data/README.mkd +14 -2
- data/VERSION +1 -1
- data/app/controllers/mail_engine/application_controller.rb +4 -0
- data/app/controllers/mail_engine/mail_logs_controller.rb +1 -1
- data/app/controllers/mail_engine/mail_schedules_controller.rb +4 -4
- data/app/controllers/mail_engine/mail_template_files_controller.rb +4 -4
- data/app/controllers/mail_engine/mail_templates_controller.rb +16 -11
- data/app/controllers/mail_engine/reports_controller.rb +5 -1
- data/app/helpers/mail_engine/mail_engine_helper.rb +1 -1
- data/app/mailers/mail_engine/mail_dispatcher.rb +16 -9
- data/app/models/mail_engine/mail_log.rb +1 -1
- data/app/models/mail_engine/mail_schedule.rb +14 -12
- data/app/models/mail_engine/mail_template.rb +81 -55
- data/app/models/mail_engine/mail_template_file.rb +4 -3
- data/app/views/layouts/mail_engine/mail_engine.html.erb +31 -18
- data/app/views/layouts/mail_engine/simple.html.erb +14 -0
- data/app/views/mail_engine/dashboard/index.html.erb +18 -1
- data/app/views/mail_engine/mail_logs/_related_logs.html.erb +29 -0
- data/app/views/mail_engine/mail_logs/index.html.erb +5 -5
- data/app/views/mail_engine/mail_schedules/_form.html.erb +6 -5
- data/app/views/mail_engine/mail_schedules/index.html.erb +13 -8
- data/app/views/mail_engine/mail_schedules/show.html.erb +2 -0
- data/app/views/mail_engine/mail_template_files/_form.html.erb +20 -10
- data/app/views/mail_engine/mail_template_files/edit.html.erb +2 -0
- data/app/views/mail_engine/mail_template_files/new.html.erb +2 -0
- data/app/views/mail_engine/mail_templates/_form.html.erb +65 -12
- data/app/views/mail_engine/mail_templates/_layout_selector.html.erb +3 -3
- data/app/views/mail_engine/mail_templates/duplicate.html.erb +11 -7
- data/app/views/mail_engine/mail_templates/index.html.erb +25 -21
- data/app/views/mail_engine/mail_templates/new_by_upload.html.erb +11 -5
- data/app/views/mail_engine/mail_templates/partial_options.html.erb +2 -2
- data/app/views/mail_engine/mail_templates/show.html.erb +19 -29
- data/app/views/mail_engine/reports/charts/blocks.html.erb +2 -2
- data/app/views/mail_engine/reports/charts/bounces.html.erb +2 -2
- data/app/views/mail_engine/reports/charts/invalidemails.html.erb +2 -2
- data/app/views/mail_engine/reports/charts/spamreports.html.erb +2 -2
- data/app/views/mail_engine/reports/index.html.erb +40 -5
- data/config/routes.rb +5 -6
- data/db/migrate/20110114030841_create_table_mail_template.rb +1 -0
- data/doc/ActionMailer.html +108 -0
- data/doc/ActionMailer/Base.html +193 -0
- data/doc/ActionMailer/Collector.html +175 -0
- data/doc/MailEngine.html +146 -0
- data/doc/MailEngine/ActsAsMailReceiver.html +97 -0
- data/doc/MailEngine/ActsAsMailReceiver/ClassMethods.html +187 -0
- data/doc/MailEngine/Base.html +297 -0
- data/doc/MailEngine/Configuration.html +181 -0
- data/doc/MailEngine/CopyMigrations.html +187 -0
- data/doc/MailEngine/CopyResources.html +171 -0
- data/doc/MailEngine/CreateConfig.html +193 -0
- data/doc/MailEngine/CreateMigration.html +187 -0
- data/doc/MailEngine/Engine.html +100 -0
- data/doc/MailEngine/HtmlDocumentAssetsReplacer.html +397 -0
- data/doc/MailEngine/Install.html +273 -0
- data/doc/MailEngine/MailLogSubscriber.html +204 -0
- data/doc/MailEngine/Sendgrid.html +101 -0
- data/doc/MailEngine/Sendgrid/Base.html +97 -0
- data/doc/MailEngine/Sendgrid/Base/ClassMethods.html +150 -0
- data/doc/MailEngine/Sendgrid/Base/InstanceMethods.html +81 -0
- data/doc/MailEngine/Sendgrid/FilterSetting.html +257 -0
- data/doc/MailEngine/Sendgrid/RestApi.html +476 -0
- data/doc/MailEngine/Sendgrid/RestApiError.html +100 -0
- data/doc/MailEngine/Sendgrid/SmtpApi.html +604 -0
- data/doc/MailEngine/ZipProcessor.html +267 -0
- data/doc/_index.html +21 -7
- data/doc/class_list.html +1 -1
- data/doc/file.README.html +231 -0
- data/doc/index.html +231 -0
- data/doc/method_list.html +45 -21
- data/doc/top-level-namespace.html +88 -0
- data/lib/mail_engine.rb +7 -1
- data/lib/mail_engine/action_mailer_patch.rb +7 -0
- data/lib/mail_engine/acts_as_mail_receiver.rb +40 -6
- data/lib/mail_engine/base.rb +28 -7
- data/lib/mail_engine/configuration.rb +3 -0
- data/lib/mail_engine/engine.rb +5 -5
- data/lib/mail_engine/generators/{create_migration.rb → copy_migrations.rb} +4 -3
- data/lib/mail_engine/generators/copy_resources.rb +13 -0
- data/lib/mail_engine/generators/install.rb +21 -0
- data/lib/mail_engine/generators/templates/mail_engine_config.yml +10 -1
- data/lib/mail_engine/html_document_assets_replacer.rb +12 -23
- data/lib/mail_engine/mail_log_subscriber.rb +13 -5
- data/lib/mail_engine/zip_processor.rb +10 -1
- data/mail_engine.gemspec +336 -110
- data/public/images/mail_engine/header_and_footer_layout.png +0 -0
- data/public/images/mail_engine/icons/add.png +0 -0
- data/public/images/mail_engine/icons/copy.png +0 -0
- data/public/images/mail_engine/icons/delete.png +0 -0
- data/public/images/mail_engine/icons/edit.gif +0 -0
- data/public/images/mail_engine/icons/missing.png +0 -0
- data/public/images/mail_engine/icons/save.png +0 -0
- data/public/images/mail_engine/icons/show.png +0 -0
- data/public/images/mail_engine/logo.gif +0 -0
- data/public/images/mail_engine/logo.png +0 -0
- data/public/images/mail_engine/none_layout.png +0 -0
- data/public/images/mail_engine/only_footer_layout.png +0 -0
- data/public/images/mail_engine/unselect_header_and_footer_layout.png +0 -0
- data/public/images/mail_engine/unselect_none_layout.png +0 -0
- data/public/images/mail_engine/unselect_only_footer_layout.png +0 -0
- data/public/javascripts/mail_engine/fancybox/blank.gif +0 -0
- data/public/javascripts/mail_engine/fancybox/fancy_close.png +0 -0
- data/public/javascripts/mail_engine/fancybox/fancy_loading.png +0 -0
- data/public/javascripts/mail_engine/fancybox/fancy_nav_left.png +0 -0
- data/public/javascripts/mail_engine/fancybox/fancy_nav_right.png +0 -0
- data/public/javascripts/mail_engine/fancybox/fancy_shadow_e.png +0 -0
- data/public/javascripts/mail_engine/fancybox/fancy_shadow_n.png +0 -0
- data/public/javascripts/mail_engine/fancybox/fancy_shadow_ne.png +0 -0
- data/public/javascripts/mail_engine/fancybox/fancy_shadow_nw.png +0 -0
- data/public/javascripts/mail_engine/fancybox/fancy_shadow_s.png +0 -0
- data/public/javascripts/mail_engine/fancybox/fancy_shadow_se.png +0 -0
- data/public/javascripts/mail_engine/fancybox/fancy_shadow_sw.png +0 -0
- data/public/javascripts/mail_engine/fancybox/fancy_shadow_w.png +0 -0
- data/public/javascripts/mail_engine/fancybox/fancy_title_left.png +0 -0
- data/public/javascripts/mail_engine/fancybox/fancy_title_main.png +0 -0
- data/public/javascripts/mail_engine/fancybox/fancy_title_over.png +0 -0
- data/public/javascripts/mail_engine/fancybox/fancy_title_right.png +0 -0
- data/public/javascripts/mail_engine/fancybox/fancybox-x.png +0 -0
- data/public/javascripts/mail_engine/fancybox/fancybox-y.png +0 -0
- data/public/javascripts/mail_engine/fancybox/fancybox.png +0 -0
- data/public/javascripts/mail_engine/fancybox/jquery.easing-1.3.pack.js +72 -0
- data/public/javascripts/mail_engine/fancybox/jquery.fancybox-1.3.4.css +359 -0
- data/public/javascripts/mail_engine/fancybox/jquery.fancybox-1.3.4.js +1156 -0
- data/public/javascripts/mail_engine/fancybox/jquery.fancybox-1.3.4.pack.js +46 -0
- data/public/javascripts/mail_engine/fancybox/jquery.mousewheel-3.0.4.pack.js +14 -0
- data/public/javascripts/mail_engine/jquery-ui.min.js +577 -0
- data/{test/dummy/public/javascripts → public/javascripts/mail_engine}/jquery.iframe-auto-height.plugin.js +0 -0
- data/{test/dummy/public/javascripts → public/javascripts/mail_engine}/jquery.string.js +0 -0
- data/{test/dummy/public/javascripts/mail_engine_application.js → public/javascripts/mail_engine/mail_engine.js} +0 -0
- data/{test/dummy/public/javascripts → public/javascripts/mail_engine}/markitup/jquery.markitup.js +0 -0
- data/{test/dummy/public/javascripts → public/javascripts/mail_engine}/markitup/sets/css/images/bold.png +0 -0
- data/{test/dummy/public/javascripts → public/javascripts/mail_engine}/markitup/sets/css/images/css.png +0 -0
- data/{test/dummy/public/javascripts → public/javascripts/mail_engine}/markitup/sets/css/images/italic.png +0 -0
- data/{test/dummy/public/javascripts → public/javascripts/mail_engine}/markitup/sets/css/images/picture.png +0 -0
- data/{test/dummy/public/javascripts → public/javascripts/mail_engine}/markitup/sets/css/images/stroke.png +0 -0
- data/{test/dummy/public/javascripts → public/javascripts/mail_engine}/markitup/sets/css/images/tag.png +0 -0
- data/{test/dummy/public/javascripts → public/javascripts/mail_engine}/markitup/sets/css/images/text_align_center.png +0 -0
- data/{test/dummy/public/javascripts → public/javascripts/mail_engine}/markitup/sets/css/images/text_align_justify.png +0 -0
- data/{test/dummy/public/javascripts → public/javascripts/mail_engine}/markitup/sets/css/images/text_align_left.png +0 -0
- data/{test/dummy/public/javascripts → public/javascripts/mail_engine}/markitup/sets/css/images/text_align_right.png +0 -0
- data/{test/dummy/public/javascripts → public/javascripts/mail_engine}/markitup/sets/css/images/text_indent.png +0 -0
- data/{test/dummy/public/javascripts → public/javascripts/mail_engine}/markitup/sets/css/images/text_letterspacing.png +0 -0
- data/{test/dummy/public/javascripts → public/javascripts/mail_engine}/markitup/sets/css/images/text_linespacing.png +0 -0
- data/{test/dummy/public/javascripts → public/javascripts/mail_engine}/markitup/sets/css/images/text_lowercase.png +0 -0
- data/{test/dummy/public/javascripts → public/javascripts/mail_engine}/markitup/sets/css/images/text_padding_bottom.png +0 -0
- data/{test/dummy/public/javascripts → public/javascripts/mail_engine}/markitup/sets/css/images/text_padding_left.png +0 -0
- data/{test/dummy/public/javascripts → public/javascripts/mail_engine}/markitup/sets/css/images/text_padding_right.png +0 -0
- data/{test/dummy/public/javascripts → public/javascripts/mail_engine}/markitup/sets/css/images/text_padding_top.png +0 -0
- data/{test/dummy/public/javascripts → public/javascripts/mail_engine}/markitup/sets/css/images/text_uppercase.png +0 -0
- data/{test/dummy/public/javascripts → public/javascripts/mail_engine}/markitup/sets/css/readme.txt +0 -0
- data/{test/dummy/public/javascripts → public/javascripts/mail_engine}/markitup/sets/css/set.js +0 -0
- data/{test/dummy/public/javascripts → public/javascripts/mail_engine}/markitup/sets/css/style.css +0 -0
- data/{test/dummy/public/javascripts → public/javascripts/mail_engine}/markitup/sets/default/images/bold.png +0 -0
- data/{test/dummy/public/javascripts → public/javascripts/mail_engine}/markitup/sets/default/images/clean.png +0 -0
- data/{test/dummy/public/javascripts → public/javascripts/mail_engine}/markitup/sets/default/images/image.png +0 -0
- data/{test/dummy/public/javascripts → public/javascripts/mail_engine}/markitup/sets/default/images/italic.png +0 -0
- data/{test/dummy/public/javascripts → public/javascripts/mail_engine}/markitup/sets/default/images/link.png +0 -0
- data/{test/dummy/public/javascripts → public/javascripts/mail_engine}/markitup/sets/default/images/picture.png +0 -0
- data/{test/dummy/public/javascripts → public/javascripts/mail_engine}/markitup/sets/default/images/preview.png +0 -0
- data/{test/dummy/public/javascripts → public/javascripts/mail_engine}/markitup/sets/default/images/stroke.png +0 -0
- data/{test/dummy/public/javascripts → public/javascripts/mail_engine}/markitup/sets/default/set.js +0 -0
- data/{test/dummy/public/javascripts → public/javascripts/mail_engine}/markitup/sets/default/style.css +0 -0
- data/{test/dummy/public/javascripts → public/javascripts/mail_engine}/markitup/sets/html/images/bold.png +0 -0
- data/{test/dummy/public/javascripts → public/javascripts/mail_engine}/markitup/sets/html/images/clean.png +0 -0
- data/{test/dummy/public/javascripts → public/javascripts/mail_engine}/markitup/sets/html/images/h1.png +0 -0
- data/{test/dummy/public/javascripts → public/javascripts/mail_engine}/markitup/sets/html/images/h2.png +0 -0
- data/{test/dummy/public/javascripts → public/javascripts/mail_engine}/markitup/sets/html/images/h3.png +0 -0
- data/{test/dummy/public/javascripts → public/javascripts/mail_engine}/markitup/sets/html/images/h4.png +0 -0
- data/{test/dummy/public/javascripts → public/javascripts/mail_engine}/markitup/sets/html/images/h5.png +0 -0
- data/{test/dummy/public/javascripts → public/javascripts/mail_engine}/markitup/sets/html/images/h6.png +0 -0
- data/{test/dummy/public/javascripts → public/javascripts/mail_engine}/markitup/sets/html/images/image.png +0 -0
- data/{test/dummy/public/javascripts → public/javascripts/mail_engine}/markitup/sets/html/images/italic.png +0 -0
- data/{test/dummy/public/javascripts → public/javascripts/mail_engine}/markitup/sets/html/images/link.png +0 -0
- data/{test/dummy/public/javascripts → public/javascripts/mail_engine}/markitup/sets/html/images/list-bullet.png +0 -0
- data/{test/dummy/public/javascripts → public/javascripts/mail_engine}/markitup/sets/html/images/list-item.png +0 -0
- data/{test/dummy/public/javascripts → public/javascripts/mail_engine}/markitup/sets/html/images/list-numeric.png +0 -0
- data/{test/dummy/public/javascripts → public/javascripts/mail_engine}/markitup/sets/html/images/paragraph.png +0 -0
- data/{test/dummy/public/javascripts → public/javascripts/mail_engine}/markitup/sets/html/images/picture.png +0 -0
- data/{test/dummy/public/javascripts → public/javascripts/mail_engine}/markitup/sets/html/images/preview.png +0 -0
- data/{test/dummy/public/javascripts → public/javascripts/mail_engine}/markitup/sets/html/images/stroke.png +0 -0
- data/{test/dummy/public/javascripts → public/javascripts/mail_engine}/markitup/sets/html/readme.txt +0 -0
- data/{test/dummy/public/javascripts → public/javascripts/mail_engine}/markitup/sets/html/set.js +0 -0
- data/{test/dummy/public/javascripts → public/javascripts/mail_engine}/markitup/sets/html/style.css +0 -0
- data/{test/dummy/public/javascripts → public/javascripts/mail_engine}/markitup/skins/markitup/images/bg-container.png +0 -0
- data/{test/dummy/public/javascripts → public/javascripts/mail_engine}/markitup/skins/markitup/images/bg-editor-bbcode.png +0 -0
- data/{test/dummy/public/javascripts → public/javascripts/mail_engine}/markitup/skins/markitup/images/bg-editor-dotclear.png +0 -0
- data/{test/dummy/public/javascripts → public/javascripts/mail_engine}/markitup/skins/markitup/images/bg-editor-html.png +0 -0
- data/{test/dummy/public/javascripts → public/javascripts/mail_engine}/markitup/skins/markitup/images/bg-editor-json.png +0 -0
- data/{test/dummy/public/javascripts → public/javascripts/mail_engine}/markitup/skins/markitup/images/bg-editor-markdown.png +0 -0
- data/{test/dummy/public/javascripts → public/javascripts/mail_engine}/markitup/skins/markitup/images/bg-editor-textile.png +0 -0
- data/{test/dummy/public/javascripts → public/javascripts/mail_engine}/markitup/skins/markitup/images/bg-editor-wiki.png +0 -0
- data/{test/dummy/public/javascripts → public/javascripts/mail_engine}/markitup/skins/markitup/images/bg-editor-xml.png +0 -0
- data/{test/dummy/public/javascripts → public/javascripts/mail_engine}/markitup/skins/markitup/images/bg-editor.png +0 -0
- data/{test/dummy/public/javascripts → public/javascripts/mail_engine}/markitup/skins/markitup/images/handle.png +0 -0
- data/{test/dummy/public/javascripts → public/javascripts/mail_engine}/markitup/skins/markitup/images/menu.png +0 -0
- data/{test/dummy/public/javascripts → public/javascripts/mail_engine}/markitup/skins/markitup/images/submenu.png +0 -0
- data/{test/dummy/public/javascripts → public/javascripts/mail_engine}/markitup/skins/markitup/style.css +0 -0
- data/{test/dummy/public/javascripts → public/javascripts/mail_engine}/markitup/skins/simple/images/handle.png +0 -0
- data/{test/dummy/public/javascripts → public/javascripts/mail_engine}/markitup/skins/simple/images/menu.png +0 -0
- data/{test/dummy/public/javascripts → public/javascripts/mail_engine}/markitup/skins/simple/images/submenu.png +0 -0
- data/{test/dummy/public/javascripts → public/javascripts/mail_engine}/markitup/skins/simple/style.css +0 -0
- data/{test/dummy/public/javascripts → public/javascripts/mail_engine}/markitup/templates/preview.css +0 -0
- data/{test/dummy/public/javascripts → public/javascripts/mail_engine}/markitup/templates/preview.html +0 -0
- data/public/stylesheets/mail_engine/jquery-ui/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/public/stylesheets/mail_engine/jquery-ui/smoothness/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
- data/public/stylesheets/mail_engine/jquery-ui/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- data/public/stylesheets/mail_engine/jquery-ui/smoothness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/public/stylesheets/mail_engine/jquery-ui/smoothness/images/ui-bg_glass_75_dadada_1x400.png +0 -0
- data/public/stylesheets/mail_engine/jquery-ui/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- data/public/stylesheets/mail_engine/jquery-ui/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/public/stylesheets/mail_engine/jquery-ui/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- data/public/stylesheets/mail_engine/jquery-ui/smoothness/images/ui-icons_222222_256x240.png +0 -0
- data/public/stylesheets/mail_engine/jquery-ui/smoothness/images/ui-icons_2e83ff_256x240.png +0 -0
- data/public/stylesheets/mail_engine/jquery-ui/smoothness/images/ui-icons_454545_256x240.png +0 -0
- data/public/stylesheets/mail_engine/jquery-ui/smoothness/images/ui-icons_888888_256x240.png +0 -0
- data/public/stylesheets/mail_engine/jquery-ui/smoothness/images/ui-icons_cd0a0a_256x240.png +0 -0
- data/public/stylesheets/mail_engine/jquery-ui/smoothness/jquery-ui.css +544 -0
- data/{test/dummy/public/stylesheets → public/stylesheets/mail_engine}/style.css +6 -2
- data/test/dummy/app/controllers/application_controller.rb +0 -8
- data/test/dummy/app/models/user.rb +6 -4
- data/test/dummy/config/application.rb +2 -2
- data/test/dummy/config/database.yml +2 -2
- data/test/dummy/db/migrate/20110114030841_create_table_mail_template.rb +1 -0
- data/test/dummy/db/migrate/20110206025002_create_mail_logs.rb +1 -1
- data/test/dummy/db/schema.rb +1 -0
- data/test/dummy/public/images/mail_engine/icons/add.png +0 -0
- data/test/dummy/public/images/mail_engine/icons/copy.png +0 -0
- data/test/dummy/public/images/mail_engine/icons/delete.png +0 -0
- data/test/dummy/public/images/mail_engine/icons/edit.gif +0 -0
- data/test/dummy/public/images/mail_engine/icons/missing.png +0 -0
- data/test/dummy/public/images/mail_engine/icons/save.png +0 -0
- data/test/dummy/public/images/mail_engine/icons/show.png +0 -0
- data/test/dummy/public/javascripts/mail_engine/fancybox/blank.gif +0 -0
- data/test/dummy/public/javascripts/mail_engine/fancybox/fancy_close.png +0 -0
- data/test/dummy/public/javascripts/mail_engine/fancybox/fancy_loading.png +0 -0
- data/test/dummy/public/javascripts/mail_engine/fancybox/fancy_nav_left.png +0 -0
- data/test/dummy/public/javascripts/mail_engine/fancybox/fancy_nav_right.png +0 -0
- data/test/dummy/public/javascripts/mail_engine/fancybox/fancy_shadow_e.png +0 -0
- data/test/dummy/public/javascripts/mail_engine/fancybox/fancy_shadow_n.png +0 -0
- data/test/dummy/public/javascripts/mail_engine/fancybox/fancy_shadow_ne.png +0 -0
- data/test/dummy/public/javascripts/mail_engine/fancybox/fancy_shadow_nw.png +0 -0
- data/test/dummy/public/javascripts/mail_engine/fancybox/fancy_shadow_s.png +0 -0
- data/test/dummy/public/javascripts/mail_engine/fancybox/fancy_shadow_se.png +0 -0
- data/test/dummy/public/javascripts/mail_engine/fancybox/fancy_shadow_sw.png +0 -0
- data/test/dummy/public/javascripts/mail_engine/fancybox/fancy_shadow_w.png +0 -0
- data/test/dummy/public/javascripts/mail_engine/fancybox/fancy_title_left.png +0 -0
- data/test/dummy/public/javascripts/mail_engine/fancybox/fancy_title_main.png +0 -0
- data/test/dummy/public/javascripts/mail_engine/fancybox/fancy_title_over.png +0 -0
- data/test/dummy/public/javascripts/mail_engine/fancybox/fancy_title_right.png +0 -0
- data/test/dummy/public/javascripts/mail_engine/fancybox/fancybox-x.png +0 -0
- data/test/dummy/public/javascripts/mail_engine/fancybox/fancybox-y.png +0 -0
- data/test/dummy/public/javascripts/mail_engine/fancybox/fancybox.png +0 -0
- data/test/dummy/public/javascripts/mail_engine/fancybox/jquery.easing-1.3.pack.js +72 -0
- data/test/dummy/public/javascripts/mail_engine/fancybox/jquery.fancybox-1.3.4.css +359 -0
- data/test/dummy/public/javascripts/mail_engine/fancybox/jquery.fancybox-1.3.4.js +1156 -0
- data/test/dummy/public/javascripts/mail_engine/fancybox/jquery.fancybox-1.3.4.pack.js +46 -0
- data/test/dummy/public/javascripts/mail_engine/fancybox/jquery.mousewheel-3.0.4.pack.js +14 -0
- data/test/dummy/public/javascripts/mail_engine/jquery-ui.min.js +577 -0
- data/test/dummy/public/javascripts/mail_engine/jquery.iframe-auto-height.plugin.js +50 -0
- data/test/dummy/public/javascripts/mail_engine/jquery.string.js +425 -0
- data/test/dummy/public/javascripts/mail_engine/mail_engine.js +2 -0
- data/test/dummy/public/javascripts/mail_engine/markitup/jquery.markitup.js +564 -0
- data/test/dummy/public/javascripts/mail_engine/markitup/sets/css/images/bold.png +0 -0
- data/test/dummy/public/javascripts/mail_engine/markitup/sets/css/images/css.png +0 -0
- data/test/dummy/public/javascripts/mail_engine/markitup/sets/css/images/italic.png +0 -0
- data/test/dummy/public/javascripts/mail_engine/markitup/sets/css/images/picture.png +0 -0
- data/test/dummy/public/javascripts/mail_engine/markitup/sets/css/images/stroke.png +0 -0
- data/test/dummy/public/javascripts/mail_engine/markitup/sets/css/images/tag.png +0 -0
- data/test/dummy/public/javascripts/mail_engine/markitup/sets/css/images/text_align_center.png +0 -0
- data/test/dummy/public/javascripts/mail_engine/markitup/sets/css/images/text_align_justify.png +0 -0
- data/test/dummy/public/javascripts/mail_engine/markitup/sets/css/images/text_align_left.png +0 -0
- data/test/dummy/public/javascripts/mail_engine/markitup/sets/css/images/text_align_right.png +0 -0
- data/test/dummy/public/javascripts/mail_engine/markitup/sets/css/images/text_indent.png +0 -0
- data/test/dummy/public/javascripts/mail_engine/markitup/sets/css/images/text_letterspacing.png +0 -0
- data/test/dummy/public/javascripts/mail_engine/markitup/sets/css/images/text_linespacing.png +0 -0
- data/test/dummy/public/javascripts/mail_engine/markitup/sets/css/images/text_lowercase.png +0 -0
- data/test/dummy/public/javascripts/mail_engine/markitup/sets/css/images/text_padding_bottom.png +0 -0
- data/test/dummy/public/javascripts/mail_engine/markitup/sets/css/images/text_padding_left.png +0 -0
- data/test/dummy/public/javascripts/mail_engine/markitup/sets/css/images/text_padding_right.png +0 -0
- data/test/dummy/public/javascripts/mail_engine/markitup/sets/css/images/text_padding_top.png +0 -0
- data/test/dummy/public/javascripts/mail_engine/markitup/sets/css/images/text_uppercase.png +0 -0
- data/test/dummy/public/javascripts/mail_engine/markitup/sets/css/readme.txt +28 -0
- data/test/dummy/public/javascripts/mail_engine/markitup/sets/css/set.js +52 -0
- data/test/dummy/public/javascripts/mail_engine/markitup/sets/css/style.css +72 -0
- data/test/dummy/public/javascripts/mail_engine/markitup/sets/default/images/bold.png +0 -0
- data/test/dummy/public/javascripts/mail_engine/markitup/sets/default/images/clean.png +0 -0
- data/test/dummy/public/javascripts/mail_engine/markitup/sets/default/images/image.png +0 -0
- data/test/dummy/public/javascripts/mail_engine/markitup/sets/default/images/italic.png +0 -0
- data/test/dummy/public/javascripts/mail_engine/markitup/sets/default/images/link.png +0 -0
- data/test/dummy/public/javascripts/mail_engine/markitup/sets/default/images/picture.png +0 -0
- data/test/dummy/public/javascripts/mail_engine/markitup/sets/default/images/preview.png +0 -0
- data/test/dummy/public/javascripts/mail_engine/markitup/sets/default/images/stroke.png +0 -0
- data/test/dummy/public/javascripts/mail_engine/markitup/sets/default/set.js +27 -0
- data/test/dummy/public/javascripts/mail_engine/markitup/sets/default/style.css +27 -0
- data/test/dummy/public/javascripts/mail_engine/markitup/sets/html/images/bold.png +0 -0
- data/test/dummy/public/javascripts/mail_engine/markitup/sets/html/images/clean.png +0 -0
- data/test/dummy/public/javascripts/mail_engine/markitup/sets/html/images/h1.png +0 -0
- data/test/dummy/public/javascripts/mail_engine/markitup/sets/html/images/h2.png +0 -0
- data/test/dummy/public/javascripts/mail_engine/markitup/sets/html/images/h3.png +0 -0
- data/test/dummy/public/javascripts/mail_engine/markitup/sets/html/images/h4.png +0 -0
- data/test/dummy/public/javascripts/mail_engine/markitup/sets/html/images/h5.png +0 -0
- data/test/dummy/public/javascripts/mail_engine/markitup/sets/html/images/h6.png +0 -0
- data/test/dummy/public/javascripts/mail_engine/markitup/sets/html/images/image.png +0 -0
- data/test/dummy/public/javascripts/mail_engine/markitup/sets/html/images/italic.png +0 -0
- data/test/dummy/public/javascripts/mail_engine/markitup/sets/html/images/link.png +0 -0
- data/test/dummy/public/javascripts/mail_engine/markitup/sets/html/images/list-bullet.png +0 -0
- data/test/dummy/public/javascripts/mail_engine/markitup/sets/html/images/list-item.png +0 -0
- data/test/dummy/public/javascripts/mail_engine/markitup/sets/html/images/list-numeric.png +0 -0
- data/test/dummy/public/javascripts/mail_engine/markitup/sets/html/images/paragraph.png +0 -0
- data/test/dummy/public/javascripts/mail_engine/markitup/sets/html/images/picture.png +0 -0
- data/test/dummy/public/javascripts/mail_engine/markitup/sets/html/images/preview.png +0 -0
- data/test/dummy/public/javascripts/mail_engine/markitup/sets/html/images/stroke.png +0 -0
- data/test/dummy/public/javascripts/mail_engine/markitup/sets/html/readme.txt +11 -0
- data/test/dummy/public/javascripts/mail_engine/markitup/sets/html/set.js +40 -0
- data/test/dummy/public/javascripts/mail_engine/markitup/sets/html/style.css +59 -0
- data/test/dummy/public/javascripts/mail_engine/markitup/skins/markitup/images/bg-container.png +0 -0
- data/test/dummy/public/javascripts/mail_engine/markitup/skins/markitup/images/bg-editor-bbcode.png +0 -0
- data/test/dummy/public/javascripts/mail_engine/markitup/skins/markitup/images/bg-editor-dotclear.png +0 -0
- data/test/dummy/public/javascripts/mail_engine/markitup/skins/markitup/images/bg-editor-html.png +0 -0
- data/test/dummy/public/javascripts/mail_engine/markitup/skins/markitup/images/bg-editor-json.png +0 -0
- data/test/dummy/public/javascripts/mail_engine/markitup/skins/markitup/images/bg-editor-markdown.png +0 -0
- data/test/dummy/public/javascripts/mail_engine/markitup/skins/markitup/images/bg-editor-textile.png +0 -0
- data/test/dummy/public/javascripts/mail_engine/markitup/skins/markitup/images/bg-editor-wiki.png +0 -0
- data/test/dummy/public/javascripts/mail_engine/markitup/skins/markitup/images/bg-editor-xml.png +0 -0
- data/test/dummy/public/javascripts/mail_engine/markitup/skins/markitup/images/bg-editor.png +0 -0
- data/test/dummy/public/javascripts/mail_engine/markitup/skins/markitup/images/handle.png +0 -0
- data/test/dummy/public/javascripts/mail_engine/markitup/skins/markitup/images/menu.png +0 -0
- data/test/dummy/public/javascripts/mail_engine/markitup/skins/markitup/images/submenu.png +0 -0
- data/test/dummy/public/javascripts/mail_engine/markitup/skins/markitup/style.css +147 -0
- data/test/dummy/public/javascripts/mail_engine/markitup/skins/simple/images/handle.png +0 -0
- data/test/dummy/public/javascripts/mail_engine/markitup/skins/simple/images/menu.png +0 -0
- data/test/dummy/public/javascripts/mail_engine/markitup/skins/simple/images/submenu.png +0 -0
- data/test/dummy/public/javascripts/mail_engine/markitup/skins/simple/style.css +118 -0
- data/test/dummy/public/javascripts/mail_engine/markitup/templates/preview.css +5 -0
- data/test/dummy/public/javascripts/mail_engine/markitup/templates/preview.html +11 -0
- data/test/dummy/public/stylesheets/mail_engine/jquery-ui/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/test/dummy/public/stylesheets/mail_engine/jquery-ui/smoothness/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
- data/test/dummy/public/stylesheets/mail_engine/jquery-ui/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- data/test/dummy/public/stylesheets/mail_engine/jquery-ui/smoothness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/test/dummy/public/stylesheets/mail_engine/jquery-ui/smoothness/images/ui-bg_glass_75_dadada_1x400.png +0 -0
- data/test/dummy/public/stylesheets/mail_engine/jquery-ui/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- data/test/dummy/public/stylesheets/mail_engine/jquery-ui/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/test/dummy/public/stylesheets/mail_engine/jquery-ui/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- data/test/dummy/public/stylesheets/mail_engine/jquery-ui/smoothness/images/ui-icons_222222_256x240.png +0 -0
- data/test/dummy/public/stylesheets/mail_engine/jquery-ui/smoothness/images/ui-icons_2e83ff_256x240.png +0 -0
- data/test/dummy/public/stylesheets/mail_engine/jquery-ui/smoothness/images/ui-icons_454545_256x240.png +0 -0
- data/test/dummy/public/stylesheets/mail_engine/jquery-ui/smoothness/images/ui-icons_888888_256x240.png +0 -0
- data/test/dummy/public/stylesheets/mail_engine/jquery-ui/smoothness/images/ui-icons_cd0a0a_256x240.png +0 -0
- data/test/dummy/public/stylesheets/mail_engine/jquery-ui/smoothness/jquery-ui.css +544 -0
- data/test/dummy/public/stylesheets/mail_engine/style.css +685 -0
- data/test/factories.rb +31 -4
- data/test/functional/mail_engine/{mail_schedules_controller_controller_test.rb → dashboard_controller_test.rb} +2 -2
- data/test/functional/mail_engine/{mail_templates_controller_controller_test.rb → mail_logs_controller_test.rb} +2 -2
- data/test/functional/mail_engine/mail_schedules_controller_test.rb +8 -0
- data/test/functional/mail_engine/mail_template_files_controller_test.rb +8 -0
- data/test/functional/mail_engine/mail_templates_controller_test.rb +8 -0
- data/test/functional/mail_engine/reports_controller_test.rb +8 -0
- data/test/functional/user_mailer_test.rb +14 -0
- data/test/test_helper.rb +4 -1
- data/test/unit/mail_engine/mail_log_test.rb +1 -1
- data/test/unit/mail_engine/mail_schedule_test.rb +34 -1
- data/test/unit/mail_engine/mail_template_test.rb +51 -12
- data/test/unit/user_test.rb +20 -0
- metadata +370 -125
- data/.yardoc/objects/MailEngine/Base/send_mail_c.dat +0 -0
- data/.yardoc/objects/MailEngine/CreateMigration.dat +0 -0
- data/.yardoc/objects/MailEngine/CreateMigration/create_migrations_i.dat +0 -0
- data/.yardoc/objects/MailEngine/HtmlDocumentAssetsReplacer/replace_resource_filename_in_html_c.dat +0 -0
- data/.yardoc/objects/MailEngine/HtmlDocumentAssetsReplacer/replace_resource_url_in_html_c.dat +0 -0
- data/.yardoc/objects/PLACEHOLDERS_IN_LAYOUT.dat +0 -0
- data/lib/mail_engine/placeholders_in_layout.rb +0 -5
- data/test/dummy/public/javascripts/jquery.nyroModal/img/ajaxLoader.gif +0 -0
- data/test/dummy/public/javascripts/jquery.nyroModal/img/close.gif +0 -0
- data/test/dummy/public/javascripts/jquery.nyroModal/img/next.gif +0 -0
- data/test/dummy/public/javascripts/jquery.nyroModal/img/prev.gif +0 -0
- data/test/dummy/public/javascripts/jquery.nyroModal/js/jquery.nyroModal-ie6.js +0 -186
- data/test/dummy/public/javascripts/jquery.nyroModal/js/jquery.nyroModal-ie6.min.js +0 -9
- data/test/dummy/public/javascripts/jquery.nyroModal/js/jquery.nyroModal.custom.js +0 -1599
- data/test/dummy/public/javascripts/jquery.nyroModal/js/jquery.nyroModal.custom.min.js +0 -34
- data/test/dummy/public/javascripts/jquery.nyroModal/styles/nyroModal.css +0 -102
- data/test/dummy/public/stylesheets/.gitkeep +0 -0
@@ -13,12 +13,13 @@ class MailEngine::MailTemplateFile < ActiveRecord::Base
|
|
13
13
|
end
|
14
14
|
|
15
15
|
def replace_url_in_mail_template
|
16
|
-
if self.file_changed?
|
16
|
+
if self.file_changed? and self.file_was.present?
|
17
17
|
self.mail_template.update_attribute :body,
|
18
|
-
MailEngine::HtmlDocumentAssetsReplacer.
|
18
|
+
MailEngine::HtmlDocumentAssetsReplacer.replace_resource_in_html(
|
19
19
|
self.mail_template.body,
|
20
20
|
self.file_was,
|
21
|
-
File.basename(self.file.url)
|
21
|
+
File.basename(self.file.url),
|
22
|
+
:filename
|
22
23
|
)
|
23
24
|
end
|
24
25
|
end
|
@@ -2,29 +2,42 @@
|
|
2
2
|
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr">
|
3
3
|
|
4
4
|
<head>
|
5
|
-
<%= stylesheet_link_tag "style", "/
|
6
|
-
<%= javascript_include_tag "jquery", "rails",
|
5
|
+
<%= stylesheet_link_tag "mail_engine/style", "mail_engine/jquery-ui/smoothness/jquery-ui" %>
|
6
|
+
<%= javascript_include_tag "jquery", "rails",
|
7
|
+
"mail_engine/jquery-ui.min",
|
8
|
+
"mail_engine/jquery.iframe-auto-height.plugin",
|
9
|
+
"mail_engine/jquery.string" %>
|
7
10
|
|
8
|
-
<!--
|
9
|
-
<%= stylesheet_link_tag "/javascripts/
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
"markitup/sets/default/set",
|
14
|
-
"markitup/sets/html/set" %>
|
15
|
-
|
16
|
-
<!-- used for google chart -->
|
17
|
-
<script type='text/javascript' src='https://www.google.com/jsapi'></script>
|
11
|
+
<!-- modal lib -->
|
12
|
+
<%= stylesheet_link_tag "/javascripts/mail_engine/fancybox/jquery.fancybox-1.3.4.css" %>
|
13
|
+
<%= javascript_include_tag "mail_engine/fancybox/jquery.mousewheel-3.0.4.pack.js",
|
14
|
+
"mail_engine/fancybox/jquery.easing-1.3.pack.js",
|
15
|
+
"mail_engine/fancybox/jquery.fancybox-1.3.4.pack.js" %>
|
18
16
|
|
19
|
-
<!--
|
20
|
-
|
21
|
-
|
17
|
+
<!-- markitup -->
|
18
|
+
<%= stylesheet_link_tag "/javascripts/mail_engine/markitup/skins/markitup/style",
|
19
|
+
"/javascripts/mail_engine/markitup/sets/default/style",
|
20
|
+
"/javascripts/mail_engine/markitup/sets/html/style" %>
|
21
|
+
<%= javascript_include_tag "mail_engine/markitup/jquery.markitup",
|
22
|
+
"mail_engine/markitup/sets/default/set",
|
23
|
+
"mail_engine/markitup/sets/html/set" %>
|
22
24
|
|
23
25
|
<%= csrf_meta_tag %>
|
26
|
+
|
24
27
|
<script>
|
25
28
|
$(function(){
|
26
|
-
$(
|
27
|
-
|
29
|
+
$("a.fancybox").fancybox({
|
30
|
+
'transitionIn' : 'elastic',
|
31
|
+
'transitionOut' : 'elastic',
|
32
|
+
'speedIn' : 600,
|
33
|
+
'speedOut' : 200,
|
34
|
+
'overlayShow' : false,
|
35
|
+
'scrolling' : 'auto',
|
36
|
+
'centerOnScroll': true,
|
37
|
+
'autoDimensions' : true
|
38
|
+
});
|
39
|
+
|
40
|
+
$('iframe').iframeAutoHeight({heightOffset: 50});
|
28
41
|
|
29
42
|
$("#loading").ajaxStart(function(){
|
30
43
|
$(this).slideDown("fast");
|
@@ -35,7 +48,7 @@
|
|
35
48
|
});
|
36
49
|
});
|
37
50
|
</script>
|
38
|
-
<title>Mail Engine</title>
|
51
|
+
<title>Mail Engine Admin</title>
|
39
52
|
</head>
|
40
53
|
|
41
54
|
<body>
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
2
|
+
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr">
|
3
|
+
|
4
|
+
<head>
|
5
|
+
<%= stylesheet_link_tag "mail_engine/style" %>
|
6
|
+
<%= javascript_include_tag "jquery", "rails" %>
|
7
|
+
<%= csrf_meta_tag %>
|
8
|
+
<title>Mail Engine Admin</title>
|
9
|
+
</head>
|
10
|
+
|
11
|
+
<body>
|
12
|
+
<%= yield %>
|
13
|
+
</body>
|
14
|
+
</html>
|
@@ -1,3 +1,6 @@
|
|
1
|
+
<!-- used for google chart -->
|
2
|
+
<script type='text/javascript' src='https://www.google.com/jsapi'></script>
|
3
|
+
|
1
4
|
<script type="text/javascript">
|
2
5
|
// show today's pie chart
|
3
6
|
function drawPie() {
|
@@ -24,7 +27,7 @@
|
|
24
27
|
<div class="today-report left">
|
25
28
|
|
26
29
|
<h2>Report of Today</h2>
|
27
|
-
<div class="
|
30
|
+
<div class="clearer"></div>
|
28
31
|
|
29
32
|
<div class="left">
|
30
33
|
<table border="0" cellspacing="5" cellpadding="5" class="data-table" style="width: 500px; margin-top: 30px; margin-right: 30px">
|
@@ -61,4 +64,18 @@
|
|
61
64
|
<div id='pie_chart'></div>
|
62
65
|
</div>
|
63
66
|
</div>
|
67
|
+
<div class="clearer"></div>
|
68
|
+
|
69
|
+
<div class="today-report left">
|
70
|
+
<h2>Next Scheduled Mail</h2>
|
71
|
+
<div class="clearer"></div>
|
72
|
+
<table border="0" cellspacing="5" cellpadding="5" class="data-table" style="width: 910px; margin-top: 30px; margin-right: 30px">
|
73
|
+
<tr>
|
74
|
+
<th>Schedule Name</th><th width="120">Send Time</th>
|
75
|
+
</tr>
|
76
|
+
<tr>
|
77
|
+
<td>New Jobs Newsletter</td><td>2011-3-4 12:00</td>
|
78
|
+
</tr>
|
79
|
+
</table>
|
80
|
+
</div>
|
64
81
|
<div class="clearer"></div>
|
@@ -0,0 +1,29 @@
|
|
1
|
+
<p>
|
2
|
+
<h4>Latest 10 Logs</h4>
|
3
|
+
<%= show_no_record(logs) do %>
|
4
|
+
<table class="data-table">
|
5
|
+
<tr>
|
6
|
+
<th>Subject</th>
|
7
|
+
<th>Sender</th>
|
8
|
+
<th>Recipient</th>
|
9
|
+
<th>mime_type</th>
|
10
|
+
<th>Sent at</th>
|
11
|
+
<th></th>
|
12
|
+
</tr>
|
13
|
+
|
14
|
+
<% logs.each do |log| %>
|
15
|
+
<tr class="even">
|
16
|
+
<td><%= log.subject %></td>
|
17
|
+
<td><%= log.sender %></td>
|
18
|
+
<td><%= log.recipient %></td>
|
19
|
+
<td><%= log.mime_type %></td>
|
20
|
+
<td><%= log.created_at %></td>
|
21
|
+
<td>
|
22
|
+
<%= link_to 'Show', mail_log_path(log) %>
|
23
|
+
<%= link_to 'Destroy', mail_log_path(log), :confirm => 'Are you sure?', :method => :delete %>
|
24
|
+
</td>
|
25
|
+
</tr>
|
26
|
+
<% end %>
|
27
|
+
</table>
|
28
|
+
<% end %>
|
29
|
+
</p>
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<div class="post">
|
2
2
|
<div class="post-title"><h2>Mail Logs</h2></div>
|
3
3
|
<div class="post-body">
|
4
|
-
|
4
|
+
<%= show_no_record(@mail_logs) do %>
|
5
5
|
<table class="data-table">
|
6
6
|
<tr>
|
7
7
|
<th>Subject</th>
|
@@ -9,7 +9,7 @@
|
|
9
9
|
<th>Recipient</th>
|
10
10
|
<th>mime_type</th>
|
11
11
|
<th>Sent at</th>
|
12
|
-
<th></th>
|
12
|
+
<th width="50"></th>
|
13
13
|
</tr>
|
14
14
|
|
15
15
|
<% @mail_logs.each do |log| %>
|
@@ -20,13 +20,13 @@
|
|
20
20
|
<td><%= log.mime_type %></td>
|
21
21
|
<td><%= log.created_at %></td>
|
22
22
|
<td>
|
23
|
-
<%= link_to '
|
24
|
-
<%= link_to '
|
23
|
+
<%= link_to image_tag('mail_engine/icons/show.png'), mail_log_path(log) %>
|
24
|
+
<%= link_to image_tag('mail_engine/icons/delete.png'), mail_log_path(log), :confirm => 'Are you sure?', :method => :delete %>
|
25
25
|
</td>
|
26
26
|
</tr>
|
27
27
|
<% end %>
|
28
28
|
</table>
|
29
|
-
<%=
|
29
|
+
<%= paginate @mail_logs %>
|
30
30
|
<% end %>
|
31
31
|
|
32
32
|
<div class="clearer"> </div>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<% if @mail_schedule.errors.any? %>
|
2
|
-
<
|
2
|
+
<p id="error_explanation">
|
3
3
|
<h2><%= pluralize(@mail_schedule.errors.count, "error") %> prohibited this mail_schedule from being saved:</h2>
|
4
4
|
|
5
5
|
<ul>
|
@@ -7,7 +7,7 @@
|
|
7
7
|
<li><%= msg %></li>
|
8
8
|
<% end %>
|
9
9
|
</ul>
|
10
|
-
</
|
10
|
+
</p>
|
11
11
|
<% end %>
|
12
12
|
|
13
13
|
<div class="field">
|
@@ -16,11 +16,11 @@
|
|
16
16
|
</div>
|
17
17
|
<div class="field">
|
18
18
|
<%= f.label :mail_template_id %><br />
|
19
|
-
<%= f.select :mail_template_id, MailEngine::MailTemplate.where(:for_marketing => true).map {|t| [t.name, t.id]} %>
|
19
|
+
<%= f.select :mail_template_id, MailEngine::MailTemplate.group("path").where(:for_marketing => true).map {|t| [t.name, t.id]} %>
|
20
20
|
</div>
|
21
21
|
<div class="field">
|
22
22
|
<%= f.label :user_group %><br />
|
23
|
-
<%= f.select :user_group,
|
23
|
+
<%= f.select :user_group, MailEngine::USER_MODEL.groups %>
|
24
24
|
</div>
|
25
25
|
<div class="field">
|
26
26
|
<%= f.label :count %><br />
|
@@ -36,10 +36,11 @@
|
|
36
36
|
</div>
|
37
37
|
<div class="field">
|
38
38
|
<%= f.label :payload %><br />
|
39
|
-
<%
|
39
|
+
<% MailEngine::USER_MODEL.payload_columns.each do |column| %>
|
40
40
|
<%= check_box_tag "#{f.object_name}[payload][]", column, f.object.payload.try(:include?, column) %> <%= column %><br />
|
41
41
|
<% end %>
|
42
42
|
</div>
|
43
|
+
|
43
44
|
<div class="actions">
|
44
45
|
<%= f.submit :class => "button" %>
|
45
46
|
</div>
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<div class="post">
|
2
2
|
<div class="post-title"><h2>System Mail Schedules</h2></div>
|
3
3
|
<div class="post-body">
|
4
|
-
|
4
|
+
<%= show_no_record(@mail_schedules) do %>
|
5
5
|
<table class="data-table">
|
6
6
|
<tr>
|
7
7
|
<th>Name</th>
|
@@ -22,15 +22,20 @@
|
|
22
22
|
<td><%= mail_schedule.count %></td>
|
23
23
|
<td><%= mail_schedule.sent_count %></td>
|
24
24
|
<td><%= mail_schedule.period %></td>
|
25
|
-
<td><%= mail_schedule.payload %></td>
|
25
|
+
<td><%= raw mail_schedule.payload.gsub(",", "<br/>") %></td>
|
26
26
|
<td>
|
27
|
-
<%= link_to '
|
28
|
-
<%= link_to '
|
29
|
-
<%= link_to '
|
27
|
+
<%= link_to image_tag('mail_engine/icons/show.png'), mail_schedule_path(mail_schedule) %>
|
28
|
+
<%= link_to image_tag('mail_engine/icons/edit.gif'), edit_mail_schedule_path(mail_schedule) %>
|
29
|
+
<%= link_to image_tag('mail_engine/icons/delete.png'), mail_schedule_path(mail_schedule), :confirm => 'Are you sure?', :method => :delete %>
|
30
30
|
<br>
|
31
31
|
<%= form_tag send_test_mail_mail_schedule_path(mail_schedule), :remote => true do %>
|
32
|
-
|
33
|
-
|
32
|
+
<div>
|
33
|
+
<span>Load data from user</span>: <%= select_tag :sample_user_id, options_from_collection_for_select(MailEngine::USER_MODEL.order('id asc').limit(10).send(mail_schedule.user_group), "id", "email") %>
|
34
|
+
</div>
|
35
|
+
<div>
|
36
|
+
<span>Send mail to</span>: <%= text_field_tag :recipient, "", :size => 14, :class => "text" %>
|
37
|
+
<%= submit_tag 'Send Test', :class => "button" %>
|
38
|
+
</div>
|
34
39
|
<% end %>
|
35
40
|
</td>
|
36
41
|
</tr>
|
@@ -38,7 +43,7 @@
|
|
38
43
|
</table>
|
39
44
|
|
40
45
|
<div class="left">
|
41
|
-
<%=
|
46
|
+
<%= paginate @mail_schedules %>
|
42
47
|
</div>
|
43
48
|
<% end %>
|
44
49
|
|
@@ -1,28 +1,38 @@
|
|
1
1
|
<% if f.object.errors.any? %>
|
2
|
-
<
|
3
|
-
<
|
4
|
-
|
2
|
+
<p id="error_explanation">
|
3
|
+
<h4><%= pluralize(f.object.errors.count, "error") %> prohibited this mail_schedule from being saved:</h4>
|
5
4
|
<ul>
|
6
5
|
<% f.object.errors.full_messages.each do |msg| %>
|
7
6
|
<li><%= msg %></li>
|
8
7
|
<% end %>
|
9
8
|
</ul>
|
10
|
-
</
|
9
|
+
</p>
|
11
10
|
<% end %>
|
12
11
|
|
12
|
+
|
13
13
|
<div class="field">
|
14
14
|
<%= f.label :file %><br />
|
15
15
|
<%= f.file_field :file, :class => "text" %>
|
16
|
+
<div>
|
17
|
+
<i>Only allowed to upload Image file(.jpg, .jpeg, .gif, .png) and CSS file(.css).</i>
|
18
|
+
</div>
|
16
19
|
</div>
|
17
20
|
|
18
21
|
<% if f.object.attributes["file"] %>
|
19
|
-
<
|
20
|
-
<
|
21
|
-
|
22
|
-
</
|
23
|
-
|
22
|
+
<table class="data-table" style="margin-top: 10px; margin-bottom: 0px">
|
23
|
+
<tr>
|
24
|
+
<td><h3><%= link_to f.object.attributes["file"], f.object.file.url, :target => '_blank' %></h3></td>
|
25
|
+
</tr>
|
26
|
+
<% if f.object.image? %>
|
27
|
+
<tr>
|
28
|
+
<td><%= image_tag f.object.file.url, :width => 200 %></td>
|
29
|
+
</tr>
|
30
|
+
<% end %>
|
31
|
+
</table>
|
32
|
+
|
24
33
|
<% end %>
|
25
34
|
|
26
|
-
<div class="
|
35
|
+
<div class="clearer"></div>
|
36
|
+
<div class="actions right">
|
27
37
|
<%= f.submit :class => "button" %>
|
28
38
|
</div>
|
@@ -1,15 +1,20 @@
|
|
1
|
+
<%
|
2
|
+
is_current_template_for_marketing = f.object.for_marketing || params[:type] == 'marketing'
|
3
|
+
is_current_template_partial = f.object.partial || params[:type] == 'partial'
|
4
|
+
%>
|
5
|
+
|
1
6
|
<% if @mail_template.errors.any? %>
|
2
|
-
<
|
7
|
+
<p id="error_explanation">
|
3
8
|
<h2><%= pluralize(@mail_template.errors.count, "error") %> prohibited this mail_template from being saved:</h2>
|
4
|
-
|
5
9
|
<ul>
|
6
10
|
<% @mail_template.errors.full_messages.each do |msg| %>
|
7
11
|
<li><%= msg %></li>
|
8
12
|
<% end %>
|
9
13
|
</ul>
|
10
|
-
</
|
14
|
+
</p>
|
11
15
|
<% end %>
|
12
16
|
|
17
|
+
<!-- basic columns -->
|
13
18
|
<div class="field">
|
14
19
|
<%= f.label :name %><br />
|
15
20
|
<%= f.text_field :name, :class => "text" %>
|
@@ -20,6 +25,18 @@
|
|
20
25
|
<%= f.text_field :path, :class => "text" %>
|
21
26
|
</div>
|
22
27
|
|
28
|
+
<% unless is_current_template_partial %>
|
29
|
+
<div class="field">
|
30
|
+
<%= f.label :subject %><br />
|
31
|
+
<%= f.text_field :subject, :class => "text" %>
|
32
|
+
|
33
|
+
<div class="hint">
|
34
|
+
<span class='found_subject_hint hidden'>We found you have entered this subject in another template with same locale and path.</span>
|
35
|
+
<span class='found_same_path_template_hint <%= 'hidden' unless f.object.persisted? %>'>If you edit this subject here, the subject of current template with same locale will be changed.</span>
|
36
|
+
</div>
|
37
|
+
</div>
|
38
|
+
<% end %>
|
39
|
+
|
23
40
|
<div class="field">
|
24
41
|
<%= f.label :locale %><br />
|
25
42
|
<%= f.select :locale, I18n.available_locales.map(&:to_s) %>
|
@@ -33,6 +50,7 @@
|
|
33
50
|
<!-- layout selecter -->
|
34
51
|
<%= render 'layout_selector', :f => f if params[:type] != 'partial' and f.object.partial != true %>
|
35
52
|
|
53
|
+
<!-- template files -->
|
36
54
|
<% if @mail_template.persisted? %>
|
37
55
|
<div class="field">
|
38
56
|
<label>Files</label>
|
@@ -42,9 +60,12 @@
|
|
42
60
|
<p>
|
43
61
|
<div style="margin-bottom: 5px">
|
44
62
|
<b><%= link_to file.attributes["file"], file.url %></b>
|
45
|
-
|
46
|
-
<b><%= link_to "[edit]", edit_mail_template_mail_template_file_path(@mail_template, file), :class => "
|
63
|
+
<!-- operation links -->
|
64
|
+
<b><%= link_to "[edit]", edit_mail_template_mail_template_file_path(@mail_template, file), :class => "fancybox iframe", :title => "Editing #{file.attributes["file"]}" %></b>
|
47
65
|
<b><%= link_to "[delete]", mail_template_mail_template_file_path(@mail_template, file), :method => :delete, :confirm => 'Are you sure?', :remote => true %></b>
|
66
|
+
<br />
|
67
|
+
<!-- url preview input box -->
|
68
|
+
<input type="text" class="text click_to_select" style="width:910px" value="<%= "http://#{request.host}#{file.url}" %>" />
|
48
69
|
</div>
|
49
70
|
<%= image_tag file.url if file.image? %>
|
50
71
|
</p>
|
@@ -53,40 +74,72 @@
|
|
53
74
|
<% end %>
|
54
75
|
<div class="clearer"></div>
|
55
76
|
|
56
|
-
<h3 class="right"><%= link_to "New File", new_mail_template_mail_template_file_path(@mail_template), :class => "
|
77
|
+
<h3 class="right"><%= link_to "New File", new_mail_template_mail_template_file_path(@mail_template), :class => "fancybox iframe", :title => "Upload A New File" %></h3>
|
57
78
|
<div class="clearer"></div>
|
58
79
|
</div>
|
59
80
|
<% end %>
|
60
81
|
|
82
|
+
<!-- template zip file which uploaded when create from zip file -->
|
61
83
|
<% if @mail_template.zip_file.present? %>
|
62
84
|
<div class="field">
|
63
85
|
<label>ZIP Files</label>
|
64
86
|
<h4><%= link_to @mail_template.attributes["zip_file"], @mail_template.zip_file.url %></h4>
|
65
|
-
<
|
87
|
+
<div class="hint">If you want to do batch editing, we recommend you to download the original file then edit it on your local computer.</div>
|
66
88
|
</div>
|
67
89
|
<% end %>
|
68
90
|
|
69
|
-
<!--
|
91
|
+
<!-- html or text editor -->
|
70
92
|
<div class="field">
|
71
93
|
<%= f.label :body %><br />
|
72
94
|
<%= f.text_area :body, :class => "markitup w910", :rows => "10" %>
|
73
95
|
</div>
|
74
96
|
|
75
|
-
<%= f.hidden_field :for_marketing, :value =>
|
76
|
-
<%= f.hidden_field :partial, :value =>
|
97
|
+
<%= f.hidden_field :for_marketing, :value => is_current_template_for_marketing %>
|
98
|
+
<%= f.hidden_field :partial, :value => is_current_template_partial %>
|
77
99
|
|
78
100
|
<div class="actions">
|
79
101
|
<%= f.submit :class => "button" %>
|
80
102
|
</div>
|
81
103
|
|
82
104
|
<script>
|
83
|
-
|
105
|
+
function get_subject() {
|
106
|
+
options = {
|
107
|
+
path : $("#mail_engine_mail_template_path").val(),
|
108
|
+
for_marketing : <%= is_current_template_for_marketing %>,
|
109
|
+
locale : $("#mail_engine_mail_template_locale").val()
|
110
|
+
};
|
111
|
+
|
112
|
+
$.get("<%= get_existed_subject_mail_templates_path %>", options, function(data){
|
113
|
+
if(data.length > 0) {
|
114
|
+
$("#mail_engine_mail_template_subject").val(data);
|
115
|
+
$(".found_subject_hint, .found_same_path_template_hint").fadeIn('slow');
|
116
|
+
} else {
|
117
|
+
$(".found_subject_hint, .found_same_path_template_hint").fadeOut('slow');
|
118
|
+
}
|
119
|
+
});
|
120
|
+
}
|
121
|
+
|
122
|
+
$(function(){
|
123
|
+
// if path, locale changed should check if subject's existance.
|
124
|
+
$("#mail_engine_mail_template_path, #mail_engine_mail_template_locale").change(function(){
|
125
|
+
get_subject();
|
126
|
+
});
|
127
|
+
|
128
|
+
$("#mail_engine_mail_template_subject").change(function(){
|
129
|
+
if($(this).val().length == 0) {
|
130
|
+
$(".found_subject_hint, .found_same_path_template_hint").fadeOut('slow');
|
131
|
+
}
|
132
|
+
});
|
133
|
+
|
134
|
+
$(".click_to_select").click(function(){ $(this).select(); });
|
135
|
+
|
84
136
|
// when the format chenged, should reload the same format of partial options.
|
85
137
|
$("#mail_engine_mail_template_format, #mail_engine_mail_template_locale").change(function(){
|
86
138
|
$(".layout_option:checked").click();
|
87
139
|
});
|
88
|
-
|
140
|
+
|
89
141
|
// init markitup
|
142
|
+
// FIXME: when format changed the preview.{format} can't change.
|
90
143
|
$.extend(mySettings, {
|
91
144
|
previewParserPath: '~/preview.' + $("#mail_engine_mail_template_format").val(),
|
92
145
|
previewParserVar: 'new_body',
|