effective_classifieds 0.8.0 → 0.8.2
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/controllers/effective/classifieds_controller.rb +2 -2
- data/app/datatables/admin/effective_classified_wizards_datatable.rb +1 -0
- data/app/helpers/effective_classifieds_helper.rb +2 -2
- data/app/models/concerns/effective_classifieds_classified_wizard.rb +1 -1
- data/app/views/admin/classifieds/_form.html.haml +8 -3
- data/app/views/effective/classified_wizards/_dashboard.html.haml +1 -1
- data/app/views/effective/classified_wizards/_summary.html.haml +1 -1
- data/app/views/effective/classified_wizards/billing.html.haml +1 -1
- data/app/views/effective/classified_wizards/summary.html.haml +1 -1
- data/app/views/effective/classifieds/_classified.html.haml +3 -2
- data/app/views/effective/classifieds/_fields.html.haml +13 -14
- data/app/views/effective/classifieds/_layout.html.haml +1 -1
- data/app/views/effective/classifieds/index.html.haml +17 -14
- data/app/views/effective/classifieds/show.html.haml +22 -32
- data/app/views/effective/classifieds_mailer/classified_submitted.html.haml +5 -5
- data/config/locales/effective_classifieds.en.yml +2 -2
- data/lib/effective_classifieds/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: '09276ebf0a343cc31aaf14e9c5ce96c02da8a9f11de345f292abfc10a0df642b'
|
|
4
|
+
data.tar.gz: 47d861d8fedb6c9d69d02bbe7885da7202419696626c1d5fc3f9dd8329a6c5d8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d9c4ae1fd02205ae2070eedfa0413cb24b4623e88828bf66ce7cd97a2e7bb6c55e00b62a5f40fd1d26d3bb76b23654c20b094bd135087d494e38f6c8c10ddf64
|
|
7
|
+
data.tar.gz: 8451614768b018a315e00ccf08799e950f0e8f9f70e1dc2d7f7d21045c013ebe97371ac85d35616418e69b9fe18d9de66ba2c5829157fe7c8e070c0d1a4afeae
|
|
@@ -22,8 +22,8 @@ module Effective
|
|
|
22
22
|
if EffectiveResources.authorized?(self, :admin, :effective_classifieds)
|
|
23
23
|
flash.now[:warning] = [
|
|
24
24
|
'Hi Admin!',
|
|
25
|
-
(
|
|
26
|
-
("<a href='#{effective_classifieds.edit_admin_classified_path(@classified)}' class='alert-link'>
|
|
25
|
+
("You are viewing a hidden #{view_context.classified_label.downcase}." unless @classified.published?),
|
|
26
|
+
("<a href='#{effective_classifieds.edit_admin_classified_path(@classified)}' class='alert-link'>Edit this #{view_context.classified_label.downcase}</a>.")
|
|
27
27
|
].compact.join(' ')
|
|
28
28
|
end
|
|
29
29
|
|
|
@@ -5,12 +5,12 @@ module EffectiveClassifiedsHelper
|
|
|
5
5
|
et('effective_classifieds.name')
|
|
6
6
|
end
|
|
7
7
|
|
|
8
|
-
# Job
|
|
8
|
+
# Job or Classified
|
|
9
9
|
def classified_label
|
|
10
10
|
et(Effective::Classified)
|
|
11
11
|
end
|
|
12
12
|
|
|
13
|
-
#
|
|
13
|
+
# Jobs or Classifieds
|
|
14
14
|
def classifieds_label
|
|
15
15
|
ets(Effective::Classified)
|
|
16
16
|
end
|
|
@@ -28,7 +28,7 @@ module EffectiveClassifiedsClassifiedWizard
|
|
|
28
28
|
|
|
29
29
|
acts_as_wizard(
|
|
30
30
|
start: 'Start',
|
|
31
|
-
classified: '
|
|
31
|
+
classified: I18n.t('activerecord.models.effective/classified') + ' Details',
|
|
32
32
|
summary: 'Review',
|
|
33
33
|
billing: 'Billing Address',
|
|
34
34
|
checkout: 'Checkout',
|
|
@@ -3,16 +3,21 @@
|
|
|
3
3
|
= render 'admin/classifieds/form_classified', classified: classified
|
|
4
4
|
|
|
5
5
|
- if classified.persisted?
|
|
6
|
+
- if classified.classified_wizard.present?
|
|
7
|
+
= tab(et(EffectiveClassifieds.ClassifiedWizard)) do
|
|
8
|
+
= card('Wizard') do
|
|
9
|
+
= render('effective/classified_wizards/summary', classified_wizard: classified.classified_wizard)
|
|
6
10
|
|
|
7
|
-
|
|
8
|
-
= render '/admin/classifieds/form_access', classified: classified
|
|
11
|
+
= render('effective/classified_wizards/classified_wizard', classified_wizard: classified.classified_wizard)
|
|
9
12
|
|
|
10
|
-
- if classified.classified_wizard.present?
|
|
11
13
|
= tab 'Orders' do
|
|
12
14
|
%h2 Orders
|
|
13
15
|
- datatable = Admin::EffectiveOrdersDatatable.new(parent: classified.classified_wizard, owner: classified.owner, user: classified.owner, total: false)
|
|
14
16
|
= render_datatable(datatable, simple: true)
|
|
15
17
|
|
|
18
|
+
= tab 'Access' do
|
|
19
|
+
= render '/admin/classifieds/form_access', classified: classified
|
|
20
|
+
|
|
16
21
|
- if classified.class.respond_to?(:acts_as_trackable?)
|
|
17
22
|
= tab 'Tracks' do
|
|
18
23
|
- datatable = Admin::EffectiveTracksDatatable.new(owner: classified)
|
|
@@ -26,4 +26,4 @@
|
|
|
26
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 "
|
|
29
|
+
%p= link_to "Post a #{classified_label}", effective_classifieds.new_classified_wizard_path, class: 'btn btn-primary'
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
- if classified&.published?
|
|
10
10
|
= link_to(classified, effective_classifieds.classified_path(classified), target: '_blank')
|
|
11
11
|
- else
|
|
12
|
-
= classified.presence ||
|
|
12
|
+
= classified.presence || "#{classified_label} was deleted"
|
|
13
13
|
|
|
14
14
|
- if request.path.start_with?('/admin')
|
|
15
15
|
%tr
|
|
@@ -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 #{classified_label} require a fee. We ask for your billing address for future use.
|
|
14
14
|
|
|
15
15
|
= f.save 'Save and Continue'
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
%tr
|
|
2
|
-
%td.col-date= classified.start_on&.strftime("%b %
|
|
3
|
-
%td.col-date.d-none.d-md-table-cell= classified.end_on&.strftime("%b %d, %Y")
|
|
2
|
+
%td.col-date.text-right= classified.start_on&.strftime("%b %e, %Y")
|
|
4
3
|
%td
|
|
5
4
|
%strong= link_to classified.title, effective_classifieds.classified_path(classified)
|
|
6
5
|
.text-muted= classified.organization
|
|
6
|
+
.d-block.d-md-none= classified.location
|
|
7
7
|
|
|
8
8
|
%td.d-none.d-md-table-cell= classified.location
|
|
9
|
+
-# %td.col-date.d-none.d-md-table-cell.text-right= classified.end_on&.strftime("%b %e, %Y")
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
= f.select :category, EffectiveClassifieds.categories, required: true, include_blank: false
|
|
2
|
-
= f.text_field :title
|
|
3
|
-
= f.text_field :
|
|
4
|
-
= f.text_field :
|
|
2
|
+
= f.text_field :title, label: "#{classified_label} title"
|
|
3
|
+
= f.text_field :location, label: "#{classified_label} location"
|
|
4
|
+
= f.text_field :organization
|
|
5
5
|
|
|
6
6
|
- if f.object.persisted? || f.object.errors.include?(:slug)
|
|
7
7
|
- current_url = (effective_classifieds.classified_url(f.object) rescue nil)
|
|
@@ -12,26 +12,25 @@
|
|
|
12
12
|
.row
|
|
13
13
|
.col-lg-6
|
|
14
14
|
- if f.object.new_record?
|
|
15
|
-
= f.date_field :start_on, label: "Start", hint: "
|
|
15
|
+
= f.date_field :start_on, label: "Start date", hint: "If approved, this #{classified_label.downcase} will be displayed on the #{classifieds_name_label.downcase} after this date.", input_js: { minDate: minDate.strftime('%F') }
|
|
16
16
|
- else
|
|
17
|
-
= f.date_field :start_on, label: "Start", hint:
|
|
17
|
+
= f.date_field :start_on, label: "Start date", hint: "The #{classified_label.downcase} will be displayed starting after this date."
|
|
18
18
|
|
|
19
19
|
.col-lg-6
|
|
20
|
-
= f.date_field :end_on, label: "
|
|
20
|
+
= f.date_field :end_on, label: "Close date", hint: "The #{classified_label.downcase} will no longer be displayed on the #{classifieds_name_label.downcase} after this date. Please enter a date within #{f.object.end_on_distance} of the start date."
|
|
21
21
|
|
|
22
|
-
- if f.object.persisted? && !f.object.draft?
|
|
23
|
-
|
|
22
|
+
-# - if f.object.persisted? && !f.object.draft?
|
|
23
|
+
-# = f.check_box :archived, label: 'Yes, this posting is archived. It will not be displayed.'
|
|
24
24
|
|
|
25
25
|
- if defined?(EffectiveArticleEditor)
|
|
26
|
-
= f.article_editor :body, label: 'Description', hint:
|
|
26
|
+
= f.article_editor :body, label: 'Description', hint: "The #{classified_label.downcase} description - be sure to include all relevant information!"
|
|
27
27
|
- else
|
|
28
|
-
= f.rich_text_area :body, label: 'Description', hint:
|
|
28
|
+
= f.rich_text_area :body, label: 'Description', hint: "The #{classified_label.downcase} description. Be sure to include all relevant information."
|
|
29
29
|
|
|
30
|
-
= f.file_field :file,
|
|
30
|
+
= f.file_field :file, label: "Attach a PDF for download. Optional."
|
|
31
31
|
|
|
32
|
-
%
|
|
33
|
-
%p
|
|
34
|
-
%small.text-muted The following contact information is not displayed to the public and is only used by staff to provide support.
|
|
32
|
+
%h3.mt-5 Contact Information
|
|
33
|
+
%p.text-muted These details <strong>are not</strong> displayed on the #{classifieds_name_label}. They may be used by staff for administration and support. Please ensure the above #{classified_label.downcase} description includes relavent contact information.
|
|
35
34
|
|
|
36
35
|
= f.text_field :contact_name
|
|
37
36
|
= f.url_field :website
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
.effective-classifieds
|
|
1
|
+
.effective-classifieds.mb-3
|
|
2
2
|
= yield
|
|
@@ -1,21 +1,24 @@
|
|
|
1
1
|
= render 'layout' do
|
|
2
|
-
.
|
|
3
|
-
|
|
2
|
+
.row
|
|
3
|
+
.col
|
|
4
|
+
%h1.effective-title.mb-4= @page_title
|
|
5
|
+
|
|
6
|
+
.col-auto.text-right
|
|
7
|
+
= link_to "Post a #{classified_label}", effective_classifieds.new_classified_wizard_path, class: 'btn btn-primary'
|
|
4
8
|
|
|
5
9
|
- if @classifieds.present?
|
|
6
10
|
.table-responsive
|
|
7
|
-
%table.table.table-striped
|
|
8
|
-
%
|
|
9
|
-
%
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
= render @classifieds
|
|
11
|
+
%table.table.table-striped
|
|
12
|
+
%thead
|
|
13
|
+
%tr
|
|
14
|
+
%th.col-date.text-right Posted
|
|
15
|
+
%th Title
|
|
16
|
+
%th.d-none.d-md-table-cell Location
|
|
17
|
+
-# %th.col-date.d-none.d-md-table-cell.text-right Closing
|
|
15
18
|
|
|
16
|
-
|
|
17
|
-
|
|
19
|
+
%tbody
|
|
20
|
+
= render @classifieds
|
|
18
21
|
|
|
19
22
|
- else
|
|
20
|
-
|
|
21
|
-
|
|
23
|
+
.alert.alert-warning.mb-3
|
|
24
|
+
There are no active #{classifieds_label.downcase}.
|
|
@@ -1,46 +1,36 @@
|
|
|
1
1
|
= render 'layout' do
|
|
2
2
|
.effective-classified
|
|
3
3
|
- unless @classified.published?
|
|
4
|
-
.alert.alert-warning.mb-4 This #{
|
|
4
|
+
.alert.alert-warning.mb-4 This #{classified_label} is not published.
|
|
5
5
|
|
|
6
|
+
%h1.effective-title.mb-4= @page_title
|
|
6
7
|
|
|
7
|
-
.
|
|
8
|
-
|
|
8
|
+
.row
|
|
9
|
+
.col-md
|
|
10
|
+
%table.table.table-striped.effective-table-summary
|
|
11
|
+
%tr
|
|
12
|
+
%th Company
|
|
13
|
+
%td= @classified.organization
|
|
9
14
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
%tr
|
|
15
|
-
%th Position
|
|
16
|
-
%td= @classified.title
|
|
15
|
+
- if @classified.location.present?
|
|
16
|
+
%tr
|
|
17
|
+
%th Location
|
|
18
|
+
%td= @classified.location
|
|
17
19
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
20
|
+
%tr
|
|
21
|
+
%th Posted
|
|
22
|
+
%td #{@classified.start_on&.strftime("%b %d, %Y")}
|
|
21
23
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
%td= @classified.location
|
|
24
|
+
%tr
|
|
25
|
+
%th Closing
|
|
26
|
+
%td #{@classified.end_on&.strftime("%b %d, %Y")}
|
|
26
27
|
|
|
27
|
-
|
|
28
|
-
%table.table.table-striped.table-hover.effective-table-summary
|
|
28
|
+
- if @classified.file.attached?
|
|
29
29
|
%tr
|
|
30
|
-
%th
|
|
31
|
-
%td
|
|
32
|
-
|
|
33
|
-
%tr
|
|
34
|
-
%th Closing
|
|
35
|
-
%td #{@classified.end_on&.strftime("%b %d, %Y")}
|
|
36
|
-
|
|
37
|
-
- if @classified.file.attached?
|
|
38
|
-
%tr
|
|
39
|
-
%th Attachment
|
|
40
|
-
%td= link_to(@classified.file.filename, main_app.url_for(@classified.file), target: '_blank')
|
|
30
|
+
%th Attachment
|
|
31
|
+
%td= link_to(@classified.file.filename, main_app.url_for(@classified.file), target: '_blank')
|
|
41
32
|
|
|
42
33
|
.body.mt-4
|
|
43
34
|
= @classified.body.to_s
|
|
44
35
|
|
|
45
|
-
.
|
|
46
|
-
= link_to "Return to #{classifieds_name_label}", effective_classifieds.classifieds_path, class: 'btn btn-secondary'
|
|
36
|
+
= link_to "← #{classifieds_name_label}".html_safe, effective_classifieds.classifieds_path, class: 'btn btn-secondary my-4'
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
%p Hello Admin!
|
|
2
2
|
|
|
3
3
|
- if @classified.published?
|
|
4
|
-
%p The following
|
|
4
|
+
%p The following has been submitted and is published online:
|
|
5
5
|
- else
|
|
6
|
-
%p The following
|
|
6
|
+
%p The following has been submitted and is awaiting your approval:
|
|
7
7
|
|
|
8
8
|
%hr
|
|
9
9
|
|
|
10
10
|
= render('effective/classifieds/classified', classified: @classified) do
|
|
11
|
-
%
|
|
11
|
+
%div= @classified.body
|
|
12
12
|
|
|
13
13
|
%hr
|
|
14
14
|
|
|
15
15
|
- unless @classified.approved?
|
|
16
|
-
%p= link_to(
|
|
16
|
+
%p= link_to("Approve", effective_classifieds.edit_admin_classified_path(@classified))
|
|
17
17
|
|
|
18
|
-
%p= link_to(
|
|
18
|
+
%p= link_to("View", effective_classifieds.classified_path(@classified))
|
|
19
19
|
|
|
20
20
|
%p Have a great day!
|
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.8.
|
|
4
|
+
version: 0.8.2
|
|
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: 2024-07-
|
|
11
|
+
date: 2024-07-29 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|