ish_manager 0.1.8.470 → 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 +2 -0
- data/app/mailers/ish_manager/office_mailer.rb +16 -3
- 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/_m202309_ror4.html.erb +1 -1
- data/config/routes.rb +7 -6
- metadata +3 -4
- data/app/mailers/ish_manager/meeting_mailer.rb +0 -13
- data/app/mailers/ish_manager/offier_mailer.rb-trash +0 -53
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,10 +1,10 @@
|
|
1
1
|
|
2
2
|
class IshManager::OfficeMailer < IshManager::ApplicationMailer
|
3
|
-
default from: 'WasyaCo Mailer <no-reply@wco.com.de>'
|
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,
|
@@ -16,10 +16,23 @@ class IshManager::OfficeMailer < IshManager::ApplicationMailer
|
|
16
16
|
@domain = Rails.application.config.action_mailer.default_url_options[:host]
|
17
17
|
@origin = "https://#{Rails.application.config.action_mailer.default_url_options[:host]}"
|
18
18
|
|
19
|
-
|
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
|
+
|
20
32
|
renderer.instance_variable_set( :@ctx, @ctx )
|
21
33
|
renderer.instance_variable_set( :@lead, @ctx.lead )
|
22
34
|
renderer.instance_variable_set( :@utm_tracking_str, @utm_tracking_str )
|
35
|
+
renderer.instance_variable_set( :@unsubscribe_url, @unsubscribe_url )
|
23
36
|
|
24
37
|
eval( @ctx.tmpl.config_exe )
|
25
38
|
|
@@ -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>
|
data/config/routes.rb
CHANGED
@@ -87,14 +87,15 @@ IshManager::Engine.routes.draw do
|
|
87
87
|
get 'email_conversations', to: 'email_conversations#index'
|
88
88
|
get 'email_conversations/in/:slug', to: 'email_conversations#index', as: :email_conversations_in
|
89
89
|
get 'email_conversations/notin/:not_slug', to: 'email_conversations#index', as: :email_conversations_notin
|
90
|
-
get 'email_conversations/show/:id', to: 'email_conversations#show',
|
90
|
+
get 'email_conversations/show/:id', to: 'email_conversations#show', as: :email_conversation
|
91
91
|
|
92
|
-
get 'email_contexts/summary', to: 'email_contexts#summary',
|
93
|
-
get 'email_contexts/for_lead/:lead_id', to: 'email_contexts#index',
|
94
|
-
get 'email_contexts/iframe_src/:id', to: 'email_contexts#iframe_src',
|
92
|
+
get 'email_contexts/summary', to: 'email_contexts#summary', as: :email_contexts_summary
|
93
|
+
get 'email_contexts/for_lead/:lead_id', to: 'email_contexts#index', as: :email_contexts_for_lead
|
94
|
+
get 'email_contexts/iframe_src/:id', to: 'email_contexts#iframe_src', as: :email_context_iframe
|
95
95
|
get 'email_contexts/new_with_template/:template_slug', to: 'email_contexts#new'
|
96
|
-
post 'email_contexts/
|
97
|
-
|
96
|
+
post 'email_contexts/send_schedule/:id', to: 'email_contexts#send_schedule', as: :send_schedule_email_context
|
97
|
+
post 'email_contexts/send_immediate/:id', to: 'email_contexts#send_immediate', as: :send_immediate_email_context
|
98
|
+
get 'email_contexts', to: 'email_contexts#index', as: :email_contexts
|
98
99
|
resources :email_contexts
|
99
100
|
|
100
101
|
get 'email_templates/iframe_src/:id', to: 'email_templates#iframe_src', as: :email_template_iframe
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ish_manager
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.8.
|
4
|
+
version: 0.1.8.471
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- piousbox
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-09-
|
11
|
+
date: 2023-09-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -483,6 +483,7 @@ files:
|
|
483
483
|
- app/controllers/ish_manager/appliance_tmpls_controller.rb
|
484
484
|
- app/controllers/ish_manager/appliances_controller.rb
|
485
485
|
- app/controllers/ish_manager/application_controller.rb
|
486
|
+
- app/controllers/ish_manager/application_mailer_controller.rb
|
486
487
|
- app/controllers/ish_manager/categories_controller.rb
|
487
488
|
- app/controllers/ish_manager/email_actions_controller.rb
|
488
489
|
- app/controllers/ish_manager/email_campaign_leads_controller.rb
|
@@ -528,9 +529,7 @@ files:
|
|
528
529
|
- app/jobs/ish_manager/test_email_job.rb
|
529
530
|
- app/mailers/ish_manager/application_mailer.rb
|
530
531
|
- app/mailers/ish_manager/leadset_mailer.rb
|
531
|
-
- app/mailers/ish_manager/meeting_mailer.rb
|
532
532
|
- app/mailers/ish_manager/office_mailer.rb
|
533
|
-
- app/mailers/ish_manager/offier_mailer.rb-trash
|
534
533
|
- app/models/ish_manager/ability.rb
|
535
534
|
- app/views/202212 Mailchimp Templates/202212 1col fixed-width.html
|
536
535
|
- app/views/202212 Mailchimp Templates/202212 1col full-width.html
|
@@ -1,13 +0,0 @@
|
|
1
|
-
|
2
|
-
class IshManager::MeetingMailer < IshManager::ApplicationMailer
|
3
|
-
default from: 'WasyaCo Consulting <no-reply@wasya.co>'
|
4
|
-
|
5
|
-
# layout 'mailer'
|
6
|
-
|
7
|
-
def morning_reminder meeting_id:
|
8
|
-
@meeting = Ish::Meeting.find meeting_id
|
9
|
-
mail( to: @meeting.invitee_email,
|
10
|
-
subject: 'A reminder for your upcoming meeting' )
|
11
|
-
end
|
12
|
-
|
13
|
-
end
|
@@ -1,53 +0,0 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
def send_campaign_email campaign_id, c_lead_id
|
4
|
-
@ctx = @campaign = ::Ish::EmailContext.find campaign_id
|
5
|
-
@lead = EmailCampaignLead.find c_lead_id
|
6
|
-
|
7
|
-
if @lead.sent_at
|
8
|
-
raise "This campaign_lead #{@lead.id} has already been sent."
|
9
|
-
end
|
10
|
-
|
11
|
-
actl = ActionController::Base.new
|
12
|
-
actl.instance_variable_set( :@ctx, @ctx )
|
13
|
-
|
14
|
-
@pixel_tracking = {
|
15
|
-
'v' => 1,
|
16
|
-
'tid' => 'UA-53077236-2',
|
17
|
-
'cid' => @lead.cid,
|
18
|
-
'uid' => @lead.uid,
|
19
|
-
't' => 'event',
|
20
|
-
'ec' => 'email',
|
21
|
-
'ea' => 'open',
|
22
|
-
'cn' => @campaign.slug,
|
23
|
-
'ci' => @campaign.slug,
|
24
|
-
'cm' => 'email',
|
25
|
-
'utm_source' => @campaign.slug,
|
26
|
-
'utm_medium' => 'email',
|
27
|
-
'utm_campaign' => @campaign.slug,
|
28
|
-
}.map { |k, v| "#{k}=#{v}" }.join("&")
|
29
|
-
actl.instance_variable_set( :@pixel_tracking, @pixel_tracking )
|
30
|
-
|
31
|
-
@click_tracking = {
|
32
|
-
'cid' => @lead.cid,
|
33
|
-
'uid' => @lead.uid,
|
34
|
-
't' => 'event',
|
35
|
-
'ec' => 'email',
|
36
|
-
'ea' => 'clk-ctct', # clicked contact us
|
37
|
-
'utm_source' => @campaign.slug,
|
38
|
-
'utm_medium' => 'email',
|
39
|
-
'utm_campaign' => @campaign.slug,
|
40
|
-
}.map { |k, v| "#{k}=#{v}" }.join("&")
|
41
|
-
actl.instance_variable_set( :@click_tracking, @click_tracking )
|
42
|
-
|
43
|
-
actl.instance_variable_set( :@lead, @lead )
|
44
|
-
|
45
|
-
template = "render/_#{@ctx.email_template.slug}"
|
46
|
-
rendered_str = actl.render_to_string("ish_manager/email_templates/_#{@ctx.email_template.slug}")
|
47
|
-
@lead.update( rendered_str: rendered_str, sent_at: Time.now )
|
48
|
-
|
49
|
-
mail( from: @ctx.from_email,
|
50
|
-
to: @lead.email,
|
51
|
-
subject: @ctx.subject,
|
52
|
-
template_name: template )
|
53
|
-
end
|