wco_email 0.1.1.79 → 0.1.1.80
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/controllers/wco_email/message_stubs_controller.rb +45 -0
- data/app/views/wco_email/_main_header.haml +2 -1
- data/app/views/wco_email/message_stubs/_form.haml +12 -0
- data/app/views/wco_email/message_stubs/_index.haml +8 -2
- data/app/views/wco_email/message_stubs/_index_table.haml +24 -0
- data/app/views/wco_email/message_stubs/edit.haml +3 -0
- data/app/views/wco_email/message_stubs/new.haml +7 -0
- data/app/views/wco_email/message_stubs/show.haml +4 -0
- data/app/views/wco_email/messages/_meta.haml +2 -2
- data/app/views/wco_email/messages/show.haml +4 -3
- metadata +7 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4c75364c487acb06734974d75ed8b1ec8e3c2f170e770b0c03f6c9589cf6ee4a
|
4
|
+
data.tar.gz: 9358b7cabd07fc5d0ccf675216fce4f1a1acf329d81eca41cd6845380a8d5445
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e88f5abb24e1d5eb216db6596235cb230e179c2c3a6894f195c4fcf6924d11c69b657e5312f577c8f328bea99a1b1c1766fdfac2d8f68719b00738f31a782893
|
7
|
+
data.tar.gz: 9c8de2194ce44663dcc887b5cfa0ce3d943adb29146adbd6d43619a3ce76ebcf10cbc71d17cd3de913087f65577f189cf016bf234eba86520d77c01c126c6605
|
@@ -21,6 +21,51 @@ class WcoEmail::MessageStubsController < WcoEmail::ApplicationController
|
|
21
21
|
redirect_to request.referrer
|
22
22
|
end
|
23
23
|
|
24
|
+
def create
|
25
|
+
@stub = WcoEmail::MessageStub.new params[:stub].permit!
|
26
|
+
authorize! :create, @stub
|
27
|
+
if @stub.save
|
28
|
+
flash_notice 'saved.'
|
29
|
+
redirect_to action: 'show'
|
30
|
+
else
|
31
|
+
flash_alert "Cannot save stub: #{@stub.errors.full_messages}"
|
32
|
+
render 'new'
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
def edit
|
37
|
+
@stub = WcoEmail::MessageStub.find params[:id]
|
38
|
+
authorize! :edit, @stub
|
39
|
+
end
|
40
|
+
|
41
|
+
def index
|
42
|
+
authorize! :index, WcoEmail::MessageStub
|
43
|
+
@stubs = WcoEmail::MessageStub.all.page( params[:stubs_page] )
|
44
|
+
render '_index_table'
|
45
|
+
end
|
46
|
+
|
47
|
+
def new
|
48
|
+
@stub = WcoEmail::MessageStub.new
|
49
|
+
authorize! :new, @stub
|
50
|
+
end
|
51
|
+
|
52
|
+
def show
|
53
|
+
@stub = WcoEmail::MessageStub.find params[:id]
|
54
|
+
authorize! :show, @stub
|
55
|
+
end
|
56
|
+
|
57
|
+
def update
|
58
|
+
@stub = WcoEmail::MessageStub.find params[:id]
|
59
|
+
authorize! :update, @stub
|
60
|
+
flag = @stub.update_attributes params[:stub].permit!
|
61
|
+
if flag
|
62
|
+
flash_notice 'success'
|
63
|
+
redirect_to action: 'show'
|
64
|
+
else
|
65
|
+
flash_alert "Cannot save stub: #{@stub.errors.full_messages}"
|
66
|
+
render 'edit'
|
67
|
+
end
|
68
|
+
end
|
24
69
|
|
25
70
|
end
|
26
71
|
|
@@ -7,9 +7,10 @@
|
|
7
7
|
%ul
|
8
8
|
%li= link_to 'Inbox', conversations_in_path('inbox')
|
9
9
|
%li
|
10
|
-
Stubs
|
10
|
+
= link_to 'Stubs', wco_email.message_stubs_path
|
11
11
|
(#{WcoEmail::MessageStub.pending.length})
|
12
12
|
(#{WcoEmail::MessageStub.all.length})
|
13
|
+
= link_to '[+]', wco_email.new_message_stub_path
|
13
14
|
%li= render '/wco_email/email_templates/header'
|
14
15
|
%li= render '/wco_email/email_campaigns/header'
|
15
16
|
%li= render '/wco_email/email_filters/header'
|
@@ -1,10 +1,16 @@
|
|
1
1
|
|
2
|
+
- stubs ||= @stubs
|
3
|
+
|
2
4
|
.message-stubs--index
|
5
|
+
= paginate stubs, param_name: :stubs_page
|
3
6
|
%ul
|
4
7
|
- stubs.each do |stub|
|
5
8
|
%li
|
9
|
+
.a <b>created_at:</b> #{stub.created_at}
|
6
10
|
.a
|
11
|
+
<b>Status:</b>
|
7
12
|
= stub.status
|
8
13
|
.d-inline-block= button_to 'churn', wco_email.churn_message_stub_path(stub), data: { confirm: 'Are you sure?' }
|
9
|
-
.a
|
10
|
-
.a
|
14
|
+
.a <b>object_key:</b> #{stub.object_key}
|
15
|
+
.a <b>tag slugs:</b> #{stub.tags.map &:slug}
|
16
|
+
= paginate stubs, param_name: :stubs_page
|
@@ -0,0 +1,24 @@
|
|
1
|
+
|
2
|
+
- stubs ||= @stubs
|
3
|
+
|
4
|
+
.message-stubs--index
|
5
|
+
= paginate stubs, param_name: :stubs_page
|
6
|
+
%table.bordered.padded
|
7
|
+
%thead
|
8
|
+
%tr
|
9
|
+
%th created_at
|
10
|
+
%th status
|
11
|
+
%th object_key
|
12
|
+
%th tag slugs
|
13
|
+
%tbody
|
14
|
+
- stubs.each do |stub|
|
15
|
+
%tr
|
16
|
+
%td #{stub.created_at}
|
17
|
+
%td
|
18
|
+
= stub.status
|
19
|
+
= link_to '[view]', wco_email.message_stub_path(stub)
|
20
|
+
= link_to '[~]', wco_email.edit_message_stub_path(stub)
|
21
|
+
.d-inline-block= button_to 'churn', wco_email.churn_message_stub_path(stub), data: { confirm: 'Are you sure?' }
|
22
|
+
%td #{stub.object_key}
|
23
|
+
%td #{stub.tags.map &:slug}
|
24
|
+
= paginate stubs, param_name: :stubs_page
|
@@ -24,8 +24,8 @@
|
|
24
24
|
%li
|
25
25
|
<b>object_key:</b> #{message.object_key}
|
26
26
|
%li
|
27
|
-
<b>Stub:</b>
|
28
|
-
#{message.stub.id}
|
27
|
+
<b>Stub id:</b>
|
28
|
+
#{link_to message.stub.id, message_stub_path(message.stub)}
|
29
29
|
.d-inline-block= button_to 'reprocess', churn_message_stub_path(message.stub)
|
30
30
|
%li <b>in_reply_to_id:</b> #{message.in_reply_to_id}
|
31
31
|
%li
|
@@ -10,8 +10,9 @@
|
|
10
10
|
%iframe.message-iframe{ src: message_iframe_path(@message) }
|
11
11
|
= render '/wco_email/contexts/form_reply', lead_id: @message.lead_id, message: @message, ctx: WcoEmail::Context.new({ from_email: @message.to&.downcase, subject: @message.subject, email_template_id: ET.find_by( slug: 'blank').id })
|
12
12
|
|
13
|
-
= @message.inspect
|
14
|
-
%hr
|
15
13
|
%pre
|
16
|
-
= raw @the_mail.body.decoded
|
14
|
+
= raw @the_mail.body.decoded.force_encoding('UTF-8')
|
15
|
+
%hr
|
16
|
+
= @message.inspect
|
17
|
+
|
17
18
|
|
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.80
|
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-08-
|
11
|
+
date: 2024-08-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-s3
|
@@ -434,7 +434,12 @@ files:
|
|
434
434
|
- app/views/wco_email/email_templates/show_iframe.haml
|
435
435
|
- app/views/wco_email/lead_action_templates/_header.haml
|
436
436
|
- app/views/wco_email/lead_actions/_header.haml
|
437
|
+
- app/views/wco_email/message_stubs/_form.haml
|
437
438
|
- app/views/wco_email/message_stubs/_index.haml
|
439
|
+
- app/views/wco_email/message_stubs/_index_table.haml
|
440
|
+
- app/views/wco_email/message_stubs/edit.haml
|
441
|
+
- app/views/wco_email/message_stubs/new.haml
|
442
|
+
- app/views/wco_email/message_stubs/show.haml
|
438
443
|
- app/views/wco_email/messages/_meta.haml
|
439
444
|
- app/views/wco_email/messages/show.haml
|
440
445
|
- app/views/wco_email/messages/show_iframe.haml
|