wco_email 0.1.1.40 → 0.1.1.42
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/wco_email/application_controller.rb +10 -9
- data/app/controllers/wco_email/contexts_controller.rb +14 -12
- data/app/controllers/wco_email/email_templates_controller.rb +8 -22
- data/app/views/wco_email/contexts/_form.haml +4 -2
- data/app/views/wco_email/contexts/_form_reply.haml +2 -0
- data/app/views/wco_email/contexts/show.haml +0 -2
- data/app/views/wco_email/contexts/show_iframe.haml +3 -0
- data/app/views/wco_email/conversations/_search.haml +3 -5
- data/app/views/wco_email/conversations/index.haml +8 -7
- data/app/views/wco_email/email_layouts/_plain.haml +18 -0
- data/app/views/wco_email/email_templates/_form.haml +3 -1
- data/app/views/wco_email/email_templates/_plain.haml +6 -0
- data/app/views/wco_email/email_templates/show_iframe.haml +3 -1
- data/config/routes.rb +1 -1
- metadata +4 -3
- data/app/views/wco_email/contexts/iframe_src.haml +0 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 16bd727a333da209b9d653313bfac3c6b112ca87c0a03f514dc6c7beeba0c767
|
4
|
+
data.tar.gz: 05bd0bf61431eab3448adcb2c514f54017d9b5a29067bbd239c00651e7ab420c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 95e46edb2a134e7646ab381d1120ea14cb3c11bf87af4eea11d235c8901e318cdfc98c7c675469a5139e8e30017072976771fd55380233caaae99c68884dca2f
|
7
|
+
data.tar.gz: a9f82e64f99c55c13b0501b0027bcfd33eeb619c932fbcab7078c030fbf25920f5ac957f74a3ebeaba30349bb5f8fed4f33dbe1d206588248e2fbf5f6d196bb4
|
@@ -1,13 +1,14 @@
|
|
1
1
|
|
2
|
-
EC
|
3
|
-
EF
|
4
|
-
EM
|
5
|
-
ET
|
6
|
-
MS
|
7
|
-
EMS
|
8
|
-
OA
|
9
|
-
OAT
|
10
|
-
|
2
|
+
EC ||= WcoEmail::Conversation
|
3
|
+
EF ||= WcoEmail::EmailFilter
|
4
|
+
EM ||= WcoEmail::Message
|
5
|
+
ET ||= WcoEmail::EmailTemplate
|
6
|
+
MS ||= WcoEmail::MessageStub
|
7
|
+
EMS ||= MS
|
8
|
+
OA ||= Wco::OfficeAction
|
9
|
+
OAT ||= Wco::OfficeActionTemplate
|
10
|
+
OATT ||= Wco::OfficeActionTemplateTie
|
11
|
+
Sch ||= WcoEmail::EmailAction
|
11
12
|
|
12
13
|
class WcoEmail::ApplicationController < Wco::ApplicationController
|
13
14
|
# before_action :set_lists
|
@@ -44,18 +44,6 @@ class WcoEmail::ContextsController < WcoEmail::ApplicationController
|
|
44
44
|
authorize! :edit, @ctx
|
45
45
|
end
|
46
46
|
|
47
|
-
def iframe_src
|
48
|
-
@ctx = @email_context = WcoEmail::Context.find params[:id]
|
49
|
-
authorize! :iframe_src, @ctx
|
50
|
-
|
51
|
-
@tmpl = @email_template = @ctx.email_template
|
52
|
-
@tmpl_config = OpenStruct.new JSON.parse( @ctx.tmpl[:config_json] )
|
53
|
-
@lead = @ctx.lead
|
54
|
-
@body = @ctx.body
|
55
|
-
|
56
|
-
render layout: false
|
57
|
-
end
|
58
|
-
|
59
47
|
def index
|
60
48
|
authorize! :index, WcoEmail::Context
|
61
49
|
@ctxs = WcoEmail::Context.all.order_by( sent_at: :desc, send_at: :desc
|
@@ -113,6 +101,20 @@ class WcoEmail::ContextsController < WcoEmail::ApplicationController
|
|
113
101
|
authorize! :show, @ctx
|
114
102
|
end
|
115
103
|
|
104
|
+
def show_iframe
|
105
|
+
@ctx = @email_context = WcoEmail::Context.find params[:id]
|
106
|
+
authorize! :iframe_src, @ctx
|
107
|
+
|
108
|
+
@tmpl = @email_template = @ctx.email_template
|
109
|
+
@tmpl_config = OpenStruct.new JSON.parse( @ctx.tmpl[:config_json] )
|
110
|
+
@lead = @ctx.lead
|
111
|
+
@body = @ctx.body
|
112
|
+
|
113
|
+
@renderer = WcoEmail::ApplicationMailer.renderer ctx: @ctx
|
114
|
+
|
115
|
+
render layout: false
|
116
|
+
end
|
117
|
+
|
116
118
|
def summary
|
117
119
|
authorize! :summary, WcoEmail::Context
|
118
120
|
@results = WcoEmail::Context.summary
|
@@ -87,28 +87,19 @@ class WcoEmail::EmailTemplatesController < WcoEmail::ApplicationController
|
|
87
87
|
end
|
88
88
|
|
89
89
|
def show_iframe
|
90
|
-
@tmpl = WcoEmail::EmailTemplate.where({
|
90
|
+
@tmpl = WcoEmail::EmailTemplate.where({ id: params[:id] }).first
|
91
91
|
@tmpl ||= WcoEmail::EmailTemplate.find_by({ slug: params[:id] })
|
92
92
|
authorize! :show, @tmpl
|
93
93
|
|
94
|
-
@
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
@utm_tracking_str = {
|
99
|
-
'cid' => @ctx.lead_id,
|
100
|
-
'utm_campaign' => @ctx.tmpl.slug,
|
101
|
-
'utm_medium' => 'email',
|
102
|
-
'utm_source' => @ctx.tmpl.slug,
|
103
|
-
}.map { |k, v| "#{k}=#{v}" }.join("&")
|
104
|
-
|
105
|
-
@unsubscribe_url = WcoEmail::Engine.routes.url_helpers.unsubscribes_url({
|
106
|
-
template_id: @ctx.tmpl.id,
|
107
|
-
lead_id: @lead.id,
|
108
|
-
token: @lead.unsubscribe_token,
|
109
|
-
host: Rails.application.routes.default_url_options[:host],
|
94
|
+
@ctx = WcoEmail::Context.new({
|
95
|
+
email_template: @tmpl,
|
96
|
+
lead: Wco::Lead.find_by({ email: 'poxlovi@gmail.com' }),
|
110
97
|
})
|
111
98
|
|
99
|
+
@renderer = WcoEmail::ApplicationMailer.renderer ctx: @ctx
|
100
|
+
# @rendered_str = renderer.render_to_string("/wco_email/email_templates/_#{@ctx.tmpl.layout}")
|
101
|
+
# @rendered_str = renderer.render_to_string( inline: @ctx.body )
|
102
|
+
|
112
103
|
render layout: false
|
113
104
|
end
|
114
105
|
|
@@ -124,9 +115,4 @@ class WcoEmail::EmailTemplatesController < WcoEmail::ApplicationController
|
|
124
115
|
redirect_to action: :edit
|
125
116
|
end
|
126
117
|
|
127
|
-
##
|
128
|
-
## private
|
129
|
-
##
|
130
|
-
private
|
131
|
-
|
132
118
|
end
|
@@ -27,7 +27,7 @@
|
|
27
27
|
|
28
28
|
.flex-row
|
29
29
|
= f.label :reply_to_message
|
30
|
-
= f.select :reply_to_message_id, options_for_select([[ ctx.reply_to_message, ctx.reply_to_message_id ]], selected: ctx.reply_to_message_id), {}, class: 'w-100'
|
30
|
+
= f.select :reply_to_message_id, options_for_select([[ ctx.reply_to_message&.preview_str, ctx.reply_to_message_id ]], selected: ctx.reply_to_message_id), {}, class: 'w-100'
|
31
31
|
|
32
32
|
|
33
33
|
.tab-labels.flex-row
|
@@ -41,7 +41,9 @@
|
|
41
41
|
- if ctx.new_record?
|
42
42
|
New record...
|
43
43
|
- else
|
44
|
-
%iframe{ src: context_iframe_path(ctx), width: '100%', height: '100%' }
|
44
|
+
%iframe{ src: context_iframe_path(ctx.id), width: '100%', height: '100%' }
|
45
|
+
.gray.mini= link_to context_iframe_path(ctx.id), context_iframe_path(ctx.id), target: :_blank
|
46
|
+
|
45
47
|
|
46
48
|
|
47
49
|
.actions
|
@@ -2,12 +2,10 @@
|
|
2
2
|
|
3
3
|
.conversations--search.Card
|
4
4
|
.inline-block
|
5
|
-
= form_tag
|
6
|
-
%
|
5
|
+
= form_tag conversations_path, method: :get do
|
6
|
+
%b Search
|
7
|
+
%label from_email
|
7
8
|
= text_field_tag :from_email, params[:from_email]
|
8
|
-
-# = submit_tag '>'
|
9
|
-
-# .inline-block
|
10
|
-
-# = form_tag email_conversations_path do
|
11
9
|
%label by subject
|
12
10
|
= text_field_tag :subject, params[:subject]
|
13
11
|
= submit_tag '>'
|
@@ -3,13 +3,14 @@
|
|
3
3
|
= render 'wco_email/sidebar'
|
4
4
|
|
5
5
|
.conversations-index
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
6
|
+
.header
|
7
|
+
%h5.title
|
8
|
+
- if @tag
|
9
|
+
Tag `#{@tag}`
|
10
|
+
- if @tag_not
|
11
|
+
Tag-not `#{@tag_not}`
|
12
|
+
(#{@conversations.length})
|
13
|
+
= render '/wco_email/conversations/search'
|
13
14
|
= render '/wco_email/conversations/actions'
|
14
15
|
|
15
16
|
= render '/wco/paginate', resource: @conversations, param_name: :conv_page
|
@@ -0,0 +1,18 @@
|
|
1
|
+
|
2
|
+
-# %ul
|
3
|
+
-# %li= @lead.inspect
|
4
|
+
-# %li= @ctx.tmpl.inspect
|
5
|
+
-# %li= @ctx.reply_to_message.inspect
|
6
|
+
-# %li= @renderer.inspect
|
7
|
+
|
8
|
+
= @renderer.render( inline: @ctx.body )
|
9
|
+
|
10
|
+
-# = @ctx.utm_tracking_str
|
11
|
+
-# = @ctx.unsubscribe_url
|
12
|
+
|
13
|
+
- if @ctx.reply_to_message
|
14
|
+
%br
|
15
|
+
%br
|
16
|
+
.mini Your previous message is shown below.
|
17
|
+
%hr
|
18
|
+
= raw @ctx.reply_to_message.part_html_sanitized
|
@@ -28,10 +28,12 @@
|
|
28
28
|
.label-save-preview= f.submit 'Save & Preview'
|
29
29
|
.tabs
|
30
30
|
.tab-raw
|
31
|
-
|
31
|
+
-## No class tinymce, cannot have tinymce mess with my own templating.
|
32
|
+
= f.text_area :body
|
32
33
|
.tab-preview
|
33
34
|
- if email_template.persisted?
|
34
35
|
%iframe{ src: email_template_iframe_path(email_template), width: '100%', height: '100%' }
|
36
|
+
.gray.mini= link_to email_template_iframe_path(email_template), email_template_iframe_path(email_template), target: :_blank
|
35
37
|
|
36
38
|
.row
|
37
39
|
.col-md-6
|
data/config/routes.rb
CHANGED
@@ -22,7 +22,7 @@ WcoEmail::Engine.routes.draw do
|
|
22
22
|
resources :email_campaigns
|
23
23
|
resources :email_layouts
|
24
24
|
|
25
|
-
get 'contexts/
|
25
|
+
get 'contexts/show_iframe/:id', to: 'contexts#show_iframe', as: :context_iframe
|
26
26
|
get 'contexts/summary', to: 'contexts#summary'
|
27
27
|
post 'contexts/send_immediate/:id', to: 'contexts#send_immediate', as: :send_context
|
28
28
|
resources :contexts
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wco_email
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.1.
|
4
|
+
version: 0.1.1.42
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Victor Pudeyev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-01-
|
11
|
+
date: 2024-01-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-s3
|
@@ -365,10 +365,10 @@ files:
|
|
365
365
|
- app/views/wco_email/contexts/_header.haml
|
366
366
|
- app/views/wco_email/contexts/_index.haml
|
367
367
|
- app/views/wco_email/contexts/edit.haml
|
368
|
-
- app/views/wco_email/contexts/iframe_src.haml
|
369
368
|
- app/views/wco_email/contexts/index.haml
|
370
369
|
- app/views/wco_email/contexts/new.haml
|
371
370
|
- app/views/wco_email/contexts/show.haml
|
371
|
+
- app/views/wco_email/contexts/show_iframe.haml
|
372
372
|
- app/views/wco_email/contexts/summary.csv.erb
|
373
373
|
- app/views/wco_email/contexts/summary.haml
|
374
374
|
- app/views/wco_email/conversations/_actions.haml
|
@@ -401,6 +401,7 @@ files:
|
|
401
401
|
- app/views/wco_email/email_filters/index.haml
|
402
402
|
- app/views/wco_email/email_filters/new.haml
|
403
403
|
- app/views/wco_email/email_filters/show.haml
|
404
|
+
- app/views/wco_email/email_layouts/_plain.haml
|
404
405
|
- app/views/wco_email/email_templates/_form.haml
|
405
406
|
- app/views/wco_email/email_templates/_form_mini.haml
|
406
407
|
- app/views/wco_email/email_templates/_form_reply_mini.haml
|