effective_classifieds 0.4.13 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/MIT-LICENSE +1 -1
- data/app/controllers/admin/classifieds_controller.rb +0 -3
- data/app/controllers/effective/classifieds_controller.rb +1 -1
- data/app/datatables/admin/effective_classifieds_datatable.rb +1 -1
- data/app/helpers/effective_classifieds_helper.rb +15 -0
- data/app/models/concerns/effective_classifieds_classified_wizard.rb +1 -1
- data/app/models/effective/classified.rb +5 -1
- data/app/views/admin/classifieds/_form.html.haml +1 -1
- data/app/views/effective/classified_wizards/_dashboard.html.haml +6 -6
- data/app/views/effective/classified_wizards/_summary.html.haml +3 -3
- data/app/views/effective/classified_wizards/start.html.haml +1 -1
- data/app/views/effective/classified_wizards/submitted.html.haml +6 -4
- data/app/views/effective/classified_wizards/summary.html.haml +1 -1
- data/app/views/effective/classifieds/_dashboard.html.haml +2 -2
- data/app/views/effective/classifieds/_fields.html.haml +5 -5
- data/app/views/effective/classifieds/_summary.html.haml +2 -49
- data/app/views/effective/classifieds/index.html.haml +2 -2
- data/app/views/effective/classifieds/show.html.haml +1 -1
- data/config/effective_classifieds.rb +0 -3
- data/config/locales/effective_classifieds.en.yml +3 -4
- data/config/routes.rb +1 -0
- data/lib/effective_classifieds/version.rb +1 -1
- data/lib/effective_classifieds.rb +1 -1
- metadata +18 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fd50a8e12797b1b7a7da7081e55c077efc5141775706430fbffd440bf744b911
|
4
|
+
data.tar.gz: fd97d6b44bbfa9b076f5cf419edc1b9e58572cbc04abcba91ad0a68bbd0a1ebc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 27283385e03edd3c6588e90a05fba8beffc9864c219b88e6b882c487263bd40b374683bd074750530f62acd3a766b718f4becc0d664a41ad675a7e5cc0af0a11
|
7
|
+
data.tar.gz: 36e596bbfb2b110a180d6c470500d1675136ac6cd629c8f4478569081cf2b10f72772dc6c25b2127cc36207f0889f12a830470c28ce49d389848c8562997b1f2
|
data/MIT-LICENSE
CHANGED
@@ -5,9 +5,6 @@ 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
|
-
|
11
8
|
submit :save, 'Save'
|
12
9
|
submit :save, 'Save and View', redirect: -> { effective_classifieds.classified_path(resource) }
|
13
10
|
submit :approve, 'Approve'
|
@@ -2,7 +2,7 @@ module Effective
|
|
2
2
|
class ClassifiedsController < ApplicationController
|
3
3
|
include Effective::CrudController
|
4
4
|
|
5
|
-
page_title(only: :index) {
|
5
|
+
page_title(only: :index) { view_context.classifieds_name_label }
|
6
6
|
|
7
7
|
def show
|
8
8
|
@classified = resource_scope.find(params[:id])
|
@@ -49,7 +49,7 @@ module Admin
|
|
49
49
|
col :purchased_order, visible: false
|
50
50
|
|
51
51
|
actions_col do |classified|
|
52
|
-
dropdown_link_to(
|
52
|
+
dropdown_link_to("View #{classified_label}", effective_classifieds.classified_path(classified), target: '_blank')
|
53
53
|
end
|
54
54
|
end
|
55
55
|
|
@@ -1,2 +1,17 @@
|
|
1
1
|
module EffectiveClassifiedsHelper
|
2
|
+
|
3
|
+
# Job Board or Classifieds
|
4
|
+
def classifieds_name_label
|
5
|
+
et('effective_classifieds.name')
|
6
|
+
end
|
7
|
+
|
8
|
+
# Job Board Posting or Classified Posting
|
9
|
+
def classified_label
|
10
|
+
et(Effective::Classified)
|
11
|
+
end
|
12
|
+
|
13
|
+
# Job Board Postings or Classified Postings
|
14
|
+
def classifieds_label
|
15
|
+
ets(Effective::Classified)
|
16
|
+
end
|
2
17
|
end
|
@@ -147,7 +147,7 @@ module Effective
|
|
147
147
|
end
|
148
148
|
|
149
149
|
def to_s
|
150
|
-
title.presence ||
|
150
|
+
title.presence || model_name.human
|
151
151
|
end
|
152
152
|
|
153
153
|
def purchasable_name
|
@@ -177,5 +177,9 @@ module Effective
|
|
177
177
|
approved!
|
178
178
|
end
|
179
179
|
|
180
|
+
def unapprove!
|
181
|
+
unapproved!
|
182
|
+
end
|
183
|
+
|
180
184
|
end
|
181
185
|
end
|
@@ -5,25 +5,25 @@
|
|
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 #{classifieds_label}
|
9
9
|
|
10
|
-
%p Your
|
10
|
+
%p Your submission is incomplete:
|
11
11
|
|
12
12
|
%p
|
13
13
|
Please
|
14
|
-
= link_to("Continue submission
|
14
|
+
= link_to("Continue submission", effective_classifieds.classified_wizard_build_path(submission, submission.next_step), 'data-turbolinks' => false, class: 'btn btn-primary')
|
15
15
|
or you can
|
16
16
|
= link_to('Abandon submission', effective_classifieds.classified_wizard_path(submission), 'data-confirm': "Really delete #{submission}?", 'data-method': :delete, class: 'btn btn-danger')
|
17
17
|
to submit another.
|
18
18
|
|
19
19
|
%hr
|
20
20
|
|
21
|
-
%h2=
|
21
|
+
%h2= classifieds_label
|
22
22
|
|
23
23
|
- if datatable.present?
|
24
24
|
= render_simple_datatable(datatable)
|
25
25
|
- else
|
26
|
-
%p You don't have any
|
26
|
+
%p You don't have any #{classifieds_label.downcase}. When you do, we'll show them here.
|
27
27
|
|
28
28
|
- if submission.blank?
|
29
|
-
%p= link_to "Submit New #{
|
29
|
+
%p= link_to "Submit New #{classified_label}", effective_classifieds.new_classified_wizard_path, class: 'btn btn-primary'
|
@@ -3,7 +3,7 @@
|
|
3
3
|
%table.table.table-sm
|
4
4
|
%tbody
|
5
5
|
%tr
|
6
|
-
%th.border-0
|
6
|
+
%th.border-0= classified_label
|
7
7
|
%td.border-0
|
8
8
|
|
9
9
|
- if classified&.published?
|
@@ -13,13 +13,13 @@
|
|
13
13
|
|
14
14
|
- if request.path.start_with?('/admin')
|
15
15
|
%tr
|
16
|
-
%th
|
16
|
+
%th Submitted by
|
17
17
|
%td
|
18
18
|
- url = (polymorphic_admin_path(classified_wizard.owner) rescue "/admin/users/#{classified_wizard.owner.to_param}/edit")
|
19
19
|
= link_to(classified_wizard.owner, url)
|
20
20
|
- else
|
21
21
|
%tr
|
22
|
-
%th
|
22
|
+
%th Submitted by
|
23
23
|
%td= classified_wizard.owner
|
24
24
|
|
25
25
|
- if classified&.was_submitted?
|
@@ -6,7 +6,7 @@
|
|
6
6
|
%p Welcome #{current_user}!
|
7
7
|
|
8
8
|
%p
|
9
|
-
You can use this wizard to submit a new #{
|
9
|
+
You can use this wizard to submit a new #{classified_label.downcase} for display on the #{classifieds_name_label}.
|
10
10
|
Your progress will be saved as you move through the wizard.
|
11
11
|
Once your posting is published you are able to come back and edit the details.
|
12
12
|
|
@@ -10,15 +10,17 @@
|
|
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 #{classified_label.downcase} was submitted on #{classified.submitted_at.strftime('%F')}.
|
14
14
|
|
15
15
|
- unless classified.approved?
|
16
16
|
.alert.alert-danger.mb-4
|
17
|
-
Your
|
17
|
+
Your #{classified_label.downcase} must still be approved before it will be displayed.
|
18
18
|
|
19
|
-
= link_to "Return to Dashboard", return_to_dashboard_path, class: 'btn btn-lg btn-primary btn-block'
|
19
|
+
.mb-4= link_to "Return to Dashboard", return_to_dashboard_path, class: 'btn btn-lg btn-primary btn-block'
|
20
|
+
|
21
|
+
= card do
|
22
|
+
= render 'effective/classified_wizards/summary', classified_wizard: resource
|
20
23
|
|
21
|
-
= render 'effective/classified_wizards/summary', classified_wizard: resource
|
22
24
|
= render 'effective/classified_wizards/classified_wizard', classified_wizard: resource
|
23
25
|
|
24
26
|
- if resource.orders.present?
|
@@ -5,4 +5,4 @@
|
|
5
5
|
|
6
6
|
= effective_form_with(model: resource, url: wizard_path(step), method: :put) do |f|
|
7
7
|
= f.hidden_field :id
|
8
|
-
= f.submit "Submit #{
|
8
|
+
= f.submit "Submit #{classified_label}", class: 'btn btn-primary'
|
@@ -1,4 +1,4 @@
|
|
1
|
-
%h2=
|
1
|
+
%h2= classifieds_name_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 #{classifieds_label.downcase}. When there are, we'll show them here.
|
10
10
|
|
11
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
|
3
3
|
= f.text_field :location
|
4
4
|
|
5
5
|
- if f.object.persisted? || f.object.errors.include?(:slug)
|
@@ -11,7 +11,7 @@
|
|
11
11
|
.row
|
12
12
|
.col-lg-6
|
13
13
|
- if f.object.new_record?
|
14
|
-
= f.date_field :start_on, label: "Start", hint:
|
14
|
+
= f.date_field :start_on, label: "Start", hint: "The posting will be displayed starting after this date.", input_js: { minDate: minDate.strftime('%F') }
|
15
15
|
- else
|
16
16
|
= f.date_field :start_on, label: "Start", hint: 'The posting will be displayed starting after this date.'
|
17
17
|
|
@@ -26,13 +26,13 @@
|
|
26
26
|
- else
|
27
27
|
= f.rich_text_area :body, label: 'Description', hint: 'The content of your posting. Be sure to include all relevant information!'
|
28
28
|
|
29
|
-
= f.file_field :file,
|
29
|
+
= f.file_field :file, hint: 'Please attach a PDF'
|
30
30
|
|
31
31
|
%h2.mt-5.mb-0 Contact Information
|
32
32
|
%p
|
33
|
-
%small.text-muted Contact information will be displayed on the
|
33
|
+
%small.text-muted Contact information will be displayed on the #{classifieds_name_label} ad.
|
34
34
|
|
35
|
-
= f.text_field :organization,
|
35
|
+
= f.text_field :organization, hint: 'Organization or company name'
|
36
36
|
= f.url_field :website
|
37
37
|
= f.email_field :email
|
38
38
|
= f.tel_field :phone
|
@@ -1,49 +1,2 @@
|
|
1
|
-
|
2
|
-
|
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
|
+
= effective_table_with(classified, except: :slug) do |f|
|
2
|
+
= render('effective/classifieds/fields', f: f)
|
@@ -1,9 +1,9 @@
|
|
1
1
|
= render 'layout' do
|
2
2
|
.resource-buttons
|
3
|
-
= link_to "Submit New #{
|
3
|
+
= link_to "Submit New #{et(Effective::Classified)}", effective_classifieds.new_classified_wizard_path, class: 'btn btn-primary'
|
4
4
|
|
5
5
|
= card do
|
6
6
|
- if @datatable.present?(self)
|
7
7
|
= render_datatable(@datatable, simple: true)
|
8
8
|
- else
|
9
|
-
%p There are no active
|
9
|
+
%p There are no active #{etsd(Effective::Classified)}. When there are, we'll show them here.
|
@@ -12,9 +12,6 @@ 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
|
-
|
18
15
|
# Pagination length on the Classified#index page
|
19
16
|
config.per_page = :all
|
20
17
|
|
@@ -1,10 +1,9 @@
|
|
1
1
|
en:
|
2
2
|
effective_classifieds:
|
3
|
-
name: '
|
4
|
-
acronym: 'Classifieds'
|
3
|
+
name: 'Classifieds'
|
5
4
|
|
6
5
|
activerecord:
|
7
6
|
models:
|
8
7
|
# These ones might be app level
|
9
|
-
app/classified_wizard: 'Classified
|
10
|
-
effective/classified: 'Classified'
|
8
|
+
app/classified_wizard: 'Classified Posting Submission'
|
9
|
+
effective/classified: 'Classified Posting'
|
data/config/routes.rb
CHANGED
@@ -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
|
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
|
+
version: 0.5.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: 2023-
|
11
|
+
date: 2023-08-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -123,7 +123,7 @@ dependencies:
|
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: '0'
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
|
-
name: haml
|
126
|
+
name: haml
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
128
128
|
requirements:
|
129
129
|
- - ">="
|
@@ -178,6 +178,20 @@ dependencies:
|
|
178
178
|
- - ">="
|
179
179
|
- !ruby/object:Gem::Version
|
180
180
|
version: '0'
|
181
|
+
- !ruby/object:Gem::Dependency
|
182
|
+
name: psych
|
183
|
+
requirement: !ruby/object:Gem::Requirement
|
184
|
+
requirements:
|
185
|
+
- - "<"
|
186
|
+
- !ruby/object:Gem::Version
|
187
|
+
version: '4'
|
188
|
+
type: :development
|
189
|
+
prerelease: false
|
190
|
+
version_requirements: !ruby/object:Gem::Requirement
|
191
|
+
requirements:
|
192
|
+
- - "<"
|
193
|
+
- !ruby/object:Gem::Version
|
194
|
+
version: '4'
|
181
195
|
description: Users submit classified ads for job openings and equipment sales
|
182
196
|
email:
|
183
197
|
- info@codeandeffect.com
|
@@ -263,7 +277,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
263
277
|
- !ruby/object:Gem::Version
|
264
278
|
version: '0'
|
265
279
|
requirements: []
|
266
|
-
rubygems_version: 3.
|
280
|
+
rubygems_version: 3.3.7
|
267
281
|
signing_key:
|
268
282
|
specification_version: 4
|
269
283
|
summary: Users submit classified ads for job openings and equipment sales
|