decidim-admin 0.29.0.rc4 → 0.29.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -12,13 +12,13 @@ shared_examples "a paginated collection" do |options|
12
12
  end
13
13
 
14
14
  describe "Number of results per page" do
15
- it "lists 15 resources per page by default" do
16
- expect(page).to have_css(".table-list tbody tr", count: 15)
15
+ it "lists 25 resources per page by default" do
16
+ expect(page).to have_css(".table-list tbody tr", count: 25)
17
17
  end
18
18
 
19
19
  it "changes the number of results per page" do
20
20
  within "[data-pagination]" do
21
- page.find("details", text: "15").click
21
+ page.find("details", text: "25").click
22
22
  click_on "50"
23
23
  end
24
24
 
@@ -4,7 +4,7 @@ module Decidim
4
4
  # This holds the decidim-admin version.
5
5
  module Admin
6
6
  def self.version
7
- "0.29.0.rc4"
7
+ "0.29.1"
8
8
  end
9
9
  end
10
10
  end
data/lib/decidim/admin.rb CHANGED
@@ -17,21 +17,6 @@ module Decidim
17
17
 
18
18
  include ActiveSupport::Configurable
19
19
 
20
- # Public Setting that configures Kaminari configuration options
21
- # https://github.com/kaminari/kaminari#general-configuration-options
22
-
23
- # Range of number of results per_page. Defaults to [15, 50, 100].
24
- # per_page_range.first sets the default number per page
25
- # per_page_range.last sets the default max_per_page
26
- config_accessor :per_page_range do
27
- [15, 50, 100]
28
- end
29
-
30
- Kaminari.configure do |config|
31
- config.default_per_page = Decidim::Admin.per_page_range.first
32
- config.max_per_page = Decidim::Admin.per_page_range.last
33
- end
34
-
35
20
  # Public: Stores an instance of ViewHooks
36
21
  def self.view_hooks
37
22
  @view_hooks ||= ViewHooks.new
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: decidim-admin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.29.0.rc4
4
+ version: 0.29.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josep Jaume Rey Peroy
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2024-07-30 00:00:00.000000000 Z
13
+ date: 2024-10-02 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: active_link_to
@@ -32,14 +32,14 @@ dependencies:
32
32
  requirements:
33
33
  - - '='
34
34
  - !ruby/object:Gem::Version
35
- version: 0.29.0.rc4
35
+ version: 0.29.1
36
36
  type: :runtime
37
37
  prerelease: false
38
38
  version_requirements: !ruby/object:Gem::Requirement
39
39
  requirements:
40
40
  - - '='
41
41
  - !ruby/object:Gem::Version
42
- version: 0.29.0.rc4
42
+ version: 0.29.1
43
43
  - !ruby/object:Gem::Dependency
44
44
  name: devise
45
45
  requirement: !ruby/object:Gem::Requirement
@@ -94,28 +94,28 @@ dependencies:
94
94
  requirements:
95
95
  - - '='
96
96
  - !ruby/object:Gem::Version
97
- version: 0.29.0.rc4
97
+ version: 0.29.1
98
98
  type: :development
99
99
  prerelease: false
100
100
  version_requirements: !ruby/object:Gem::Requirement
101
101
  requirements:
102
102
  - - '='
103
103
  - !ruby/object:Gem::Version
104
- version: 0.29.0.rc4
104
+ version: 0.29.1
105
105
  - !ruby/object:Gem::Dependency
106
106
  name: decidim-participatory_processes
107
107
  requirement: !ruby/object:Gem::Requirement
108
108
  requirements:
109
109
  - - '='
110
110
  - !ruby/object:Gem::Version
111
- version: 0.29.0.rc4
111
+ version: 0.29.1
112
112
  type: :development
113
113
  prerelease: false
114
114
  version_requirements: !ruby/object:Gem::Requirement
115
115
  requirements:
116
116
  - - '='
117
117
  - !ruby/object:Gem::Version
118
- version: 0.29.0.rc4
118
+ version: 0.29.1
119
119
  description: Organization administration to manage a single organization.
120
120
  email:
121
121
  - josepjaume@gmail.com
@@ -212,7 +212,6 @@ files:
212
212
  - app/controllers/concerns/decidim/admin/logs/filterable.rb
213
213
  - app/controllers/concerns/decidim/admin/needs_admin_tos_accepted.rb
214
214
  - app/controllers/concerns/decidim/admin/officializations/filterable.rb
215
- - app/controllers/concerns/decidim/admin/paginable.rb
216
215
  - app/controllers/concerns/decidim/admin/participatory_space_admin_breadcrumb.rb
217
216
  - app/controllers/concerns/decidim/admin/participatory_space_admin_context.rb
218
217
  - app/controllers/concerns/decidim/admin/participatory_space_export.rb
@@ -329,7 +328,6 @@ files:
329
328
  - app/helpers/decidim/admin/moderations/reports_helper.rb
330
329
  - app/helpers/decidim/admin/moderations_helper.rb
331
330
  - app/helpers/decidim/admin/newsletters_helper.rb
332
- - app/helpers/decidim/admin/paginable/per_page_helper.rb
333
331
  - app/helpers/decidim/admin/reminders_helper.rb
334
332
  - app/helpers/decidim/admin/resource_permissions_helper.rb
335
333
  - app/helpers/decidim/admin/resource_scope_helper.rb
@@ -712,9 +710,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
712
710
  version: 3.2.0
713
711
  required_rubygems_version: !ruby/object:Gem::Requirement
714
712
  requirements:
715
- - - ">"
713
+ - - ">="
716
714
  - !ruby/object:Gem::Version
717
- version: 1.3.1
715
+ version: '0'
718
716
  requirements: []
719
717
  rubygems_version: 3.4.10
720
718
  signing_key:
@@ -1,20 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "active_support/concern"
4
-
5
- module Decidim
6
- module Admin
7
- module Paginable
8
- # Common logic to paginate admin resources
9
- extend ActiveSupport::Concern
10
-
11
- included do
12
- include Decidim::Paginable
13
-
14
- def per_page
15
- params[:per_page].present? ? params[:per_page].to_i : Decidim::Admin.per_page_range.first
16
- end
17
- end
18
- end
19
- end
20
- end
@@ -1,22 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Decidim
4
- module Admin
5
- module Paginable
6
- # This module includes helpers the :per_page cell's option
7
- module PerPageHelper
8
- def per_page_options
9
- OpenStruct.new(
10
- per_page:,
11
- per_page_range: Decidim::Admin.per_page_range
12
- )
13
- end
14
-
15
- # Renders the pagination dropdown menu in the admin panel.
16
- def admin_filters_pagination
17
- cell("decidim/admin/results_per_page", per_page_options)
18
- end
19
- end
20
- end
21
- end
22
- end