effective_classifieds 0.4.4 → 0.4.6

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: 3610f8cb04cfd110fbcdae4c20891c456bf8634ed3f7a9acebfd740a20056f06
4
- data.tar.gz: fb3dc4d6373143bbb5df800b632c96990d45ff46d7dad78058fdfc78cffa767f
3
+ metadata.gz: 04aa76011636f0b0567c2f9bc47a1cbc10223a1d373e9b25083373b32bdebf0a
4
+ data.tar.gz: 42028db9291dbd902e7c1ed915db086ceaed94d9251d7e865529b8e8a44e59a1
5
5
  SHA512:
6
- metadata.gz: '00780eb893c3051744a5fa5f0fa92cf97fd0afc513ce30442988726e4fa04366f2f043dcd19479cf7fb45d0bf115b12ca95c662a0300ac1310df1d224e43335d'
7
- data.tar.gz: 18ba35c92f0efe5fc40c715ff6c14e3d84dfa2ce88af2908e983161ec16e1abd5cb15aa06aa7b751c95dd17aadfdcd1e5d008af836519ef392ef958b65891c31
6
+ metadata.gz: 77818f2c23a18486b68b5ef0a037b6a9100d8818a25a292444e7d0fc654c53c0f51d80aaee6f4f14fa1a4019ff8c8570cd523cfd59af6cd5f384ca48fc969b55
7
+ data.tar.gz: 065fd119c41bf71817c2e983714267ffc5c16e2445910fb84549a05b0b27ac71db574a5f5a7d9413b5705547429680627aa347bf7e62e93248b43b0654f37c84
@@ -5,6 +5,9 @@ module Admin
5
5
 
6
6
  include Effective::CrudController
7
7
 
8
+ page_title(only: :index) { EffectiveClassifieds.classifieds_label }
9
+ page_title(only: :new) { "New #{EffectiveClassifieds.classifieds_label} Posting" }
10
+
8
11
  submit :save, 'Save'
9
12
  submit :save, 'Save and View', redirect: -> { effective_classifieds.classified_path(resource) }
10
13
  submit :approve, 'Approve'
@@ -8,6 +8,7 @@ module Admin
8
8
  scope :approved
9
9
  end
10
10
 
11
+ scope :draft
11
12
  scope :published
12
13
  end
13
14
 
@@ -39,11 +40,10 @@ module Admin
39
40
  col :email
40
41
  col :phone
41
42
 
43
+ col :status
42
44
  col :archived
43
45
 
44
- unless EffectiveClassifieds.auto_approve
45
- col :status, search: ['submitted', 'approved']
46
- end
46
+ col :status
47
47
 
48
48
  col :purchased_order, visible: false
49
49
 
@@ -53,7 +53,7 @@ module Admin
53
53
  end
54
54
 
55
55
  collection do
56
- Effective::Classified.all.where.not(status: :draft)
56
+ Effective::Classified.all
57
57
  end
58
58
 
59
59
  def categories
@@ -2,7 +2,7 @@
2
2
  class EffectiveClassifiedsDatatable < Effective::Datatable
3
3
  datatable do
4
4
  length :all
5
- order :start_on
5
+ order :end_on
6
6
 
7
7
  col :start_on, as: :date, label: 'Published'
8
8
  col :end_on, as: :date, label: 'Closing'
@@ -150,6 +150,10 @@ module Effective
150
150
  title.presence || 'New Classified'
151
151
  end
152
152
 
153
+ def purchasable_name
154
+ "Posting - #{to_s}"
155
+ end
156
+
153
157
  def published?
154
158
  return false unless approved?
155
159
  return false if archived?
@@ -1,3 +1,3 @@
1
1
  module EffectiveClassifieds
2
- VERSION = '0.4.4'.freeze
2
+ VERSION = '0.4.6'.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.4.4
4
+ version: 0.4.6
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: 2022-11-03 00:00:00.000000000 Z
11
+ date: 2022-11-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails