wco_email 0.1.1.79 → 0.1.1.81
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/email_filters_controller.rb +8 -1
- 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/email_filters/index.haml +3 -3
- 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: cb4cda304553c3ccdc232709927e68ce17be6511d0bb26df1fa7880f8a4974b8
|
4
|
+
data.tar.gz: 9de4dd2f1c693a4cfe1e814d6925cb496c6edc3e253561a61411ba0ed9bf3d69
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 20216f0274fbce9ffb1fcdc554db12b9034e9e3f0c74a83f6da2d1872504e9ab9c2f8de6077cbd997bb9230b94d0dee40f643cb281c1283ee045fb7eaa801279
|
7
|
+
data.tar.gz: 283b1a319bec4a25a2642c3cbb73a60d0b383287cdfe41cf32974fa41b5d5a6a35cb02b4f4982fee7eeaa9e4e4f793773e9f36bbbfe2adb194d5e76ac8419a78
|
@@ -34,7 +34,14 @@ class WcoEmail::EmailFiltersController < WcoEmail::ApplicationController
|
|
34
34
|
def index
|
35
35
|
authorize! :index, WcoEmail::EmailFilter.new
|
36
36
|
@email_filter = WcoEmail::EmailFilter.new
|
37
|
-
@email_filters = WcoEmail::EmailFilter.all.includes( :email_template, :conversations )
|
37
|
+
@email_filters = WcoEmail::EmailFilter.all().includes( :email_template, :conversations )
|
38
|
+
|
39
|
+
if params[:q]
|
40
|
+
@email_filters = @email_filters.where( from_exact: /#{params[:q]}/i )
|
41
|
+
end
|
42
|
+
|
43
|
+
@email_filters = @email_filters.page( params[WcoEmail::EmailFilter::PAGE_PARAM_NAME]
|
44
|
+
).per( current_profile.per_page )
|
38
45
|
end
|
39
46
|
|
40
47
|
def new
|
@@ -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'
|
@@ -12,8 +12,8 @@
|
|
12
12
|
= render 'form', email_filter: @email_filter
|
13
13
|
%hr
|
14
14
|
|
15
|
-
|
16
|
-
%table.bordered
|
15
|
+
= paginate @email_filters, param_name: WcoEmail::EmailFilter::PAGE_PARAM_NAME, views_prefix: 'wco'
|
16
|
+
%table.bordered
|
17
17
|
%thead
|
18
18
|
%tr
|
19
19
|
%th
|
@@ -64,6 +64,6 @@
|
|
64
64
|
- if ef.kind == EF::KIND_REMOVE_TAG
|
65
65
|
.a <b>#{EF::KIND_REMOVE_TAG}:</b> #{ef.tag&.slug}
|
66
66
|
|
67
|
-
|
67
|
+
= paginate @email_filters, param_name: WcoEmail::EmailFilter::PAGE_PARAM_NAME, views_prefix: 'wco'
|
68
68
|
|
69
69
|
|
@@ -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.81
|
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-29 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
|