wco_models 3.1.0.194 → 3.1.0.196

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7b3538da96d43d2b858d411c19ebc17ec895fc80775ab8fae866c6ba5eef66b4
4
- data.tar.gz: f62962e74f94fa28d1252d72502470fd3b7dce833d875e2a86648138b613ec67
3
+ metadata.gz: 6edaaf0b56607ebe8b92217e54dd6cb2b89b0a3e70c94c8c1b7cab85f6c46850
4
+ data.tar.gz: 7a1d6d52dfa41bef70e127c66e0ebab10b61dca8bb147bbe2ececc007f16ff14
5
5
  SHA512:
6
- metadata.gz: aeed39e89ebbc919a75fa436a36a7b69c154839f17825aa72007766f728c99ae30cd9b22792c1b058d9745e3bbc6ec2f2ebece2cb69d2568bb841d5e8c2eee6d
7
- data.tar.gz: cc252f6b9a5799cc4aa1835d4b74163ed981cd14c268f529dce89e321fb8466d28d39864e2fd57a804708c3549353a8f4bd42ba703f488f33362a6c90ef01139
6
+ metadata.gz: e559030c342a708f47f83235222d929132d8869fcfd852da2a55b3b22c1084b262c07db916e95bea481c6947de3f42ee4a3d47683cee243f3996b372528757a0
7
+ data.tar.gz: 5decaf5fce553e94f19bbeac146e6b3cfef6a7d77472636bdbd0ddce74b1c1aa191ee5fbe91b2bf076736c70453b96e7cc3cb4bb2875c8fff61de1e0e38a4659
@@ -7,6 +7,7 @@ class Wco::Gallery
7
7
  include Wco::Utils
8
8
  store_in collection: 'galleries'
9
9
 
10
+ PAGE_PARAM_NAME = 'galleries_page'
10
11
 
11
12
  field :name
12
13
  validates :name, :uniqueness => true
@@ -6,6 +6,8 @@ class Wco::Headline
6
6
  include Mongoid::Paranoia
7
7
  store_in collection: 'wco_content_headlines'
8
8
 
9
+ PAGE_PARAM_NAME = 'headlines_page'
10
+
9
11
  field :date
10
12
  validates :date, presence: true
11
13
 
@@ -5,6 +5,8 @@ class Wco::Lead
5
5
  include Mongoid::Paranoia
6
6
  store_in collection: 'wco_leads'
7
7
 
8
+ PAGE_PARAM_NAME = 'leads_page'
9
+
8
10
  field :email
9
11
  validates :email, presence: true, uniqueness: true
10
12
  index({ email: -1 }, { unique: true })
@@ -5,6 +5,8 @@ class Wco::Leadset
5
5
  include Mongoid::Paranoia
6
6
  store_in collection: 'wco_leadsets'
7
7
 
8
+ PAGE_PARAM_NAME = 'leadsets_page'
9
+
8
10
  field :company_url
9
11
  validates :company_url, presence: true, uniqueness: true
10
12
  index({ company_url: 1 }, { unique: true, name: 'company_url' })
@@ -9,6 +9,8 @@ class Wco::Report
9
9
  include Wco::Utils
10
10
  store_in collection: 'wco_reports'
11
11
 
12
+ PAGE_PARAM_NAME = 'reports_page'
13
+
12
14
  field :title
13
15
  validates :title, presence: true # , uniqueness: true
14
16
  index({ title: 1 }, { unique: true })
@@ -9,6 +9,8 @@ class Wco::Video
9
9
  include Wco::Utils
10
10
  store_in collection: 'videos'
11
11
 
12
+ PAGE_PARAM_NAME = 'videos_page'
13
+
12
14
  field :name, :type => String
13
15
  index({ created_at: -1 })
14
16
  index({ created_at: -1, name: -1 })
@@ -5,6 +5,8 @@ class WcoEmail::Conversation
5
5
  include Mongoid::Paranoia
6
6
  store_in collection: 'office_email_conversations'
7
7
 
8
+ PAGE_PARAM_NAME = 'conversations_page'
9
+
8
10
  STATUS_UNREAD = 'status_unread'
9
11
  STATUS_READ = 'status_read'
10
12
  STATUSES = [ STATUS_UNREAD, STATUS_READ ]
@@ -16,6 +16,8 @@ class WcoEmail::MessageStub
16
16
  include Mongoid::Paranoia
17
17
  store_in collection: 'wco_email_message_stub'
18
18
 
19
+ PAGE_PARAM_NAME = 'stubs_page'
20
+
19
21
  STATUS_PENDING = 'status_pending'
20
22
  STATUS_PROCESSED = 'status_processed'
21
23
  STATUS_FAILED = 'status_failed'
@@ -0,0 +1,5 @@
1
+
2
+ .leadsets.index--list
3
+ %ul
4
+ - leadsets.each do |ls|
5
+ %li= link_to ls, leadset_path(ls)
@@ -1,5 +1,5 @@
1
1
 
2
- %table.bordered.tags--index.data-table
2
+ %table.bordered.tags--index.maxwidth
3
3
  %thead
4
4
  %tr
5
5
  %td  
@@ -12,6 +12,7 @@
12
12
  %td N Reports
13
13
  %td N Videos
14
14
 
15
+ %td N leadsets
15
16
  %td N Leads
16
17
 
17
18
  %td N Logs
@@ -27,5 +28,6 @@
27
28
  %td= tag.galleries.length
28
29
  %td= tag.reports.length
29
30
  %td= tag.videos.length
31
+ %td= tag.leadsets.length
30
32
  %td= tag.leads.length
31
33
  %td= tag.logs.length
@@ -9,22 +9,25 @@
9
9
  <b>Conversations (#{@tag.conversations.length}):&nbsp;</b>
10
10
  - if @tag.conversations.present?
11
11
  .Conversations
12
- = render '/wco_email/conversations/table', convs: @tag.conversations
12
+ = render '/wco_email/conversations/table', convs: @tag.conversations.page( params[::WcoEmail::Conversation::PAGE_PARAM_NAME] )
13
13
  %li.d-flex
14
14
  <b>Message Stubs (#{@tag.message_stubs.length}):&nbsp;</b>
15
- = render '/wco_email/message_stubs/index', stubs: @tag.message_stubs
15
+ = render '/wco_email/message_stubs/index', stubs: @tag.message_stubs.page( params[::WcoEmail::MessageStub::PAGE_PARAM_NAME] )
16
16
 
17
17
  %li.d-flex
18
18
  <b>Galleries (#{@galleries.length}):&nbsp;</b>
19
- = render '/wco/galleries/index', galleries: @galleries, config: { skip_tags: true }
19
+ = render '/wco/galleries/index', galleries: @galleries.page( params[::Wco::Gallery::PAGE_PARAM_NAME] ), config: { skip_tags: true }
20
20
  %li.d-flex
21
21
  <b>Headlines (#{@tag.headlines.length}):&nbsp;</b>
22
- = render '/wco/headlines/index', headlines: @tag.headlines
22
+ = render '/wco/headlines/index', headlines: @tag.headlines.page( params[::Wco::Headline::PAGE_PARAM_NAME] )
23
23
 
24
+ %li.d-flex
25
+ <b>Leadsets (#{@tag.leadsets.length}):&nbsp;</b>
26
+ = render '/wco/leadsets/index_list', leadsets: @tag.leadsets.page( params[::Wco::Leadset::PAGE_PARAM_NAME] )
24
27
  %li.d-flex
25
28
  <b>Leads (#{@tag.leads.length}):&nbsp;</b>
26
- = render '/wco/leads/index', leads: @tag.leads
29
+ = render '/wco/leads/index', leads: @tag.leads.page( params[::Wco::Lead::PAGE_PARAM_NAME] )
27
30
 
28
31
  %li.d-flex
29
32
  <b>Reports (#{@reports.length}):&nbsp;</b>
30
- = render '/wco/reports/index', reports: @reports, config: { skip_tags: true }
33
+ = render '/wco/reports/index', reports: @reports.page( params[::Wco::Report::PAGE_PARAM_NAME] ), config: { skip_tags: true }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wco_models
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.0.194
4
+ version: 3.1.0.196
5
5
  platform: ruby
6
6
  authors:
7
7
  - Victor Pudeyev
@@ -578,6 +578,7 @@ files:
578
578
  - app/views/wco/leadsets/_form.haml
579
579
  - app/views/wco/leadsets/_header.haml
580
580
  - app/views/wco/leadsets/_index_chips.haml
581
+ - app/views/wco/leadsets/_index_list.haml
581
582
  - app/views/wco/leadsets/edit.haml
582
583
  - app/views/wco/leadsets/index.haml
583
584
  - app/views/wco/leadsets/index_dataTables.haml