ish_manager 0.1.8.469 → 0.1.8.471
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/ish_manager/application_controller.rb +0 -2
- data/app/controllers/ish_manager/application_mailer_controller.rb +10 -0
- data/app/controllers/ish_manager/email_contexts_controller.rb +22 -11
- data/app/controllers/ish_manager/email_conversations_controller.rb +3 -1
- data/app/helpers/ish_manager/application_helper.rb +5 -1
- data/app/mailers/ish_manager/application_mailer.rb +3 -1
- data/app/mailers/ish_manager/office_mailer.rb +28 -10
- data/app/views/ish_manager/email_campaigns/_form.haml +1 -1
- data/app/views/ish_manager/email_contexts/_form.haml +1 -1
- data/app/views/ish_manager/email_contexts/edit.haml +3 -1
- data/app/views/ish_manager/email_contexts/index.haml +6 -5
- data/app/views/ish_manager/email_contexts/show.haml +6 -7
- data/app/views/ish_manager/email_templates/_footer_unsubscribe.html.erb +2 -4
- data/app/views/ish_manager/email_templates/_form.haml +5 -1
- data/app/views/ish_manager/email_templates/_index.haml +1 -0
- data/app/views/ish_manager/email_templates/_m20221201react.html.erb +2 -2
- data/app/views/ish_manager/email_templates/_m202309_ror4.html.erb +985 -0
- data/config/routes.rb +7 -6
- data/lib/ish_manager.rb +0 -2
- data/lib/tasks/office_tasks.rake +7 -15
- metadata +4 -6
- data/app/mailers/ish_manager/meeting_mailer.rb +0 -13
- data/app/mailers/ish_manager/offier_mailer.rb-trash +0 -53
- data/app/views/ish_manager/email_templates/done/_form.haml +0 -22
- data/app/views/ish_manager/email_templates/done/_form2.haml +0 -26
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3041801c1b15c0929b1b230aa72313e7de831fb3609afc1cec4dd664b8422af1
|
4
|
+
data.tar.gz: d2b711abd1fa459dfcdce279a58045d0cffab9ba1a00050deb511ef21083816b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 49543de291e21a10bbf953b4a432d04fa665b81b7c9b7d5b58daf9b2bfa8d8c6ad83ffc178f077bed668835a3e60d9e11b1d41a9805c08a8b481c0664d29adbf
|
7
|
+
data.tar.gz: 8a7cc1777b3e019742179abcacb9108fecca78d65e795074cb022af1d5cf5be033176720d5c9dee093edc0ef5b659b5bd7c137b7832ad30d99a408d32a9ebc88
|
@@ -38,17 +38,6 @@ class ::IshManager::EmailContextsController < ::IshManager::ApplicationControlle
|
|
38
38
|
redirect_to action: :index
|
39
39
|
end
|
40
40
|
|
41
|
-
def do_send
|
42
|
-
@ctx = ::Ish::EmailContext.find params[:id]
|
43
|
-
authorize! :do_send, @ctx
|
44
|
-
|
45
|
-
flash[:notice] = 'Scheduled a single send - v2'
|
46
|
-
@ctx.send_at = Time.now
|
47
|
-
@ctx.save
|
48
|
-
|
49
|
-
redirect_to action: 'index'
|
50
|
-
end
|
51
|
-
|
52
41
|
def edit
|
53
42
|
@ctx = ::Ish::EmailContext.find params[:id]
|
54
43
|
authorize! :edit, @ctx
|
@@ -93,6 +82,28 @@ class ::IshManager::EmailContextsController < ::IshManager::ApplicationControlle
|
|
93
82
|
@ctx = ::Ish::EmailContext.new({ email_template: @tmpl }.merge(attrs))
|
94
83
|
end
|
95
84
|
|
85
|
+
def send_immediate
|
86
|
+
@ctx = ::Ish::EmailContext.find params[:id]
|
87
|
+
authorize! :do_send, @ctx
|
88
|
+
flash[:notice] = 'Sent immediately.'
|
89
|
+
|
90
|
+
out = IshManager::OfficeMailer.send_context_email( @ctx[:id].to_s )
|
91
|
+
Rails.env.production? ? out.deliver_later : out.deliver_now
|
92
|
+
|
93
|
+
redirect_to action: 'index'
|
94
|
+
end
|
95
|
+
|
96
|
+
def send_schedule
|
97
|
+
@ctx = ::Ish::EmailContext.find params[:id]
|
98
|
+
authorize! :do_send, @ctx
|
99
|
+
|
100
|
+
flash[:notice] = 'Scheduled a single send - v2'
|
101
|
+
@ctx.send_at = Time.now
|
102
|
+
@ctx.save
|
103
|
+
|
104
|
+
redirect_to action: 'index'
|
105
|
+
end
|
106
|
+
|
96
107
|
def show
|
97
108
|
@ctx = @email_context = ::Ish::EmailContext.find( params[:id] )
|
98
109
|
authorize! :show, @ctx
|
@@ -17,9 +17,11 @@ class ::IshManager::EmailConversationsController < IshManager::ApplicationContro
|
|
17
17
|
if params[:slug]
|
18
18
|
@email_conversations = @email_conversations.in_emailtag( params[:slug] )
|
19
19
|
end
|
20
|
+
|
20
21
|
if params[:not_slug]
|
21
|
-
@email_conversations = @email_conversations.not_in_emailtag(params[:not_slug])
|
22
|
+
@email_conversations = @email_conversations.not_in_emailtag( params[:not_slug] )
|
22
23
|
end
|
24
|
+
|
23
25
|
@email_conversations = @email_conversations.order_by( latest_at: :desc
|
24
26
|
).page( params[:conv_page]
|
25
27
|
).per( per_page )
|
@@ -38,8 +38,12 @@ module IshManager
|
|
38
38
|
## O
|
39
39
|
##
|
40
40
|
|
41
|
+
# def self.obfuscate link
|
42
|
+
# obf = Office::ObfuscatedRedirect.find_or_create_by({ to: link })
|
43
|
+
# return Ishapi::Engine.routes.url_helpers.obf_url( obf.id )
|
44
|
+
# end
|
41
45
|
def obfuscate link
|
42
|
-
puts! link, 'obfuscate helper'
|
46
|
+
# puts! link, 'obfuscate helper'
|
43
47
|
obf = Office::ObfuscatedRedirect.find_or_create_by({ to: link })
|
44
48
|
return Ishapi::Engine.routes.url_helpers.obf_url( obf.id )
|
45
49
|
end
|
@@ -1,7 +1,9 @@
|
|
1
1
|
|
2
2
|
module IshManager
|
3
3
|
class ApplicationMailer < ActionMailer::Base
|
4
|
-
default from: 'WasyaCo Consulting <no-reply@
|
4
|
+
default from: 'WasyaCo Consulting <no-reply@wco.com.de>'
|
5
|
+
helper(IshManager::ApplicationHelper)
|
6
|
+
|
5
7
|
layout 'mailer'
|
6
8
|
|
7
9
|
def shared_galleries profiles, gallery
|
@@ -1,10 +1,10 @@
|
|
1
1
|
|
2
2
|
class IshManager::OfficeMailer < IshManager::ApplicationMailer
|
3
|
-
default from: 'WasyaCo Consulting & Software Development <no-reply@mail.wasyaco.com>'
|
4
3
|
|
5
4
|
## 2023-04-02 _vp_ Continue.
|
6
5
|
def send_context_email ctx_id
|
7
|
-
@ctx
|
6
|
+
@ctx = Ctx.find ctx_id
|
7
|
+
@lead = Lead.find @ctx.lead_id
|
8
8
|
|
9
9
|
@utm_tracking_str = {
|
10
10
|
'cid' => @ctx.lead_id,
|
@@ -13,25 +13,43 @@ class IshManager::OfficeMailer < IshManager::ApplicationMailer
|
|
13
13
|
'utm_source' => @ctx.tmpl.slug,
|
14
14
|
}.map { |k, v| "#{k}=#{v}" }.join("&")
|
15
15
|
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
16
|
+
@domain = Rails.application.config.action_mailer.default_url_options[:host]
|
17
|
+
@origin = "https://#{Rails.application.config.action_mailer.default_url_options[:host]}"
|
18
|
+
|
19
|
+
@unsubscribe_url = Ishapi::Engine.routes.url_helpers.email_unsubscribes_url({
|
20
|
+
host: 'text-host-3',
|
21
|
+
template_id: @ctx.tmpl.id,
|
22
|
+
lead_id: @lead.id,
|
23
|
+
token: @lead.unsubscribe_token,
|
24
|
+
})
|
25
|
+
# renderer = Tmp6Ctl.new
|
26
|
+
# renderer = IshManager::ApplicationController.new
|
27
|
+
# renderer.send( :include, ::IshManager::ApplicationHelper )
|
28
|
+
# renderer.send( :request, { host: 'test-host' } )
|
29
|
+
renderer = IshManager::ApplicationMailer.new
|
30
|
+
|
31
|
+
|
32
|
+
renderer.instance_variable_set( :@ctx, @ctx )
|
33
|
+
renderer.instance_variable_set( :@lead, @ctx.lead )
|
34
|
+
renderer.instance_variable_set( :@utm_tracking_str, @utm_tracking_str )
|
35
|
+
renderer.instance_variable_set( :@unsubscribe_url, @unsubscribe_url )
|
36
|
+
|
37
|
+
eval( @ctx.tmpl.config_exe )
|
20
38
|
|
21
39
|
if 'plain' == @ctx.tmpl.layout
|
22
40
|
rendered_str = ERB.new( @ctx.body ).result( @ctx.get_binding )
|
23
41
|
else
|
24
|
-
rendered_str =
|
42
|
+
rendered_str = renderer.render_to_string("ish_manager/email_templates/_#{@ctx.tmpl.layout}")
|
25
43
|
end
|
26
44
|
@ctx.update({
|
27
45
|
rendered_str: rendered_str,
|
28
46
|
sent_at: Time.now.to_s,
|
29
47
|
})
|
30
48
|
|
31
|
-
mail( from:
|
32
|
-
to:
|
49
|
+
mail( from: @ctx.from_email,
|
50
|
+
to: @ctx.to_email,
|
33
51
|
subject: ERB.new( @ctx.subject ).result( @ctx.get_binding ),
|
34
|
-
body:
|
52
|
+
body: rendered_str,
|
35
53
|
content_type: "text/html" )
|
36
54
|
end
|
37
55
|
|
@@ -21,7 +21,7 @@
|
|
21
21
|
|
22
22
|
.field
|
23
23
|
= f.label "From"
|
24
|
-
= f.select :from_email, options_for_select(Ish::
|
24
|
+
= f.select :from_email, options_for_select(Ish::EmailTemplate.from_email_list, selected: campaign.from_email), {}, class: 'select2'
|
25
25
|
|
26
26
|
.actions
|
27
27
|
= f.submit 'Submit'
|
@@ -12,7 +12,7 @@
|
|
12
12
|
|
13
13
|
.field
|
14
14
|
= f.label "From"
|
15
|
-
= f.select :from_email, options_for_select(Ish::
|
15
|
+
= f.select :from_email, options_for_select(Ish::EmailTemplate.from_email_list, selected: ctx.from_email)
|
16
16
|
|
17
17
|
.field.flex-row
|
18
18
|
= f.label "To lead"
|
@@ -3,7 +3,6 @@
|
|
3
3
|
|
4
4
|
.header.collapse-expand-trash#emailContextsIndex
|
5
5
|
%h2.title
|
6
|
-
|
7
6
|
Email Contexts (#{@ctxs.length})
|
8
7
|
- if @lead
|
9
8
|
For lead #{@lead.email}
|
@@ -33,12 +32,14 @@
|
|
33
32
|
%tbody
|
34
33
|
- @ctxs.each do |ctx|
|
35
34
|
%tr
|
36
|
-
%td.actions
|
35
|
+
%td.actions.padded
|
37
36
|
- if ctx.sent_at
|
38
|
-
|
37
|
+
\--
|
39
38
|
- else
|
40
|
-
= link_to '[~]',
|
41
|
-
|
39
|
+
= link_to '[~]', edit_email_context_path(ctx)
|
40
|
+
= button_to 'x', email_context_path(ctx), method: :delete, form_class: :inline, data: { confirm: 'Are you sure?' }
|
41
|
+
= button_to 'send', send_immediate_email_context_path(ctx), form_class: :inline, data: { confirm: 'Are you sure?' }
|
42
|
+
|
42
43
|
%td.from
|
43
44
|
= ctx.from_email ? ctx.from_email : "t| #{ctx.tmpl.from_email}"
|
44
45
|
%td.to= link_to ctx.lead.email, lead_path(ctx.lead)
|
@@ -4,23 +4,22 @@
|
|
4
4
|
%h2.title Email Context
|
5
5
|
|
6
6
|
.row
|
7
|
-
.col-md-
|
7
|
+
.col-md-6
|
8
8
|
%ul
|
9
|
+
%li <b>Template:</b> #{link_to @ctx.email_template.slug, email_template_path(@ctx.email_template), target: :_blank }
|
10
|
+
%li <b>Layout:</b> #{@ctx.email_template.layout}
|
11
|
+
%hr
|
9
12
|
%li <b>From:</b> #{@ctx.from_email}
|
10
13
|
%li <b>To Lead:</b> #{link_to @ctx.lead.email, lead_path(@ctx.lead)}
|
11
14
|
%li <b>Subject:</b> #{@ctx.subject}
|
12
15
|
|
13
|
-
.col-md-4
|
14
|
-
%ul
|
15
|
-
%li <b>Template:</b> #{link_to @ctx.email_template.slug, email_template_path(@ctx.email_template), target: :_blank }
|
16
|
-
%li <b>Layout:</b> #{@ctx.email_template.layout}
|
17
16
|
|
18
|
-
.col-md-
|
17
|
+
.col-md-6
|
19
18
|
%ul
|
20
19
|
%li <b>Send at:</b> #{@ctx.send_at&.strftime('%Y-%m-%d %l:%M%P')}
|
21
20
|
%li <b>Sent at:</b> #{@ctx.sent_at&.strftime('%Y-%m-%d %l:%M%P')}
|
22
21
|
%li
|
23
|
-
= button_to 'Send',
|
22
|
+
= button_to 'Send', send_immediate_email_context_path(@ctx), form_class: 'inline', :data => { :confirm => 'Are you sure?' }
|
24
23
|
= link_to '[~]', edit_email_context_path(@ctx)
|
25
24
|
|
26
25
|
.max-width
|
@@ -13,10 +13,8 @@
|
|
13
13
|
|
14
14
|
201 W 5th St 11th Floor, Austin, TX 78701<br><br>
|
15
15
|
|
16
|
-
Want to change how you receive these emails
|
17
|
-
|
18
|
-
You can <%= link_to 'update your preferences', @update_preferences_url %> or
|
19
|
-
|
16
|
+
Want to change how you receive these emails? You can <br>
|
17
|
+
<%= link_to 'update your preferences', '#' %> or
|
20
18
|
<%= link_to 'unsubscribe from this list', @unsubscribe_url %>.<br><br>
|
21
19
|
|
22
20
|
</td>
|
@@ -15,7 +15,7 @@
|
|
15
15
|
.col-md-4
|
16
16
|
.field
|
17
17
|
= f.label "From"
|
18
|
-
= f.select :from_email, options_for_select(Ish::
|
18
|
+
= f.select :from_email, options_for_select(Ish::EmailTemplate.from_email_list, selected: email_template.from_email)
|
19
19
|
.field.field-subject
|
20
20
|
= f.label :subject
|
21
21
|
= f.text_field :subject
|
@@ -39,6 +39,10 @@
|
|
39
39
|
-# .descr= render "ish_manager/email_templates/#{email_template.layout}", ctx: Ish::EmailContext.new, tmpl: email_template
|
40
40
|
%iframe{ src: email_template_iframe_path(email_template), width: '100%', height: '100%' }
|
41
41
|
|
42
|
+
.field
|
43
|
+
= f.label :config_json
|
44
|
+
= f.text_area :config_json
|
45
|
+
|
42
46
|
.field
|
43
47
|
= f.label :config_exe
|
44
48
|
= f.text_area :config_exe
|
@@ -3,6 +3,7 @@
|
|
3
3
|
|
4
4
|
%h3.center.collapse-expand#emailTemplatesIndex
|
5
5
|
Email Templates (#{Ish::EmailTemplate.all.count})
|
6
|
+
= link_to '[+]', new_email_template_path
|
6
7
|
|
7
8
|
= paginate @templates, :param_name => :templates_page, :views_prefix => 'ish_manager'
|
8
9
|
.email-templates-index.max-width
|
@@ -840,7 +840,7 @@
|
|
840
840
|
<td align="center" valign="middle" class="mcnButtonContent"
|
841
841
|
style="font-family: Helvetica; font-size: 18px; padding: 18px;">
|
842
842
|
<a class="mcnButton " title="Wasya Co Project Intake for ReactJs Development"
|
843
|
-
href="https://
|
843
|
+
href="https://wasyaco.com/contact-us-2/" target="_blank"
|
844
844
|
style="font-weight: bold;letter-spacing: -0.5px;line-height: 100%;text-align: center;text-decoration: none;color: #FFFFFF;"
|
845
845
|
>Tell us About your Project!</a>
|
846
846
|
</td>
|
@@ -1040,7 +1040,7 @@
|
|
1040
1040
|
style="font-family: Helvetica; font-size: 18px;">
|
1041
1041
|
<a class="mcnButton "
|
1042
1042
|
title="Wasya Co Project Intake for ReactJs Development"
|
1043
|
-
href="https://
|
1043
|
+
href="https://wasyaco.com/our-work/" target="_blank"
|
1044
1044
|
style="padding: 18px; font-weight: bold;letter-spacing: -0.5px;line-height: 100%;text-align: center;text-decoration: none;color: #FFFFFF;"
|
1045
1045
|
>See Our Successful <br />ReactJs Deliveries</a>
|
1046
1046
|
</td>
|