decidim-admin 0.28.2 → 0.28.4
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/concerns/decidim/admin/verification_conflicts/filterable.rb +31 -0
- data/app/controllers/decidim/admin/application_controller.rb +1 -1
- data/app/controllers/decidim/admin/conflicts_controller.rb +13 -5
- 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/components/index.html.erb +5 -1
- data/app/views/decidim/admin/conflicts/index.html.erb +29 -6
- data/app/views/decidim/admin/exports/_dropdown.html.erb +5 -5
- data/app/views/decidim/admin/imports/_dropdown.html.erb +6 -4
- data/app/views/decidim/admin/imports/new.html.erb +5 -4
- data/app/views/decidim/admin/newsletters/select_recipients_to_deliver.html.erb +4 -3
- data/app/views/decidim/admin/organization_appearance/form/_minimap.html.erb +3 -3
- data/app/views/layouts/decidim/admin/_application.html.erb +1 -1
- data/config/locales/bg.yml +2 -0
- data/config/locales/ca.yml +4 -2
- data/config/locales/cs.yml +7 -0
- data/config/locales/de.yml +2 -0
- data/config/locales/en.yml +2 -0
- data/config/locales/es-MX.yml +2 -0
- data/config/locales/es-PY.yml +2 -0
- data/config/locales/es.yml +4 -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/fr-CA.yml +2 -0
- data/config/locales/fr.yml +2 -0
- 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 +347 -207
- data/lib/decidim/admin/test/invite_participatory_space_users_shared_context.rb +1 -0
- data/lib/decidim/admin/test/manage_attachments_examples.rb +13 -1
- data/lib/decidim/admin/test/manage_paginated_collection_examples.rb +4 -4
- data/lib/decidim/admin/version.rb +1 -1
- data/lib/decidim/admin.rb +0 -15
- metadata +9 -10
- data/app/controllers/concerns/decidim/admin/paginable.rb +0 -20
- data/app/helpers/decidim/admin/paginable/per_page_helper.rb +0 -22
@@ -26,7 +26,19 @@ shared_examples "manage attachments examples" do
|
|
26
26
|
expect(page).to have_selector("input#attachment_description_en[value='#{translated(attachment.description, locale: :en)}']")
|
27
27
|
expect(page).to have_selector("input#attachment_weight[value='#{attachment.weight}']")
|
28
28
|
expect(page).to have_select("attachment_attachment_collection_id", selected: translated(attachment_collection.name, locale: :en))
|
29
|
-
|
29
|
+
|
30
|
+
# The image's URL changes every time it is requested because the disk
|
31
|
+
# service generates a unique URL based on the expiry time of the link.
|
32
|
+
# This expiry time is calculated at the time when the URL is requested
|
33
|
+
# which is why it changes every time to different URL. This changes the
|
34
|
+
# JSON encoded file identifier which includes the expiry time as well as
|
35
|
+
# the digest of the URL because the digest is calculated based on the
|
36
|
+
# passed data.
|
37
|
+
filename = attachment.file.blob.filename
|
38
|
+
within %([data-active-uploads] [data-filename="#{filename}"]) do
|
39
|
+
src = page.find("img")["src"]
|
40
|
+
expect(src).to be_blob_url(attachment.file.blob)
|
41
|
+
end
|
30
42
|
end
|
31
43
|
|
32
44
|
it "can add attachments without a collection to a process" do
|
@@ -12,14 +12,14 @@ 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: "
|
22
|
-
|
21
|
+
page.find("details", text: "25").click
|
22
|
+
click_on "50"
|
23
23
|
end
|
24
24
|
|
25
25
|
expect(page).to have_selector(".table-list tbody tr", count: 50)
|
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.28.
|
4
|
+
version: 0.28.4
|
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.28.
|
35
|
+
version: 0.28.4
|
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.28.
|
42
|
+
version: 0.28.4
|
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.28.
|
97
|
+
version: 0.28.4
|
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.28.
|
104
|
+
version: 0.28.4
|
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.28.
|
111
|
+
version: 0.28.4
|
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.28.
|
118
|
+
version: 0.28.4
|
119
119
|
description: Organization administration to manage a single organization.
|
120
120
|
email:
|
121
121
|
- josepjaume@gmail.com
|
@@ -215,12 +215,12 @@ files:
|
|
215
215
|
- app/controllers/concerns/decidim/admin/logs/filterable.rb
|
216
216
|
- app/controllers/concerns/decidim/admin/needs_admin_tos_accepted.rb
|
217
217
|
- app/controllers/concerns/decidim/admin/officializations/filterable.rb
|
218
|
-
- app/controllers/concerns/decidim/admin/paginable.rb
|
219
218
|
- app/controllers/concerns/decidim/admin/participatory_space_admin_breadcrumb.rb
|
220
219
|
- app/controllers/concerns/decidim/admin/participatory_space_admin_context.rb
|
221
220
|
- app/controllers/concerns/decidim/admin/participatory_space_export.rb
|
222
221
|
- app/controllers/concerns/decidim/admin/user_groups.rb
|
223
222
|
- app/controllers/concerns/decidim/admin/user_groups/filterable.rb
|
223
|
+
- app/controllers/concerns/decidim/admin/verification_conflicts/filterable.rb
|
224
224
|
- app/controllers/concerns/decidim/moderated_users/admin/filterable.rb
|
225
225
|
- app/controllers/concerns/decidim/moderations/admin/filterable.rb
|
226
226
|
- app/controllers/concerns/decidim/participatory_space_private_users/admin/filterable.rb
|
@@ -331,7 +331,6 @@ files:
|
|
331
331
|
- app/helpers/decidim/admin/moderations/reports_helper.rb
|
332
332
|
- app/helpers/decidim/admin/moderations_helper.rb
|
333
333
|
- app/helpers/decidim/admin/newsletters_helper.rb
|
334
|
-
- app/helpers/decidim/admin/paginable/per_page_helper.rb
|
335
334
|
- app/helpers/decidim/admin/reminders_helper.rb
|
336
335
|
- app/helpers/decidim/admin/resource_permissions_helper.rb
|
337
336
|
- app/helpers/decidim/admin/resource_scope_helper.rb
|
@@ -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
|