wco_email 0.1.1.32 → 0.1.1.34

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 18277505658153c7d7c5eab9423ea2ba6c41c6caa7806585c7bd27d5902c8e25
4
- data.tar.gz: e3ff9e176cf33852a644e69c7656525c433912c6d8779e2df4ebf2bfa683ea95
3
+ metadata.gz: 5f21429d551316f7bb09d0cc2d90f5e8129a93933e6146b9d75da18f4e86b63c
4
+ data.tar.gz: c59a431091d005abc1f995629f9c434aa114971fbb3add7517470aaad79ba833
5
5
  SHA512:
6
- metadata.gz: 0fc8baa3bb7116f9dbe7fe1b8461967f742e81174b0e43a45b50464e708c24f5c68b4bc079cebb26f7c78c7c4625fa5e1626e4595c235dabd92604da3b68e573
7
- data.tar.gz: 3ad9d39f189133c42996a71da24910101a08ba28871735b08221c53fc2ac64ea25c1c975c366faff6631abbd4974906d3812808f5c2e06f10ee30f3cfdeae87c
6
+ metadata.gz: 2e4599c999e52ecc69bf7dda4470c0296670042adf4b715e532cc641c2b1e2d24a3835cc764e86e9846c9a1cdcc70fdddccc5c7c6436cee315bfcdb4e3716bfd
7
+ data.tar.gz: 2843b7c0ef995916740731835143e1bf2e32eca0531184766a0fcc7b5207740e5d928e21485bf192119f477d440644ce32277487a12693a551a309c1a1cfa660
@@ -44,7 +44,7 @@ class WcoEmail::ConversationsController < WcoEmail::ApplicationController
44
44
  end
45
45
 
46
46
  @conversations = @conversations.order_by( latest_at: :desc
47
- ).includes( :leads
47
+ ).includes( :leads, :messages
48
48
  ).page( params[:conv_page]
49
49
  ).per( current_profile.per_page
50
50
  )
@@ -34,7 +34,7 @@ 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 # .page( params[WcoEmail::EmailFilter::PAGE_PARAM_NAME] ).per( current_profile.per_page )
37
+ @email_filters = WcoEmail::EmailFilter.all.includes( :email_template, :conversations )
38
38
  end
39
39
 
40
40
  def new
@@ -42,6 +42,11 @@ class WcoEmail::EmailFiltersController < WcoEmail::ApplicationController
42
42
  authorize! :new, @email_filter
43
43
  end
44
44
 
45
+ def show
46
+ @email_filter = WcoEmail::EmailFilter.find params[:id]
47
+ authorize! :show, @email_filter
48
+ end
49
+
45
50
  def update
46
51
  @email_filter = WcoEmail::EmailFilter.find params[:id]
47
52
  authorize! :update, @email_filter
@@ -58,7 +58,7 @@
58
58
  -# %span.absolute.collapse-expand#mainW
59
59
  -# = yield
60
60
 
61
- .flex-row
61
+ .padded.flex-row
62
62
  = yield :sidebar
63
63
  %span.absolute.collapse-expand#mainW
64
64
  = yield
@@ -7,4 +7,5 @@
7
7
  -# (#{tag.conversations.unread.length}, #{tag.conversations.length})
8
8
  (#{tag.conversations.unread.length})
9
9
  (#{tag.conversations.length})
10
+ = link_to "not", email_conversations_not_in_path( tag.slug )
10
11
 
@@ -1,14 +1,16 @@
1
1
 
2
2
  .conversations--actions.bordered.d-flex
3
- %a.btn.archive-btn{ href: "javascript: void(0)", data: { url: conversations_rmtag_path(Wco::Tag::INBOX) } }
4
- %i.material-icons archive
5
- archive
6
- %a.btn.delete-btn{ href: "javascript: void(0)", data: { url: conversations_path } }
7
- %i.material-icons delete
8
- delete
9
- %a.btn.reload-btn{ href: "javascript: location.reload()" }
10
- %i.material-icons refresh
11
- refresh
3
+
4
+ -# %a.btn.archive-btn{ href: "javascript: void(0)", data: { url: conversations_rmtag_path(Wco::Tag::INBOX) } }
5
+ -# %i.material-icons archive
6
+ -# archive
7
+ -# %a.btn.delete-btn{ href: "javascript: void(0)", data: { url: conversations_path } }
8
+ -# %i.material-icons delete
9
+ -# delete
10
+ -# %a.btn.reload-btn{ href: "javascript: location.reload()" }
11
+ -# %i.material-icons refresh
12
+ -# refresh
13
+
12
14
  .bordered.inline-block
13
15
  .d-inline-block
14
16
  = select_tag :emailtag, options_for_select(@tags_list), class: 'select2'
@@ -9,6 +9,7 @@
9
9
  Tag `#{@tag}`
10
10
  - if @tag_not
11
11
  Tag-not `#{@tag_not}`
12
+ (#{@conversations.length})
12
13
  = render '/wco_email/conversations/actions'
13
14
 
14
15
  = render '/wco/paginate', resource: @conversations, param_name: :conv_page
@@ -18,15 +18,10 @@
18
18
  %tr
19
19
  %th &nbsp;
20
20
  %th &nbsp;
21
- %th From Regex
22
- %th From Exact
23
- %th Subject Regex
24
- %th Subject Exact
25
- %th Body Exact
26
- %th Kind
27
- %th Respond with <br />Email Template
28
- %th Email Action <br />(template)
29
- %th Tag
21
+ %th n convs
22
+ %th Match
23
+ %th Action
24
+
30
25
  - @email_filters.each_with_index do |ef, idx|
31
26
 
32
27
  %tr
@@ -34,19 +29,34 @@
34
29
  .gray= idx+1
35
30
  = check_box_tag 'checked'
36
31
  %td
37
- = link_to '[~]', edit_email_filter_path(ef)
38
- .inline-block= button_to '[x]', email_filter_path(ef), method: :delete, data: { confirm: 'Are you sure?' }
39
- %td
40
- `#{ef.from_regex}`
41
- %td
42
- `#{ef.from_exact}`
43
- %td= ef.subject_regex
44
- %td= ef.subject_exact
45
- %td= ef.body_exact
46
- %td= ef.kind
47
- %td= ef.email_template&.slug
48
- %td= ef.email_action_template&.slug
49
- %td= ef.tag&.slug
32
+ .flex-row
33
+ = link_to '[~]', edit_email_filter_path(ef)
34
+ = link_to '[view]', email_filter_path(ef)
35
+ .inline-block= button_to '[x]', email_filter_path(ef), method: :delete, data: { confirm: 'Are you sure?' }
36
+ %td.n-convs
37
+ = ef.conversations.length
38
+ %td.match
39
+ - if ef.from_regex.present?
40
+ .a <b>from_regex:</b> `#{ef.from_regex}`
41
+ - if ef.from_exact.present?
42
+ .a <b>from_exact:</b> `#{ef.from_exact}`
43
+ - if ef.subject_regex.present?
44
+ .a <b>subject_regex:</b> `#{ef.subject_regex}`
45
+ - if ef.subject_exact.present?
46
+ .a <b>subject_exact:</b> `#{ef.subject_exact}`
47
+ - if ef.body_exact.present?
48
+ .a <b>body_exact:</b> `#{ef.body_exact}`
49
+
50
+ %td.action
51
+ - if ef.kind == EF::KIND_AUTORESPOND_TMPL
52
+ .a <b>#{EF::KIND_AUTORESPOND_TMPL}:</b> #{ef.email_template&.slug}
53
+ - if ef.kind == EF::KIND_AUTORESPOND_EACT
54
+ .a <b>#{EF::KIND_AUTORESPOND_EACT}:</b> #{ef.email_action_template&.slug}
55
+ - if ef.kind == EF::KIND_ADD_TAG
56
+ .a <b>#{EF::KIND_ADD_TAG}:</b> #{ef.tag&.slug}
57
+ - if ef.kind == EF::KIND_REMOVE_TAG
58
+ .a <b>#{EF::KIND_REMOVE_TAG}:</b> #{ef.tag&.slug}
59
+
50
60
  -# = paginate @email_filters, param_name: WcoEmail::EmailFilter::PAGE_PARAM_NAME, views_prefix: 'wco'
51
61
 
52
62
 
@@ -0,0 +1,9 @@
1
+
2
+ .email-filters-show.maxwidth
3
+ .header
4
+ %h5.title Email Filter `#{@email_filter.id}`
5
+
6
+ %h5 Convs (#{@email_filter.conversations.length})
7
+ %ul
8
+ - @email_filter.conversations.each do |conv|
9
+ %li= link_to conv, email_conversation_path(conv)
data/config/routes.rb CHANGED
@@ -8,7 +8,7 @@ WcoEmail::Engine.routes.draw do
8
8
 
9
9
  # get 'conversations', to: '/wco_email/conversations#index', as: :email_conversations
10
10
  get 'conversations/in/:tagname', to: '/wco_email/conversations#index', as: :email_conversations_in
11
- get 'conversations/not-in/:tagname_not', to: '/wco_email/conversations#index', as: :email_conversations_in_not
11
+ get 'conversations/not-in/:tagname_not', to: '/wco_email/conversations#index', as: :email_conversations_not_in
12
12
  get 'conversations/:id', to: '/wco_email/conversations#show', as: :email_conversation
13
13
  post 'conversations/:id1/merge/:id2', to: '/wco_email/conversations#merge', as: :merge_email_conversations
14
14
  post 'conversations/addtag', to: 'conversations#addtag'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wco_email
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1.32
4
+ version: 0.1.1.34
5
5
  platform: ruby
6
6
  authors:
7
7
  - Victor Pudeyev
@@ -400,6 +400,7 @@ files:
400
400
  - app/views/wco_email/email_filters/edit.haml
401
401
  - app/views/wco_email/email_filters/index.haml
402
402
  - app/views/wco_email/email_filters/new.haml
403
+ - app/views/wco_email/email_filters/show.haml
403
404
  - app/views/wco_email/email_templates/_form.haml
404
405
  - app/views/wco_email/email_templates/_form_mini.haml
405
406
  - app/views/wco_email/email_templates/_form_reply_mini.haml