ish_manager 0.1.8.428 → 0.1.8.429

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: b9f691435726734a9202b8266f28b7fb9c62b8090f9f75ea1ba7c706c474a68c
4
- data.tar.gz: 873c4604a16c7612130fe758882aa97e6485fcbe74c391399a6ea10f39fb1b3a
3
+ metadata.gz: a0abc37d22ccfddfa3800f1fed6895e74277e0a4d7c830daad34db5d1adf6764
4
+ data.tar.gz: 715a9713d49199bc20908be318498bbb0626b709bf085a7e333099082f06cd83
5
5
  SHA512:
6
- metadata.gz: afb5335ab24acfccd4dab998bd8c56e0418376208687ca06f93fc04d4842e385814c4b73c36bf261eff750687df4709fba794fc1bf36995db5761e103865dc27
7
- data.tar.gz: 23fe9362978d688d0fb6576b6fde208155dd48748889b9f2bb437ab10976ca47ce4f9822bea5511f51cd0817139b472ab1acbcf4373193a058f04c272c1b2b41
6
+ metadata.gz: 12a1ef887def22ebf1b016dd0aa5b1a5dfaf4fd3baa3675d3bba651fc60ae2353949bf6f51623d9c57d60efd2624bee8ad303199bbf8439481e7c54ab37a93a9
7
+ data.tar.gz: ba86068a4bc4f2c00a9cb3aaf292952f87dec3da30708408d67937cf794bafea23d871354eec685fd712aff2edc95eb8a74d5c3f2bdf34bb5f4d4b14795384f2
@@ -12,6 +12,7 @@
12
12
  .emails-ns, // emails namespace
13
13
  .iro-purses-my,
14
14
  .leads-edit,
15
+ .leads--index,
15
16
  .leads-index,
16
17
  .leads-show,
17
18
  .scheduled-email-actions--form,
@@ -14,6 +14,12 @@ class ::IshManager::CategoriesController < IshManager::ApplicationController
14
14
  @category = WpTag.find params[:id]
15
15
  authorize! :show, @category
16
16
 
17
+ ## same as in leads#index
18
+ @leads = @category.leads
19
+ if params[:q].present?
20
+ @leads = @leads.where(" email LIKE ? ", "%#{params[:q]}%" )
21
+ end
22
+ @leads = @leads.page( params[:leads_page] ).per( current_profile.per_page )
17
23
  end
18
24
 
19
25
  end
@@ -38,6 +38,11 @@ class ::IshManager::EmailCampaignsController < IshManager::ApplicationController
38
38
  def show
39
39
  @campaign = Ish::EmailCampaign.find params[:id]
40
40
  authorize! :show, @campaign
41
+ @leads = @campaign.leads
42
+ if params[:q].present?
43
+ @leads = @leads.where(" email LIKE ? ", "%#{params[:q]}%" )
44
+ end
45
+ @leads = @leads.page( params[:leads_page ] ).per( current_profile.per_page )
41
46
  end
42
47
 
43
48
  def update
@@ -3,8 +3,5 @@
3
3
  .header
4
4
  %h2.title Category/Tag `#{@category.slug}`
5
5
 
6
- .leads
7
- %h3 Leads (#{@category.leads.length})
8
- %ol
9
- - @category.leads.each do |lead|
10
- %li= link_to lead.email, lead_path(lead)
6
+ = render 'ish_manager/leads/index', leads: @leads, email_contexts: {}, search_path: category_path(@category)
7
+
@@ -14,10 +14,4 @@
14
14
  -# %li Send At: #{@campaign.send_at}
15
15
 
16
16
  .collapse-expand#campaignLeads Email Campaign leads (#{@campaign.campaign_leads.length})
17
- %ul.email-campaign-leads.items.browser-default
18
- - @campaign.campaign_leads.each do |clead|
19
- %li.item
20
- .inline-block= button_to '[x]', email_campaign_lead_path(clead), method: :delete, :data => { :confirm => 'Are you sure?' }
21
- = link_to clead.lead.email, lead_path(clead.lead.id)
22
- (#{clead.lead.email_contexts.length} ctxs)
23
-
17
+ = render 'ish_manager/leads/index', leads: @leads, search_path: email_campaign_path(@campaign), email_contexts: {}
@@ -0,0 +1,60 @@
1
+
2
+ -#
3
+ -# receives locals: leads , email_contexts , search_path
4
+ -#
5
+ .leads--index.padded
6
+ .header
7
+ %h2.title
8
+ Leads (#{leads.total_count})
9
+ = link_to raw("<i class='fa fa-plus-square'></i>"), new_lead_path
10
+
11
+ .float-right= render 'search', path: search_path
12
+ = form_tag leads_bulkop_path do
13
+ = label_tag 'Act on Selected:'
14
+ = select_tag :op, options_for_select( [[nil,nil]] + Lead::OPS )
15
+ = select_tag :email_campaign_id, options_for_select( @email_campaigns_list )
16
+ = submit_tag 'Go'
17
+
18
+ = paginate leads, param_name: :leads_page
19
+ %table.bordered
20
+ %thead
21
+ %tr
22
+ %th &nbsp;
23
+ %th Name/Email
24
+ %th.company Company
25
+ %th Phone, address
26
+ %th Tag
27
+ %th created_at
28
+ %th Ctx
29
+ %th Sch
30
+
31
+ %tbody
32
+ - leads.each do |lead|
33
+ %tr
34
+ %td= check_box_tag 'lead_ids[]', lead.id
35
+ %td= link_to "#{lead.name} <#{lead.email}>", lead_path( lead )
36
+ %td.company
37
+ = lead.company.company_url
38
+ - if lead.company.name.present?
39
+ <br /><b>#{lead.company.name}</b>
40
+ %td
41
+ .a= lead.phone if lead.phone.present?
42
+ .a= lead.address if lead.address.present?
43
+ %td= lead.wp_tags.map(&:name).join(", ")
44
+ %td= lead.created_at.to_s[0..10]
45
+ %td.ctx
46
+ = email_contexts[lead.email] || '-'
47
+ %td.sch
48
+ = lead.scheduled_email_actions.length
49
+ = link_to '[+]', new_scheduled_email_action_path( lead_id: lead.id )
50
+ -# %ul
51
+ -# - lead.scheduled_email_actions.map do |sch_a|
52
+ -# %li
53
+ -# = link_to sch_a.email_action.slug, edit_scheduled_email_action_path( sch_a )
54
+ -# [x]
55
+
56
+ = paginate leads, param_name: :leads_page
57
+
58
+
59
+
60
+
@@ -1,57 +1,2 @@
1
1
 
2
- .leads-index.padded
3
- .header
4
- %h2.title
5
- #{link_to 'Kept Leads', leads_path} (#{::Lead.kept.count}, #{::Lead.all.count})
6
- = link_to raw("<i class='fa fa-plus-square'></i>"), new_lead_path
7
-
8
- = render 'search', resource: ::Lead
9
- = form_tag leads_bulkop_path do
10
- = label_tag 'Act on Selected:'
11
- = select_tag :op, options_for_select( [[nil,nil]] + Lead::OPS )
12
- = select_tag :email_campaign_id, options_for_select( @email_campaigns_list )
13
- = submit_tag 'Go'
14
-
15
- = paginate @leads, param_name: :leads_page
16
- %table.bordered
17
- %thead
18
- %tr
19
- %th &nbsp;
20
- %th Name/Email
21
- %th.company Company
22
- %th Phone, address
23
- %th Tag
24
- %th created_at
25
- %th Ctx
26
- %th Sch
27
-
28
- %tbody
29
- - @leads.each do |lead|
30
- %tr
31
- %td= check_box_tag 'lead_ids[]', lead.id
32
- %td= link_to "#{lead.name} <#{lead.email}>", lead_path( lead )
33
- %td.company
34
- = lead.company.company_url
35
- - if lead.company.name.present?
36
- <br /><b>#{lead.company.name}</b>
37
- %td
38
- .a= lead.phone if lead.phone.present?
39
- .a= lead.address if lead.address.present?
40
- %td= lead.wp_tags.map(&:name).join(", ")
41
- %td= lead.created_at.to_s[0..10]
42
- %td.ctx
43
- = @email_contexts[lead.email] || '-'
44
- %td.sch
45
- = lead.scheduled_email_actions.length
46
- = link_to '[+]', new_scheduled_email_action_path( lead_id: lead.id )
47
- -# %ul
48
- -# - lead.scheduled_email_actions.map do |sch_a|
49
- -# %li
50
- -# = link_to sch_a.email_action.slug, edit_scheduled_email_action_path( sch_a )
51
- -# [x]
52
-
53
- = paginate @leads, param_name: :leads_page
54
-
55
-
56
-
57
-
2
+ = render 'index', leads: @leads, email_contexts: @email_contexts, search_path: leads_path
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.428
4
+ version: 0.1.8.429
5
5
  platform: ruby
6
6
  authors:
7
7
  - piousbox
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-05-10 00:00:00.000000000 Z
11
+ date: 2023-05-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -654,6 +654,7 @@ files:
654
654
  - app/views/ish_manager/kaminari/_prev_page.html.erb
655
655
  - app/views/ish_manager/leads/_form.haml
656
656
  - app/views/ish_manager/leads/_form_import.haml
657
+ - app/views/ish_manager/leads/_index.haml
657
658
  - app/views/ish_manager/leads/_index_rows.haml
658
659
  - app/views/ish_manager/leads/edit.haml
659
660
  - app/views/ish_manager/leads/index.haml