effective_classifieds 0.8.4 → 0.9.1
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 +6 -0
- 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/db/migrate/101_create_effective_classifieds.rb +2 -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: 409d7d330b2bd94d34ef2bfcbdd042309527c10fb98b8a212ebfe1e323ef5bdf
|
4
|
+
data.tar.gz: 40d07570996b6f32b35b0efa2f040496b613c438359f0019db03de78eb97a815
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bd901460ef34cc8a5e03c52ce575115ccc3988dd2ac6c67d051b6c8d8decf3196f5605659f817fc822000f9100d3a10d11ff4f7b65f4251a0bac500f48b8edce
|
7
|
+
data.tar.gz: '09ebe629976f8e4cabc53e75bc903e1cdd5216ce59a5ad08f9f1f775e16184335b803fcca13c9af8294240f3ffa7a07d0c370531f6ad2685350e7c34595bbb2a'
|
@@ -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
|
@@ -21,6 +21,8 @@ module Effective
|
|
21
21
|
belongs_to :classified_wizard, polymorphic: true, optional: true
|
22
22
|
|
23
23
|
has_one_attached :file
|
24
|
+
has_one_purgable :file
|
25
|
+
|
24
26
|
has_rich_text :body
|
25
27
|
|
26
28
|
acts_as_statused(
|
@@ -112,6 +114,10 @@ module Effective
|
|
112
114
|
self.owner ||= current_user
|
113
115
|
end
|
114
116
|
|
117
|
+
before_validation(if: -> { EffectiveClassifieds.default_qb_item_name.present? }) do
|
118
|
+
assign_attributes(qb_item_name: EffectiveClassifieds.default_qb_item_name) if qb_item_name.blank?
|
119
|
+
end
|
120
|
+
|
115
121
|
# Automatically approve submissions created by admins outside the submissions wizard
|
116
122
|
before_validation(if: -> { new_record? && classified_wizard.blank? }) do
|
117
123
|
assign_attributes(status: :approved, price: 0)
|
@@ -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
|
#
|
@@ -45,6 +45,8 @@ class CreateEffectiveClassifieds < ActiveRecord::Migration[6.0]
|
|
45
45
|
|
46
46
|
add_index :classifieds, [:owner_id, :owner_type]
|
47
47
|
add_index :classifieds, :slug
|
48
|
+
add_index :classifieds, :classified_wizard_id, if_not_exists: true
|
49
|
+
add_index :classifieds, :archived, if_not_exists: true
|
48
50
|
|
49
51
|
create_table :classified_wizards do |t|
|
50
52
|
t.string :token
|
@@ -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.1
|
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-06-26 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
|