wco_models 3.1.0.45 → 3.1.0.47

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: 6eca81149b751af67bdaeaf83369e10a053f8df727a62cae6491a9bd6d7033b0
4
- data.tar.gz: 073553f8ad6ca654445d4bc1685ed5c4ebd6d9deabe38494b486c28573e35cef
3
+ metadata.gz: 3147cfe33bdd89500f5331afad95a8be2b283fbb7b7426e64a0022ef7cadee7f
4
+ data.tar.gz: 84feaedc4b04015e78d9d950818a4e5bbe468c77975f1d30452648cd9b087fb1
5
5
  SHA512:
6
- metadata.gz: 1fe3104f7484a1ea45f73dd3ae6d8bf01a6ea135747698163768832c5b916d3e17ce930538e9eb9e4b9139911a5d18d3d17790d9291faae73434d9dd88060306
7
- data.tar.gz: 8993d0f1294ee42d0c1a90a065f287fed3ee373fdb1417bc41256231da63301e6f2369e5b2e1fc8a895c2fb6690113b7136e3e5e3730c377470d5c62986afa30
6
+ metadata.gz: bce10b4ec941773ecdf5157517163f7c283304055f2a6d8c11f40fc23429f0c65b2d04e062e914a7bd0abc4c3c58cce7844111687267ff7584eaf390fc334a2b
7
+ data.tar.gz: 241e9cb262887e972942bc74794628f04c4201e7acac6f50c735dbd3d4192873479e38a3e140f7b1b983de0c5970a212e4560fb94dddff6a8505abef1d95e0a0
@@ -0,0 +1,5 @@
1
+ //
2
+ //= link_directory ../stylesheets/wco .css
3
+ //
4
+
5
+ console.log('Loaded wco_models/wco_models_manifest.js')
@@ -2,9 +2,13 @@
2
2
  *= require vendor/bootstrap-4.6.2.min
3
3
  *
4
4
  *= require ./utils
5
- *= require_self
5
+ *= require_tree .
6
6
  **/
7
7
 
8
+ /* body {
9
+ color: red !important;
10
+ } */
11
+
8
12
  .select2 {
9
13
  min-width: 200px;
10
14
  width: 100%;
@@ -29,11 +33,3 @@
29
33
  }
30
34
  }
31
35
  }
32
-
33
-
34
- /* .min-w-100px {
35
- min-width: 100px;
36
- }
37
- .min-w-40px {
38
- min-width: 40px;
39
- } */
@@ -0,0 +1,52 @@
1
+
2
+ .pagination a,
3
+ .pagination span.current,
4
+ .pagination span.gap {
5
+ float: left;
6
+ padding: 0 14px;
7
+ line-height: 38px;
8
+ text-decoration: none;
9
+ background-color: white;
10
+ border: 1px solid #DDD;
11
+ border-left-width: 0;
12
+ }
13
+
14
+ .pagination {
15
+ border-left: 1px solid #ddd;
16
+
17
+ li.active {
18
+ padding: 0 14px;
19
+ line-height: 38px;
20
+
21
+ a {
22
+ background-color: #ee6e73;
23
+ color: white;
24
+ }
25
+ }
26
+ .first{
27
+ padding : 0;
28
+ float: none;
29
+ border: none;
30
+ }
31
+ .prev {
32
+ padding : 0;
33
+ float: none;
34
+ border: none;
35
+ }
36
+ .page{
37
+ padding : 0;
38
+ float: none;
39
+ border: none;
40
+ }
41
+ .next{
42
+ padding : 0;
43
+ float: none;
44
+ border: none;
45
+ }
46
+ .last{
47
+ padding : 0;
48
+ float: none;
49
+ border: none;
50
+ }
51
+ }
52
+
@@ -16,5 +16,8 @@ class Ability
16
16
 
17
17
  end
18
18
 
19
+ can [ :open_permission ], Wco
20
+ # can [ :open_permission ], WcoEmail
21
+
19
22
  end
20
23
  end
@@ -7,7 +7,7 @@ class Wco::Lead
7
7
 
8
8
  field :email
9
9
  validates :email, presence: true, uniqueness: true
10
- index({ email: -1 })
10
+ index({ email: -1 }, { unique: true })
11
11
 
12
12
  field :name
13
13
  field :phone
@@ -30,7 +30,7 @@ class Wco::Lead
30
30
  # has_many :videos, class_name: 'Wco::Video'
31
31
 
32
32
  def self.list
33
- all.map { |p| [ p.id, p.email ] }
33
+ [[nil,nil]] + all.map { |p| [ p.email, p.id ] }
34
34
  end
35
35
 
36
36
  OP_DELETE = 'delete'
@@ -7,7 +7,7 @@ class Wco::Leadset
7
7
 
8
8
  field :company_url
9
9
  validates :company_url, presence: true, uniqueness: true
10
- index({ company_url: 1 }, { name: 'company_url' })
10
+ index({ company_url: 1 }, { unique: true, name: 'company_url' })
11
11
 
12
12
  field :email
13
13
  index({ email: 1 }, { name: 'email' })
@@ -1,4 +1,6 @@
1
1
 
2
+ require 'mongoid_paperclip'
3
+
2
4
  class Wco::Video
3
5
  include Mongoid::Document
4
6
  include Mongoid::Timestamps
@@ -12,7 +14,6 @@ class Wco::Video
12
14
  field :subhead ## still need it... 2023-03-24
13
15
 
14
16
  field :is_public, :type => Boolean, :default => false
15
-
16
17
  def published
17
18
  where({ :is_public => true }).order_by({ :created_at => :desc })
18
19
  end
@@ -28,13 +29,6 @@ class Wco::Video
28
29
  # belongs_to :user_profile, :class_name => 'Ish::UserProfile', :inverse_of => :videos
29
30
  # has_and_belongs_to_many :shared_profiles, :class_name => 'Ish::UserProfile', :inverse_of => :shared_videos
30
31
 
31
-
32
- def self.list
33
- [['', nil]] + self.unscoped.order_by( :created_at => :desc ).map do |item|
34
- [ "#{item.created_at.strftime('%Y%m%d')} #{item.name}", item.id ]
35
- end
36
- end
37
-
38
32
  has_mongoid_attached_file :video,
39
33
  # styles: { :thumb => { geometry: '192x108', format: 'jpeg' }, },
40
34
  # processors: [ :transcoder ],
@@ -69,4 +63,10 @@ class Wco::Video
69
63
  %w| name descr |
70
64
  end
71
65
 
66
+ def self.list
67
+ [['', nil]] + self.unscoped.order_by( :created_at => :desc ).map do |item|
68
+ [ "#{item.created_at.strftime('%Y%m%d')} #{item.name}", item.id ]
69
+ end
70
+ end
71
+
72
72
  end
@@ -45,8 +45,6 @@ class WcoEmail::Context
45
45
  self[:subject].presence || tmpl.subject
46
46
  end
47
47
 
48
- has_and_belongs_to_many :leads, class_name: 'Wco::Lead'
49
-
50
48
  belongs_to :email_template, class_name: 'WcoEmail::EmailTemplate'
51
49
  def tmpl; email_template; end
52
50
 
@@ -76,6 +74,9 @@ class WcoEmail::Context
76
74
 
77
75
 
78
76
  belongs_to :lead, class_name: 'Wco::Lead'
77
+ def to_email
78
+ lead.email
79
+ end
79
80
 
80
81
  field :cc, type: :string
81
82
  field :ccs, type: :array, default: []
@@ -6,12 +6,12 @@ class WcoHosting::ApplianceTmpl
6
6
  include Mongoid::Paranoia
7
7
  store_in collection: 'wco_appliance_tmpls'
8
8
 
9
- field :kind
9
+ field :kind, type: :string
10
10
  validates :kind, uniqueness: { scope: :version }, presence: true
11
11
 
12
12
  field :version, type: :string, default: '0.0.0'
13
13
  validates :version, uniqueness: { scope: :kind }, presence: true
14
- index({ kind: -1, version: -1 }, { name: :kind_version })
14
+ index({ kind: -1, version: -1 }, { name: 'kind_version' })
15
15
 
16
16
  def name
17
17
  "#{kind} #{version}"
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.45
4
+ version: 3.1.0.47
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-01-07 00:00:00.000000000 Z
11
+ date: 2024-01-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-s3
@@ -341,7 +341,7 @@ extra_rdoc_files: []
341
341
  files:
342
342
  - README.txt
343
343
  - Rakefile
344
- - app/assets/config/wco_models_manifest.js
344
+ - app/assets/config-trash/wco_models_manifest.js
345
345
  - app/assets/javascripts/vendor/bootstrap-4.6.2.min.js
346
346
  - app/assets/javascripts/vendor/fontawesome-5.0.13.js
347
347
  - app/assets/javascripts/vendor/fontawesome-5.15.4.min.js
@@ -363,6 +363,7 @@ files:
363
363
  - app/assets/javascripts/wco/shared.js
364
364
  - app/assets/stylesheets/vendor/bootstrap-4.6.2.min.css
365
365
  - app/assets/stylesheets/wco/application.css
366
+ - app/assets/stylesheets/wco/pagination.scss
366
367
  - app/assets/stylesheets/wco/utils.scss
367
368
  - app/controllers/wco/application_controller.rb
368
369
  - app/controllers/wco/galleries_controller.rb
@@ -1,6 +0,0 @@
1
- //
2
- //= link wco_models/application.css
3
- //= link_directory ../stylesheets/wco_models .css
4
- //
5
-
6
- console.log('Loaded wco_models/wco_models_manifest.js')