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.
- checksums.yaml +4 -4
- data/README.md +0 -13
- data/app/commands/decidim/admin/create_participatory_space_private_user.rb +1 -1
- data/app/commands/decidim/admin/destroy_component.rb +1 -0
- data/app/controllers/concerns/decidim/admin/filterable.rb +1 -1
- data/app/controllers/decidim/admin/application_controller.rb +0 -1
- data/app/controllers/decidim/admin/organization_external_domain_allowlist_controller.rb +1 -1
- data/app/helpers/decidim/admin/application_helper.rb +13 -0
- data/app/views/decidim/admin/block_user/new.html.erb +1 -1
- data/app/views/decidim/admin/newsletters/select_recipients_to_deliver.html.erb +4 -3
- data/config/locales/bg.yml +2 -0
- data/config/locales/ca.yml +2 -2
- data/config/locales/cs.yml +7 -0
- data/config/locales/es-MX.yml +2 -0
- data/config/locales/es-PY.yml +2 -0
- data/config/locales/es.yml +2 -2
- data/config/locales/eu.yml +2 -0
- data/config/locales/fi-plain.yml +3 -1
- data/config/locales/fi.yml +7 -5
- data/config/locales/ja.yml +4 -2
- data/config/locales/pt-BR.yml +3 -0
- data/config/locales/ro-RO.yml +9 -3
- data/config/locales/sv.yml +323 -166
- data/lib/decidim/admin/test/manage_paginated_collection_examples.rb +3 -3
- data/lib/decidim/admin/version.rb +1 -1
- data/lib/decidim/admin.rb +0 -15
- metadata +10 -12
- data/app/controllers/concerns/decidim/admin/paginable.rb +0 -20
- data/app/helpers/decidim/admin/paginable/per_page_helper.rb +0 -22
@@ -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
|
16
|
-
expect(page).to have_css(".table-list tbody tr", count:
|
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: "
|
21
|
+
page.find("details", text: "25").click
|
22
22
|
click_on "50"
|
23
23
|
end
|
24
24
|
|
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.
|
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-
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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:
|
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
|