effective_classifieds 0.11.1 → 0.13.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 227ecb2be07e7b68f8b9e66ff44fc909ffcd7a599e515cdcfdf9ddb4f6843d06
4
- data.tar.gz: 321d8cf35a1c6d8bdf5d913f39ca70307533e4f1daa7ed1d50bcdd4dc4ef740b
3
+ metadata.gz: ea06f5a66be4f3b850a30a13abb68b6d6330c07b79887372ddfaf06550d812b3
4
+ data.tar.gz: 51a5a3e7502614ecd7e4685698e0eba688c66591902a0e9a03927d62495eb3a3
5
5
  SHA512:
6
- metadata.gz: 8ecb8b6f097d07d4fc7ccf41c61bb22f79f7f015d89821ce8bf7ead33b7f7ae5447c090bf53003c04faa2d0d1fc8159a7bd03e92347261f0c02647d0ccecc3dd
7
- data.tar.gz: 83cdd7b7da346b556cbbb7212e5e5019141e66039e7ec2da24442994dc76b6b28d4307124b0ba8b95dee83c8264d94458b790e3c11f68242b9d28b5c6c34947b
6
+ metadata.gz: aaeca7a221d795f87e3e0d2dfd8cf90e9e8b6c8658dd185911505d2af4d43790ea9805c53fd1fc85a76ff13c871aac192d6b89f514fc3b52530fbb44f3443d14
7
+ data.tar.gz: 930945a8f6a990c62c24ac36680e3c4046e6058d95b741cc54a4355582f1ac80e0cec1ac87e3e617cde145099085ef85230b6a5ab2de6d21cfc5d26d302f07c6
@@ -8,6 +8,13 @@ module Effective
8
8
  @page_title ||= view_context.classifieds_name_label
9
9
 
10
10
  @classifieds = ::Effective::Classified.classifieds(user: current_user).sorted
11
+ @classifieds_count = @classifieds.count
12
+ page = EffectiveResources.validate_page!(
13
+ params[:page],
14
+ collection_count: @classifieds_count,
15
+ per_page: EffectiveClassifieds.per_page
16
+ )
17
+ @classifieds = @classifieds.paginate(page: page, per_page: EffectiveClassifieds.per_page)
11
18
  end
12
19
 
13
20
  def show
@@ -24,11 +24,11 @@ class EffectiveClassifiedWizardsDatatable < Effective::Datatable
24
24
 
25
25
  actions_col(actions: []) do |wizard|
26
26
  if wizard.draft?
27
- dropdown_link_to('Continue', effective_classifieds.classified_wizard_build_path(wizard, wizard.next_step), 'data-turbolinks' => false)
27
+ dropdown_link_to('Continue', effective_classifieds.classified_wizard_build_path(wizard, wizard.next_step), 'data-turbolinks' => false, 'data-turbo' => false)
28
28
  elsif wizard.classified.present?
29
29
  dropdown_link_to('Show', effective_classifieds.classified_path(wizard.classified))
30
30
  dropdown_link_to('Edit', effective_classifieds.edit_classified_path(wizard.classified))
31
- dropdown_link_to('Show Wizard', effective_classifieds.classified_wizard_path(wizard), 'data-turbolinks' => false)
31
+ dropdown_link_to('Show Wizard', effective_classifieds.classified_wizard_path(wizard), 'data-turbolinks' => false, 'data-turbo' => false)
32
32
  end
33
33
 
34
34
  if EffectiveResources.authorized?(self, :destroy, wizard)
@@ -11,7 +11,7 @@
11
11
 
12
12
  %p
13
13
  Please
14
- = link_to("Continue submission", effective_classifieds.classified_wizard_build_path(submission, submission.next_step), 'data-turbolinks' => false, class: 'btn btn-primary')
14
+ = link_to("Continue submission", effective_classifieds.classified_wizard_build_path(submission, submission.next_step), 'data-turbolinks' => false, 'data-turbo' => 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.
@@ -19,6 +19,9 @@
19
19
  %tbody
20
20
  = render @classifieds
21
21
 
22
+ %nav.d-flex.justify-content-center
23
+ = bootstrap_paginate(@classifieds, per_page: EffectiveClassifieds.per_page, collection_count: @classifieds_count)
24
+
22
25
  - else
23
26
  .alert.alert-warning.mb-3
24
27
  There are no active #{classifieds_label.downcase}.
@@ -1,3 +1,3 @@
1
1
  module EffectiveClassifieds
2
- VERSION = '0.11.1'.freeze
2
+ VERSION = '0.13.0'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_classifieds
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.1
4
+ version: 0.13.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Code and Effect