effective_classifieds 0.8.3 → 0.9.0
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 +4 -4
- data/app/datatables/admin/effective_classifieds_datatable.rb +3 -0
- data/app/models/effective/classified.rb +5 -1
- data/app/views/effective/classifieds/_fields.html.haml +3 -0
- data/app/views/effective/classifieds/_qb_item_name_field.html.haml +6 -0
- data/config/effective_classifieds.rb +3 -0
- data/lib/effective_classifieds/version.rb +1 -1
- data/lib/effective_classifieds.rb +2 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d502d48f620fdf916078dcec57e2f92193c1ae89335d467226680046e3a2c681
|
4
|
+
data.tar.gz: 2d40ac91a4a999fb5381505faf1455e061c898a3c3638e790314b60bf4e494e8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f6567e4d48d1725e52631991a9447301e2d28bf6bc0fe184ea348096e8f05c6f4762003bae21d07e3645310b345b01b9bad164fb6280bc14770aacb28355e4f3
|
7
|
+
data.tar.gz: 212ae7bc5b53211f1bfed1be111f359433d695ceaa903a76757c6baa6d2a0aa014b34d1fa57d083cab9192152c2b177fbc0804808dede29781960a4221715245
|
@@ -50,6 +50,9 @@ module Admin
|
|
50
50
|
|
51
51
|
col :purchased_order, visible: false
|
52
52
|
|
53
|
+
col :qb_item_name, label: qb_item_name_label, search: Effective::ItemName.sorted.map(&:to_s),
|
54
|
+
visible: EffectiveOrders.use_item_names? && EffectiveClassifieds.default_qb_item_name.blank?
|
55
|
+
|
53
56
|
actions_col do |classified|
|
54
57
|
dropdown_link_to("View #{classified_label}", effective_classifieds.classified_path(classified), target: '_blank')
|
55
58
|
end
|
@@ -112,6 +112,10 @@ module Effective
|
|
112
112
|
self.owner ||= current_user
|
113
113
|
end
|
114
114
|
|
115
|
+
before_validation(if: -> { EffectiveClassifieds.default_qb_item_name.present? }) do
|
116
|
+
assign_attributes(qb_item_name: EffectiveClassifieds.default_qb_item_name) if qb_item_name.blank?
|
117
|
+
end
|
118
|
+
|
115
119
|
# Automatically approve submissions created by admins outside the submissions wizard
|
116
120
|
before_validation(if: -> { new_record? && classified_wizard.blank? }) do
|
117
121
|
assign_attributes(status: :approved, price: 0)
|
@@ -170,7 +174,7 @@ module Effective
|
|
170
174
|
def published?
|
171
175
|
return false unless approved?
|
172
176
|
return false if archived?
|
173
|
-
return false if start_on.blank? || (Time.zone.now
|
177
|
+
return false if start_on.blank? || (Time.zone.now < start_on)
|
174
178
|
return false if end_on.present? && (Time.zone.now >= end_on)
|
175
179
|
true
|
176
180
|
end
|
@@ -1,4 +1,7 @@
|
|
1
1
|
= f.select :category, EffectiveClassifieds.categories, required: true, include_blank: false
|
2
|
+
|
3
|
+
= render 'effective/classifieds/qb_item_name_field', f: f
|
4
|
+
|
2
5
|
= f.text_field :title, label: "#{classified_label} title"
|
3
6
|
= f.text_field :location, label: "#{classified_label} location"
|
4
7
|
= f.text_field :organization
|
@@ -24,6 +24,9 @@ EffectiveClassifieds.setup do |config|
|
|
24
24
|
# Can checkout with phone or cheque 'deferred' payment providers
|
25
25
|
config.skip_deferred = true
|
26
26
|
|
27
|
+
# Default QB Item Name
|
28
|
+
# config.default_qb_item_name = 'Job Board'
|
29
|
+
|
27
30
|
# Mailer Settings
|
28
31
|
# Please see config/initializers/effective_resources.rb for default effective_* gem mailer settings
|
29
32
|
#
|
@@ -10,7 +10,8 @@ module EffectiveClassifieds
|
|
10
10
|
:classifieds_table_name, :classified_wizards_table_name,
|
11
11
|
:mailer, :parent_mailer, :deliver_method, :mailer_layout, :mailer_sender, :mailer_admin, :mailer_subject,
|
12
12
|
:layout, :categories, :per_page, :use_effective_roles, :max_duration, :auto_approve,
|
13
|
-
:classified_wizard_class_name, :skip_deferred
|
13
|
+
:classified_wizard_class_name, :skip_deferred,
|
14
|
+
:default_qb_item_name
|
14
15
|
]
|
15
16
|
end
|
16
17
|
|
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
|
+
version: 0.9.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: 2025-
|
11
|
+
date: 2025-03-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -256,6 +256,7 @@ files:
|
|
256
256
|
- app/views/effective/classifieds/_fields.html.haml
|
257
257
|
- app/views/effective/classifieds/_form.html.haml
|
258
258
|
- app/views/effective/classifieds/_layout.html.haml
|
259
|
+
- app/views/effective/classifieds/_qb_item_name_field.html.haml
|
259
260
|
- app/views/effective/classifieds/_summary.html.haml
|
260
261
|
- app/views/effective/classifieds/edit.html.haml
|
261
262
|
- app/views/effective/classifieds/index.html.haml
|