ish_manager 0.1.8.374 → 0.1.8.376

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.
Files changed (37) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/ish_manager/application.js +0 -1
  3. data/app/assets/stylesheets/ish_manager/application.scss +11 -7
  4. data/app/assets/stylesheets/ish_manager/email.scss +4 -2
  5. data/app/assets/stylesheets/ish_manager/email_contexts.scss +12 -11
  6. data/app/assets/stylesheets/ish_manager/email_conversations.scss +12 -0
  7. data/app/assets/stylesheets/ish_manager/scheduled_actions_emails.scss +6 -5
  8. data/app/controllers/ish_manager/application_controller.rb +1 -1
  9. data/app/controllers/ish_manager/email_contexts_controller.rb +8 -9
  10. data/app/controllers/ish_manager/email_conversations_controller.rb +0 -2
  11. data/app/controllers/ish_manager/email_templates_controller.rb +0 -3
  12. data/app/controllers/ish_manager/leads_controller.rb +5 -4
  13. data/app/controllers/ish_manager/leadsets_controller.rb +0 -2
  14. data/app/controllers/ish_manager/scheduled_email_actions_controller.rb +6 -2
  15. data/app/helpers/ish_manager/application_helper.rb +2 -1
  16. data/app/views/ish_manager/application/_main_header_admin.haml +1 -1
  17. data/app/views/ish_manager/application/_paginate.haml +4 -1
  18. data/app/views/ish_manager/email_actions/edit.haml +1 -1
  19. data/app/views/ish_manager/email_actions/index.haml +2 -2
  20. data/app/views/ish_manager/email_actions/new.haml +1 -1
  21. data/app/views/ish_manager/email_contexts/_form_reply.haml +17 -0
  22. data/app/views/ish_manager/email_contexts/index.haml +28 -23
  23. data/app/views/ish_manager/email_contexts/show.haml +1 -1
  24. data/app/views/ish_manager/email_conversations/show.haml +9 -13
  25. data/app/views/ish_manager/email_templates/_form.haml +5 -3
  26. data/app/views/ish_manager/email_templates/_plain.html.erb +4 -0
  27. data/app/views/ish_manager/email_templates/iframe_src.haml +2 -4
  28. data/app/views/ish_manager/email_templates/plain.html.erb +1 -1
  29. data/app/views/ish_manager/leads/_index_rows.haml +11 -0
  30. data/app/views/ish_manager/leads/index.haml +11 -10
  31. data/app/views/ish_manager/leads/show.haml +48 -0
  32. data/app/views/ish_manager/scheduled_email_actions/edit.haml +4 -0
  33. data/app/views/ish_manager/scheduled_email_actions/index.haml +8 -6
  34. data/app/views/layouts/ish_manager/application.haml +4 -6
  35. data/app/views/layouts/ish_manager/{application_fullwidth.haml → done/20230316 application.haml } +6 -4
  36. metadata +22 -4
  37. data/app/views/ish_manager/email_templates/_form_reply_2_mini.haml +0 -15
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 39b64d928f290a56cb8566d6e3e41883fbdffa45342900d55cc86d2ac650b01f
4
- data.tar.gz: f6c64a2bf55a68bfe3ececa0d03ae3b89761db23b29fcb0ebcf1a5fc445b4eec
3
+ metadata.gz: b0ff9a276e00c2464f92167105e1cb686a92433a33979e8ee2f1f9d4d461dd29
4
+ data.tar.gz: 2ab57d283b26b74871533704e3369ddf72cb2c4f1b14e34dc23c35f539a6491a
5
5
  SHA512:
6
- metadata.gz: 1b871f0b6e1c35d5dae63efbd7c92f940bfb4cca42e0d0fa132448276db4789594d8644d94ac92f09a4f9d75001c34eac080de100eebf0147a15880df9f29214
7
- data.tar.gz: 726aded514ecd4998a7be06d37488afa6688020fe4f28d1b3feb5dfcaa3f31ae7e00f1580225ccbb404123f7e16d909dc422a6148b1e32fca6c0c69a6d3fe5cc
6
+ metadata.gz: 9028d3cdd8091a7bc6e458174d71baeb1428d0e40067bddb05d0069f63fa31fa97795b08756b72b3c6000dc63e741fc34e48f1d0726b4b381b133625e8dd4b47
7
+ data.tar.gz: '082dd5da46c2d5c5620236f898d2e44fdb3252421d7be3a2f5d339addd205fff5a19c5c8aa86e6fd4784f9ebf10d1d1b8e9686037ec3a93d280c0556421fae29'
@@ -106,7 +106,6 @@ $(function () {
106
106
  pageLength: 10,
107
107
  lengthMenu: [[10, 25, 100, -1], [10, 25, 100, 'All']],
108
108
  lengthChange: true,
109
- "aLengthMenu": [[5, 10, 25, 50, -1], [5, 10, 25, 50, "All"]]
110
109
  }
111
110
  $('#dataTable').DataTable(_props)
112
111
  $('.data-table').DataTable(_props)
@@ -25,11 +25,15 @@
25
25
  **/
26
26
 
27
27
  a[target='_blank'] {
28
+ display: flex;
29
+
28
30
  &::before {
29
- content: '[ '
31
+ content: '[ ';
32
+ display: inline;
30
33
  }
31
34
  &::after {
32
35
  content: ' ^]';
36
+ display: inline;
33
37
  // content: ' ^]' !important;
34
38
  // font-size: .5em;
35
39
  }
@@ -74,6 +78,10 @@ ul:not(.browser-default).bullets, {
74
78
  // border: 1px solid red !important;
75
79
  // display: none !important;
76
80
  }
81
+ .expand-hide {
82
+ display: none;
83
+ position: absolute;
84
+ }
77
85
 
78
86
  .alert {
79
87
  border: 1px solid red;
@@ -162,8 +170,8 @@ table.bordered {
162
170
  /* D */
163
171
 
164
172
  table.dataTable {
165
- border: 1px solid red;
166
- padding: 1em;
173
+ // border: 1px solid red;
174
+ // padding: 1em;
167
175
  border-radius: 5px;
168
176
  box-sizing: border-box;
169
177
  background: white;
@@ -217,10 +225,6 @@ table.dataTable {
217
225
  .hide, .hidden {
218
226
  display: none !important;
219
227
  }
220
- .hide-expand {
221
- display: none;
222
- position: absolute;
223
- }
224
228
 
225
229
  /* I */
226
230
  img.img-400 {
@@ -9,7 +9,9 @@
9
9
  .email-contexts-show,
10
10
  .emails-ns, // emails namespace
11
11
  .leads-edit,
12
- .leads-index {
12
+ .leads-index,
13
+ .leads-show,
14
+ .scheduled-emails-index {
13
15
  .header {
14
16
  display: flex;
15
17
  justify-content: center;
@@ -24,7 +26,7 @@
24
26
  // display: flex;
25
27
  // flex-direction: column;
26
28
 
27
- max-width: 400px;
29
+ // max-width: 400px; // @TODO: where is this used?!
28
30
 
29
31
  margin-left: 20px;
30
32
 
@@ -56,20 +56,21 @@
56
56
 
57
57
  .email-contexts-index {
58
58
 
59
- > .collapse-expand {
59
+ > .header {
60
60
  display: flex;
61
61
  justify-content: center;
62
62
 
63
- .header {
64
- a {
65
- &:before {
66
- content: '[';
67
- }
68
- &:after {
69
- content: ']';
70
- }
71
- }
72
- }
63
+ // .title {
64
+ // a {
65
+ // &:before {
66
+ // content: '[';
67
+ // }
68
+ // &:after {
69
+ // content: ']';
70
+ // }
71
+ // }
72
+ // }
73
+
73
74
  }
74
75
 
75
76
 
@@ -65,6 +65,13 @@
65
65
  }
66
66
  }
67
67
 
68
+ .leads {
69
+ .item {
70
+ border: 1px solid green;
71
+ // background: cyan;
72
+ }
73
+ }
74
+
68
75
  // these are inside a conversation. _vp_ 2023-02-28
69
76
  .messages {
70
77
  // border: 1px solid red;
@@ -149,6 +156,11 @@
149
156
  border: 1px solid cyan;
150
157
  }
151
158
 
159
+ .subject {
160
+ margin: 0 1em;
161
+ font-weight: bold;
162
+ }
163
+
152
164
  .tags {
153
165
  display: flex;
154
166
  flex-direction: column;
@@ -1,9 +1,9 @@
1
1
 
2
- .scheduled-email-actions--form {
3
- display: none;
4
- position: absolute;
5
- min-width: 250px;
6
- }
2
+ // .scheduled-email-actions--form {
3
+ // display: none;
4
+ // position: absolute;
5
+ // min-width: 250px;
6
+ // }
7
7
 
8
8
  .scheduled-emails-new {
9
9
 
@@ -22,6 +22,7 @@
22
22
 
23
23
  .scheduled-actions--form-mini {
24
24
  display: inline-block;
25
+ background: #ccc;
25
26
 
26
27
  form {
27
28
  border: 1px solid blue;
@@ -11,7 +11,7 @@ module IshManager
11
11
 
12
12
  def home
13
13
  authorize! :home, IshManager::Ability
14
- render 'home', layout: 'ish_manager/application_fullwidth'
14
+ render 'home'
15
15
  end
16
16
 
17
17
  #
@@ -1,15 +1,19 @@
1
1
 
2
2
  class ::IshManager::EmailContextsController < ::IshManager::ApplicationController
3
3
 
4
- # alphabetized : )
4
+ # Alphabetized : )
5
5
 
6
6
  before_action :set_lists
7
7
 
8
8
  def create
9
- authorize! :create, ::Ish::EmailContext
10
9
  pparams = params[:ish_email_context].permit!
11
- pparams[:tmpl] = JSON.parse(pparams[:tmpl])
12
- @ctx = ::Ish::EmailContext.new pparams
10
+ @ctx = ::Ish::EmailContext.new pparams
11
+ @tmpl = ::Ish::EmailTemplate.find @ctx.email_template_id
12
+
13
+ @ctx.from_email ||= @tmpl.from_email
14
+ @ctx.subject ||= @tmpl.subject
15
+
16
+ authorize! :create, @ctx
13
17
  if @ctx.save
14
18
  flash[:notice] = 'Saved.'
15
19
  redirect_to action: 'show', id: @ctx.id
@@ -55,7 +59,6 @@ class ::IshManager::EmailContextsController < ::IshManager::ApplicationControlle
55
59
  authorize! :iframe_src, @ctx
56
60
  @tmpl = @email_template = @ctx.email_template
57
61
  @lead = @ctx.lead
58
- # @body = @ctx.body_templated
59
62
  render "ish_manager/email_templates/_#{@tmpl.layout}", layout: false
60
63
  end
61
64
 
@@ -71,10 +74,6 @@ class ::IshManager::EmailContextsController < ::IshManager::ApplicationControlle
71
74
  @lead = Lead.find params[:lead_id]
72
75
  @ctxs = @ctxs.where( to_email: @lead.email )
73
76
  end
74
-
75
- @ctxs = @ctxs.page( params[Ish::EmailContext::PAGE_PARAM_NAME] )
76
-
77
- render layout: 'ish_manager/application_fullwidth'
78
77
  end
79
78
 
80
79
  def new
@@ -1,8 +1,6 @@
1
1
 
2
2
  class ::IshManager::EmailConversationsController < IshManager::ApplicationController
3
3
 
4
- layout 'ish_manager/application_fullwidth'
5
-
6
4
  before_action :set_lists
7
5
 
8
6
  def index
@@ -28,9 +28,6 @@ class ::IshManager::EmailTemplatesController < ::IshManager::ApplicationControll
28
28
  def edit
29
29
  @tmpl = @email_template = Ish::EmailTemplate.where({ id: params[:id] }).first
30
30
  authorize! :edit, @tmpl
31
-
32
- # @ctx = @email_context = Ish::EmailContext.new
33
- render layout: 'ish_manager/application_fullwidth'
34
31
  end
35
32
 
36
33
  def iframe_src
@@ -3,8 +3,6 @@ class ::IshManager::LeadsController < IshManager::ApplicationController
3
3
 
4
4
  before_action :set_lists
5
5
 
6
- layout 'ish_manager/application_fullwidth'
7
-
8
6
  ## alphabetized : )
9
7
 
10
8
  def bulkop
@@ -127,8 +125,11 @@ class ::IshManager::LeadsController < IshManager::ApplicationController
127
125
  end
128
126
 
129
127
  def show
130
- authorize! :redirect, IshManager::Ability
131
- redirect_to :action => :edit, :id => params[:id]
128
+ @lead = Lead.find params[:id]
129
+ authorize! :show, @lead
130
+ @schs = Sch.where( lead_id: @lead.id )
131
+ @ctxs = Ctx.where( lead_id: @lead.id )
132
+ @msgs = Msg.where( from: @lead.email )
132
133
  end
133
134
 
134
135
  def update
@@ -42,8 +42,6 @@ class ::IshManager::LeadsetsController < IshManager::ApplicationController
42
42
  # else
43
43
  # @leadsets = @leadsets.where( :is_done => false )
44
44
  # end
45
-
46
- render layout: 'ish_manager/application_fullwidth'
47
45
  end
48
46
 
49
47
  def new
@@ -3,8 +3,6 @@ class IshManager::ScheduledEmailActionsController < IshManager::ApplicationContr
3
3
 
4
4
  before_action :set_lists
5
5
 
6
- layout 'ish_manager/application_fullwidth'
7
-
8
6
  def create
9
7
  puts! params, 'params'
10
8
 
@@ -24,6 +22,12 @@ class IshManager::ScheduledEmailActionsController < IshManager::ApplicationContr
24
22
  redirect_to request.referrer ? request.referrer : leadsets_path
25
23
  end
26
24
 
25
+ def edit
26
+ @sch = Sch.find params[:id]
27
+ authorize! :edit, @sch
28
+
29
+ end
30
+
27
31
  def index
28
32
  authorize! :scheduled_emails_index, ::IshManager
29
33
  @scheduled_email_actions = ::Office::ScheduledEmailAction.all
@@ -49,7 +49,8 @@ module IshManager
49
49
  end
50
50
 
51
51
  def pretty_date date
52
- date.to_s[0, 10]
52
+ # date.to_s[0, 10]
53
+ date&.strftime('%Y-%m-%d')
53
54
  end
54
55
  def pp_date a; pretty_date a; end
55
56
 
@@ -52,7 +52,7 @@
52
52
  = link_to '[+]', new_email_campaign_path
53
53
 
54
54
  %li
55
- = link_to 'Scheduled Emails', scheduled_email_actions_path
55
+ = link_to 'Scheduled Email Actions', scheduled_email_actions_path
56
56
  = link_to '[+]', new_scheduled_email_action_path
57
57
  %ul
58
58
  %li
@@ -1,4 +1,7 @@
1
1
 
2
2
  -# Used only in email_contexts#index right now. _vp_ 2022-10-06
3
3
 
4
- = paginate resource, param_name: resource.klass::PAGE_PARAM_NAME, views_prefix: 'ish_manager'
4
+ - if resource.respond_to? :total_pages
5
+ = paginate resource, param_name: resource.klass::PAGE_PARAM_NAME, views_prefix: 'ish_manager'
6
+ - else
7
+ -# %label Not paginated.
@@ -1,5 +1,5 @@
1
1
 
2
- .email-actions-edit
2
+ .email-actions-edit.max-width
3
3
  .header
4
4
  %h2.title Edit Email Action
5
5
 
@@ -1,5 +1,5 @@
1
1
 
2
- .email-actions-index
2
+ .email-actions-index.max-width
3
3
 
4
4
  .header
5
5
  %h2.title
@@ -9,7 +9,7 @@
9
9
  %table.bordered
10
10
  %tr
11
11
  %th= check_box_tag 'abba'
12
- %th actions
12
+ %th
13
13
  %th slug
14
14
  %th descr
15
15
  %th next actions
@@ -1,5 +1,5 @@
1
1
 
2
- .email-actions-new
2
+ .email-actions-new.max-width
3
3
  .header
4
4
  %h2.title
5
5
  New Email Action
@@ -0,0 +1,17 @@
1
+
2
+ .email-contexts--form-reply.form-mini
3
+ = form_for ::Ish::EmailContext.new, url: email_contexts_path do |f|
4
+ = hidden_field_tag 'ish_email_context[lead_id]', lead.id
5
+ To: #{lead.email}
6
+ .field
7
+ -# = f.label :template
8
+ = f.select :email_template_id, options_for_select( @email_templates_list )
9
+ .action
10
+ = f.submit 'Reply'
11
+
12
+ .field.send-at
13
+ -# = f.label :send_at
14
+ = f.text_field :send_at, placeholder: 'YYYY-MM-DD', value: 1.business_day.after(Time.now).strftime('%Y-%m-%d'), size: 10, class: 'input-date'
15
+
16
+ .action
17
+ = f.submit 'Schedule'
@@ -1,36 +1,41 @@
1
1
 
2
2
  .email-contexts-index.padded
3
3
 
4
- .collapse-expand#emailContextsIndex
5
- %h2.header
6
- Paginated Email Contexts (#{@ctxs.length})
4
+ .header.collapse-expand-trash#emailContextsIndex
5
+ %h2.title
6
+ Email Contexts (#{@ctxs.length})
7
7
  - if @lead
8
8
  For lead `#{@lead.name}`
9
- = link_to '+', new_email_context_path
10
- = link_to 'unsent', notsent_email_contexts_path
9
+ = link_to '[+]', new_email_context_path
10
+ = link_to '[unsent]', notsent_email_contexts_path
11
11
 
12
12
  .W0
13
13
  = render 'paginate', resource: @ctxs, param_name: :email_contexts_page, views_prefix: :ish_manager
14
14
 
15
- %table.bordered
16
- %tr
17
- %th.actions Actions
18
- %th.to To
19
- %th.subject Subject
20
- %th.template Template
21
- - @ctxs.each do |ctx|
15
+ %table.bordered.data-table
16
+ %thead
22
17
  %tr
23
- %td
24
- - if ctx.sent_at
25
- [~]
26
- - else
27
- = link_to '[~]', edit_email_context_path(ctx)
28
- = button_to '[x]', email_context_path(ctx), method: :delete, form_class: :inline, data: { confirm: 'Are you sure?' }
29
- %td= ctx.to_email
30
- %td
31
- = link_to ctx.subject, email_context_path(ctx)
32
- -# = link_to 'iframe', email_context_iframe_path(ctx), target: :_blank do
33
- %td= ctx.email_template.slug
18
+ %th.actions Actions
19
+ %th.to To
20
+ %th.subject Subject
21
+ %th.template Template
22
+ %th.created_at Created at
23
+ %th.updated_at Updated at
24
+ %tbody
25
+ - @ctxs.each do |ctx|
26
+ %tr
27
+ %td
28
+ - if ctx.sent_at
29
+ [~]
30
+ - else
31
+ = link_to '[~]', edit_email_context_path(ctx)
32
+ = button_to '[x]', email_context_path(ctx), method: :delete, form_class: :inline, data: { confirm: 'Are you sure?' }
33
+ %td= ctx.to_email
34
+ %td
35
+ = link_to ctx.subject, email_context_path(ctx)
36
+ %td= ctx.email_template.slug
37
+ %td= ctx.created_at.strftime('%Y-%m-%d')
38
+ %td= ctx.updated_at.strftime('%Y-%m-%d')
34
39
 
35
40
 
36
41
  = render 'paginate', resource: @ctxs, param_name: :email_contexts_page, views_prefix: :ish_manager
@@ -7,7 +7,7 @@
7
7
  .col-md-4
8
8
  %ul
9
9
  %li <b>From:</b> #{@ctx.from_email}
10
- %li <b>To Lead:</b> #{@ctx.lead_id ? @ctx.lead.email : '-'}
10
+ %li <b>To Lead:</b> #{link_to @ctx.lead.email, lead_path(@ctx.lead)}
11
11
  %li <b>Subject:</b> #{@ctx.subject}
12
12
 
13
13
  .col-md-4
@@ -2,28 +2,24 @@
2
2
  .email-conversations-show
3
3
 
4
4
  .header.max-width
5
- %i.material-icons mail
6
- Inbox (#{Office::EmailConversation.all.length})
5
+ -# %i.material-icons mail
7
6
 
8
7
  = link_to '[<<-]', email_conversations_path
9
- -# = link_to '[<-]', email_conversations_path
10
- #{@email_conversation.subject}
8
+
9
+ .subject #{@email_conversation.subject}
11
10
  (#{@email_conversation.email_messages.all.count})
12
11
 
13
12
  .tags.max-width
14
- Tags:
13
+ Tags (#{@email_conversation.tags.length}):
15
14
  = @email_conversation.wp_term_ids
16
15
  = @email_conversation.tags.map(&:name).join(", ")
17
16
 
18
17
  .leads.max-width
19
18
  Leads (#{@email_conversation.leads.length}):
20
- %ul
21
- - @email_conversation.leads.each do |p|
22
- %li
23
- = p.email
24
- [existing actions?]
25
- = render 'ish_manager/email_templates/form_reply_2_mini'
26
- = render 'ish_manager/scheduled_actions/form_mini'
19
+ = @email_conversation.leads.map(&:id)
20
+ .leadsC
21
+ = render 'ish_manager/leads/index_rows', leads: @email_conversation.leads
22
+
27
23
 
28
24
 
29
25
  .messages.max-width
@@ -59,7 +55,7 @@
59
55
  %iframe{ name: msg.message_id }
60
56
 
61
57
  .my-actions.hide
62
- = render 'ish_manager/email_templates/form_reply_2_mini'
58
+ = render 'ish_manager/email_contexts/form_reply', lead: lead
63
59
  -# = button_to 'Reply'
64
60
  -# = button_to 'Reply All'
65
61
  -# = button_to 'New Template'
@@ -35,7 +35,9 @@
35
35
  .tab-raw
36
36
  = f.text_area :body
37
37
  .tab-preview
38
- -# .descr= render "ish_manager/email_templates/#{email_template.layout}", ctx: Ish::EmailContext.new, tmpl: email_template
39
- %iframe{ src: email_template_iframe_path(email_template), width: '100%', height: '100%' }
38
+ - if email_template.persisted?
39
+ -# .descr= render "ish_manager/email_templates/#{email_template.layout}", ctx: Ish::EmailContext.new, tmpl: email_template
40
+ %iframe{ src: email_template_iframe_path(email_template), width: '100%', height: '100%' }
40
41
  .actions
41
- = f.submit 'Save'
42
+ = f.submit 'Save'
43
+
@@ -0,0 +1,4 @@
1
+
2
+
3
+ <%= raw @tmpl.body %>
4
+
@@ -1,5 +1,3 @@
1
1
 
2
- - if @email_template.layout == 'plain'
3
- = raw @email_template.body
4
- - else
5
- = render "ish_manager/email_templates/#{@email_template.layout}", ctx: @email_ctx
2
+ -# = render "ish_manager/email_templates/#{@email_template.layout}", ctx: @ctx
3
+ = render "ish_manager/email_templates/#{@email_template.layout}"
@@ -1,4 +1,4 @@
1
1
 
2
2
 
3
- <%= raw @body %>
3
+ <%= raw @tmpl.body %>
4
4
 
@@ -0,0 +1,11 @@
1
+
2
+ .leads--index-rows
3
+ - leads.each do |lead|
4
+ .item
5
+ = link_to lead.email, lead_path(lead)
6
+ \(#{lead.scheduled_email_actions.length} sch
7
+ %span.expand-next [+]
8
+ .expand-hide= render 'ish_manager/scheduled_actions/form_mini'
9
+ \)
10
+ %span.expand-next [reply]
11
+ .expand-hide= render 'ish_manager/email_contexts/form_reply', lead: lead
@@ -11,7 +11,7 @@
11
11
  -# = select_tag :email_campaign_id, options_for_select( @email_campaigns_list )
12
12
  = submit_tag 'Go'
13
13
 
14
- %table.bordered
14
+ %table.bordered.data-table
15
15
  %thead
16
16
  %tr
17
17
  %th &nbsp;
@@ -19,8 +19,8 @@
19
19
  %th Company
20
20
  %th Tag
21
21
  %th created_at
22
- %th (c,s) sends
23
- %th Scheduled Actions
22
+ %th Ctx
23
+ %th Sch
24
24
 
25
25
  %tbody
26
26
  - @leads.each do |lead|
@@ -30,15 +30,16 @@
30
30
  %td= lead.company.company_url
31
31
  %td= lead.wp_tags.map(&:name).join(", ")
32
32
  %td= lead.created_at.to_s[0..10]
33
- %td #{lead.email_campaign_leads.count || '-'}, #{@email_contexts[lead.email] || '-'}
34
- %td
33
+ %td.ctx
34
+ = @email_contexts[lead.email] || '-'
35
+ %td.sch
35
36
  = lead.scheduled_email_actions.length
36
37
  = link_to '[+]', new_scheduled_email_action_path( lead_id: lead.id )
37
- %ul
38
- - lead.scheduled_email_actions.map do |sch_a|
39
- %li
40
- = link_to sch_a.email_action.slug, edit_scheduled_email_action_path( sch_a )
41
- [x]
38
+ -# %ul
39
+ -# - lead.scheduled_email_actions.map do |sch_a|
40
+ -# %li
41
+ -# = link_to sch_a.email_action.slug, edit_scheduled_email_action_path( sch_a )
42
+ -# [x]
42
43
 
43
44
 
44
45
 
@@ -0,0 +1,48 @@
1
+
2
+ .leads-show
3
+
4
+ .header
5
+ %h2.title
6
+ Lead ##{@lead.id}
7
+ = link_to '[~]', edit_lead_path(@lead)
8
+
9
+ %ul
10
+ %li Name: #{@lead.name}
11
+ %li Email: #{@lead.email}
12
+
13
+ .row
14
+ .col-md-6.ctxs
15
+ %h5
16
+ Email Contexts (#{@ctxs.length})
17
+ = link_to '[new]', '#'
18
+ %ul
19
+ - @ctxs.each do |ctx|
20
+ %li
21
+ = link_to ctx.subject, email_context_path(ctx)
22
+ = pp_date ctx.sent_at
23
+ .col-md-6.schs
24
+ %h5
25
+ Scheduled actions (#{@schs.length})
26
+ = link_to '[new]', '#'
27
+ %ul
28
+ - @schs.each do |sch|
29
+ %li
30
+ = link_to sch.email_action.slug, edit_scheduled_email_action_path(sch)
31
+ = sch.state
32
+
33
+
34
+ (#{link_to 'prototype', edit_email_action_path(sch.email_action)})
35
+
36
+ In #{sch.email_action.next_in_days} days at #{sch.email_action.next_at_time}
37
+
38
+
39
+ .row
40
+ .col-md-12.msgs
41
+ %h5 Email Messages (#{@msgs.length})
42
+ %ul
43
+ - @msgs.each do |msg|
44
+ %li= link_to msg.subject, email_conversation_path( msg.conv )
45
+
46
+
47
+
48
+
@@ -0,0 +1,4 @@
1
+
2
+ .scheduled-email-actions-edit.max-width
3
+
4
+ = render 'form', scheduled_email_action: @sch
@@ -2,14 +2,16 @@
2
2
  .scheduled-emails-index.max-width
3
3
  .header
4
4
  %h2
5
- Index
5
+ Scheduled Email Actions
6
6
  -# (#{Sch.kept.count})
7
7
  (#{Sch.all.count})
8
- = link_to '[+]', new_scheduled_email_path
8
+ = link_to '[+]', new_scheduled_email_action_path
9
9
 
10
10
  .items
11
- - @scheduled_emails.each do |sch|
11
+ - @scheduled_email_actions.each do |sch|
12
12
  .item
13
- = sch.interval
14
- = sch.email_template.slug
15
- = sch.lead.email
13
+ <b>Lead:</b> #{link_to sch.lead.email, lead_path(sch.lead)}
14
+ %ul
15
+ -# %li= sch.interval
16
+ %li <b>Tmpl:</b> #{sch.email_action.email_template.slug}
17
+ %li <b>Lead:</b> #{sch.lead.email}
@@ -34,13 +34,11 @@
34
34
  = javascript_include_tag "ish_manager/application"
35
35
 
36
36
  = csrf_meta_tags
37
- %body{ class: [ params[:controller].gsub("ish_manager/",""), "#{params[:controller].gsub("ish_manager/","")}-#{params[:action]}", params[:action]] }
38
- .bg-white
39
- = render :partial => "ish_manager/application/main_header_#{@current_profile.role_name}"
40
- .container.W0
41
- = render 'alerts_notices' if notice || alert
42
- = yield
37
+ %body{ class: [ params[:controller].gsub("ish_manager/",""), "#{params[:controller].gsub("ish_manager/","")}-#{params[:action]}", params[:action], "application-fullwidth" ] }
43
38
 
39
+ = render :partial => "ish_manager/application/main_header_#{@current_profile.role_name}"
40
+ = render 'alerts_notices' if notice || alert
41
+ = yield
44
42
  = render 'ish_manager/application/main_footer'
45
43
  = render 'analytics' if Rails.env.production?
46
44
 
@@ -34,11 +34,13 @@
34
34
  = javascript_include_tag "ish_manager/application"
35
35
 
36
36
  = csrf_meta_tags
37
- %body{ class: [ params[:controller].gsub("ish_manager/",""), "#{params[:controller].gsub("ish_manager/","")}-#{params[:action]}", params[:action], "application-fullwidth" ] }
37
+ %body{ class: [ params[:controller].gsub("ish_manager/",""), "#{params[:controller].gsub("ish_manager/","")}-#{params[:action]}", params[:action]] }
38
+ .bg-white
39
+ = render :partial => "ish_manager/application/main_header_#{@current_profile.role_name}"
40
+ .container.W0
41
+ = render 'alerts_notices' if notice || alert
42
+ = yield
38
43
 
39
- = render :partial => "ish_manager/application/main_header_#{@current_profile.role_name}"
40
- = render 'alerts_notices' if notice || alert
41
- = yield
42
44
  = render 'ish_manager/application/main_footer'
43
45
  = render 'analytics' if Rails.env.production?
44
46
 
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.374
4
+ version: 0.1.8.376
5
5
  platform: ruby
6
6
  authors:
7
7
  - piousbox
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-03-16 00:00:00.000000000 Z
11
+ date: 2023-03-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -206,6 +206,20 @@ dependencies:
206
206
  - - ">="
207
207
  - !ruby/object:Gem::Version
208
208
  version: '0'
209
+ - !ruby/object:Gem::Dependency
210
+ name: business_time
211
+ requirement: !ruby/object:Gem::Requirement
212
+ requirements:
213
+ - - "~>"
214
+ - !ruby/object:Gem::Version
215
+ version: 0.13.0
216
+ type: :runtime
217
+ prerelease: false
218
+ version_requirements: !ruby/object:Gem::Requirement
219
+ requirements:
220
+ - - "~>"
221
+ - !ruby/object:Gem::Version
222
+ version: 0.13.0
209
223
  description: Description of IshManager.
210
224
  email:
211
225
  - piousbox@gmail.com
@@ -384,6 +398,7 @@ files:
384
398
  - app/views/ish_manager/email_actions/new.haml
385
399
  - app/views/ish_manager/email_campaign_leads/show.haml
386
400
  - app/views/ish_manager/email_contexts/_form.haml
401
+ - app/views/ish_manager/email_contexts/_form_reply.haml
387
402
  - app/views/ish_manager/email_contexts/edit.haml
388
403
  - app/views/ish_manager/email_contexts/index.haml
389
404
  - app/views/ish_manager/email_contexts/new.haml
@@ -402,7 +417,6 @@ files:
402
417
  - app/views/ish_manager/email_messages/show_stripped.haml
403
418
  - app/views/ish_manager/email_templates/_form.haml
404
419
  - app/views/ish_manager/email_templates/_form_mini.haml
405
- - app/views/ish_manager/email_templates/_form_reply_2_mini.haml
406
420
  - app/views/ish_manager/email_templates/_form_reply_mini.haml
407
421
  - app/views/ish_manager/email_templates/_form_schedule_mini.haml
408
422
  - app/views/ish_manager/email_templates/_index.haml
@@ -415,6 +429,7 @@ files:
415
429
  - app/views/ish_manager/email_templates/_marketing_wordpress_2.html
416
430
  - app/views/ish_manager/email_templates/_piousbox_roundborders.html.erb
417
431
  - app/views/ish_manager/email_templates/_piousbox_social.html.erb
432
+ - app/views/ish_manager/email_templates/_plain.html.erb
418
433
  - app/views/ish_manager/email_templates/_slug-1.html.erb
419
434
  - app/views/ish_manager/email_templates/_slug-2.html.erb
420
435
  - app/views/ish_manager/email_templates/_slug-3.html.erb
@@ -458,9 +473,11 @@ files:
458
473
  - app/views/ish_manager/kaminari/_prev_page.html.erb
459
474
  - app/views/ish_manager/leads/_form.haml
460
475
  - app/views/ish_manager/leads/_form_import.haml
476
+ - app/views/ish_manager/leads/_index_rows.haml
461
477
  - app/views/ish_manager/leads/edit.haml
462
478
  - app/views/ish_manager/leads/index.haml
463
479
  - app/views/ish_manager/leads/new.haml
480
+ - app/views/ish_manager/leads/show.haml
464
481
  - app/views/ish_manager/leadsets/_form.haml
465
482
  - app/views/ish_manager/leadsets/edit.haml
466
483
  - app/views/ish_manager/leadsets/index.haml
@@ -512,6 +529,7 @@ files:
512
529
  - app/views/ish_manager/reports/show.haml
513
530
  - app/views/ish_manager/scheduled_actions/_form_mini.haml
514
531
  - app/views/ish_manager/scheduled_email_actions/_form.haml
532
+ - app/views/ish_manager/scheduled_email_actions/edit.haml
515
533
  - app/views/ish_manager/scheduled_email_actions/index.haml
516
534
  - app/views/ish_manager/scheduled_email_actions/new.haml
517
535
  - app/views/ish_manager/scheduled_email_actions/show.haml
@@ -544,7 +562,7 @@ files:
544
562
  - app/views/ish_manager/videos/new.haml
545
563
  - app/views/ish_manager/videos/show.haml
546
564
  - app/views/layouts/ish_manager/application.haml
547
- - app/views/layouts/ish_manager/application_fullwidth.haml
565
+ - app/views/layouts/ish_manager/done/20230316 application.haml
548
566
  - app/views/layouts/ish_manager/email_iframe.haml
549
567
  - config/routes.rb
550
568
  - lib/ish_manager.rb
@@ -1,15 +0,0 @@
1
-
2
- .email-templates--form-reply-2-mini.form-mini
3
- = form_for ::Ish::EmailContext.new, url: email_contexts_path do |f|
4
- .field
5
- -# = f.label :template
6
- = f.select :email_template_id, options_for_select( @email_templates_list )
7
- .action
8
- = f.submit 'Reply'
9
-
10
- .field.send-at
11
- -# = f.label :send_at
12
- = f.text_field :send_at, placeholder: 'YYYY-MM-DD', size: 10, class: 'input-date'
13
-
14
- .action
15
- = f.submit 'Schedule'