wco_models 3.1.0.160 → 3.1.0.161
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/stylesheets/wco/application.scss +23 -0
- data/app/controllers/wco/leadsets_controller.rb +1 -1
- data/app/controllers/wco/videos_controller.rb +14 -5
- data/app/models/wco/lead.rb +2 -2
- data/app/models/wco/video.rb +2 -0
- data/app/views/wco/application/_meta.haml +2 -2
- data/app/views/wco/leads/_index.haml +1 -1
- data/app/views/wco/office_action_templates/_form.haml +2 -2
- data/app/views/wco/tags/_index_table.haml +31 -0
- data/app/views/wco/tags/index.haml +2 -2
- data/app/views/wco/tags/show.haml +3 -3
- data/app/views/wco/videos/_form.haml +10 -14
- data/app/views/wco/videos/_index.haml +0 -14
- data/app/views/wco/videos/index.haml +11 -0
- data/lib/wco/scrape_wsj.rb +3 -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: 96f8f41510a97ed15c15a6594f542a3c65b65590dbc710ea277f293db1d3429f
|
4
|
+
data.tar.gz: 2eaf694e31445856c59b081ee8ceb3fb0ef15a30a22c8d19556016d060c912b2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: db5d8c264282bc718451b273e6b50af0884e0dff64247368c1547784a9f3d3fe53898af6ee9d31bf73cae241df35a6efc3b39a898f389e2aad7586bc5e9543fc
|
7
|
+
data.tar.gz: f9ef6930a6bcbc40a59c5e5909693448083e60e650bae6913e2151f05ddab0b78c8a3af36ecaa84a82a6d1c514d149c6059807415078c164110ee097f81a1873
|
@@ -16,12 +16,14 @@ $enable-important-utilities: false;
|
|
16
16
|
|
17
17
|
|
18
18
|
/* A */
|
19
|
+
|
19
20
|
.application--main-header.development {
|
20
21
|
background: url('//wasyaco.com/wp-content/uploads/2024/02/weather-bg-development.png'),
|
21
22
|
linear-gradient(90deg, pink, rgba(255,255,255,0) 5% );
|
22
23
|
}
|
23
24
|
|
24
25
|
/* B */
|
26
|
+
|
25
27
|
.bold {
|
26
28
|
font-weight: bold;
|
27
29
|
}
|
@@ -29,6 +31,23 @@ $enable-important-utilities: false;
|
|
29
31
|
border-bottom: 1px solid grey !important;
|
30
32
|
}
|
31
33
|
|
34
|
+
/* F */
|
35
|
+
|
36
|
+
.field {
|
37
|
+
display: flex;
|
38
|
+
margin-bottom: 0.5em;
|
39
|
+
|
40
|
+
input {
|
41
|
+
flex-grow: 1;
|
42
|
+
}
|
43
|
+
|
44
|
+
label {
|
45
|
+
margin-right: 0.5em;
|
46
|
+
min-width: 100px;
|
47
|
+
}
|
48
|
+
}
|
49
|
+
|
50
|
+
/* M */
|
32
51
|
|
33
52
|
.main-footer {
|
34
53
|
border-top: 2px solid #6395b9;
|
@@ -46,10 +65,14 @@ $enable-important-utilities: false;
|
|
46
65
|
}
|
47
66
|
}
|
48
67
|
|
68
|
+
/* S */
|
69
|
+
|
49
70
|
.select2 {
|
50
71
|
min-width: 200px;
|
51
72
|
}
|
52
73
|
|
74
|
+
/* T */
|
75
|
+
|
53
76
|
td.tags {
|
54
77
|
min-width: 200px;
|
55
78
|
}
|
@@ -60,7 +60,7 @@ class Wco::LeadsetsController < Wco::ApplicationController
|
|
60
60
|
@email_contexts[lead.email] = lead.email_contexts
|
61
61
|
end
|
62
62
|
|
63
|
-
@leads
|
63
|
+
@leads = @leadset.leads.page( params[:leads_page] ).per( current_profile.per_page )
|
64
64
|
@subscriptions = @leadset.subscriptions
|
65
65
|
@invoices = @leadset.invoices
|
66
66
|
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
|
2
2
|
class Wco::VideosController < Wco::ApplicationController
|
3
3
|
|
4
|
-
|
4
|
+
before_action :set_lists
|
5
5
|
|
6
6
|
# Alphabetized : )
|
7
7
|
|
@@ -46,9 +46,7 @@ class Wco::VideosController < Wco::ApplicationController
|
|
46
46
|
@videos = @videos.page( params[:videos_page] ).per( 9 )
|
47
47
|
|
48
48
|
respond_to do |format|
|
49
|
-
format.html
|
50
|
-
render '_index'
|
51
|
-
end
|
49
|
+
format.html
|
52
50
|
format.json do
|
53
51
|
render :json => @videos
|
54
52
|
end
|
@@ -98,9 +96,20 @@ class Wco::VideosController < Wco::ApplicationController
|
|
98
96
|
flash[:notice] = 'Success.'
|
99
97
|
redirect_to video_path(@video)
|
100
98
|
else
|
101
|
-
flash[:alert] = "No luck: #{@video.errors.full_messages.
|
99
|
+
flash[:alert] = "No luck: #{@video.errors.full_messages.join(', ')}"
|
102
100
|
render :edit
|
103
101
|
end
|
104
102
|
end
|
105
103
|
|
104
|
+
##
|
105
|
+
## private
|
106
|
+
##
|
107
|
+
private
|
108
|
+
|
109
|
+
def set_lists
|
110
|
+
super
|
111
|
+
@leads_list = Wco::Lead.list
|
112
|
+
@tags_list = Wco::Tag.list
|
113
|
+
end
|
114
|
+
|
106
115
|
end
|
data/app/models/wco/lead.rb
CHANGED
@@ -61,8 +61,8 @@ class Wco::Lead
|
|
61
61
|
has_and_belongs_to_many :email_campaigns, class_name: '::WcoEmail::Campaign'
|
62
62
|
has_and_belongs_to_many :tags, class_name: '::Wco::Tag', index: true
|
63
63
|
|
64
|
-
|
65
|
-
|
64
|
+
has_many :galleries, class_name: 'Wco::Gallery'
|
65
|
+
has_many :videos, class_name: 'Wco::Video'
|
66
66
|
|
67
67
|
OP_DELETE = 'delete'
|
68
68
|
OP_ADD_TO_CAMPAIGN = 'add_to_campaign'
|
data/app/models/wco/video.rb
CHANGED
@@ -32,6 +32,8 @@ class Wco::Video
|
|
32
32
|
# belongs_to :user_profile, :class_name => 'Ish::UserProfile', :inverse_of => :videos
|
33
33
|
# has_and_belongs_to_many :shared_profiles, :class_name => 'Ish::UserProfile', :inverse_of => :shared_videos
|
34
34
|
|
35
|
+
belongs_to :lead, optional: true
|
36
|
+
|
35
37
|
has_and_belongs_to_many :tags
|
36
38
|
|
37
39
|
|
@@ -6,8 +6,8 @@
|
|
6
6
|
<b>By</b>
|
7
7
|
= link_to item.profile.name, edit_profile_path( item.profile )
|
8
8
|
|
9
|
-
|
10
|
-
|
9
|
+
- if item.tags.length > 0
|
10
|
+
<b>Tags:</b> #{ item.tags.map(&:slug).join(', ') }
|
11
11
|
|
12
12
|
- if defined?(item.premium_tier) && item.premium_tier > 0
|
13
13
|
<b>Tier $#{item.premium_tier}</b>
|
@@ -26,7 +26,7 @@
|
|
26
26
|
.col-md-4
|
27
27
|
|
28
28
|
.col-md-8
|
29
|
-
.
|
29
|
+
.a
|
30
30
|
%label Next Office Action Templates
|
31
31
|
.eg rand(1..5).business_days.from_now.to_date + rand(8..16).hours + rand(1..59).minutes
|
32
32
|
.eg This is not an interval! But you can do Time.now + 30.seconds
|
@@ -36,7 +36,7 @@
|
|
36
36
|
.flex-row.field
|
37
37
|
%label next_at_exe
|
38
38
|
= next_f.text_field :next_at_exe, class: 'flex-grow w-100'
|
39
|
-
.flex-row
|
39
|
+
.flex-row
|
40
40
|
%label to_delete
|
41
41
|
= next_f.check_box :to_delete
|
42
42
|
= next_f.select :next_office_action_template_id, options_for_select( @oats_list, selected: next_f.object.next_office_action_template_id ), { }, { class: 'select2' }
|
@@ -0,0 +1,31 @@
|
|
1
|
+
|
2
|
+
%table.bordered.tags--index.data-table
|
3
|
+
%thead
|
4
|
+
%tr
|
5
|
+
%td
|
6
|
+
%td N Conv
|
7
|
+
%td N Stubs
|
8
|
+
|
9
|
+
%td N Headlines
|
10
|
+
|
11
|
+
%td N Galleries
|
12
|
+
%td N Reports
|
13
|
+
%td N Videos
|
14
|
+
|
15
|
+
%td N Leads
|
16
|
+
|
17
|
+
%td N Logs
|
18
|
+
%tbody
|
19
|
+
- tags.each do |tag|
|
20
|
+
%tr
|
21
|
+
%td
|
22
|
+
= link_to '[~]', edit_tag_path(tag)
|
23
|
+
= link_to tag.slug, tag_path(tag)
|
24
|
+
%td= tag.conversations.length
|
25
|
+
%td= tag.message_stubs.length
|
26
|
+
%td= tag.headlines.length
|
27
|
+
%td= tag.galleries.length
|
28
|
+
%td= tag.reports.length
|
29
|
+
%td= tag.videos.length
|
30
|
+
%td= tag.leads.length
|
31
|
+
%td= tag.logs.length
|
@@ -16,15 +16,15 @@
|
|
16
16
|
|
17
17
|
%li.d-flex
|
18
18
|
<b>Galleries (#{@galleries.length}): </b>
|
19
|
-
= render 'wco/galleries/index', galleries: @galleries, config: { skip_tags: true }
|
19
|
+
= render '/wco/galleries/index', galleries: @galleries, config: { skip_tags: true }
|
20
20
|
%li.d-flex
|
21
21
|
<b>Headlines (#{@tag.headlines.length}): </b>
|
22
22
|
= render '/wco/headlines/index', headlines: @tag.headlines
|
23
23
|
|
24
24
|
%li.d-flex
|
25
25
|
<b>Leads (#{@tag.leads.length}): </b>
|
26
|
-
= render 'wco/leads/
|
26
|
+
= render '/wco/leads/index', leads: @tag.leads
|
27
27
|
|
28
28
|
%li.d-flex
|
29
29
|
<b>Reports (#{@reports.length}): </b>
|
30
|
-
= render 'wco/reports/index', reports: @reports, config: { skip_tags: true }
|
30
|
+
= render '/wco/reports/index', reports: @reports, config: { skip_tags: true }
|
@@ -3,20 +3,17 @@
|
|
3
3
|
.row
|
4
4
|
.col-sm-6
|
5
5
|
.field
|
6
|
-
|
6
|
+
%label youtube_id
|
7
7
|
= f.text_field :youtube_id
|
8
8
|
.field
|
9
|
-
|
9
|
+
%label Title (name)
|
10
10
|
= f.text_field :name
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
-# .field
|
18
|
-
-# %label Lead
|
19
|
-
-# = f.select :lead_id, options_for_select(@leads_list, selected: video.lead_id), {}, class: :select2
|
11
|
+
.field
|
12
|
+
%label Lead
|
13
|
+
= f.select :lead_id, options_for_select(@leads_list, selected: video.lead_id), {}, class: :select2
|
14
|
+
.field
|
15
|
+
%label Tags
|
16
|
+
= f.select :tag_ids, options_for_select(@tags_list, selected: video.tag_ids), { }, { class: :select2, multiple: 'multiple' }
|
20
17
|
.col-sm-6
|
21
18
|
.field
|
22
19
|
= f.label :video
|
@@ -30,9 +27,8 @@
|
|
30
27
|
|
31
28
|
.row
|
32
29
|
.col-md-6
|
33
|
-
|
34
|
-
|
35
|
-
= f.text_area :descr, class: :tinymce
|
30
|
+
%label descr
|
31
|
+
= f.text_area :descr, class: :tinymce
|
36
32
|
|
37
33
|
|
38
34
|
.action
|
@@ -1,19 +1,5 @@
|
|
1
1
|
|
2
|
-
- videos ||= @videos
|
3
|
-
- this_videos_path ||= videos_path
|
4
|
-
|
5
2
|
.videos--index.container-fluid
|
6
|
-
.videos--menu
|
7
|
-
= link_to "Videos (#{videos.count})", this_videos_path
|
8
|
-
|
9
|
-
-# = render 'search', path: this_videos_path
|
10
|
-
.inline-search
|
11
|
-
= form_tag this_videos_path, method: :get do
|
12
|
-
= text_field_tag :q
|
13
|
-
|
14
|
-
= link_to '[+]', new_video_path
|
15
|
-
%hr
|
16
|
-
|
17
3
|
= paginate videos, param_name: :videos_page, views_prefix: 'wco'
|
18
4
|
|
19
5
|
.row
|
@@ -0,0 +1,11 @@
|
|
1
|
+
|
2
|
+
.videos-index.container-fluid
|
3
|
+
.d-flex
|
4
|
+
= link_to "Videos (#{@videos.count})", videos_path
|
5
|
+
|
6
|
+
.inline-search
|
7
|
+
= form_tag videos_path, method: :get do
|
8
|
+
= text_field_tag :q
|
9
|
+
|
10
|
+
= link_to '[+]', new_video_path
|
11
|
+
= render '/wco/videos/index', videos: @videos
|
data/lib/wco/scrape_wsj.rb
CHANGED
@@ -6,7 +6,8 @@ class Wco::ScrapeWsj
|
|
6
6
|
def initialize site: nil, max_count: 2
|
7
7
|
site ||= Wco::Site.find_by slug: 'wsj'
|
8
8
|
|
9
|
-
out = HTTParty.get( site.origin ).response.body
|
9
|
+
# out = HTTParty.get( site.origin ).response.body
|
10
|
+
# out = `curl #{site.origin}`
|
10
11
|
out = Nokogiri::HTML(out)
|
11
12
|
out.css('h3').each_with_index do |headline, idx|
|
12
13
|
if idx < max_count
|
@@ -23,6 +24,7 @@ class Wco::ScrapeWsj
|
|
23
24
|
end
|
24
25
|
end
|
25
26
|
end
|
27
|
+
|
26
28
|
end
|
27
29
|
|
28
30
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wco_models
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.1.0.
|
4
|
+
version: 3.1.0.161
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Victor Pudeyev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-06-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ahoy_matey
|
@@ -639,6 +639,7 @@ files:
|
|
639
639
|
- app/views/wco/tags/_header.haml
|
640
640
|
- app/views/wco/tags/_index.haml
|
641
641
|
- app/views/wco/tags/_index_chips.haml
|
642
|
+
- app/views/wco/tags/_index_table.haml
|
642
643
|
- app/views/wco/tags/_list_chips.haml
|
643
644
|
- app/views/wco/tags/_menuitem.haml
|
644
645
|
- app/views/wco/tags/edit.haml
|
@@ -651,6 +652,7 @@ files:
|
|
651
652
|
- app/views/wco/videos/_header.haml
|
652
653
|
- app/views/wco/videos/_index.haml
|
653
654
|
- app/views/wco/videos/edit.haml
|
655
|
+
- app/views/wco/videos/index.haml
|
654
656
|
- app/views/wco/videos/new.haml
|
655
657
|
- app/views/wco/videos/show.haml
|
656
658
|
- app/views/wco_email/application_mailer/_footer_unsubscribe.html.erb
|