ish_manager 0.1.8.419 → 0.1.8.421
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/ish_manager/email_conversations.js +10 -9
- data/app/assets/stylesheets/ish_manager/application.scss +1 -0
- data/app/assets/stylesheets/ish_manager/email_conversations.scss +15 -14
- data/app/assets/stylesheets/ish_manager/kaminari_pagination.scss +40 -0
- data/app/assets/stylesheets/ish_manager/leads_leadsets.scss +4 -0
- data/app/controllers/ish_manager/categories_controller.rb +6 -0
- data/app/controllers/ish_manager/events_controller.rb +1 -1
- data/app/controllers/ish_manager/leads_controller.rb +19 -47
- data/app/controllers/ish_manager/newsitems_controller.rb +6 -4
- data/app/views/ish_manager/application/_main_footer.haml +8 -3
- data/app/views/ish_manager/application/_main_header_admin.haml +2 -2
- data/app/views/ish_manager/categories/_subtree.haml +2 -2
- data/app/views/ish_manager/categories/index.haml +4 -1
- data/app/views/ish_manager/categories/show.haml +10 -0
- data/app/views/ish_manager/email_conversations/show.haml +19 -10
- data/app/views/ish_manager/galleries/_menu.haml +2 -4
- data/app/views/ish_manager/leads/_form_import.haml +9 -9
- data/app/views/ish_manager/leads/index.haml +10 -5
- data/app/views/ish_manager/photos/_meta.haml +0 -2
- data/app/views/ish_manager/photos/show.haml +5 -1
- data/config/routes.rb +2 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3ed09f47dd1da9f389ed8d851a0606dae2f4596f617066c8a8aea021c661dd59
|
4
|
+
data.tar.gz: 124439f5be8caf79bd98e022c65c190a4ac58f54fc597279120b18bb24cc5b31
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c8f6cd77abbfce756e35bb9f918c071285828b43d17c0b176bab36438fa357f294e41b1e875e83accac69de0d767031b2034c2209534eac7c95e0d7bbf2e792d
|
7
|
+
data.tar.gz: 2c84c3cd1d4f4a1857e256b08d82d443725f0828de3b12a6f2d6c6f99724dcca2e3ea2949609343877ef9c3e80d6f7b3b23037417236cd6fc2acb605426e9e4f
|
@@ -1,17 +1,18 @@
|
|
1
1
|
|
2
2
|
$(document).ready(() => {
|
3
3
|
|
4
|
-
$("body.email_conversations-show
|
5
|
-
// logg(
|
4
|
+
$("body.email_conversations-show .preview-btn").click(function(e) {
|
5
|
+
// logg($(this).data(), 'clicked')
|
6
6
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
7
|
+
var msgId = $(this).data().msg.id
|
8
|
+
var msgC = $(`.msg-container[data-msg-id='${msgId}']`) // msgContainer
|
9
|
+
|
10
|
+
if ($(msgC).data('expanded')) {
|
11
|
+
$(msgC).data('expanded', false)
|
12
|
+
msgC.find(".to-expand").css('display', 'none')
|
11
13
|
} else {
|
12
|
-
$(
|
13
|
-
|
14
|
-
$(this).parent().find("iframe").css('display', 'block')
|
14
|
+
$(msgC).data('expanded', true)
|
15
|
+
msgC.find(".to-expand").css('display', 'block')
|
15
16
|
}
|
16
17
|
|
17
18
|
})
|
@@ -86,10 +86,19 @@
|
|
86
86
|
border-bottom: 1px solid yellow;
|
87
87
|
margin-bottom: 0.2em;
|
88
88
|
|
89
|
-
.expand {
|
90
|
-
|
91
|
-
|
92
|
-
|
89
|
+
// .expand {
|
90
|
+
// border: 1px solid red;
|
91
|
+
// max-height: 500px;
|
92
|
+
// overflow: auto;
|
93
|
+
// }
|
94
|
+
|
95
|
+
iframe {
|
96
|
+
border: 2px solid yellow;
|
97
|
+
|
98
|
+
width: 100%;
|
99
|
+
min-height: 500px;
|
100
|
+
height: 80vh;
|
101
|
+
// display: none;
|
93
102
|
}
|
94
103
|
|
95
104
|
.my-actions {
|
@@ -112,17 +121,9 @@
|
|
112
121
|
justify-content: space-between;
|
113
122
|
}
|
114
123
|
|
115
|
-
.
|
116
|
-
|
117
|
-
border: 2px solid yellow;
|
118
|
-
|
119
|
-
width: 100%;
|
120
|
-
min-height: 500px;
|
121
|
-
height: 80vh;
|
122
|
-
display: none;
|
123
|
-
}
|
124
|
+
.to-expand {
|
125
|
+
display: none;
|
124
126
|
}
|
125
|
-
|
126
127
|
}
|
127
128
|
}
|
128
129
|
|
@@ -0,0 +1,40 @@
|
|
1
|
+
|
2
|
+
.pagination a, .pagination span.current, .pagination span.gap {
|
3
|
+
float: left;
|
4
|
+
padding: 0 14px;
|
5
|
+
line-height: 38px;
|
6
|
+
text-decoration: none;
|
7
|
+
background-color: white;
|
8
|
+
border: 1px solid #DDD;
|
9
|
+
border-left-width: 0;
|
10
|
+
}
|
11
|
+
|
12
|
+
.pagination {
|
13
|
+
border-left: 1px solid #ddd;
|
14
|
+
.first{
|
15
|
+
padding : 0;
|
16
|
+
float: none;
|
17
|
+
border: none;
|
18
|
+
}
|
19
|
+
.prev {
|
20
|
+
padding : 0;
|
21
|
+
float: none;
|
22
|
+
border: none;
|
23
|
+
}
|
24
|
+
.page{
|
25
|
+
padding : 0;
|
26
|
+
float: none;
|
27
|
+
border: none;
|
28
|
+
}
|
29
|
+
.next{
|
30
|
+
padding : 0;
|
31
|
+
float: none;
|
32
|
+
border: none;
|
33
|
+
}
|
34
|
+
.last{
|
35
|
+
padding : 0;
|
36
|
+
float: none;
|
37
|
+
border: none;
|
38
|
+
}
|
39
|
+
}
|
40
|
+
|
@@ -20,7 +20,7 @@ class IshManager::EventsController < ::IshManager::ApplicationController
|
|
20
20
|
|
21
21
|
def index
|
22
22
|
authorize! :manage, Ish::Event
|
23
|
-
@events = Ish::Event.all
|
23
|
+
@events = Ish::Event.all.order_by({ start_at: :desc })
|
24
24
|
if params[:q]
|
25
25
|
@events = @events.where({ :name => /#{params[:q]}/i })
|
26
26
|
end
|
@@ -51,65 +51,37 @@ class ::IshManager::LeadsController < IshManager::ApplicationController
|
|
51
51
|
authorize! :edit, @lead
|
52
52
|
end
|
53
53
|
|
54
|
-
## 0 1 2 3 4 5 6 7
|
55
|
-
## Fields: id, date, name, email, tag, phone, linkedin, comment
|
56
54
|
def import
|
57
55
|
authorize! :import, ::Lead
|
58
56
|
file = params[:csv_file]
|
59
|
-
flags = []
|
60
|
-
errors = []
|
61
|
-
CSV.read(file.path, headers: true).each do |row|
|
62
|
-
|
63
|
-
leadset = ::Leadset.find_or_create_by({ company_url: row[3].split('@')[1] })
|
64
|
-
lead = ::Lead.new({
|
65
|
-
name: row[2].presence || row[3].split('@')[0],
|
66
|
-
full_name: row[2].presence || row[3].split('@')[0],
|
67
|
-
email: row[3],
|
68
|
-
m3_leadset_id: leadset.id,
|
69
|
-
phone: row[5],
|
70
|
-
})
|
71
|
-
flag = lead.save
|
72
|
-
flags << flag
|
73
|
-
if !flag
|
74
|
-
errors << lead.errors.full_messages.join(", ")
|
75
|
-
end
|
76
57
|
|
77
|
-
|
78
|
-
|
79
|
-
WpTag.my_find_or_create({ name: tag_name })
|
80
|
-
end
|
81
|
-
puts! tags, 'tags'
|
82
|
-
tags.each do |tag|
|
83
|
-
LeadTag.create({ wp_tag: tag, lead: lead })
|
84
|
-
end
|
85
|
-
end
|
58
|
+
## 2023-04-08
|
59
|
+
flags = Lead.import_v1( file )
|
86
60
|
|
87
|
-
end
|
88
61
|
flash[:notice] = "Result: #{flags.inspect}."
|
89
|
-
flash[:alert] = errors
|
90
62
|
redirect_to action: 'new'
|
91
63
|
end
|
92
64
|
|
93
65
|
def index
|
94
66
|
authorize! :index, ::Lead
|
95
|
-
@leads = ::Lead.kept.includes( :company )
|
96
|
-
|
97
|
-
|
98
|
-
map = %Q{
|
99
|
-
function() {
|
100
|
-
emit(this.to_email, {count: 1})
|
101
|
-
}
|
102
|
-
}
|
103
|
-
reduce = %Q{
|
104
|
-
function(key, values) {
|
105
|
-
var result = {count: 0};
|
106
|
-
values.forEach(function(value) {
|
107
|
-
result.count += value.count;
|
108
|
-
});
|
109
|
-
return result;
|
110
|
-
}
|
111
|
-
}
|
67
|
+
@leads = ::Lead.kept.includes( :company ).page( params[:leads_page ] ).per( current_profile.per_page )
|
68
|
+
|
112
69
|
@email_contexts = {}
|
70
|
+
# lead_emails = @leads.map( &:email ).compact.reject(&:empty?)
|
71
|
+
# map = %Q{
|
72
|
+
# function() {
|
73
|
+
# emit(this.to_email, {count: 1})
|
74
|
+
# }
|
75
|
+
# }
|
76
|
+
# reduce = %Q{
|
77
|
+
# function(key, values) {
|
78
|
+
# var result = {count: 0};
|
79
|
+
# values.forEach(function(value) {
|
80
|
+
# result.count += value.count;
|
81
|
+
# });
|
82
|
+
# return result;
|
83
|
+
# }
|
84
|
+
# }
|
113
85
|
# tmp_contexts = Ish::EmailContext.all.where( :to_email.in => lead_emails
|
114
86
|
# ).map_reduce( map, reduce
|
115
87
|
# ).out( inline: 1 ## From: https://www.mongodb.com/docs/mongoid/current/reference/map-reduce/
|
@@ -13,10 +13,12 @@ class IshManager::NewsitemsController < IshManager::ApplicationController
|
|
13
13
|
authorize! :create_newsitem, @resource
|
14
14
|
|
15
15
|
if params[:photo]
|
16
|
-
photo = Photo.create(
|
17
|
-
:
|
18
|
-
|
19
|
-
subhead:
|
16
|
+
photo = Photo.create({
|
17
|
+
descr: params[:descr],
|
18
|
+
photo: params[:photo],
|
19
|
+
subhead: params[:subhead],
|
20
|
+
user_profile: @current_profile,
|
21
|
+
})
|
20
22
|
@newsitem.photo = photo
|
21
23
|
end
|
22
24
|
|
@@ -8,7 +8,7 @@
|
|
8
8
|
Account & Session
|
9
9
|
.a
|
10
10
|
.row
|
11
|
-
.col-sm-
|
11
|
+
.col-sm-4
|
12
12
|
%ul
|
13
13
|
%li <b>Email:</b> #{@current_profile.email}
|
14
14
|
%li <b>Role name:</b> #{@current_profile.role_name}
|
@@ -21,8 +21,13 @@
|
|
21
21
|
%li= Time.now.to_s
|
22
22
|
-# <pre>#{@changelog}</pre>
|
23
23
|
|
24
|
-
.col-sm-
|
25
|
-
= button_to 'Logout', main_app.destroy_user_session_path, :method => :delete
|
24
|
+
.col-sm-4
|
25
|
+
= button_to 'Logout', main_app.destroy_user_session_path, :method => :delete, data: { confirm: 'Are you sure?' }
|
26
|
+
= form_for @current_profile, url: profile_path(@current_profile), as: :profile do |f|
|
27
|
+
.flex-row
|
28
|
+
= f.label :per_page
|
29
|
+
= f.select :per_page, options_for_select([ 10, 25, 50, 100, 250, 500, 1000], selected: @current_profile.per_page)
|
30
|
+
= f.submit 'Go'
|
26
31
|
|
27
32
|
.c
|
28
33
|
= render 'debug' if !Rails.env.production?
|
@@ -18,7 +18,7 @@
|
|
18
18
|
= text_field_tag :q
|
19
19
|
= link_to '[+]', new_report_path
|
20
20
|
%li
|
21
|
-
= link_to
|
21
|
+
= link_to "Videos (#{Video.all.length})", videos_path
|
22
22
|
.inline-search
|
23
23
|
= form_tag videos_path, method: :get do
|
24
24
|
= text_field_tag :q
|
@@ -33,7 +33,7 @@
|
|
33
33
|
= text_field_tag :q
|
34
34
|
|
35
35
|
%li
|
36
|
-
= link_to
|
36
|
+
= link_to "Locations (#{Location.all.length})", maps_path
|
37
37
|
.inline-search
|
38
38
|
= form_tag maps_path, method: :get do
|
39
39
|
= text_field_tag :q
|
@@ -23,24 +23,21 @@
|
|
23
23
|
- @email_messages.each do |msg|
|
24
24
|
- lead = msg.lead || Lead.new(email: 'NO LEAD!', id: 'no lead')
|
25
25
|
|
26
|
-
.item
|
26
|
+
.item.msg-container{ data: { msg: { id: msg.id } } }
|
27
27
|
.row-1
|
28
28
|
.gray
|
29
29
|
%ul
|
30
30
|
%li
|
31
31
|
= msg.id
|
32
32
|
<b>To:</b> #{msg.to}
|
33
|
-
|
34
|
-
|
35
|
-
-# #{msg.from}
|
36
|
-
= lead.email
|
37
|
-
%a.chip{ href: email_contexts_for_lead_path( lead ) }
|
33
|
+
<b>From:</b> #{lead.email}
|
34
|
+
= link_to email_contexts_for_lead_path( lead ) do
|
38
35
|
\(
|
39
36
|
= lead.email_contexts.count
|
40
37
|
%i.fa.fa-envelope
|
41
38
|
\)
|
42
39
|
.relative.inline-block
|
43
|
-
%i.fa.fa-clock-o.expand-next
|
40
|
+
%i.fa.fa-clock-o.expand-next{ style: "color: red;" }
|
44
41
|
.expand-hide= render 'ish_manager/scheduled_email_actions/form', scheduled_email_action: Sch.new({ lead_id: lead.id })
|
45
42
|
|
46
43
|
.datetime
|
@@ -48,11 +45,23 @@
|
|
48
45
|
.time= msg.date&.strftime('%l:%M%P')
|
49
46
|
|
50
47
|
.row-2
|
48
|
+
.flexy
|
49
|
+
= link_to "Expand w/img", ishapi.email_message_path(msg, jwt_token: @jwt_token, load_images: true ), target: msg.message_id, class: 'preview-btn', data: { msg: { id: msg.id.to_s } }
|
50
|
+
\- or -
|
51
|
+
= link_to "Expand", ishapi.email_message_path(msg, jwt_token: @jwt_token ), target: msg.message_id, class: 'preview-btn', data: { msg: { id: msg.id.to_s } }
|
52
|
+
= msg.preview_str
|
53
|
+
|
54
|
+
.to-expand
|
55
|
+
|
56
|
+
- if msg.attachments.present?
|
57
|
+
.attachments
|
58
|
+
- msg.attachments.map do |att|
|
59
|
+
.item
|
60
|
+
%h5= att.photo.original_filename
|
61
|
+
= image_tag att.photo.url(:original)
|
51
62
|
|
52
|
-
|
53
|
-
%iframe{ name: msg.message_id }
|
63
|
+
%iframe{ name: msg.message_id }
|
54
64
|
|
55
|
-
.my-actions.hide
|
56
65
|
= render 'ish_manager/email_contexts/form_reply', lead: lead
|
57
66
|
.bordered-card
|
58
67
|
= render 'ish_manager/email_contexts/form', ctx: Ctx.new({ lead_id: lead.id, email_template: Tmpl.blank_template, from_email: msg.to, subject: msg.subject, body: (msg.part_html||msg.part_txt) }), lead: lead
|
@@ -1,12 +1,10 @@
|
|
1
1
|
|
2
2
|
.galleries--menu
|
3
3
|
|
4
|
-
= link_to
|
5
|
-
- if defined?(count)
|
6
|
-
(#{count})
|
4
|
+
= link_to "Galleries (#{Gallery.all.length})", galleries_path
|
7
5
|
|
8
6
|
.inline-search
|
9
7
|
= form_tag galleries_path, method: :get do
|
10
8
|
= text_field_tag :q
|
11
9
|
|
12
|
-
= link_to '[+]', new_gallery_path
|
10
|
+
= link_to '[+]', new_gallery_path
|
@@ -1,11 +1,11 @@
|
|
1
1
|
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
%
|
6
|
-
|
7
|
-
|
8
|
-
|
2
|
+
.Card
|
3
|
+
= form_tag leads_import_path, multipart: true do
|
4
|
+
.doc
|
5
|
+
%pre= Lead.import_v1_fields
|
6
|
+
.field
|
7
|
+
%label File
|
8
|
+
= file_field_tag :csv_file
|
9
9
|
|
10
|
-
|
11
|
-
|
10
|
+
.actions
|
11
|
+
= submit_tag 'Submit'
|
@@ -1,22 +1,23 @@
|
|
1
1
|
|
2
|
-
.leads-index
|
2
|
+
.leads-index.padded
|
3
3
|
.header
|
4
4
|
%h2.title
|
5
5
|
#{link_to 'Kept Leads', leads_path} (#{::Lead.kept.count}, #{::Lead.all.count})
|
6
6
|
= link_to raw("<i class='fa fa-plus-square'></i>"), new_lead_path
|
7
7
|
|
8
|
+
= paginate @leads, param_name: :leads_page
|
8
9
|
= form_tag leads_bulkop_path do
|
9
10
|
= label_tag 'Act on Selected:'
|
10
11
|
= select_tag :op, options_for_select( [[nil,nil]] + Lead::OPS )
|
11
12
|
= select_tag :email_campaign_id, options_for_select( @email_campaigns_list )
|
12
13
|
= submit_tag 'Go'
|
13
14
|
|
14
|
-
%table.bordered
|
15
|
+
%table.bordered
|
15
16
|
%thead
|
16
17
|
%tr
|
17
18
|
%th
|
18
19
|
%th Name/Email
|
19
|
-
%th Company
|
20
|
+
%th.company Company
|
20
21
|
%th Phone
|
21
22
|
%th Tag
|
22
23
|
%th created_at
|
@@ -28,7 +29,10 @@
|
|
28
29
|
%tr
|
29
30
|
%td= check_box_tag 'lead_ids[]', lead.id
|
30
31
|
%td= link_to "#{lead.name} <#{lead.email}>", lead_path( lead )
|
31
|
-
%td
|
32
|
+
%td.company
|
33
|
+
= lead.company.company_url
|
34
|
+
- if lead.company.name.present?
|
35
|
+
<br /><b>#{lead.company.name}</b>
|
32
36
|
%td= lead.phone
|
33
37
|
%td= lead.wp_tags.map(&:name).join(", ")
|
34
38
|
%td= lead.created_at.to_s[0..10]
|
@@ -42,7 +46,8 @@
|
|
42
46
|
-# %li
|
43
47
|
-# = link_to sch_a.email_action.slug, edit_scheduled_email_action_path( sch_a )
|
44
48
|
-# [x]
|
45
|
-
|
49
|
+
.c
|
50
|
+
= paginate @leads, param_name: :leads_page
|
46
51
|
|
47
52
|
|
48
53
|
|
@@ -2,8 +2,6 @@
|
|
2
2
|
.photos-meta.row
|
3
3
|
.meta
|
4
4
|
On #{ pretty_date photo.created_at }
|
5
|
-
-# - unless photo.user.blank?
|
6
|
-
-# By #{ link_to photo.user.username, user_path(photo.user.username) }
|
7
5
|
- unless photo.gallery.blank?
|
8
6
|
In #{ link_to photo.gallery.name, gallery_path(photo.gallery.slug, 0) }
|
9
7
|
= photo.name unless photo.name.blank?
|
data/config/routes.rb
CHANGED
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.421
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- piousbox
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-04-
|
11
|
+
date: 2023-04-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -271,6 +271,7 @@ files:
|
|
271
271
|
- app/assets/stylesheets/ish_manager/galleries.scss
|
272
272
|
- app/assets/stylesheets/ish_manager/iro.scss
|
273
273
|
- app/assets/stylesheets/ish_manager/jquery-ui.css
|
274
|
+
- app/assets/stylesheets/ish_manager/kaminari_pagination.scss
|
274
275
|
- app/assets/stylesheets/ish_manager/leads_leadsets.scss
|
275
276
|
- app/assets/stylesheets/ish_manager/maps.scss
|
276
277
|
- app/assets/stylesheets/ish_manager/markers.scss
|
@@ -377,6 +378,7 @@ files:
|
|
377
378
|
- app/views/ish_manager/application_mailer/welcome.html.erb
|
378
379
|
- app/views/ish_manager/categories/_subtree.haml
|
379
380
|
- app/views/ish_manager/categories/index.haml
|
381
|
+
- app/views/ish_manager/categories/show.haml
|
380
382
|
- app/views/ish_manager/email_actions/_form.haml
|
381
383
|
- app/views/ish_manager/email_actions/edit.haml
|
382
384
|
- app/views/ish_manager/email_actions/index.haml
|