ish_manager 0.1.8.355 → 0.1.8.356
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/assets/javascripts/ish_manager/application.js +67 -15
- data/app/assets/javascripts/ish_manager/email_contexts.js +1 -1
- data/app/assets/javascripts/ish_manager/email_templates.js +20 -0
- data/app/assets/stylesheets/ish_manager/application.scss +48 -9
- data/app/assets/stylesheets/ish_manager/email.scss +44 -0
- data/app/assets/stylesheets/ish_manager/{email_contexts_templates.scss → email_contexts.scss} +29 -49
- data/app/assets/stylesheets/ish_manager/email_conversations.scss +99 -21
- data/app/assets/stylesheets/ish_manager/email_templates.scss +59 -0
- data/app/assets/stylesheets/ish_manager/leads_leadsets.scss +96 -3
- data/app/assets/stylesheets/ish_manager/scheduled_actions_emails.scss +25 -0
- data/app/assets/stylesheets/ish_manager/tags.scss +5 -0
- data/app/controllers/ish_manager/application_controller.rb +15 -0
- data/app/controllers/ish_manager/email_actions_controller.rb +80 -0
- data/app/controllers/ish_manager/email_campaigns_controller.rb +13 -0
- data/app/controllers/ish_manager/email_contexts_controller.rb +41 -48
- data/app/controllers/ish_manager/email_conversations_controller.rb +6 -2
- data/app/controllers/ish_manager/email_filters_controller.rb +47 -0
- data/app/controllers/ish_manager/email_messages_controller.rb +1 -1
- data/app/controllers/ish_manager/email_templates_controller.rb +23 -10
- data/app/controllers/ish_manager/leads_controller.rb +3 -9
- data/app/controllers/ish_manager/leadset_tags_controller.rb +18 -0
- data/app/controllers/ish_manager/leadsets_controller.rb +13 -0
- data/app/controllers/ish_manager/scheduled_email_actions_controller.rb +38 -0
- data/app/helpers/ish_manager/application_helper.rb +4 -0
- data/app/mailers/ish_manager/office_mailer.rb +10 -9
- data/app/views/ish_manager/application/_debug.haml +2 -1
- data/app/views/ish_manager/application/_main_header_admin.haml +47 -60
- data/app/views/ish_manager/email_actions/_form.haml +42 -0
- data/app/views/ish_manager/email_actions/edit.haml +7 -0
- data/app/views/ish_manager/email_actions/index.haml +24 -0
- data/app/views/ish_manager/email_actions/new.haml +7 -0
- data/app/views/ish_manager/email_contexts/_form.haml +32 -30
- data/app/views/ish_manager/email_contexts/edit.haml +1 -1
- data/app/views/ish_manager/email_contexts/index.haml +27 -22
- data/app/views/ish_manager/email_contexts/show.haml +26 -15
- data/app/views/ish_manager/email_conversations/index.haml +46 -9
- data/app/views/ish_manager/email_conversations/show.haml +56 -21
- data/app/views/ish_manager/email_filters/_form.haml +12 -0
- data/app/views/ish_manager/email_filters/edit.haml +5 -0
- data/app/views/ish_manager/email_filters/index.haml +24 -0
- data/app/views/ish_manager/email_filters/new.haml +5 -0
- data/app/views/ish_manager/email_templates/_form.haml +30 -14
- data/app/views/ish_manager/email_templates/_form_reply_2_mini.haml +15 -0
- data/app/views/ish_manager/email_templates/_form_reply_mini.haml +1 -1
- data/app/views/ish_manager/email_templates/_index.haml +24 -11
- data/app/views/ish_manager/email_templates/_piousbox_roundborders.html.erb +4 -1
- data/app/views/ish_manager/email_templates/done/_form.haml +22 -0
- data/app/views/ish_manager/email_templates/done/_form2.haml +26 -0
- data/app/views/ish_manager/email_templates/edit.haml +2 -1
- data/app/views/ish_manager/email_templates/iframe_src.haml +4 -3
- data/app/views/ish_manager/email_templates/new.haml +5 -0
- data/app/views/ish_manager/email_templates/show.haml +9 -3
- data/app/views/ish_manager/leads/_form.haml +11 -6
- data/app/views/ish_manager/leads/_form_import.haml +3 -3
- data/app/views/ish_manager/leads/edit.haml +19 -16
- data/app/views/ish_manager/leads/index.haml +25 -16
- data/app/views/ish_manager/leads/new.haml +8 -7
- data/app/views/ish_manager/leadsets/index.haml +60 -12
- data/app/views/ish_manager/leadsets/index_dataTables.haml +33 -0
- data/app/views/ish_manager/scheduled_actions/_form_mini.haml +16 -0
- data/app/views/ish_manager/scheduled_email_actions/_form.haml +26 -0
- data/app/views/ish_manager/scheduled_email_actions/index.haml +15 -0
- data/app/views/ish_manager/scheduled_email_actions/new.haml +4 -0
- data/app/views/ish_manager/scheduled_email_actions/show.haml +0 -0
- data/app/views/layouts/ish_manager/application.haml +2 -2
- data/app/views/layouts/ish_manager/application_fullwidth.haml +2 -2
- data/config/routes.rb +10 -2
- metadata +30 -6
- data/app/controllers/ish_manager/office_actions_controller.rb +0 -59
- data/app/views/ish_manager/office_actions/_form.haml +0 -83
- data/app/views/ish_manager/office_actions/index.haml +0 -9
@@ -0,0 +1,24 @@
|
|
1
|
+
|
2
|
+
.email-filters-index
|
3
|
+
.header
|
4
|
+
%h2.title
|
5
|
+
Email Filters (#{@email_filters.length})
|
6
|
+
= link_to '[+]', new_email_filter_path
|
7
|
+
|
8
|
+
%table.bordered
|
9
|
+
%tr
|
10
|
+
%th
|
11
|
+
%th
|
12
|
+
%th From Regex
|
13
|
+
%th Body Regex
|
14
|
+
%th Kind
|
15
|
+
- @email_filters.each do |ef|
|
16
|
+
|
17
|
+
%tr
|
18
|
+
%td= check_box_tag 'checked'
|
19
|
+
%td= link_to '[~]', edit_email_filter_path(ef)
|
20
|
+
%td= ef.from_regex
|
21
|
+
%td= ef.body_regex
|
22
|
+
%td= ef.kind
|
23
|
+
|
24
|
+
|
@@ -1,22 +1,38 @@
|
|
1
1
|
|
2
|
-
- url =
|
2
|
+
- url = email_template.new_record? ? email_templates_path : email_template_path(email_template.id)
|
3
3
|
|
4
4
|
.email-templates--form
|
5
|
+
|
6
|
+
.header
|
7
|
+
%h2 Email Template
|
8
|
+
|
5
9
|
= form_for email_template, url: url do |f|
|
6
|
-
.
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
10
|
+
.row
|
11
|
+
.col-md-4
|
12
|
+
.field
|
13
|
+
= f.label :slug
|
14
|
+
= f.text_field :slug
|
15
|
+
.col-md-4
|
16
|
+
.field
|
17
|
+
= f.label :layout
|
18
|
+
= f.select :layout, options_for_select(Ish::EmailTemplate::LAYOUTS, selected: email_template.layout)
|
19
|
+
.col-md-4
|
20
|
+
.field
|
21
|
+
= f.label "From"
|
22
|
+
= f.select :from_email, options_for_select(Ish::EmailContext.from_email_list, selected: email_template.from_email)
|
15
23
|
.field.field-subject
|
16
24
|
= f.label :subject
|
17
25
|
= f.text_field :subject
|
18
|
-
|
19
|
-
|
20
|
-
|
26
|
+
|
27
|
+
.tab-labels
|
28
|
+
%a.label-raw{ href: "javascript: void(0)", data: { ref: '.tab-raw' } } Raw
|
29
|
+
%a.label-preview.active{ href: "javascript: void(0)", data: { ref: '.tab-preview' } } Preview
|
30
|
+
.label-save-preview= f.submit 'Save & Preview'
|
31
|
+
.tabs
|
32
|
+
.tab-raw
|
33
|
+
= f.text_area :body
|
34
|
+
.tab-preview
|
35
|
+
-# .descr= render "ish_manager/email_templates/#{email_template.layout}", ctx: Ish::EmailContext.new, tmpl: email_template
|
36
|
+
%iframe{ src: email_template_iframe_path(email_template), width: '100%', height: '100%' }
|
21
37
|
.actions
|
22
|
-
= f.submit '
|
38
|
+
= f.submit 'Save'
|
@@ -0,0 +1,15 @@
|
|
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'
|
@@ -3,6 +3,6 @@
|
|
3
3
|
= form_for ::Ish::EmailContext.new, url: email_contexts_path do |f|
|
4
4
|
.field
|
5
5
|
-# = f.label :template
|
6
|
-
= f.select :email_template_id, options_for_select(
|
6
|
+
= f.select :email_template_id, options_for_select( @email_templates_list )
|
7
7
|
.actions
|
8
8
|
= f.submit 'Reply'
|
@@ -1,16 +1,29 @@
|
|
1
1
|
|
2
|
-
%h3.collapse-expand#emailTemplatesIndex
|
3
|
-
Email Templates
|
2
|
+
%h3.center.collapse-expand#emailTemplatesIndex
|
3
|
+
Email Templates (#{Ish::EmailTemplate.all.count})
|
4
4
|
.email-templates-index
|
5
5
|
|
6
|
-
= render 'ish_manager/email_templates/form_mini'
|
7
|
-
|
6
|
+
-# = render 'ish_manager/email_templates/form_mini'
|
7
|
+
|
8
|
+
%table.bordered
|
9
|
+
%tr
|
10
|
+
%th Actions
|
11
|
+
%th Slug
|
12
|
+
%th Created
|
13
|
+
%th Updated
|
14
|
+
|
15
|
+
|
8
16
|
- @templates.each do |tmpl|
|
9
|
-
%
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
= tmpl.slug
|
15
|
-
=
|
17
|
+
%tr
|
18
|
+
%td
|
19
|
+
= link_to '[use]', new_email_context_path({ email_template_id: tmpl.id })
|
20
|
+
= link_to '[~]', edit_email_template_path({ id: tmpl })
|
21
|
+
= button_to '[x]', email_template_path({ id: tmpl }), method: :delete, :data => { :confirm => 'Are you sure?' }, form_class: 'inline'
|
22
|
+
%td= link_to tmpl.slug, email_template_path({ id: tmpl })
|
23
|
+
%td= tmpl.created_at
|
24
|
+
%td= tmpl.updated_at
|
25
|
+
|
26
|
+
-# = link_to 'iFrame', email_template_iframe_path({ id: tmpl }), target: :_blank
|
27
|
+
|
28
|
+
%hr
|
16
29
|
|
@@ -1,3 +1,4 @@
|
|
1
|
+
|
1
2
|
<!doctype html>
|
2
3
|
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" >
|
3
4
|
<head>
|
@@ -907,7 +908,9 @@ h4 {
|
|
907
908
|
<![endif]-->
|
908
909
|
|
909
910
|
<div style="border: 2px solid #999; border-radius: 4px; padding: 1em; margin-bottom: 1em;">
|
910
|
-
|
911
|
+
<!-- herehere -->
|
912
|
+
<%== ERB.new(@tmpl.body).result((@ctx||@tmpl).get_binding) %>
|
913
|
+
|
911
914
|
</div>
|
912
915
|
|
913
916
|
<!--[if mso]>
|
@@ -0,0 +1,22 @@
|
|
1
|
+
|
2
|
+
- url = %w| index new create |.include?( params[:action] ) ? email_templates_path : email_template_path(email_template.id)
|
3
|
+
|
4
|
+
.email-templates--form
|
5
|
+
= form_for email_template, url: url do |f|
|
6
|
+
.field
|
7
|
+
= f.label :type
|
8
|
+
= f.select :type, options_for_select(Ish::EmailTemplate.type_list, selected: email_template.type)
|
9
|
+
.field
|
10
|
+
= f.label :slug
|
11
|
+
= f.text_field :slug
|
12
|
+
.field
|
13
|
+
= f.label :from_email
|
14
|
+
= f.select :from_email, options_for_select(Ish::EmailContext.from_email_list, selected: email_template.from_email)
|
15
|
+
.field.field-subject
|
16
|
+
= f.label :subject
|
17
|
+
= f.text_field :subject
|
18
|
+
.field
|
19
|
+
= f.label :body
|
20
|
+
= f.text_area :body, class: 'tinymce'
|
21
|
+
.actions
|
22
|
+
= f.submit 'Submit'
|
@@ -0,0 +1,26 @@
|
|
1
|
+
|
2
|
+
- url = email_template.new_record? ? email_templates_path : email_template_path(email_template.id)
|
3
|
+
|
4
|
+
.email-templates--form
|
5
|
+
= form_for email_template, url: url do |f|
|
6
|
+
.row
|
7
|
+
.col-md-4
|
8
|
+
.field
|
9
|
+
= f.label :slug
|
10
|
+
= f.text_field :slug
|
11
|
+
.col-md-4
|
12
|
+
.field
|
13
|
+
= f.label :layout
|
14
|
+
= f.select :layout, options_for_select(Ish::EmailTemplate::LAYOUTS, selected: email_template.layout)
|
15
|
+
.col-md-4
|
16
|
+
.field
|
17
|
+
= f.label "From"
|
18
|
+
= f.select :from_email, options_for_select(Ish::EmailContext.from_email_list, selected: email_template.from_email)
|
19
|
+
.field.field-subject
|
20
|
+
= f.label :subject
|
21
|
+
= f.text_field :subject
|
22
|
+
.field
|
23
|
+
-# = f.label :body
|
24
|
+
= f.text_area :body, class: 'tinymce'
|
25
|
+
.actions
|
26
|
+
= f.submit 'Submit'
|
@@ -1,4 +1,5 @@
|
|
1
1
|
|
2
|
-
|
3
|
-
|
4
|
-
|
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
|
@@ -1,7 +1,13 @@
|
|
1
1
|
|
2
|
-
= render 'index'
|
3
|
-
|
2
|
+
-# = render 'index'
|
3
|
+
|
4
4
|
.email-templates-show
|
5
|
-
|
5
|
+
.header
|
6
|
+
%h2.title
|
7
|
+
= @email_template.slug
|
8
|
+
= link_to '[~]', edit_email_template_path( @email_template )
|
9
|
+
= link_to '[src ^]', '#'
|
10
|
+
= link_to '[preview ^]', '#'
|
11
|
+
= link_to '[use]', '#'
|
6
12
|
|
7
13
|
%iframe{ src: email_template_iframe_path(@email_template.slug), width: '100%', height: '100%' }
|
@@ -1,19 +1,24 @@
|
|
1
1
|
|
2
|
-
- url = lead.
|
2
|
+
- url = lead.new_record? ? leads_path : lead_path( lead.id )
|
3
3
|
|
4
4
|
= form_for lead, :as => :lead, :url => url do |f|
|
5
|
+
|
5
6
|
.field
|
6
7
|
= f.label :name
|
7
8
|
= f.text_field :name
|
9
|
+
|
8
10
|
.field
|
9
11
|
= f.label :email
|
10
12
|
= f.text_field :email
|
13
|
+
|
11
14
|
.field
|
12
|
-
= f.label
|
13
|
-
= f.select :m3_leadset_id, options_for_select(@leadsets_list, selected: lead.m3_leadset_id), { include_blank: true }, {class: 'select2' }
|
14
|
-
|
15
|
-
|
16
|
-
|
15
|
+
= f.label "Leadset (company)"
|
16
|
+
= f.select :m3_leadset_id, options_for_select(@leadsets_list, selected: lead.m3_leadset_id), { include_blank: true }, { class: 'select2' }
|
17
|
+
|
18
|
+
-# .field
|
19
|
+
-# = f.label "Tags"
|
20
|
+
-# = f.text_field :wp_tags
|
21
|
+
|
17
22
|
.actions
|
18
23
|
= f.submit
|
19
24
|
|
@@ -11,9 +11,9 @@
|
|
11
11
|
-# %label Leadset
|
12
12
|
-# = select_tag :leadset_id, options_for_select(@leadsets_list), class: 'select2'
|
13
13
|
|
14
|
-
.field
|
15
|
-
|
16
|
-
|
14
|
+
-# .field
|
15
|
+
-# %label Campaign
|
16
|
+
-# = select_tag :email_campaign_id, options_for_select(@email_campaigns_list), class: 'select2'
|
17
17
|
|
18
18
|
.actions
|
19
19
|
= submit_tag 'Submit'
|
@@ -1,19 +1,22 @@
|
|
1
1
|
|
2
|
-
|
3
|
-
|
2
|
+
.leads-edit.max-width
|
3
|
+
.header
|
4
|
+
%h2.title Edit lead
|
4
5
|
|
5
|
-
|
6
|
-
%h1 Email Campaigns:
|
7
|
-
%ul
|
8
|
-
- @lead.email_campaign_leads.each do |x|
|
9
|
-
%li
|
10
|
-
<b>Sent on ::</b> #{x.sent_at.to_s[0..10]}
|
11
|
-
<b>Slug ::</b> #{x.email_campaign.slug}
|
6
|
+
= render 'form', :lead => @lead
|
12
7
|
|
13
|
-
%hr
|
14
|
-
%h1
|
15
|
-
%ul
|
16
|
-
- @lead.
|
17
|
-
|
18
|
-
|
19
|
-
|
8
|
+
-# %hr
|
9
|
+
-# %h1 Email Campaigns:
|
10
|
+
-# %ul
|
11
|
+
-# - @lead.email_campaign_leads.each do |x|
|
12
|
+
-# %li
|
13
|
+
-# <b>Sent on ::</b> #{x.sent_at.to_s[0..10]}
|
14
|
+
-# <b>Slug ::</b> #{x.email_campaign.slug}
|
15
|
+
|
16
|
+
-# %hr
|
17
|
+
-# %h1 Single Emails:
|
18
|
+
-# %ul
|
19
|
+
-# - @lead.email_contexts.each do |x|
|
20
|
+
-# %li
|
21
|
+
-# <b>Sent at ::</b> #{x.sent_at.to_s[0..10]}
|
22
|
+
-# <b>Subject ::</b> #{x.subject}
|
@@ -1,37 +1,46 @@
|
|
1
1
|
|
2
|
-
.
|
3
|
-
|
4
|
-
|
5
|
-
|
2
|
+
.leads-index
|
3
|
+
.header
|
4
|
+
%h2.title
|
5
|
+
#{link_to 'Leads', leads_path} (#{::Lead.all.count})
|
6
|
+
= link_to raw("<i class='fa fa-plus-square'></i>"), new_lead_path
|
6
7
|
|
7
8
|
= form_tag leads_bulkop_path do
|
8
9
|
= label_tag 'Act on Selected:'
|
9
10
|
= select_tag :a, options_for_select( %w| delete add_to_campaign | )
|
10
|
-
= select_tag :email_campaign_id, options_for_select( @email_campaigns_list )
|
11
|
+
-# = select_tag :email_campaign_id, options_for_select( @email_campaigns_list )
|
11
12
|
= submit_tag 'Go'
|
12
13
|
|
13
|
-
%table
|
14
|
+
%table.bordered
|
14
15
|
%thead
|
15
16
|
%tr
|
16
17
|
%th
|
17
|
-
%th Name
|
18
|
+
%th Name/Email
|
18
19
|
%th Company
|
19
|
-
%th Email
|
20
20
|
%th Tag
|
21
21
|
%th created_at
|
22
|
-
%th
|
23
|
-
%th
|
22
|
+
%th (c,s) sends
|
23
|
+
%th Scheduled Actions
|
24
24
|
|
25
25
|
%tbody
|
26
26
|
- @leads.each do |lead|
|
27
27
|
%tr
|
28
28
|
%td= check_box_tag 'lead_ids[]', lead.id
|
29
|
-
%td= link_to lead.name, lead_path( lead )
|
30
|
-
%td= lead.
|
31
|
-
%td= lead.
|
32
|
-
%td= lead.tag
|
29
|
+
%td= link_to "#{lead.name} <#{lead.email}>", lead_path( lead )
|
30
|
+
%td= lead.leadsets.first&.name
|
31
|
+
%td= lead.wp_tags.map(&:name).join(", ")
|
33
32
|
%td= lead.created_at.to_s[0..10]
|
34
|
-
%td
|
35
|
-
%td
|
33
|
+
%td #{lead.email_campaign_leads.count || '-'}, #{@email_contexts[lead.email] || '-'}
|
34
|
+
%td
|
35
|
+
= lead.scheduled_email_actions.length
|
36
|
+
= 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]
|
42
|
+
|
43
|
+
|
44
|
+
|
36
45
|
|
37
46
|
|
@@ -1,8 +1,9 @@
|
|
1
1
|
|
2
|
-
.
|
3
|
-
.
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
2
|
+
.leads-new.max-width
|
3
|
+
.row
|
4
|
+
.col-sm-12.col-md-6
|
5
|
+
%h1 New Lead
|
6
|
+
= render 'form', :lead => @new_lead
|
7
|
+
.col-sm-12.col-md-6
|
8
|
+
%h1 Import Leads
|
9
|
+
= render 'form_import'
|
@@ -2,31 +2,79 @@
|
|
2
2
|
.manager-leadsets-index
|
3
3
|
%h5
|
4
4
|
= link_to 'Leadsets', leadsets_path
|
5
|
-
(#{Leadset.
|
5
|
+
(#{Leadset.kept.length})
|
6
|
+
(trash: #{Leadset.discarded.length})
|
6
7
|
= link_to raw("<i class='fa fa-plus-square'></i>"), new_leadset_path
|
7
8
|
|
8
9
|
.actions
|
9
10
|
%label.select-all
|
10
11
|
= check_box_tag :select_all
|
11
12
|
select all
|
12
|
-
|
13
|
+
.n-selected -
|
13
14
|
= button_tag 'Delete', method: :delete, class: 'delete-btn'
|
14
15
|
|
15
|
-
%table
|
16
|
+
%table
|
16
17
|
%thead
|
17
18
|
%tr
|
18
19
|
%th
|
19
|
-
%th created at
|
20
|
-
%th Name
|
21
|
-
%th Tag
|
20
|
+
-# %th created at
|
21
|
+
-# %th Name
|
22
22
|
%th.company-url Company Url
|
23
|
-
%th
|
23
|
+
%th Tags
|
24
|
+
%th +
|
25
|
+
%th.leads Leads
|
24
26
|
%tbody
|
25
|
-
- @leadsets.
|
27
|
+
- @leadsets.each_with_index do |leadset, idx1|
|
26
28
|
%tr
|
27
29
|
%td= check_box_tag 'leadset_ids[]', leadset.id, nil, { class: 'i-sel' }
|
28
|
-
%td= leadset.created_at.strftime("%Y-%m-%d %H:%M")
|
29
|
-
%td= link_to leadset.name, leadset_path( leadset )
|
30
|
-
%td= leadset.tag
|
30
|
+
-# %td= leadset.created_at.strftime("%Y-%m-%d %H:%M%P")
|
31
|
+
-# %td= link_to leadset.name, leadset_path( leadset )
|
31
32
|
%td= link_to leadset.company_url, leadset.company_url
|
32
|
-
%td
|
33
|
+
%td.tags
|
34
|
+
|
35
|
+
- leadset.wp_tags.each_with_index do |tag, idx2|
|
36
|
+
.chip
|
37
|
+
= tag.name
|
38
|
+
|
39
|
+
%td.tags-add
|
40
|
+
%i.fa.fa-plus.expand-next
|
41
|
+
= form_tag leadset_tags_path, { class: 'tags--form-mini form-mini', style: 'display: none' } do
|
42
|
+
.header
|
43
|
+
%h5 Add a Tag
|
44
|
+
= hidden_field_tag :leadset_id, leadset.id.to_s
|
45
|
+
= select_tag :term_id, options_for_select( @tags_list ), class: [ 'select2' ]
|
46
|
+
.actions
|
47
|
+
= submit_tag 'Add'
|
48
|
+
|
49
|
+
%td.leads
|
50
|
+
-# = leadset.leads.count
|
51
|
+
- leadset.leads.each do |lead|
|
52
|
+
.item
|
53
|
+
|
54
|
+
.chip
|
55
|
+
-# = lead.email
|
56
|
+
= link_to lead.name, lead_path( lead )
|
57
|
+
|
58
|
+
.relative
|
59
|
+
%a.chip{ href: email_contexts_for_lead_path( lead ) }
|
60
|
+
\(
|
61
|
+
= lead.email_contexts.count
|
62
|
+
%i.fa.fa-envelope
|
63
|
+
\)
|
64
|
+
|
65
|
+
.relative
|
66
|
+
%i.fa.fa-pencil.expand-next
|
67
|
+
%form.form-mini{ style: 'display: none' }
|
68
|
+
Editing...
|
69
|
+
|
70
|
+
.relative
|
71
|
+
%i.fa.fa-clock-o.expand-next
|
72
|
+
= render 'ish_manager/scheduled_emails/form', scheduled_email: Sch.new({ lead_id: lead.id })
|
73
|
+
|
74
|
+
.scheduled
|
75
|
+
- lead.scheduled_emails.each do |sch|
|
76
|
+
.chip
|
77
|
+
.interval= sch.interval
|
78
|
+
.tmpl= sch.email_template.slug
|
79
|
+
|
80
|
+
|
@@ -0,0 +1,33 @@
|
|
1
|
+
|
2
|
+
.manager-leadsets-index
|
3
|
+
%h5
|
4
|
+
= link_to 'Leadsets', leadsets_path
|
5
|
+
(#{Leadset.kept.length})
|
6
|
+
(trash: #{Leadset.discarded.length})
|
7
|
+
= link_to raw("<i class='fa fa-plus-square'></i>"), new_leadset_path
|
8
|
+
|
9
|
+
.actions
|
10
|
+
%label.select-all
|
11
|
+
= check_box_tag :select_all
|
12
|
+
select all
|
13
|
+
%label.n-selected -
|
14
|
+
= button_tag 'Delete', method: :delete, class: 'delete-btn'
|
15
|
+
|
16
|
+
%table.data-table.compact
|
17
|
+
%thead
|
18
|
+
%tr
|
19
|
+
%th
|
20
|
+
%th created at
|
21
|
+
%th Name
|
22
|
+
%th Tag
|
23
|
+
%th.company-url Company Url
|
24
|
+
%th Location
|
25
|
+
%tbody
|
26
|
+
- @leadsets.each do |leadset|
|
27
|
+
%tr
|
28
|
+
%td= check_box_tag 'leadset_ids[]', leadset.id, nil, { class: 'i-sel' }
|
29
|
+
%td= leadset.created_at.strftime("%Y-%m-%d %H:%M")
|
30
|
+
%td= link_to leadset.name, leadset_path( leadset )
|
31
|
+
%td= leadset.tag
|
32
|
+
%td= link_to leadset.company_url, leadset.company_url
|
33
|
+
%td= leadset.location
|
@@ -0,0 +1,16 @@
|
|
1
|
+
|
2
|
+
.scheduled-actions--form-mini
|
3
|
+
|
4
|
+
%form
|
5
|
+
.field
|
6
|
+
%label Every
|
7
|
+
= text_field_tag :every_min_days, nil, placeholder: 'min', size: 3, class: 'input-mini'
|
8
|
+
%label -
|
9
|
+
= text_field_tag :every_max_days, nil, placeholder: 'max', size: 3, class: 'input-mini'
|
10
|
+
%label Days
|
11
|
+
|
12
|
+
.field
|
13
|
+
= select_tag :email_template_id, options_for_select( @email_templates_list )
|
14
|
+
|
15
|
+
.action
|
16
|
+
= button_tag 'Schedule'
|
@@ -0,0 +1,26 @@
|
|
1
|
+
|
2
|
+
-#
|
3
|
+
-# scheduled_emails / _form
|
4
|
+
-#
|
5
|
+
|
6
|
+
- sch_a = scheduled_email_action
|
7
|
+
- url = sch_a.new_record? ? scheduled_email_actions_path : scheduled_email_action_path(sch_a.id)
|
8
|
+
|
9
|
+
|
10
|
+
= form_for scheduled_email_action, url: url, html: { class: "form-mini" } do |f|
|
11
|
+
.header
|
12
|
+
%h5.title Schedule an email action
|
13
|
+
|
14
|
+
.field
|
15
|
+
%label Lead
|
16
|
+
= select_tag :lead_id, options_for_select( @leads_list, selected: sch_a[:lead_id]||params[:lead_id] ), class: 'select2'
|
17
|
+
.field
|
18
|
+
%label State
|
19
|
+
= f.select :state, options_for_select(::Office::ScheduledEmailAction::STATES, selected: sch_a.state ), class: 'select2'
|
20
|
+
%br
|
21
|
+
.field
|
22
|
+
%label Email Action
|
23
|
+
= select_tag :email_action_id, options_for_select( @email_actions_list, selected: sch_a[:email_action_id] ), class: 'select2'
|
24
|
+
|
25
|
+
.actions
|
26
|
+
= submit_tag 'Schedule'
|
@@ -0,0 +1,15 @@
|
|
1
|
+
|
2
|
+
.scheduled-emails-index.max-width
|
3
|
+
.header
|
4
|
+
%h2
|
5
|
+
Index
|
6
|
+
-# (#{Sch.kept.count})
|
7
|
+
(#{Sch.all.count})
|
8
|
+
= link_to '[+]', new_scheduled_email_path
|
9
|
+
|
10
|
+
.items
|
11
|
+
- @scheduled_emails.each do |sch|
|
12
|
+
.item
|
13
|
+
= sch.interval
|
14
|
+
= sch.email_template.slug
|
15
|
+
= sch.lead.email
|
File without changes
|
@@ -22,8 +22,8 @@
|
|
22
22
|
= javascript_include_tag "//cdn.jsdelivr.net/npm/popper.js@1.14.7/dist/umd/popper.min.js"
|
23
23
|
= javascript_include_tag "//cdn.jsdelivr.net/npm/bootstrap@4.3.1/dist/js/bootstrap.min.js"
|
24
24
|
|
25
|
-
= stylesheet_link_tag "//cdn.jsdelivr.net/npm/select2@4.
|
26
|
-
= javascript_include_tag "//cdn.jsdelivr.net/npm/select2@4.
|
25
|
+
= stylesheet_link_tag "//cdn.jsdelivr.net/npm/select2@4.0.0/dist/css/select2.min.css"
|
26
|
+
= javascript_include_tag "//cdn.jsdelivr.net/npm/select2@4.0.0/dist/js/select2.min.js"
|
27
27
|
|
28
28
|
- # @TODO: document? test-drive?
|
29
29
|
- if @include_materialize
|
@@ -22,8 +22,8 @@
|
|
22
22
|
= javascript_include_tag "//cdn.jsdelivr.net/npm/popper.js@1.14.7/dist/umd/popper.min.js"
|
23
23
|
= javascript_include_tag "//cdn.jsdelivr.net/npm/bootstrap@4.3.1/dist/js/bootstrap.min.js"
|
24
24
|
|
25
|
-
= stylesheet_link_tag "//cdn.jsdelivr.net/npm/select2@4.
|
26
|
-
= javascript_include_tag "//cdn.jsdelivr.net/npm/select2@4.
|
25
|
+
= stylesheet_link_tag "//cdn.jsdelivr.net/npm/select2@4.0.0/dist/css/select2.min.css"
|
26
|
+
= javascript_include_tag "//cdn.jsdelivr.net/npm/select2@4.0.0/dist/js/select2.min.js"
|
27
27
|
|
28
28
|
- # @TODO: document? test-drive?
|
29
29
|
- if @include_materialize
|