effective_classifieds 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/effective/classifieds_controller.rb +2 -3
- data/app/datatables/effective_classifieds_datatable.rb +4 -5
- data/app/models/concerns/effective_classifieds_classified_wizard.rb +2 -2
- data/app/views/admin/classifieds/_form.html.haml +1 -1
- data/app/views/admin/classifieds/_form_access.html.haml +2 -2
- data/app/views/effective/classified_wizards/_classified.html.haml +1 -1
- data/app/views/effective/classified_wizards/_dashboard.html.haml +5 -6
- data/app/views/effective/classified_wizards/_layout.html.haml +1 -1
- data/app/views/effective/classified_wizards/_summary.html.haml +25 -26
- data/app/views/effective/classified_wizards/billing.html.haml +1 -1
- data/app/views/effective/classified_wizards/start.html.haml +3 -4
- data/app/views/effective/classified_wizards/submitted.html.haml +3 -3
- data/app/views/effective/classified_wizards/summary.html.haml +1 -1
- data/app/views/effective/classifieds/_classified.html.haml +49 -51
- data/app/views/effective/classifieds/_dashboard.html.haml +3 -3
- data/app/views/effective/classifieds/_fields.html.haml +6 -6
- data/app/views/effective/classifieds/_layout.html.haml +2 -0
- data/app/views/effective/classifieds/_summary.html.haml +49 -0
- data/app/views/effective/classifieds/index.html.haml +8 -7
- data/app/views/effective/classifieds/show.html.haml +2 -2
- data/app/views/effective/classifieds_mailer/classified_submitted.html.haml +4 -4
- data/config/effective_classifieds.rb +3 -0
- data/lib/effective_classifieds/version.rb +1 -1
- data/lib/effective_classifieds.rb +1 -1
- metadata +5 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7791ff5277633953b3d9d43f9cdf8521954411ef5eb00ece46e14386cff7b0f4
|
4
|
+
data.tar.gz: '083ed5e9866481fc5513262496053f5ba4f5ea3b597d7d5a7218035dd75ecda5'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fe6fc5ad68ad34f5c34915a997b08cb8550d8245e254d25b8c2e0f121e88e58b7d9af2918e0f4207e98746ad0040e00268fb88772956453121a82d0eaec63c9b
|
7
|
+
data.tar.gz: d8503e3830fdedbf1b7ac6d01df2050c134ce23dd7fc5151462218572620fd02df1b8f754e9bc1b4e200c7640278a4a93ff1f3de1a599faa647a9c6a4ebf607c
|
@@ -14,9 +14,8 @@ module Effective
|
|
14
14
|
if EffectiveResources.authorized?(self, :admin, :effective_classifieds)
|
15
15
|
flash.now[:warning] = [
|
16
16
|
'Hi Admin!',
|
17
|
-
('You are viewing a hidden
|
18
|
-
'Click here to
|
19
|
-
("<a href='#{effective_classifieds.edit_admin_classified_path(@classified)}' class='alert-link'>edit classified settings</a>.")
|
17
|
+
('You are viewing a hidden posting.' unless @classified.published?),
|
18
|
+
("<a href='#{effective_classifieds.edit_admin_classified_path(@classified)}' class='alert-link'>Click here to edit settings</a>.")
|
20
19
|
].compact.join(' ')
|
21
20
|
end
|
22
21
|
|
@@ -4,16 +4,15 @@ class EffectiveClassifiedsDatatable < Effective::Datatable
|
|
4
4
|
length :all
|
5
5
|
order :start_on
|
6
6
|
|
7
|
-
col :start_on, as: :date, label: '
|
7
|
+
col :start_on, as: :date, label: 'Published'
|
8
|
+
col :end_on, as: :date, label: 'Closing'
|
8
9
|
|
9
10
|
col :title do |classified|
|
10
11
|
link_to classified, effective_classifieds.classified_path(classified)
|
11
12
|
end
|
12
13
|
|
13
|
-
col :
|
14
|
-
|
15
|
-
col :organization, visible: false
|
16
|
-
col :location, visible: false
|
14
|
+
col :organization
|
15
|
+
col :location
|
17
16
|
|
18
17
|
col :body, visible: false
|
19
18
|
col :website, visible: false
|
@@ -28,7 +28,7 @@ module EffectiveClassifiedsClassifiedWizard
|
|
28
28
|
|
29
29
|
acts_as_wizard(
|
30
30
|
start: 'Start',
|
31
|
-
classified: '
|
31
|
+
classified: 'Posting',
|
32
32
|
summary: 'Review',
|
33
33
|
billing: 'Billing Address',
|
34
34
|
checkout: 'Checkout',
|
@@ -107,7 +107,7 @@ module EffectiveClassifiedsClassifiedWizard
|
|
107
107
|
|
108
108
|
# Instance Methods
|
109
109
|
def to_s
|
110
|
-
'
|
110
|
+
'posting submission'
|
111
111
|
end
|
112
112
|
|
113
113
|
def in_progress?
|
@@ -1,10 +1,10 @@
|
|
1
1
|
= effective_form_with(model: classified, url: classified.persisted? ? effective_classifieds.admin_classified_path(classified.id) : effective_classifieds.admin_classifieds_path) do |f|
|
2
|
-
= f.check_box :authenticate_user, label: 'Yes, the user must be be signed in to view
|
2
|
+
= f.check_box :authenticate_user, label: 'Yes, the user must be be signed in to view', hint: 'Sign up is required to register for any classified'
|
3
3
|
|
4
4
|
- if EffectiveClassifieds.use_effective_roles
|
5
5
|
= f.checks :roles, EffectiveRoles.roles_collection(f.object)
|
6
6
|
|
7
7
|
%p.text-hint
|
8
|
-
*
|
8
|
+
* Do not select a role to allow anyone with an account to view
|
9
9
|
|
10
10
|
= f.submit
|
@@ -5,10 +5,9 @@
|
|
5
5
|
- datatable = EffectiveResources.best('EffectiveClassifiedWizardsDatatable').new(self, namespace: :effective)
|
6
6
|
|
7
7
|
- if submission.present?
|
8
|
-
%h2 In-progress
|
8
|
+
%h2 In-progress Postings
|
9
9
|
|
10
|
-
%p
|
11
|
-
Your submission for #{submission.classified.presence || 'a classified'} is incomplete.
|
10
|
+
%p Your posting submission is incomplete:
|
12
11
|
|
13
12
|
%p
|
14
13
|
Please
|
@@ -19,12 +18,12 @@
|
|
19
18
|
|
20
19
|
%hr
|
21
20
|
|
22
|
-
%h2
|
21
|
+
%h2= EffectiveClassifieds.classifieds_label
|
23
22
|
|
24
23
|
- if datatable.present?
|
25
24
|
= render_simple_datatable(datatable)
|
26
25
|
- else
|
27
|
-
%p You don't have any
|
26
|
+
%p You don't have any postings. When you do, we'll show them here.
|
28
27
|
|
29
28
|
- if submission.blank?
|
30
|
-
%p= link_to
|
29
|
+
%p= link_to "Submit New #{EffectiveClassifieds.classifieds_label} Posting", effective_classifieds.new_classified_wizard_path, class: 'btn btn-primary'
|
@@ -1,30 +1,29 @@
|
|
1
|
-
|
2
|
-
- classified = classified_wizard.classified
|
1
|
+
- classified = classified_wizard.classified
|
3
2
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
3
|
+
%table.table.table-sm
|
4
|
+
%tbody
|
5
|
+
%tr
|
6
|
+
%th.border-0 Posting
|
7
|
+
%td.border-0
|
9
8
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
9
|
+
- if classified&.published?
|
10
|
+
= link_to(classified, effective_classifieds.classified_path(classified), target: '_blank')
|
11
|
+
- else
|
12
|
+
= classified.presence || 'Posting was deleted'
|
14
13
|
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
14
|
+
- if request.path.start_with?('/admin')
|
15
|
+
%tr
|
16
|
+
%th Owner
|
17
|
+
%td
|
18
|
+
- url = (polymorphic_admin_path(classified_wizard.owner) rescue "/admin/users/#{classified_wizard.owner.to_param}/edit")
|
19
|
+
= link_to(classified_wizard.owner, url)
|
20
|
+
- else
|
21
|
+
%tr
|
22
|
+
%th Owner
|
23
|
+
%td= classified_wizard.owner
|
25
24
|
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
25
|
+
- if classified&.was_submitted?
|
26
|
+
%tr
|
27
|
+
%th Status
|
28
|
+
%td
|
29
|
+
%span.badge.badge-secondary= classified.status
|
@@ -10,6 +10,6 @@
|
|
10
10
|
= f.fields_for(:owner, f.object.owner) do |fo|
|
11
11
|
= effective_address_fields(fo, :billing)
|
12
12
|
|
13
|
-
%p.text-muted * Not all
|
13
|
+
%p.text-muted * Not all postings require a fee and we ask for a billing address for future use.
|
14
14
|
|
15
15
|
= f.save 'Save and Continue'
|
@@ -3,13 +3,12 @@
|
|
3
3
|
|
4
4
|
.card
|
5
5
|
.card-body
|
6
|
-
%p
|
7
|
-
Welcome #{current_user}!
|
6
|
+
%p Welcome #{current_user}!
|
8
7
|
|
9
8
|
%p
|
10
|
-
You can use this wizard to
|
9
|
+
You can use this wizard to submit a new #{EffectiveClassifieds.classifieds_label} posting.
|
11
10
|
Your progress will be saved as you move through the wizard.
|
12
|
-
Once
|
11
|
+
Once your posting is published you are able to come back and edit the details.
|
13
12
|
|
14
13
|
= effective_form_with(model: resource, url: wizard_path(step), method: :put) do |f|
|
15
14
|
= f.hidden_field :id
|
@@ -10,11 +10,11 @@
|
|
10
10
|
- raise('expected a purchased classified submit_order') unless resource.submit_order&.purchased?
|
11
11
|
|
12
12
|
.alert.alert-warning.mb-4
|
13
|
-
This
|
13
|
+
This posting was submitted on #{classified.submitted_at.strftime('%F')}.
|
14
14
|
|
15
15
|
- unless classified.approved?
|
16
|
-
|
17
|
-
|
16
|
+
.alert.alert-danger.mb-4
|
17
|
+
Your posting must still be approved before it will be displayed.
|
18
18
|
|
19
19
|
= link_to "Return to Dashboard", root_path, class: 'btn btn-lg btn-primary mb-4'
|
20
20
|
|
@@ -1,51 +1,49 @@
|
|
1
|
-
.
|
2
|
-
|
3
|
-
%
|
4
|
-
%
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
%th Phone
|
51
|
-
%td= classified.phone
|
1
|
+
%table.table.effective-classified-table
|
2
|
+
%tbody
|
3
|
+
%tr
|
4
|
+
%th Category
|
5
|
+
%td= classified.category
|
6
|
+
|
7
|
+
%tr
|
8
|
+
%th Title
|
9
|
+
%td= classified.title
|
10
|
+
|
11
|
+
%tr
|
12
|
+
%th Available
|
13
|
+
%td
|
14
|
+
#{classified.start_on&.strftime('%F')}
|
15
|
+
to
|
16
|
+
#{classified.end_on&.strftime('%F')}
|
17
|
+
|
18
|
+
- if classified.location.present?
|
19
|
+
%tr
|
20
|
+
%th Location
|
21
|
+
%td= classified.location
|
22
|
+
|
23
|
+
%tr
|
24
|
+
%th Description
|
25
|
+
%td= classified.body.to_s
|
26
|
+
|
27
|
+
- if classified.file.attached?
|
28
|
+
%tr
|
29
|
+
%th Attachment
|
30
|
+
%td= link_to(classified.file.filename, main_app.url_for(classified.file), target: '_blank')
|
31
|
+
|
32
|
+
%tr
|
33
|
+
%th Company
|
34
|
+
%td= classified.organization
|
35
|
+
|
36
|
+
- if classified.website.present?
|
37
|
+
%tr
|
38
|
+
%th Website
|
39
|
+
%td= link_to(classified.website, classified.website, target: '_blank')
|
40
|
+
|
41
|
+
- if classified.email.present?
|
42
|
+
%tr
|
43
|
+
%th Email
|
44
|
+
%td= mail_to(classified.email)
|
45
|
+
|
46
|
+
- if classified.phone.present?
|
47
|
+
%tr
|
48
|
+
%th Phone
|
49
|
+
%td= classified.phone
|
@@ -1,4 +1,4 @@
|
|
1
|
-
%h2
|
1
|
+
%h2= EffectiveClassifieds.classifieds_label
|
2
2
|
|
3
3
|
- published = Effective::Classified.classifieds(user: current_user).count
|
4
4
|
|
@@ -6,6 +6,6 @@
|
|
6
6
|
- datatable = EffectiveClassifiedsDatatable.new(self, namespace: :effective)
|
7
7
|
= render_datatable(datatable, simple: true)
|
8
8
|
- else
|
9
|
-
%p There are no active
|
9
|
+
%p There are no active postings. When there are, we'll show them here.
|
10
10
|
|
11
|
-
%p= link_to 'View All
|
11
|
+
%p= link_to 'View All', effective_classifieds.classifieds_path, class: 'btn btn-primary'
|
@@ -1,5 +1,5 @@
|
|
1
1
|
= f.select :category, EffectiveClassifieds.categories, required: true
|
2
|
-
= f.text_field :title
|
2
|
+
= f.text_field :title, label: "#{EffectiveClassifieds.classifieds_label} Posting Title"
|
3
3
|
= f.text_field :location
|
4
4
|
|
5
5
|
- if f.object.persisted? || f.object.errors.include?(:slug)
|
@@ -11,20 +11,20 @@
|
|
11
11
|
.row
|
12
12
|
.col-lg-6
|
13
13
|
= f.date_field :start_on, label: "Start",
|
14
|
-
hint: 'The
|
14
|
+
hint: 'The posting will be displayed starting after this date.',
|
15
15
|
input_js: { minDate: minDate.strftime('%F') }
|
16
16
|
|
17
17
|
.col-lg-6
|
18
18
|
= f.date_field :end_on, label: "Expire",
|
19
|
-
hint: 'The
|
19
|
+
hint: 'The posting will no longer be displayed after this date.'
|
20
20
|
|
21
21
|
- if f.object.persisted? && !f.object.draft?
|
22
|
-
= f.check_box :archived, label: 'Yes, this
|
22
|
+
= f.check_box :archived, label: 'Yes, this posting is archived. It will not be displayed.'
|
23
23
|
|
24
24
|
- if defined?(EffectiveArticleEditor)
|
25
|
-
= f.article_editor :body, label: '
|
25
|
+
= f.article_editor :body, label: 'Description', hint: 'The content of your posting. Be sure to include all relevant information!'
|
26
26
|
- else
|
27
|
-
= f.rich_text_area :body, label: '
|
27
|
+
= f.rich_text_area :body, label: 'Description', hint: 'The content of your posting. Be sure to include all relevant information!'
|
28
28
|
|
29
29
|
= f.file_field :file, label: 'Attach PDF'
|
30
30
|
|
@@ -0,0 +1,49 @@
|
|
1
|
+
%table.table.effective-classified-table
|
2
|
+
%tbody
|
3
|
+
%tr
|
4
|
+
%th Category
|
5
|
+
%td= classified.category
|
6
|
+
|
7
|
+
%tr
|
8
|
+
%th Title
|
9
|
+
%td= classified.title
|
10
|
+
|
11
|
+
%tr
|
12
|
+
%th Available
|
13
|
+
%td
|
14
|
+
#{classified.start_on&.strftime('%F')}
|
15
|
+
to
|
16
|
+
#{classified.end_on&.strftime('%F')}
|
17
|
+
|
18
|
+
- if classified.location.present?
|
19
|
+
%tr
|
20
|
+
%th Location
|
21
|
+
%td= classified.location
|
22
|
+
|
23
|
+
%tr
|
24
|
+
%th Description
|
25
|
+
%td= classified.body.to_s
|
26
|
+
|
27
|
+
- if classified.file.attached?
|
28
|
+
%tr
|
29
|
+
%th Attachment
|
30
|
+
%td= link_to(classified.file.filename, main_app.url_for(classified.file), target: '_blank')
|
31
|
+
|
32
|
+
%tr
|
33
|
+
%th Company
|
34
|
+
%td= classified.organization
|
35
|
+
|
36
|
+
- if classified.website.present?
|
37
|
+
%tr
|
38
|
+
%th Website
|
39
|
+
%td= link_to(classified.website, classified.website, target: '_blank')
|
40
|
+
|
41
|
+
- if classified.email.present?
|
42
|
+
%tr
|
43
|
+
%th Email
|
44
|
+
%td= mail_to(classified.email)
|
45
|
+
|
46
|
+
- if classified.phone.present?
|
47
|
+
%tr
|
48
|
+
%th Phone
|
49
|
+
%td= classified.phone
|
@@ -1,8 +1,9 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
= render 'layout' do
|
2
|
+
.resource-buttons
|
3
|
+
= link_to "Submit New #{EffectiveClassifieds.classifieds_label} Posting", effective_classifieds.new_classified_wizard_path, class: 'btn btn-primary'
|
3
4
|
|
4
|
-
= card do
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
5
|
+
= card do
|
6
|
+
- if @datatable.present?(self)
|
7
|
+
= render_datatable(@datatable, simple: true)
|
8
|
+
- else
|
9
|
+
%p There are no active postings. When there are, we'll show them here.
|
@@ -1,8 +1,8 @@
|
|
1
1
|
.effective-classified
|
2
2
|
- unless @classified.published?
|
3
|
-
.alert.alert-warning.mb-4 This
|
3
|
+
.alert.alert-warning.mb-4 This posting is currently unavailable.
|
4
4
|
|
5
5
|
= render 'effective/classifieds/classified', classified: @classified
|
6
6
|
|
7
7
|
.resource-buttons.text-left
|
8
|
-
= link_to 'View All
|
8
|
+
= link_to 'View All', effective_classifieds.classifieds_path, class: 'btn btn-primary'
|
@@ -1,9 +1,9 @@
|
|
1
1
|
%p Hello Admin!
|
2
2
|
|
3
3
|
- if @classified.published?
|
4
|
-
%p The following
|
4
|
+
%p The following posting has been submitted and is published online:
|
5
5
|
- else
|
6
|
-
%p The following
|
6
|
+
%p The following posting has been submitted and is awaiting your approval:
|
7
7
|
|
8
8
|
%hr
|
9
9
|
|
@@ -13,8 +13,8 @@
|
|
13
13
|
%hr
|
14
14
|
|
15
15
|
- unless @classified.approved?
|
16
|
-
%p= link_to('Approve
|
16
|
+
%p= link_to('Approve Posting', effective_classifieds.edit_admin_classified_path(@classified))
|
17
17
|
|
18
|
-
%p= link_to('View
|
18
|
+
%p= link_to('View Posting', effective_classifieds.classified_path(@classified))
|
19
19
|
|
20
20
|
%p Have a great day!
|
@@ -12,6 +12,9 @@ EffectiveClassifieds.setup do |config|
|
|
12
12
|
# Classified Settings
|
13
13
|
# config.classified_wizard_class_name = 'Effective::ClassifiedWizard'
|
14
14
|
|
15
|
+
# Page title like Classifieds or Job Board
|
16
|
+
config.classifieds_label = 'Classifieds'
|
17
|
+
|
15
18
|
# Pagination length on the Classified#index page
|
16
19
|
config.per_page = :all
|
17
20
|
|
@@ -10,7 +10,7 @@ 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
|
13
|
+
:classified_wizard_class_name, :classifieds_label
|
14
14
|
]
|
15
15
|
end
|
16
16
|
|
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
|
+
version: 0.4.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: 2022-
|
11
|
+
date: 2022-11-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -227,6 +227,8 @@ files:
|
|
227
227
|
- app/views/effective/classifieds/_dashboard.html.haml
|
228
228
|
- app/views/effective/classifieds/_fields.html.haml
|
229
229
|
- app/views/effective/classifieds/_form.html.haml
|
230
|
+
- app/views/effective/classifieds/_layout.html.haml
|
231
|
+
- app/views/effective/classifieds/_summary.html.haml
|
230
232
|
- app/views/effective/classifieds/edit.html.haml
|
231
233
|
- app/views/effective/classifieds/index.html.haml
|
232
234
|
- app/views/effective/classifieds/show.html.haml
|
@@ -260,7 +262,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
260
262
|
- !ruby/object:Gem::Version
|
261
263
|
version: '0'
|
262
264
|
requirements: []
|
263
|
-
rubygems_version: 3.
|
265
|
+
rubygems_version: 3.3.7
|
264
266
|
signing_key:
|
265
267
|
specification_version: 4
|
266
268
|
summary: Users submit classified ads for job openings and equipment sales
|