effective_classifieds 0.6.7 → 0.7.0

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: dcb913b24db42f767a00e6510007f7cbdd4a23f41cc12250418a7e81328746f9
4
- data.tar.gz: 604f561f584ec2199be9641ba9d7a9616f3a496c147c85e3eaa101451265f265
3
+ metadata.gz: e96a880538ec95e1745ec13e6ac7520f9de680e824068182247bde290794b6e4
4
+ data.tar.gz: 18b832496e4a994383c2dced4291c60b7563b4f772b00dbb401e1a9a2f97e673
5
5
  SHA512:
6
- metadata.gz: 9a05e61dba76290ffeac816e406e72cecf48998311b633c1deb64dcef168ee1e03521725a64c79d8ec3609aec98e1b279c116680bbfcdfac0b1618018c3ac570
7
- data.tar.gz: f7c42880255906ef28717bf3cbf93cf4f2e8a66bb9b3396e3052826828543523ff4145bec96e2851617b5a198e2f070d041b37cb42e3c54cbbfca95dd38e98ce
6
+ metadata.gz: cff4f5bd000f79a03f1342f0e030ca4459a5ed825d512e014547d8aa4cd8744f5aa577bca1c4ba430fa57795017db9d2f20469118e57ab8fd3141e2439f1a5ec
7
+ data.tar.gz: 0ba27c2ed0d734c3bedf9e034c0f43e63c2f9d5619c071878e158b52510fd8079969ddcb0e3675cb1623ba6e698e48d10d2ce2b86efd6c0c2929df7718594ce5
@@ -37,7 +37,6 @@ module Effective
37
37
  render(json: @classified.for_json.merge(url: url).to_json)
38
38
  }
39
39
  end
40
-
41
40
  end
42
41
 
43
42
  private
@@ -46,6 +46,7 @@ module Admin
46
46
  col :archived
47
47
 
48
48
  col :status
49
+ col :tracks_count, label: 'Views'
49
50
 
50
51
  col :purchased_order, visible: false
51
52
 
@@ -12,6 +12,10 @@ class EffectiveClassifiedWizardsDatatable < Effective::Datatable
12
12
 
13
13
  col :classifieds, search: :string, label: 'Title'
14
14
 
15
+ col :tracks_count, label: 'Views' do |wizard|
16
+ wizard.classified&.tracks_count
17
+ end
18
+
15
19
  col :owner, visible: false, search: :string
16
20
 
17
21
  col :status, visible: false do |wizard|
@@ -10,6 +10,7 @@ module Effective
10
10
  acts_as_slugged
11
11
  acts_as_purchasable
12
12
  log_changes if respond_to?(:log_changes)
13
+ acts_as_trackable if respond_to?(:acts_as_trackable)
13
14
  acts_as_role_restricted if respond_to?(:acts_as_role_restricted)
14
15
 
15
16
  # This will be the owner of the classified ad submission
@@ -13,6 +13,11 @@
13
13
  - datatable = Admin::EffectiveOrdersDatatable.new(parent: classified.classified_wizard, owner: classified.owner, user: classified.owner, total: false)
14
14
  = render_datatable(datatable, simple: true)
15
15
 
16
+ - if classified.class.respond_to?(:acts_as_trackable?)
17
+ = tab 'Tracks' do
18
+ - datatable = Admin::EffectiveTracksDatatable.new(owner: classified)
19
+ = render_datatable(datatable, inline: true, namespace: :admin)
20
+
16
21
  - if classified.respond_to?(:log_changes_datatable)
17
22
  = tab 'Logs' do
18
23
  = render_inline_datatable(classified.log_changes_datatable)
@@ -37,6 +37,9 @@ class CreateEffectiveClassifieds < ActiveRecord::Migration[6.0]
37
37
  t.boolean :tax_exempt, default: false
38
38
  t.string :qb_item_name
39
39
 
40
+ # Acts as trackable
41
+ t.integer :tracks_count, default: 0
42
+
40
43
  t.timestamps
41
44
  end
42
45
 
@@ -1,3 +1,3 @@
1
1
  module EffectiveClassifieds
2
- VERSION = '0.6.7'.freeze
2
+ VERSION = '0.7.0'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_classifieds
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.7
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Code and Effect
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-04-29 00:00:00.000000000 Z
11
+ date: 2024-06-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails