wco_email 0.1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/README.txt +129 -0
- data/Rakefile +5 -0
- data/app/assets/config/wco_email_manifest.js +7 -0
- data/app/assets/javascript/vendor-trash/jquery-ui.min.js +13 -0
- data/app/assets/javascript/vendor-trash/jquery.fileupload.js +1482 -0
- data/app/assets/javascript/vendor-trash/jquery.iframe-transport.js +224 -0
- data/app/assets/javascript/vendor-trash/jquery.ui.widget.js +572 -0
- data/app/assets/javascript/vendor-trash/summernote-bs4.min.js +3 -0
- data/app/assets/javascript/wco_email/application.js +11 -0
- data/app/assets/javascript/wco_email/contexts.js +19 -0
- data/app/assets/javascript/wco_email/conversations.js +177 -0
- data/app/assets/javascript/wco_email/file_upload.js-trash +32 -0
- data/app/assets/javascript/wco_email/shared.js +22 -0
- data/app/assets/stylesheets/wco_email/application.scss +29 -0
- data/app/assets/stylesheets/wco_email/contexts.scss +63 -0
- data/app/assets/stylesheets/wco_email/conversations.scss +16 -0
- data/app/assets/stylesheets/wco_email/tags.scss +6 -0
- data/app/controllers/wco_email/application_controller.rb +16 -0
- data/app/controllers/wco_email/contexts_controller.rb +156 -0
- data/app/controllers/wco_email/conversations_controller.rb +129 -0
- data/app/controllers/wco_email/email_action_templates_controller.rb +77 -0
- data/app/controllers/wco_email/email_actions_controller.rb +55 -0
- data/app/controllers/wco_email/email_campaigns_controller.rb +73 -0
- data/app/controllers/wco_email/email_filters_controller.rb +72 -0
- data/app/controllers/wco_email/email_layouts_controller.rb +13 -0
- data/app/controllers/wco_email/email_templates_controller.rb +124 -0
- data/app/controllers/wco_email/message_stubs_controller.rb +14 -0
- data/app/controllers/wco_email/messages_controller.rb +28 -0
- data/app/controllers/wco_email/obfuscated_redirects_controller.rb +20 -0
- data/app/controllers/wco_email/sessions_controller.rb +19 -0
- data/app/controllers/wco_email/unsubscribes_controller.rb +40 -0
- data/app/helpers/wco_email/application_helper.rb +20 -0
- data/app/jobs/wco_email/message_intake_job.rb +54 -0
- data/app/mailers/wco_email/application_mailer.rb +98 -0
- data/app/views/202212 Mailchimp Templates/202212 1col fixed-width.html +863 -0
- data/app/views/202212 Mailchimp Templates/202212 1col full-width.html +906 -0
- data/app/views/202212 Mailchimp Templates/202212 2col fixed-width 2.html +1003 -0
- data/app/views/202212 Mailchimp Templates/202212 2col fixed-width.html +1082 -0
- data/app/views/202212 Mailchimp Templates/202212 2col full-width 2.html +1053 -0
- data/app/views/202212 Mailchimp Templates/202212 2col full-width.html +1147 -0
- data/app/views/202212 Mailchimp Templates/202212 3col fixed-width.html +1087 -0
- data/app/views/202212 Mailchimp Templates/202212 3col full-width.html +1136 -0
- data/app/views/202212 Mailchimp Templates/202212 catalog various-colors-1.html +1223 -0
- data/app/views/202212 Mailchimp Templates/202212 educate.html +1080 -0
- data/app/views/202212 Mailchimp Templates/202212 follow up.html +1001 -0
- data/app/views/202212 Mailchimp Templates/202212 make an announcement.html +1048 -0
- data/app/views/202212 Mailchimp Templates/202212 sell-a-product.html +977 -0
- data/app/views/202212 Mailchimp Templates/202212 tell a story.html +1168 -0
- data/app/views/202212 Mailchimp Templates/202212 theme art-newsletter.html +1612 -0
- data/app/views/202212 Mailchimp Templates/202212 theme caribou-xmas.html +856 -0
- data/app/views/202212 Mailchimp Templates/202212 theme colorbox.html +1027 -0
- data/app/views/202212 Mailchimp Templates/202212 theme competition-invitation.html +918 -0
- data/app/views/202212 Mailchimp Templates/202212 theme event-veerle.html +1132 -0
- data/app/views/202212 Mailchimp Templates/202212 theme fall-colors.html +1407 -0
- data/app/views/202212 Mailchimp Templates/202212 theme gift-giving.html +787 -0
- data/app/views/202212 Mailchimp Templates/202212 theme giftgiving-snowmen.html +731 -0
- data/app/views/202212 Mailchimp Templates/202212 theme heart-of-flowers.html +795 -0
- data/app/views/202212 Mailchimp Templates/202212 theme hero-card.html +915 -0
- data/app/views/202212 Mailchimp Templates/202212 theme hero-image.html +1148 -0
- data/app/views/202212 Mailchimp Templates/202212 theme monthly-contest.html +967 -0
- data/app/views/202212 Mailchimp Templates/202212 theme multiple-event.html +1189 -0
- data/app/views/202212 Mailchimp Templates/202212 theme postcard.html +914 -0
- data/app/views/202212 Mailchimp Templates/202212 theme snowy-fields.html +733 -0
- data/app/views/202212 Mailchimp Templates/202212 theme soft.html +849 -0
- data/app/views/202212 Mailchimp Templates/202212 theme sophisticated.html +1079 -0
- data/app/views/202212 Mailchimp Templates/202212 theme subtle.html +1218 -0
- data/app/views/202212 Mailchimp Templates/202212 theme ticket.html +1015 -0
- data/app/views/202212 Mailchimp Templates/202212 theme whale.html +888 -0
- data/app/views/202310 Email Templates/_acknowledgement_of_document_receipt.html.erb +23 -0
- data/app/views/202310 Email Templates/_support_ticket_created.html.erb +26 -0
- data/app/views/layouts/wco_email/application.haml +64 -0
- data/app/views/layouts/wco_email/mailbox.haml-trash +62 -0
- data/app/views/wco_email/_analytics.erb +16 -0
- data/app/views/wco_email/_main_header.haml +31 -0
- data/app/views/wco_email/_sidebar.haml +10 -0
- data/app/views/wco_email/application_mailer/_footer_unsubscribe.html.erb +24 -0
- data/app/views/wco_email/application_mailer/_header_logo.html.erb +12 -0
- data/app/views/wco_email/application_mailer/forwarder_notify.html.erb +17 -0
- data/app/views/wco_email/contexts/_form.haml +59 -0
- data/app/views/wco_email/contexts/_form_reply.haml +27 -0
- data/app/views/wco_email/contexts/_header.haml +22 -0
- data/app/views/wco_email/contexts/_index.haml +8 -0
- data/app/views/wco_email/contexts/edit.haml +8 -0
- data/app/views/wco_email/contexts/iframe_src.haml +3 -0
- data/app/views/wco_email/contexts/index.haml +51 -0
- data/app/views/wco_email/contexts/new.haml +5 -0
- data/app/views/wco_email/contexts/show.haml +34 -0
- data/app/views/wco_email/contexts/summary.csv.erb +4 -0
- data/app/views/wco_email/contexts/summary.haml +16 -0
- data/app/views/wco_email/conversations/_actions.haml +21 -0
- data/app/views/wco_email/conversations/_search.haml +14 -0
- data/app/views/wco_email/conversations/index.haml +43 -0
- data/app/views/wco_email/conversations/show.haml +27 -0
- data/app/views/wco_email/email_action_templates/_form.haml +45 -0
- data/app/views/wco_email/email_action_templates/_header.haml +8 -0
- data/app/views/wco_email/email_action_templates/edit.haml +7 -0
- data/app/views/wco_email/email_action_templates/index.haml +36 -0
- data/app/views/wco_email/email_action_templates/new.haml +9 -0
- data/app/views/wco_email/email_action_templates/show.haml +11 -0
- data/app/views/wco_email/email_actions/_form.haml +24 -0
- data/app/views/wco_email/email_actions/_form_mini.haml-trash +28 -0
- data/app/views/wco_email/email_actions/_header.haml +8 -0
- data/app/views/wco_email/email_actions/edit.haml +4 -0
- data/app/views/wco_email/email_actions/index.haml +31 -0
- data/app/views/wco_email/email_actions/new.haml +4 -0
- data/app/views/wco_email/email_actions/show.haml +0 -0
- data/app/views/wco_email/email_campaigns/_form.haml +33 -0
- data/app/views/wco_email/email_campaigns/_header.haml +5 -0
- data/app/views/wco_email/email_campaigns/edit.haml +5 -0
- data/app/views/wco_email/email_campaigns/index.haml +14 -0
- data/app/views/wco_email/email_campaigns/new.haml +5 -0
- data/app/views/wco_email/email_campaigns/show.haml +17 -0
- data/app/views/wco_email/email_filters/_form.haml +40 -0
- data/app/views/wco_email/email_filters/_header.haml +5 -0
- data/app/views/wco_email/email_filters/edit.haml +5 -0
- data/app/views/wco_email/email_filters/index.haml +48 -0
- data/app/views/wco_email/email_filters/new.haml +5 -0
- data/app/views/wco_email/email_templates/_form.haml +48 -0
- data/app/views/wco_email/email_templates/_form_mini.haml +9 -0
- data/app/views/wco_email/email_templates/_form_reply_mini.haml +8 -0
- data/app/views/wco_email/email_templates/_form_schedule_mini.haml +11 -0
- data/app/views/wco_email/email_templates/_header.haml +6 -0
- data/app/views/wco_email/email_templates/_index.haml +26 -0
- data/app/views/wco_email/email_templates/_index_expanded.haml +13 -0
- data/app/views/wco_email/email_templates/_m20221201react.html.erb +1202 -0
- data/app/views/wco_email/email_templates/_m20221222merryxmas.html.erb +766 -0
- data/app/views/wco_email/email_templates/_m202309_feedback.html.erb +1161 -0
- data/app/views/wco_email/email_templates/_m202309_ror4.html.erb +1068 -0
- data/app/views/wco_email/email_templates/_marketing_node_1.html.erb +984 -0
- data/app/views/wco_email/email_templates/_marketing_react_1.html +0 -0
- data/app/views/wco_email/email_templates/_marketing_react_2.html.erb +749 -0
- data/app/views/wco_email/email_templates/_marketing_react_3.html.erb +628 -0
- data/app/views/wco_email/email_templates/_marketing_ror_1.html +751 -0
- data/app/views/wco_email/email_templates/_marketing_ror_2.html.erb +755 -0
- data/app/views/wco_email/email_templates/_marketing_ror_3.html.erb +25 -0
- data/app/views/wco_email/email_templates/_marketing_ror_4.html.erb +25 -0
- data/app/views/wco_email/email_templates/_marketing_ror_5.html.erb +17 -0
- data/app/views/wco_email/email_templates/_marketing_wordpress_1.html +0 -0
- data/app/views/wco_email/email_templates/_marketing_wordpress_2.html +0 -0
- data/app/views/wco_email/email_templates/_meta.haml +6 -0
- data/app/views/wco_email/email_templates/_piousbox_roundborders.html.erb +1007 -0
- data/app/views/wco_email/email_templates/_piousbox_social.html.erb +181 -0
- data/app/views/wco_email/email_templates/_plain.haml +15 -0
- data/app/views/wco_email/email_templates/_rec_resume_shared_with_you.html.erb +39 -0
- data/app/views/wco_email/email_templates/_slug-1.html.erb +0 -0
- data/app/views/wco_email/email_templates/_slug-2.html.erb +0 -0
- data/app/views/wco_email/email_templates/_slug-3.html.erb +0 -0
- data/app/views/wco_email/email_templates/_tracking_footer.html.erb +13 -0
- data/app/views/wco_email/email_templates/_wasyaco_roundborders.html.erb +686 -0
- data/app/views/wco_email/email_templates/_wasyaco_social.html.erb +181 -0
- data/app/views/wco_email/email_templates/edit.haml +6 -0
- data/app/views/wco_email/email_templates/new.haml +6 -0
- data/app/views/wco_email/email_templates/show.haml +11 -0
- data/app/views/wco_email/email_templates/show_iframe.haml +2 -0
- data/app/views/wco_email/lead_action_templates/_header.haml +7 -0
- data/app/views/wco_email/lead_actions/_header.haml +8 -0
- data/app/views/wco_email/message_stubs/_index.haml +10 -0
- data/app/views/wco_email/messages/_form_reply.haml-trash +17 -0
- data/app/views/wco_email/messages/_meta.haml +30 -0
- data/app/views/wco_email/messages/show.haml +13 -0
- data/app/views/wco_email/messages/show_iframe.haml +5 -0
- data/app/views/wco_email/sessions/new.html.erb +4 -0
- data/app/views/wco_email/unsubscribes/_header.haml +4 -0
- data/app/views/wco_email/unsubscribes/_table.haml +22 -0
- data/config/initializers/assets.rb +10 -0
- data/config/routes.rb +49 -0
- data/lib/tasks/bjjcollective/sitemap.rb +50 -0
- data/lib/tasks/db_tasks.rake +12 -0
- data/lib/tasks/direct_mail_tasks.rake +35 -0
- data/lib/tasks/infinite_shelter/sitemap.rb +25 -0
- data/lib/tasks/piousbox/sitemap.rb +80 -0
- data/lib/tasks/publish2_wordpress_tasks.rake +54 -0
- data/lib/tasks/scrape_reddit_tasks.rake-bk +23 -0
- data/lib/tasks/trash/email_tasks.rake-trash +126 -0
- data/lib/tasks/trash/sitemap_tasks.rake-trash +146 -0
- data/lib/tasks/wasya_co/sitemap.rb +281 -0
- data/lib/tasks/wco_email_tasks.rake +117 -0
- data/lib/wco_email/README_email_actions.rb +7 -0
- data/lib/wco_email/README_email_contexts.rb +7 -0
- data/lib/wco_email/engine.rb +8 -0
- data/lib/wco_email.rb +19 -0
- metadata +493 -0
@@ -0,0 +1,27 @@
|
|
1
|
+
|
2
|
+
- content_for :sidebar do
|
3
|
+
= render 'wco_email/sidebar'
|
4
|
+
|
5
|
+
.conversations-show.maxwidth
|
6
|
+
%h5
|
7
|
+
= @conversation.subject
|
8
|
+
<b>(#{@conversation.messages.length})</b>
|
9
|
+
%span.gray.mini= @conversation.id
|
10
|
+
|
11
|
+
|
12
|
+
- if @other_convs.present?
|
13
|
+
- @other_convs.each do |conv|
|
14
|
+
.d-flex
|
15
|
+
= button_to "Merge", merge_email_conversations_path( @conversation, conv ), data: { confirm: 'Are you sure?' }
|
16
|
+
= conv.subject
|
17
|
+
(#{conv.messages.length})
|
18
|
+
%span.gray.mini= conv.id
|
19
|
+
|
20
|
+
|
21
|
+
%ul.m-0.p-0
|
22
|
+
- @conversation.messages.each do |msg|
|
23
|
+
%li
|
24
|
+
= render '/wco_email/messages/meta', message: msg
|
25
|
+
%iframe.message-iframe{ src: message_iframe_path(msg) }
|
26
|
+
|
27
|
+
= render '/wco_email/contexts/form_reply', lead_id: msg.lead_id, message: msg, ctx: WcoEmail::Context.new({ from_email: msg.to.downcase, subject: msg.subject })
|
@@ -0,0 +1,45 @@
|
|
1
|
+
|
2
|
+
- eact = email_action
|
3
|
+
- url = email_action.new_record? ? email_actions_path : email_action_path( email_action )
|
4
|
+
|
5
|
+
.email-actions--form
|
6
|
+
|
7
|
+
= form_for email_action, url: url, as: :email_action, :html => { :multipart => true } do |f|
|
8
|
+
.row
|
9
|
+
.col-sm-6
|
10
|
+
= f.submit :submit
|
11
|
+
|
12
|
+
.row
|
13
|
+
.col-md-6
|
14
|
+
.field
|
15
|
+
%label Slug
|
16
|
+
= f.text_field :slug
|
17
|
+
-# .field
|
18
|
+
-# %label Descr
|
19
|
+
-# = f.text_area :descr
|
20
|
+
.field.flex-row
|
21
|
+
%label Template
|
22
|
+
= f.select :email_template_id, options_for_select( @email_templates_list, selected: eact.email_template_id ), {}, class: 'select2'
|
23
|
+
|
24
|
+
.col-md-6
|
25
|
+
.field
|
26
|
+
%label Next Email Actions
|
27
|
+
.eg rand(1..5).business_days.from_now.to_date + rand(8..16).hours + rand(1..59).minutes
|
28
|
+
.eg This is not an interval! But you can do Time.now + 30.seconds
|
29
|
+
%br
|
30
|
+
|
31
|
+
= f.fields_for :ties do |next_f|
|
32
|
+
.flex-row.field
|
33
|
+
= next_f.label :next_at_exe
|
34
|
+
= next_f.text_field :next_at_exe, class: 'flex-grow'
|
35
|
+
.flex-row.field
|
36
|
+
= next_f.label :to_delete
|
37
|
+
= next_f.check_box :to_delete
|
38
|
+
= next_f.select :next_email_action_id, options_for_select( @email_actions_list, selected: next_f.object.next_email_action_id ), { }, { class: 'select2' }
|
39
|
+
%br
|
40
|
+
|
41
|
+
.row
|
42
|
+
.col-sm-6
|
43
|
+
= f.submit :submit
|
44
|
+
|
45
|
+
|
@@ -0,0 +1,36 @@
|
|
1
|
+
|
2
|
+
.email-actions-index.padded
|
3
|
+
|
4
|
+
.header
|
5
|
+
%h2.title
|
6
|
+
Email Actions (#{@email_actions.length})
|
7
|
+
= link_to '[+]', new_email_action_path
|
8
|
+
|
9
|
+
%table.bordered
|
10
|
+
%tr
|
11
|
+
%th= check_box_tag 'abba'
|
12
|
+
%th
|
13
|
+
%th slug
|
14
|
+
%th next actions
|
15
|
+
- @email_actions.each do |eact|
|
16
|
+
%tr
|
17
|
+
%td= check_box_tag 'abba'
|
18
|
+
%td.flex-row
|
19
|
+
|
20
|
+
= link_to '[~]', edit_email_action_path( eact )
|
21
|
+
= button_to '[x]', email_action_path( eact ), data: { confirm: 'Are you sure?' }, method: :delete
|
22
|
+
|
23
|
+
%td
|
24
|
+
-# = link_to eact.slug, email_action_path( eact )
|
25
|
+
= eact.slug
|
26
|
+
.em.small= eact.descr
|
27
|
+
%td
|
28
|
+
%ul
|
29
|
+
- eact.ties.map do |next_a|
|
30
|
+
%li
|
31
|
+
.a= next_a.next_at_exe
|
32
|
+
.a
|
33
|
+
- if next_a.next_email_action.slug == eact.slug
|
34
|
+
(same)
|
35
|
+
= next_a.next_email_action.slug
|
36
|
+
|
@@ -0,0 +1,11 @@
|
|
1
|
+
|
2
|
+
.email-actions-show.maxwidth
|
3
|
+
.header
|
4
|
+
.title Email Action #{@act.id}
|
5
|
+
|
6
|
+
%ul
|
7
|
+
- @act.ties.map do |next_a|
|
8
|
+
%li
|
9
|
+
.a <b>Next act:</b> #{"(same)" if next_a.next_email_action.slug == @act.slug} #{next_a.next_email_action.slug}
|
10
|
+
.a <b>Next at exe:</b> #{next_a.next_at_exe}
|
11
|
+
.a <b>Eval'ed:</b> #{eval( next_a.next_at_exe )}
|
@@ -0,0 +1,24 @@
|
|
1
|
+
|
2
|
+
- sch_a = scheduled_email_action
|
3
|
+
- url = sch_a.new_record? ? scheduled_email_actions_path : scheduled_email_action_path(sch_a.id)
|
4
|
+
|
5
|
+
.scheduled-email-actions--form
|
6
|
+
= form_for scheduled_email_action, url: url, as: :sch do |f|
|
7
|
+
.header
|
8
|
+
%h5.title Schedule an email action
|
9
|
+
|
10
|
+
.flex-row
|
11
|
+
= f.label :lead
|
12
|
+
= f.select :lead_id, options_for_select(@leads_list, selected: sch_a[:lead_id]||params[:lead_id] ), {}, class: 'select2'
|
13
|
+
.flex-row
|
14
|
+
%label State
|
15
|
+
= f.select :state, options_for_select(::Office::ScheduledEmailAction::STATES, selected: sch_a.state )
|
16
|
+
.flex-row
|
17
|
+
= f.label :email_action
|
18
|
+
= f.select :email_action, options_for_select( @email_actions_list, selected: sch_a[:email_action_id] ), {}, class: 'select2'
|
19
|
+
.flex-row
|
20
|
+
= f.label :perform_at
|
21
|
+
= f.text_field :perform_at, value: sch_a.new_record? ? Time.now : sch_a.perform_at
|
22
|
+
|
23
|
+
.actions
|
24
|
+
= submit_tag 'Schedule'
|
@@ -0,0 +1,28 @@
|
|
1
|
+
|
2
|
+
-# unused, but maybe I should separate _form and _form_mini ?
|
3
|
+
|
4
|
+
- sch_a = scheduled_email_action
|
5
|
+
- url = sch_a.new_record? ? scheduled_email_actions_path : scheduled_email_action_path(sch_a.id)
|
6
|
+
|
7
|
+
.scheduled-email-actions--form
|
8
|
+
= form_for scheduled_email_action, url: url, as: :sch, html: { class: "form-mini" } do |f|
|
9
|
+
.header
|
10
|
+
%h5.title Schedule an email action
|
11
|
+
|
12
|
+
.flex-row
|
13
|
+
= f.label :lead
|
14
|
+
= f.select :lead_id, options_for_select(@leads_list, selected: sch_a[:lead_id]||params[:lead_id] ), {}, class: 'select2'
|
15
|
+
.field
|
16
|
+
%label State
|
17
|
+
= f.select :state, options_for_select(::Office::ScheduledEmailAction::STATES, selected: sch_a.state )
|
18
|
+
%br
|
19
|
+
.flex-row
|
20
|
+
= f.label :email_action
|
21
|
+
= f.select :email_action, options_for_select( @email_actions_list, selected: sch_a[:email_action_id] ), {}, class: 'select2'
|
22
|
+
%br
|
23
|
+
.field
|
24
|
+
= f.label :perform_at
|
25
|
+
= f.text_field :perform_at
|
26
|
+
|
27
|
+
.actions
|
28
|
+
= submit_tag 'Schedule'
|
@@ -0,0 +1,31 @@
|
|
1
|
+
|
2
|
+
.email-actions-index.padded
|
3
|
+
.header
|
4
|
+
%h2
|
5
|
+
Email Actions
|
6
|
+
(#{Sch.all.count})
|
7
|
+
= link_to '[+]', new_email_action_path
|
8
|
+
|
9
|
+
%table.bordered.data-table
|
10
|
+
%thead
|
11
|
+
%tr
|
12
|
+
%td
|
13
|
+
%td Active?
|
14
|
+
%td From
|
15
|
+
%td To
|
16
|
+
%td Tmpl
|
17
|
+
%td Perform at
|
18
|
+
%tbody
|
19
|
+
- @schs.each do |sch|
|
20
|
+
%tr
|
21
|
+
%td= link_to '[~]', edit_email_action_path(sch)
|
22
|
+
%td= sch.status == 'active' ? 'Y' : '-'
|
23
|
+
%td= sch.tmpl.from_email
|
24
|
+
%td= link_to sch.lead.email, lead_path(sch.lead)
|
25
|
+
%td= link_to sch.tmpl.email_template.slug, email_template_path(sch.tmpl.email_template)
|
26
|
+
%td= sch.perform_at.in_time_zone
|
27
|
+
|
28
|
+
|
29
|
+
|
30
|
+
|
31
|
+
|
File without changes
|
@@ -0,0 +1,33 @@
|
|
1
|
+
|
2
|
+
- url = campaign.new_record? ? email_campaigns_path : email_campaign_path(campaign)
|
3
|
+
|
4
|
+
.email-campaigns--form
|
5
|
+
= form_for campaign, as: :campaign, url: url do |f|
|
6
|
+
.field
|
7
|
+
= f.label :slug
|
8
|
+
= f.text_field :slug
|
9
|
+
|
10
|
+
-# .field
|
11
|
+
-# = f.label :send_at
|
12
|
+
-# = f.text_field :send_at
|
13
|
+
|
14
|
+
.field.field-template
|
15
|
+
= f.label "Template"
|
16
|
+
= f.select :email_template_id, options_for_select(@email_templates_list, selected: params[:email_template_id] || campaign.email_template_id ), {}, { class: 'select2' }
|
17
|
+
- if campaign.email_template_id
|
18
|
+
= link_to 'view', email_template_path( campaign.email_template_id ), target: :_blank, class: [ 'action-view' ]
|
19
|
+
= link_to '~', edit_email_template_path( campaign.email_template_id ), target: :_blank, class: [ 'action-view' ]
|
20
|
+
layout: #{campaign.tmpl.layout}
|
21
|
+
|
22
|
+
.field
|
23
|
+
= f.label "From"
|
24
|
+
= f.select :from_email, options_for_select(WcoEmail::EmailTemplate.from_emails_list, selected: campaign.from_email), {}, class: 'select2'
|
25
|
+
|
26
|
+
.actions
|
27
|
+
= f.submit 'Submit'
|
28
|
+
|
29
|
+
-# = f.select :email_template_id, options_for_select(@email_templates_list, selected: params[:email_template_id] || campaign.email_template_id ), {}, { class: 'select2' }
|
30
|
+
-# - if campaign.email_template_id
|
31
|
+
-# = link_to 'view', email_template_path( campaign.email_template_id ), target: :_blank, class: [ 'action-view' ]
|
32
|
+
-# = link_to '~', edit_email_template_path( campaign.email_template_id ), target: :_blank, class: [ 'action-view' ]
|
33
|
+
-# layout: #{campaign.tmpl.layout}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
|
2
|
+
.email-campaigns-index.maxwidth
|
3
|
+
.header
|
4
|
+
%h5.title
|
5
|
+
Email Campaigns (#{@campaigns.length})
|
6
|
+
= link_to '[+]', new_email_campaign_path
|
7
|
+
|
8
|
+
%ul
|
9
|
+
- @campaigns.each do |c|
|
10
|
+
%li
|
11
|
+
= link_to c.slug, email_campaign_path(c)
|
12
|
+
(#{c.leads.length})
|
13
|
+
= link_to '[~]', edit_email_campaign_path(c)
|
14
|
+
|
@@ -0,0 +1,17 @@
|
|
1
|
+
|
2
|
+
.email-campaigns-show.maxwidth
|
3
|
+
.header
|
4
|
+
%h5.title
|
5
|
+
Email Campaign `#{@campaign.slug}`
|
6
|
+
= link_to '[~]', edit_email_campaign_path(@campaign)
|
7
|
+
.inline-block
|
8
|
+
= form_for @campaign, as: :campaign, method: :post, url: send_email_campaign_path(@campaign) do |f|
|
9
|
+
= hidden_field_tag 'campaign[send_at]', Time.now
|
10
|
+
= f.submit 'Send', data: { confirm: 'Are you sure?' }
|
11
|
+
|
12
|
+
%ul.browser-default
|
13
|
+
%li Template: #{link_to @campaign.email_template.slug, edit_email_template_path(@campaign.email_template)}
|
14
|
+
-# %li Send At: #{@campaign.send_at}
|
15
|
+
|
16
|
+
.collapse-expand#campaignLeads Email Campaign leads (#{@campaign.campaign_leads.length})
|
17
|
+
= render 'ish_manager/leads/index', leads: @leads, search_path: email_campaign_path(@campaign), email_contexts: {}
|
@@ -0,0 +1,40 @@
|
|
1
|
+
|
2
|
+
- url = email_filter.new_record? ? email_filters_path : email_filter_path( email_filter )
|
3
|
+
.email-filters--from
|
4
|
+
= form_for email_filter, url: url, as: :email_filter do |f|
|
5
|
+
.row.maxwidth
|
6
|
+
.col-md-6
|
7
|
+
.field
|
8
|
+
%label From Regex
|
9
|
+
= f.text_field :from_regex
|
10
|
+
.field
|
11
|
+
%label From Exact
|
12
|
+
= f.text_field :from_exact
|
13
|
+
.field
|
14
|
+
%label Subject Regex
|
15
|
+
= f.text_field :subject_regex
|
16
|
+
.field
|
17
|
+
%label Subject Exact
|
18
|
+
= f.text_field :subject_exact
|
19
|
+
-# .field
|
20
|
+
-# %label Body Regex
|
21
|
+
-# = f.text_field :body_regex
|
22
|
+
.field
|
23
|
+
%label Body Exact
|
24
|
+
= f.text_field :body_exact
|
25
|
+
.col-md-6
|
26
|
+
|
27
|
+
.field
|
28
|
+
%label Kind
|
29
|
+
= f.select :kind, options_for_select( WcoEmail::EmailFilter::KINDS, selected: email_filter.kind )
|
30
|
+
.field
|
31
|
+
%label Template
|
32
|
+
= f.select :email_template_id, options_for_select(@email_templates_list, selected: params[:email_template_id] || email_filter.email_template_id ), {}, { class: 'select2' }
|
33
|
+
.field
|
34
|
+
= f.label :email_action_template
|
35
|
+
= f.select :email_action_template, options_for_select( @email_action_templates_list, selected: email_filter.email_action_template ), {}, class: 'select2'
|
36
|
+
-# .field
|
37
|
+
-# = f.label :wp_term_id
|
38
|
+
-# = f.select :wp_term_id, options_for_select( @email_tags_list, selected: email_filter.wp_term_id ), {}, class: 'select2'
|
39
|
+
.actions
|
40
|
+
= f.submit
|
@@ -0,0 +1,48 @@
|
|
1
|
+
|
2
|
+
.email-filters-index.padded
|
3
|
+
.header
|
4
|
+
%h2.title
|
5
|
+
Email Filters (#{@email_filters.length})
|
6
|
+
= link_to '[+]', new_email_filter_path
|
7
|
+
|
8
|
+
|
9
|
+
.maxwidth
|
10
|
+
%hr
|
11
|
+
%h5.title.collapse-expand#newEmailFilter New Email Filter
|
12
|
+
= render 'form', email_filter: @email_filter
|
13
|
+
%hr
|
14
|
+
|
15
|
+
%table.bordered.data-table
|
16
|
+
%thead
|
17
|
+
%tr
|
18
|
+
%th
|
19
|
+
%th
|
20
|
+
%th From Regex
|
21
|
+
%th From Exact
|
22
|
+
%th Subject Regex
|
23
|
+
%th Subject Exact
|
24
|
+
%th Body Exact
|
25
|
+
%th Kind
|
26
|
+
%th Email Action
|
27
|
+
%th Email Template
|
28
|
+
%th Email Tag
|
29
|
+
- @email_filters.each do |ef|
|
30
|
+
|
31
|
+
%tr
|
32
|
+
%td= check_box_tag 'checked'
|
33
|
+
%td
|
34
|
+
= link_to '[~]', edit_email_filter_path(ef)
|
35
|
+
.inline-block= button_to '[x]', email_filter_path(ef), method: :delete, data: { confirm: 'Are you sure?' }
|
36
|
+
%td
|
37
|
+
`#{ef.from_regex}`
|
38
|
+
%td
|
39
|
+
`#{ef.from_exact}`
|
40
|
+
%td= ef.subject_regex
|
41
|
+
%td= ef.subject_exact
|
42
|
+
%td= ef.body_exact
|
43
|
+
%td= ef.kind
|
44
|
+
%td= ef.email_action&.slug
|
45
|
+
%td= ef.email_template&.slug
|
46
|
+
%td= ef.category&.name
|
47
|
+
|
48
|
+
|
@@ -0,0 +1,48 @@
|
|
1
|
+
|
2
|
+
- url = email_template.new_record? ? email_templates_path : email_template_path(email_template.id)
|
3
|
+
|
4
|
+
.email-templates--form
|
5
|
+
= form_for email_template, as: :template, url: url do |f|
|
6
|
+
.field
|
7
|
+
%label Slug
|
8
|
+
= f.text_field :slug
|
9
|
+
.flex-row
|
10
|
+
%label Layout
|
11
|
+
= f.select :layout, options_for_select(WcoEmail::EmailTemplate::LAYOUTS, selected: email_template.layout), {}, class: 'select2'
|
12
|
+
%label From
|
13
|
+
= f.select :from_email, options_for_select(WcoEmail::EmailTemplate.from_emails_list, selected: email_template.from_email), {}, class: 'select2'
|
14
|
+
.field.field-subject
|
15
|
+
= f.label :subject
|
16
|
+
= f.text_field :subject
|
17
|
+
.field
|
18
|
+
= f.label :preview_str
|
19
|
+
= f.text_field :preview_str
|
20
|
+
-# .field
|
21
|
+
-# = f.label :can_unsubscribe
|
22
|
+
-# = f.check_box :can_unsubscribe
|
23
|
+
|
24
|
+
|
25
|
+
.tab-labels.flex-row
|
26
|
+
%a.label-raw{ href: "javascript: void(0)", data: { ref: '.tab-raw' } } Raw
|
27
|
+
%a.label-preview.active{ href: "javascript: void(0)", data: { ref: '.tab-preview' } } Preview
|
28
|
+
.label-save-preview= f.submit 'Save & Preview'
|
29
|
+
.tabs
|
30
|
+
.tab-raw
|
31
|
+
= f.text_area :body # , class: 'tinymce'
|
32
|
+
.tab-preview
|
33
|
+
- if email_template.persisted?
|
34
|
+
%iframe{ src: email_template_iframe_path(email_template), width: '100%', height: '100%' }
|
35
|
+
|
36
|
+
.row
|
37
|
+
.col-md-6
|
38
|
+
.field
|
39
|
+
= f.label :config_json
|
40
|
+
= f.text_area :config_json
|
41
|
+
.col-md-6
|
42
|
+
.field
|
43
|
+
= f.label :config_exe
|
44
|
+
= f.text_area :config_exe
|
45
|
+
|
46
|
+
.actions
|
47
|
+
= f.submit 'Save'
|
48
|
+
|
@@ -0,0 +1,11 @@
|
|
1
|
+
|
2
|
+
.email-templates--form-schedule-mini.form-mini
|
3
|
+
= form_for ::Ish::EmailContext.new, url: email_contexts_path do |f|
|
4
|
+
.field
|
5
|
+
-# = f.label :template
|
6
|
+
= f.select :email_template_id, options_for_select([ ['abba', 'abba'], ['zetta', 'zetta'] ])
|
7
|
+
.field.send-at
|
8
|
+
-# = f.label :send_at
|
9
|
+
= f.text_field :send_at, placeholder: 'YYYY-MM-DD'
|
10
|
+
.actions
|
11
|
+
= f.submit 'Schedule'
|
@@ -0,0 +1,6 @@
|
|
1
|
+
|
2
|
+
= link_to "Email Templates (#{WcoEmail::EmailTemplate.all.count})", email_templates_path
|
3
|
+
= form_tag email_templates_path, method: :get do
|
4
|
+
= text_field_tag :q
|
5
|
+
= link_to '[+]', new_email_template_path
|
6
|
+
= link_to '[expanded]', email_templates_path({ template: '_index_expanded' })
|
@@ -0,0 +1,26 @@
|
|
1
|
+
|
2
|
+
.email-templates--index.maxwidth
|
3
|
+
|
4
|
+
%h5.flex-row.collapse-expand#emailTemplatesIndex
|
5
|
+
= render '/wco_email/email_templates/header'
|
6
|
+
|
7
|
+
= paginate @templates, :param_name => :templates_page, :views_prefix => 'wco'
|
8
|
+
.email-templates-index.maxwidth
|
9
|
+
%table.bordered.data-table
|
10
|
+
%thead
|
11
|
+
%tr
|
12
|
+
%th
|
13
|
+
%th Slug
|
14
|
+
%th Created
|
15
|
+
%th Updated
|
16
|
+
|
17
|
+
- @templates.each do |tmpl|
|
18
|
+
%tr
|
19
|
+
%td.flex-row
|
20
|
+
= link_to '[use]', new_context_path({ email_template_id: tmpl.id })
|
21
|
+
= link_to '[~]', edit_email_template_path({ id: tmpl })
|
22
|
+
= button_to '[x]', email_template_path({ id: tmpl }), method: :delete, :data => { :confirm => 'Are you sure?' }, form_class: 'inline'
|
23
|
+
%td= link_to tmpl.slug, email_template_path({ id: tmpl })
|
24
|
+
%td= pp_date tmpl.created_at
|
25
|
+
%td= pp_date tmpl.updated_at
|
26
|
+
= paginate @templates, :param_name => :templates_page, :views_prefix => 'wco'
|
@@ -0,0 +1,13 @@
|
|
1
|
+
|
2
|
+
.email-templates--index-expanded.padded
|
3
|
+
|
4
|
+
%h5.flex-row.collapse-expand#emailTemplatesIndex
|
5
|
+
= render '/wco_email/email_templates/header'
|
6
|
+
|
7
|
+
= paginate @templates, :param_name => :templates_page, :views_prefix => 'wco'
|
8
|
+
.row
|
9
|
+
- @templates.each do |tmpl|
|
10
|
+
.col-md-6
|
11
|
+
%iframe.email-template-iframe{ src: email_template_iframe_path(tmpl) }
|
12
|
+
= render '/wco_email/email_templates/meta', tmpl: tmpl
|
13
|
+
= paginate @templates, :param_name => :templates_page, :views_prefix => 'wco'
|