ish_manager 0.1.8.329 → 0.1.8.331
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/ish_manager/application_controller.rb +0 -10
- data/app/controllers/ish_manager/email_campaign_leads_controller.rb +75 -0
- data/app/controllers/ish_manager/email_contexts_controller.rb +4 -4
- data/app/controllers/ish_manager/leads_controller.rb +32 -12
- data/app/controllers/ish_manager/leadsets_controller.rb +54 -0
- data/app/jobs/ish_manager/application_job.rb +6 -3
- data/app/jobs/ish_manager/email_campaign_job.rb +31 -0
- data/app/jobs/ish_manager/test_email_job.rb +2 -2
- data/app/mailers/ish_manager/office_mailer.rb +43 -48
- data/app/views/ish_manager/application/_main_header_admin.haml +8 -6
- data/app/views/ish_manager/email_campaign_leads/show.haml +4 -0
- data/app/views/ish_manager/email_contexts/show.haml +17 -6
- data/app/views/ish_manager/leads/_form.haml +9 -32
- data/app/views/ish_manager/leads/index.haml +27 -37
- data/app/views/ish_manager/leadsets/_form.haml +42 -0
- data/app/views/ish_manager/leadsets/edit.haml +3 -0
- data/app/views/ish_manager/leadsets/index.haml +26 -0
- data/app/views/ish_manager/leadsets/new.haml +5 -0
- data/config/routes.rb +6 -2
- metadata +10 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ea3bb9e8478a3740acd8face114c1d16491a498fa82cbac06aa3a5c77064c069
|
4
|
+
data.tar.gz: 2d75939c23022bacb43b4a18a9ef02b73d55fb6147aaeaafc4c94c9f84ddd19b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 35c09d4bffc777f892146892d7f2abf66c3cdfa2cc6f1ed45c65640d99b1fcd0140c253f126025a6771ecf64bb06c944124a694500727ed83469e12c16311ea7
|
7
|
+
data.tar.gz: 6db56a549845261b39cb2d2053b66bd51c030e3605712a101a28f50f847bafca9d9a487ec1abc0f401b7e511892b71bdc3359ee7394b37c96656bc7d9f39ffbb
|
@@ -26,16 +26,6 @@ module IshManager
|
|
26
26
|
@current_ability ||= ::IshManager::Ability.new( @current_profile )
|
27
27
|
end
|
28
28
|
|
29
|
-
# @TODO: obsolete, remove _vp_ 2022-10-15
|
30
|
-
def set_lists
|
31
|
-
# alphabetized! : )
|
32
|
-
@galleries_list = Gallery.all.list
|
33
|
-
@maps_list = ::Gameui::Map.list # @TODO: missing nonpublic!
|
34
|
-
@reports_list = Report.all.list
|
35
|
-
@user_profiles_list = Ish::UserProfile.list
|
36
|
-
@videos_list = Video.all.list
|
37
|
-
end
|
38
|
-
|
39
29
|
def access_denied exception
|
40
30
|
store_location_for :user, request.path
|
41
31
|
redirect_to user_signed_in? ? root_path : Rails.application.routes.url_helpers.new_user_session_path, :alert => exception.message
|
@@ -0,0 +1,75 @@
|
|
1
|
+
|
2
|
+
class ::IshManager::EmailCampaignLeadsController < IshManager::ApplicationController
|
3
|
+
|
4
|
+
# before_action :set_lists
|
5
|
+
|
6
|
+
## alphabetized : )
|
7
|
+
|
8
|
+
# def bulkop
|
9
|
+
# authorize! :bulkop, ::Lead
|
10
|
+
# case params[:a]
|
11
|
+
# when 'add_to_campaign'
|
12
|
+
# c = EmailCampaign.find params[:email_campaign_id]
|
13
|
+
# params[:lead_ids].each do |lead_id|
|
14
|
+
# c_lead = EmailCampaignLead.new( lead_id: lead_id, email_campaign_id: c.id )
|
15
|
+
# flag = c_lead.save
|
16
|
+
# if !flag
|
17
|
+
# puts! c_lead.errors.full_messages.join(", ")
|
18
|
+
# end
|
19
|
+
# end
|
20
|
+
# flash[:notice] = 'Done acted; See logs.'
|
21
|
+
# redirect_to action: :index
|
22
|
+
# end
|
23
|
+
# end
|
24
|
+
|
25
|
+
# def create
|
26
|
+
# @lead = ::Lead.new params[:lead].permit!
|
27
|
+
# authorize! :create, @lead
|
28
|
+
# if @lead.save
|
29
|
+
# flash[:notice] = "created lead"
|
30
|
+
# else
|
31
|
+
# flash[:alert] = "Cannot create lead: #{@lead.errors.messages}"
|
32
|
+
# end
|
33
|
+
# redirect_to :action => 'index'
|
34
|
+
# end
|
35
|
+
|
36
|
+
# def edit
|
37
|
+
# @lead = ::Lead.find params[:id]
|
38
|
+
# authorize! :edit, @lead
|
39
|
+
# end
|
40
|
+
|
41
|
+
# def index
|
42
|
+
# authorize! :index, ::Lead
|
43
|
+
# @leads = ::Lead.all.includes( :leadset )
|
44
|
+
# end
|
45
|
+
|
46
|
+
# def new
|
47
|
+
# @new_lead = ::Lead.new
|
48
|
+
# authorize! :new, @new_lead
|
49
|
+
# end
|
50
|
+
|
51
|
+
def show
|
52
|
+
@c_lead = ::EmailCampaignLead.find params[:id]
|
53
|
+
authorize! :show, @c_lead
|
54
|
+
|
55
|
+
end
|
56
|
+
|
57
|
+
# def update
|
58
|
+
# @lead = ::Lead.find params[:id]
|
59
|
+
# authorize! :update, @lead
|
60
|
+
# if @lead.update_attributes params[:lead].permit!
|
61
|
+
# flash[:notice] = 'Successfully updated lead.'
|
62
|
+
# else
|
63
|
+
# flash[:alert] = "Cannot update lead: #{@lead.errors.messages}"
|
64
|
+
# end
|
65
|
+
# redirect_to :action => 'index'
|
66
|
+
# end
|
67
|
+
|
68
|
+
private
|
69
|
+
|
70
|
+
# def set_lists
|
71
|
+
# @leadsets_list = [ [nil,nil] ] + ::Leadset.all.map { |k| [ k.name, k.id ] }
|
72
|
+
# @email_campaigns_list = [ [nil,nil] ] + Ish::EmailContext.all_campaigns.map { |k| [ k.slug, k.id ] }
|
73
|
+
# end
|
74
|
+
|
75
|
+
end
|
@@ -20,7 +20,7 @@ class ::IshManager::EmailContextsController < ::IshManager::ApplicationControlle
|
|
20
20
|
end
|
21
21
|
|
22
22
|
def destroy
|
23
|
-
@email_ctx = EmailContext.find params[:id]
|
23
|
+
@email_ctx = Ish::EmailContext.find params[:id]
|
24
24
|
authorize! :destroy, @email_ctx
|
25
25
|
flag = @email_ctx.destroy
|
26
26
|
if flag
|
@@ -33,14 +33,14 @@ class ::IshManager::EmailContextsController < ::IshManager::ApplicationControlle
|
|
33
33
|
|
34
34
|
def do_send
|
35
35
|
@ctx = ::Ish::EmailContext.find params[:id]
|
36
|
-
authorize! :
|
36
|
+
authorize! :do_send, @ctx
|
37
37
|
case @ctx.type
|
38
38
|
when ::Ish::EmailContext::TYPE_SINGLE
|
39
39
|
flash[:notice] = 'Scheduled a single send'
|
40
40
|
IshManager::OfficeMailer.send_context_email(params[:id]).deliver_later
|
41
41
|
when ::Ish::EmailContext::TYPE_CAMPAIGN
|
42
42
|
flash[:notice] = 'Scheduled campaign send'
|
43
|
-
IshManager::
|
43
|
+
IshManager::EmailCampaignJob.perform_later(params[:id])
|
44
44
|
end
|
45
45
|
|
46
46
|
redirect_to action: 'index'
|
@@ -52,7 +52,7 @@ class ::IshManager::EmailContextsController < ::IshManager::ApplicationControlle
|
|
52
52
|
end
|
53
53
|
|
54
54
|
def iframe_src
|
55
|
-
@email_ctx = EmailContext.find params[:id]
|
55
|
+
@email_ctx = Ish::EmailContext.find params[:id]
|
56
56
|
authorize! :iframe_src, @email_ctx
|
57
57
|
@email_template = @email_ctx.email_template
|
58
58
|
case @email_template.type
|
@@ -1,11 +1,29 @@
|
|
1
1
|
|
2
2
|
class ::IshManager::LeadsController < IshManager::ApplicationController
|
3
3
|
|
4
|
+
before_action :set_lists
|
5
|
+
|
4
6
|
## alphabetized : )
|
5
7
|
|
8
|
+
def bulkop
|
9
|
+
authorize! :bulkop, ::Lead
|
10
|
+
case params[:a]
|
11
|
+
when 'add_to_campaign'
|
12
|
+
c = EmailCampaign.find params[:email_campaign_id]
|
13
|
+
params[:lead_ids].each do |lead_id|
|
14
|
+
c_lead = EmailCampaignLead.new( lead_id: lead_id, email_campaign_id: c.id )
|
15
|
+
flag = c_lead.save
|
16
|
+
if !flag
|
17
|
+
puts! c_lead.errors.full_messages.join(", ")
|
18
|
+
end
|
19
|
+
end
|
20
|
+
flash[:notice] = 'Done acted; See logs.'
|
21
|
+
redirect_to action: :index
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
6
25
|
def create
|
7
|
-
@lead =
|
8
|
-
@lead.profile = @current_profile
|
26
|
+
@lead = ::Lead.new params[:lead].permit!
|
9
27
|
authorize! :create, @lead
|
10
28
|
if @lead.save
|
11
29
|
flash[:notice] = "created lead"
|
@@ -16,22 +34,17 @@ class ::IshManager::LeadsController < IshManager::ApplicationController
|
|
16
34
|
end
|
17
35
|
|
18
36
|
def edit
|
19
|
-
@lead =
|
37
|
+
@lead = ::Lead.find params[:id]
|
20
38
|
authorize! :edit, @lead
|
21
39
|
end
|
22
40
|
|
23
41
|
def index
|
24
|
-
authorize! :index,
|
25
|
-
@leads =
|
26
|
-
if params[:is_done]
|
27
|
-
@leads = @leads.where( :is_done => true )
|
28
|
-
else
|
29
|
-
@leads = @leads.where( :is_done => false )
|
30
|
-
end
|
42
|
+
authorize! :index, ::Lead
|
43
|
+
@leads = ::Lead.all.includes( :leadset )
|
31
44
|
end
|
32
45
|
|
33
46
|
def new
|
34
|
-
@new_lead =
|
47
|
+
@new_lead = ::Lead.new
|
35
48
|
authorize! :new, @new_lead
|
36
49
|
end
|
37
50
|
|
@@ -41,7 +54,7 @@ class ::IshManager::LeadsController < IshManager::ApplicationController
|
|
41
54
|
end
|
42
55
|
|
43
56
|
def update
|
44
|
-
@lead =
|
57
|
+
@lead = ::Lead.find params[:id]
|
45
58
|
authorize! :update, @lead
|
46
59
|
if @lead.update_attributes params[:lead].permit!
|
47
60
|
flash[:notice] = 'Successfully updated lead.'
|
@@ -51,4 +64,11 @@ class ::IshManager::LeadsController < IshManager::ApplicationController
|
|
51
64
|
redirect_to :action => 'index'
|
52
65
|
end
|
53
66
|
|
67
|
+
private
|
68
|
+
|
69
|
+
def set_lists
|
70
|
+
@leadsets_list = [ [nil,nil] ] + ::Leadset.all.map { |k| [ k.name, k.id ] }
|
71
|
+
@email_campaigns_list = [ [nil,nil] ] + Ish::EmailContext.all_campaigns.map { |k| [ k.slug, k.id ] }
|
72
|
+
end
|
73
|
+
|
54
74
|
end
|
@@ -0,0 +1,54 @@
|
|
1
|
+
|
2
|
+
class ::IshManager::LeadsetsController < IshManager::ApplicationController
|
3
|
+
|
4
|
+
## alphabetized : )
|
5
|
+
|
6
|
+
def create
|
7
|
+
@leadset = Leadset.new params[:leadset].permit!
|
8
|
+
@leadset.profile = @current_profile
|
9
|
+
authorize! :create, @leadset
|
10
|
+
if @leadset.save
|
11
|
+
flash[:notice] = "created leadset"
|
12
|
+
else
|
13
|
+
flash[:alert] = "Cannot create leadset: #{@leadset.errors.messages}"
|
14
|
+
end
|
15
|
+
redirect_to :action => 'index'
|
16
|
+
end
|
17
|
+
|
18
|
+
def edit
|
19
|
+
@leadset = Leadset.find params[:id]
|
20
|
+
authorize! :edit, @leadset
|
21
|
+
end
|
22
|
+
|
23
|
+
def index
|
24
|
+
authorize! :index, Leadset
|
25
|
+
@leadsets = Leadset.all # where( :profile => @current_profile, :is_trash => false )
|
26
|
+
# if params[:is_done]
|
27
|
+
# @leadsets = @leadsets.where( :is_done => true )
|
28
|
+
# else
|
29
|
+
# @leadsets = @leadsets.where( :is_done => false )
|
30
|
+
# end
|
31
|
+
end
|
32
|
+
|
33
|
+
def new
|
34
|
+
@new_leadset = Leadset.new
|
35
|
+
authorize! :new, @new_leadset
|
36
|
+
end
|
37
|
+
|
38
|
+
def show
|
39
|
+
authorize! :redirect, IshManager::Ability
|
40
|
+
redirect_to :action => :edit, :id => params[:id]
|
41
|
+
end
|
42
|
+
|
43
|
+
def update
|
44
|
+
@leadset = Leadset.find params[:id]
|
45
|
+
authorize! :update, @leadset
|
46
|
+
if @leadset.update_attributes params[:leadset].permit!
|
47
|
+
flash[:notice] = 'Successfully updated leadset.'
|
48
|
+
else
|
49
|
+
flash[:alert] = "Cannot update leadset: #{@leadset.errors.messages}"
|
50
|
+
end
|
51
|
+
redirect_to :action => 'index'
|
52
|
+
end
|
53
|
+
|
54
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
|
2
|
+
##
|
3
|
+
## EmailContext is mongoid
|
4
|
+
##
|
5
|
+
class IshManager::EmailCampaignJob < ApplicationJob
|
6
|
+
include Sidekiq::Worker
|
7
|
+
Sidekiq_options queue: "default"
|
8
|
+
|
9
|
+
def perform campaign_id
|
10
|
+
@ctx = @campaign = ::Ish::EmailContext.find campaign_id
|
11
|
+
print "Sending #{@campaign.slug}:"
|
12
|
+
|
13
|
+
if @ctx.email_template.type != 'partial'
|
14
|
+
raise "only `partial` template type is supported for campaigns."
|
15
|
+
end
|
16
|
+
|
17
|
+
if @ctx.sent_at
|
18
|
+
raise 'This campaign has already been sent!'
|
19
|
+
end
|
20
|
+
|
21
|
+
@ctx.campaign_leads.each do |campaign_lead|
|
22
|
+
IshManager::OfficeMailer.send_campaign_email( campaign_id, campaign_lead.id ).deliver_later
|
23
|
+
print '.'
|
24
|
+
end
|
25
|
+
|
26
|
+
@campaign.update_attributes({ sent_at: Time.now })
|
27
|
+
|
28
|
+
puts 'ok'
|
29
|
+
end
|
30
|
+
|
31
|
+
end
|
@@ -1,57 +1,52 @@
|
|
1
1
|
|
2
2
|
class IshManager::OfficeMailer < IshManager::ApplicationMailer
|
3
3
|
|
4
|
-
def
|
5
|
-
@ctx = ::Ish::EmailContext.find campaign_id
|
6
|
-
|
7
|
-
actl.instance_variable_set( :@ctx, @ctx )
|
4
|
+
def send_campaign_email campaign_id, c_lead_id
|
5
|
+
@ctx = @campaign = ::Ish::EmailContext.find campaign_id
|
6
|
+
@lead = EmailCampaignLead.find c_lead_id
|
8
7
|
|
9
|
-
if @
|
10
|
-
raise "
|
8
|
+
if @lead.sent_at
|
9
|
+
raise "This campaign_lead #{@lead.id} has already been sent."
|
11
10
|
end
|
12
11
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
bcc: 'piousbox@gmail.com',
|
52
|
-
subject: @ctx.subject,
|
53
|
-
template_name: template )
|
54
|
-
end
|
12
|
+
actl = ActionController::Base.new
|
13
|
+
actl.instance_variable_set( :@ctx, @ctx )
|
14
|
+
|
15
|
+
@pixel_tracking = {
|
16
|
+
'v' => 1,
|
17
|
+
'tid' => 'UA-53077236-2',
|
18
|
+
'cid' => @lead.cid,
|
19
|
+
't' => 'event',
|
20
|
+
'ec' => 'email',
|
21
|
+
'ea' => 'open',
|
22
|
+
'utm_source' => @campaign.slug,
|
23
|
+
'utm_medium' => 'email',
|
24
|
+
'utm_campaign' => @campaign.slug,
|
25
|
+
}.map { |k, v| "#{k}=#{v}" }.join("&")
|
26
|
+
actl.instance_variable_set( :@pixel_tracking, @pixel_tracking )
|
27
|
+
|
28
|
+
@click_tracking = {
|
29
|
+
'cid' => @lead.cid,
|
30
|
+
't' => 'event',
|
31
|
+
'ec' => 'email',
|
32
|
+
'ea' => 'clk-ctct', # clicked contact us
|
33
|
+
'utm_source' => 'eror1',
|
34
|
+
'utm_medium' => 'email',
|
35
|
+
'utm_campaign' => 'eror1',
|
36
|
+
}.map { |k, v| "#{k}=#{v}" }.join("&")
|
37
|
+
actl.instance_variable_set( :@click_tracking, @click_tracking )
|
38
|
+
|
39
|
+
actl.instance_variable_set( :@lead, @lead )
|
40
|
+
|
41
|
+
template = "render/_#{@ctx.email_template.slug}"
|
42
|
+
rendered_str = actl.render_to_string("ish_manager/email_templates/_#{@ctx.email_template.slug}")
|
43
|
+
@lead.update( rendered_str: rendered_str, sent_at: Time.now )
|
44
|
+
|
45
|
+
mail( from: @ctx.from_email,
|
46
|
+
to: @lead.email,
|
47
|
+
bcc: 'piousbox@gmail.com', # @TODO: change _vp_ 2022-11-21
|
48
|
+
subject: @ctx.subject,
|
49
|
+
template_name: template )
|
55
50
|
end
|
56
51
|
|
57
52
|
def send_context_email ctx_id
|
@@ -52,16 +52,18 @@
|
|
52
52
|
%i.fa.fa-compress.collapse-expand#collapseHeaderOffice
|
53
53
|
Office
|
54
54
|
.namespace
|
55
|
+
-# %ul
|
56
|
+
-# %li= link_to 'Admin', '/admin'
|
57
|
+
-# %li= link_to 'A/Leads', '/admin/leads'
|
58
|
+
-# %li= link_to 'A/CampaignLeads', '/admin/email_campaign_leads'
|
55
59
|
%ul
|
56
|
-
%li= link_to 'Leads', '/admin/leads'
|
57
60
|
%li
|
58
61
|
= link_to 'Meetings', meetings_path
|
59
62
|
= link_to '[+]', new_meeting_path
|
60
63
|
%ul
|
61
|
-
%li
|
62
|
-
|
63
|
-
%li
|
64
|
-
|
65
|
-
-# %li= link_to 'Email Campaigns', email_campaigns_path
|
64
|
+
%li= link_to 'Leads', leads_path
|
65
|
+
%li= link_to 'Leadsets', leadsets_path
|
66
|
+
%li= link_to 'Email Templates', email_templates_path
|
67
|
+
%li= link_to 'Contexts/Campaigns', email_contexts_path
|
66
68
|
%hr
|
67
69
|
|
@@ -2,28 +2,39 @@
|
|
2
2
|
.email-contexts-show
|
3
3
|
|
4
4
|
%ul
|
5
|
-
|
6
5
|
%li <b>Type:</b> #{@email_ctx.type}
|
7
6
|
%li <b>Title:</b> #{@email_ctx.title}
|
8
7
|
%li <b>Template:</b> #{@email_ctx.email_template.slug}
|
9
8
|
%li <b>From:</b> #{@email_ctx.from_email}
|
10
|
-
|
11
9
|
%li <b>Subject:</b> #{@email_ctx.subject}
|
12
|
-
|
13
10
|
- if @email_ctx.type == Ish::EmailContext::TYPE_SINGLE
|
14
11
|
%li <b>To:</b> #{@email_ctx.to_email}
|
15
12
|
%li <b>Template:</b> #{@email_ctx.email_template.slug} <b>Type:</b> #{@email_ctx.email_template.type}
|
16
|
-
- if @email_ctx.type == Ish::EmailContext::TYPE_CAMPAIGN
|
17
|
-
%li <b>Leads (#{@email_ctx.leads.length}):</b> #{@email_ctx.leads.map { |p| p&.email }.join(", ") }
|
18
13
|
|
14
|
+
-#
|
15
|
+
-# Yes sent
|
16
|
+
-#
|
19
17
|
- if @email_ctx.sent_at
|
18
|
+
- if @email_ctx.type == Ish::EmailContext::TYPE_CAMPAIGN
|
19
|
+
%li
|
20
|
+
<b>C_Leads (#{@email_ctx.campaign_leads.length}):</b>
|
21
|
+
- @email_ctx.campaign_leads&.each do |c_lead|
|
22
|
+
= c_lead.lead.email
|
23
|
+
= link_to '[view]', campaign_lead_path( c_lead )
|
24
|
+
,
|
25
|
+
|
20
26
|
%li <b>Sent at:</b> #{@email_ctx.sent_at.strftime('%Y-%m-%d %l:%M%P')}
|
21
|
-
|
27
|
+
|
28
|
+
- else # Draft
|
29
|
+
- if @email_ctx.type == Ish::EmailContext::TYPE_CAMPAIGN
|
30
|
+
%li <b>Leads (#{@email_ctx.leads.length}):</b> #{@email_ctx.leads.map { |p| p&.email }.join(", ") }
|
31
|
+
|
22
32
|
%li
|
23
33
|
= button_to 'Send', email_context_send_path(@email_ctx), form_class: 'inline', :data => { :confirm => 'Are you sure?' }
|
24
34
|
= link_to '[~]', edit_email_context_path(@email_ctx)
|
25
35
|
|
26
36
|
- if @email_ctx.sent_at
|
27
37
|
= raw @email_ctx.rendered_str
|
38
|
+
|
28
39
|
- else
|
29
40
|
%iframe{ src: email_context_iframe_path(@email_ctx), width: '100%', height: '100%' }
|
@@ -2,41 +2,18 @@
|
|
2
2
|
- url = lead.persisted? ? lead_path( lead.id ) : leads_path
|
3
3
|
|
4
4
|
= form_for lead, :as => :lead, :url => url do |f|
|
5
|
-
.
|
5
|
+
.field
|
6
|
+
= f.label :name
|
7
|
+
= f.text_field :name
|
8
|
+
.field
|
6
9
|
= f.label :email
|
7
10
|
= f.text_field :email
|
8
|
-
|
9
|
-
.input-field
|
10
|
-
= f.label :job_url
|
11
|
-
= f.text_field :job_url
|
12
|
-
.input-field
|
13
|
-
= f.label :company_url
|
14
|
-
= f.text_field :company_url
|
15
|
-
.input-field
|
16
|
-
= f.label :yelp_url
|
17
|
-
= f.text_field :yelp_url
|
18
|
-
|
19
|
-
.input-field
|
11
|
+
.field
|
20
12
|
= f.label :company
|
21
|
-
= f.
|
22
|
-
.
|
13
|
+
= f.select :m3_leadset_id, options_for_select(@leadsets_list, selected: lead.m3_leadset_id), { include_blank: true }, {class: 'select2' }
|
14
|
+
.field
|
23
15
|
= f.label :tag
|
24
16
|
= f.text_field :tag
|
25
|
-
.
|
26
|
-
= f.label :location
|
27
|
-
= f.text_field :location
|
28
|
-
.input-field
|
29
|
-
= f.label :description
|
30
|
-
= f.text_area :description
|
31
|
-
.input-field
|
32
|
-
= f.label :address
|
33
|
-
= f.text_area :address
|
34
|
-
.field
|
35
|
-
= f.check_box :is_done
|
36
|
-
= f.label :is_done
|
37
|
-
.field
|
38
|
-
= f.check_box :is_trash
|
39
|
-
= f.label :is_trash
|
40
|
-
.actions{ :style => "margin-top: 1em;" }
|
17
|
+
.actions
|
41
18
|
= f.submit
|
42
|
-
|
19
|
+
|
@@ -1,43 +1,33 @@
|
|
1
1
|
|
2
2
|
.manager-leads-index
|
3
3
|
%h5
|
4
|
-
|
5
|
-
(#{Ish::Lead.all.count})
|
4
|
+
SQL #{link_to 'Leads', leads_path} (#{::Lead.all.count})
|
6
5
|
= link_to raw("<i class='fa fa-plus-square'></i>"), new_lead_path
|
7
|
-
= link_to '[done]', done_leads_path
|
8
6
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
%th Email
|
18
|
-
%th Job Url
|
19
|
-
%th.company-url Company Url
|
20
|
-
%th.yelp-url Yelp Url
|
21
|
-
%th Location
|
22
|
-
%th Description
|
23
|
-
%th Address
|
24
|
-
%tbody
|
25
|
-
- @leads.each do |lead|
|
7
|
+
= form_tag leads_bulkop_path do
|
8
|
+
= label_tag 'Act on Selected:'
|
9
|
+
= select_tag :a, options_for_select( %w| delete add_to_campaign | )
|
10
|
+
= select_tag :email_campaign_id, options_for_select( @email_campaigns_list )
|
11
|
+
= submit_tag 'Go'
|
12
|
+
|
13
|
+
%table#dataTable.display.compact
|
14
|
+
%thead
|
26
15
|
%tr
|
27
|
-
%
|
28
|
-
%
|
29
|
-
%
|
30
|
-
%
|
31
|
-
%
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
= link_to
|
38
|
-
|
39
|
-
=
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
=
|
16
|
+
%th
|
17
|
+
%th Name
|
18
|
+
%th Company
|
19
|
+
%th Email
|
20
|
+
%th Tag
|
21
|
+
|
22
|
+
%tbody
|
23
|
+
- @leads.each do |lead|
|
24
|
+
%tr
|
25
|
+
%td= check_box_tag 'lead_ids[]', lead.id
|
26
|
+
%td= link_to lead.name, lead_path( lead )
|
27
|
+
%td= lead.leadset&.name
|
28
|
+
%td= lead.email
|
29
|
+
-# %td= link_to raw('<i class="fa fa-envelope"></i>'), "mailto:#{lead.email}" if lead.email.present?
|
30
|
+
|
31
|
+
|
32
|
+
%td= lead.tag
|
33
|
+
|
@@ -0,0 +1,42 @@
|
|
1
|
+
|
2
|
+
- url = leadset.persisted? ? leadset_path( leadset.id ) : leadsets_path
|
3
|
+
|
4
|
+
= form_for leadset, :as => :leadset, :url => url do |f|
|
5
|
+
.input-field
|
6
|
+
= f.label :email
|
7
|
+
= f.text_field :email
|
8
|
+
|
9
|
+
.input-field
|
10
|
+
= f.label :job_url
|
11
|
+
= f.text_field :job_url
|
12
|
+
.input-field
|
13
|
+
= f.label :company_url
|
14
|
+
= f.text_field :company_url
|
15
|
+
.input-field
|
16
|
+
= f.label :yelp_url
|
17
|
+
= f.text_field :yelp_url
|
18
|
+
|
19
|
+
.input-field
|
20
|
+
= f.label :company
|
21
|
+
= f.text_field :company
|
22
|
+
.input-field
|
23
|
+
= f.label :tag
|
24
|
+
= f.text_field :tag
|
25
|
+
.input-field
|
26
|
+
= f.label :location
|
27
|
+
= f.text_field :location
|
28
|
+
.input-field
|
29
|
+
= f.label :description
|
30
|
+
= f.text_area :description
|
31
|
+
.input-field
|
32
|
+
= f.label :address
|
33
|
+
= f.text_area :address
|
34
|
+
.field
|
35
|
+
= f.check_box :is_done
|
36
|
+
= f.label :is_done
|
37
|
+
.field
|
38
|
+
= f.check_box :is_trash
|
39
|
+
= f.label :is_trash
|
40
|
+
.actions{ :style => "margin-top: 1em;" }
|
41
|
+
= f.submit
|
42
|
+
|
@@ -0,0 +1,26 @@
|
|
1
|
+
|
2
|
+
.manager-leadsets-index
|
3
|
+
%h5
|
4
|
+
SQL
|
5
|
+
= link_to 'Leadsets', leadsets_path
|
6
|
+
(#{Leadset.all.count})
|
7
|
+
= link_to raw("<i class='fa fa-plus-square'></i>"), new_leadset_path
|
8
|
+
|
9
|
+
%table#dataTable.display.compact
|
10
|
+
%thead
|
11
|
+
%tr
|
12
|
+
%th
|
13
|
+
|
14
|
+
%th Name
|
15
|
+
%th Tag
|
16
|
+
%th.company-url Company Url
|
17
|
+
%th Location
|
18
|
+
%tbody
|
19
|
+
- @leadsets.each do |leadset|
|
20
|
+
%tr
|
21
|
+
%td= check_box_tag leadset.id
|
22
|
+
|
23
|
+
%td= link_to leadset.name, leadset_path( leadset )
|
24
|
+
%td= leadset.tag
|
25
|
+
%td= link_to 'B', leadset.company_url if leadset.company_url.present?
|
26
|
+
%td= leadset.location
|
data/config/routes.rb
CHANGED
@@ -62,10 +62,14 @@ IshManager::Engine.routes.draw do
|
|
62
62
|
|
63
63
|
resources :email_unsubscribes
|
64
64
|
|
65
|
-
get 'leads', :to => 'leads#index'
|
66
|
-
|
65
|
+
get 'leads', :to => 'leads#index'
|
66
|
+
post 'leads/bulkop', to: 'leads#bulkop'
|
67
67
|
resources :leads
|
68
68
|
|
69
|
+
resources :leadsets
|
70
|
+
|
71
|
+
resources :email_campaign_leads, as: :campaign_leads
|
72
|
+
|
69
73
|
resources :meetings
|
70
74
|
|
71
75
|
resources :newsitems
|
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.
|
4
|
+
version: 0.1.8.331
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- piousbox
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-11-
|
11
|
+
date: 2022-11-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -266,6 +266,7 @@ files:
|
|
266
266
|
- app/assets/stylesheets/ish_manager/user_profiles.scss
|
267
267
|
- app/assets/stylesheets/ish_manager/videos.scss
|
268
268
|
- app/controllers/ish_manager/application_controller.rb
|
269
|
+
- app/controllers/ish_manager/email_campaign_leads_controller.rb
|
269
270
|
- app/controllers/ish_manager/email_campaigns_controller.rb
|
270
271
|
- app/controllers/ish_manager/email_contexts_controller.rb
|
271
272
|
- app/controllers/ish_manager/email_templates_controller.rb
|
@@ -274,6 +275,7 @@ files:
|
|
274
275
|
- app/controllers/ish_manager/image_assets_controller.rb
|
275
276
|
- app/controllers/ish_manager/invoices_controller.rb
|
276
277
|
- app/controllers/ish_manager/leads_controller.rb
|
278
|
+
- app/controllers/ish_manager/leadsets_controller.rb
|
277
279
|
- app/controllers/ish_manager/maps_controller.rb
|
278
280
|
- app/controllers/ish_manager/markers_controller.rb
|
279
281
|
- app/controllers/ish_manager/meetings_controller.rb
|
@@ -286,6 +288,7 @@ files:
|
|
286
288
|
- app/helpers/ish_manager/application_helper.rb
|
287
289
|
- app/helpers/ish_manager/images_helper.rb
|
288
290
|
- app/jobs/ish_manager/application_job.rb
|
291
|
+
- app/jobs/ish_manager/email_campaign_job.rb
|
289
292
|
- app/jobs/ish_manager/test_email_job.rb
|
290
293
|
- app/mailers/ish_manager/application_mailer.rb
|
291
294
|
- app/mailers/ish_manager/meeting_mailer.rb
|
@@ -307,6 +310,7 @@ files:
|
|
307
310
|
- app/views/ish_manager/application/trash/_main_header_manager.haml
|
308
311
|
- app/views/ish_manager/application_mailer/shared_galleries.html.erb
|
309
312
|
- app/views/ish_manager/application_mailer/welcome.html.erb
|
313
|
+
- app/views/ish_manager/email_campaign_leads/show.haml
|
310
314
|
- app/views/ish_manager/email_contexts/_form.haml
|
311
315
|
- app/views/ish_manager/email_contexts/edit.haml
|
312
316
|
- app/views/ish_manager/email_contexts/index.haml
|
@@ -359,6 +363,10 @@ files:
|
|
359
363
|
- app/views/ish_manager/leads/edit.haml
|
360
364
|
- app/views/ish_manager/leads/index.haml
|
361
365
|
- app/views/ish_manager/leads/new.haml
|
366
|
+
- app/views/ish_manager/leadsets/_form.haml
|
367
|
+
- app/views/ish_manager/leadsets/edit.haml
|
368
|
+
- app/views/ish_manager/leadsets/index.haml
|
369
|
+
- app/views/ish_manager/leadsets/new.haml
|
362
370
|
- app/views/ish_manager/maps/_form.haml
|
363
371
|
- app/views/ish_manager/maps/_index_item.haml
|
364
372
|
- app/views/ish_manager/maps/_map_meta_row.haml
|