decidim-sortitions 0.28.2 → 0.29.0.rc2
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/helpers/decidim/sortitions/admin/sortitions_helper.rb +1 -1
- data/app/models/decidim/sortitions/sortition.rb +1 -1
- data/app/queries/decidim/sortitions/admin/participatory_space_proposals.rb +11 -18
- data/app/views/decidim/sortitions/admin/sortitions/index.html.erb +3 -3
- data/app/views/decidim/sortitions/admin/sortitions/show.html.erb +1 -1
- data/app/views/decidim/sortitions/sortitions/_linked_sortitions.html.erb +4 -4
- data/app/views/decidim/sortitions/sortitions/_sortition_author.html.erb +4 -4
- data/app/views/decidim/sortitions/sortitions/_sortition_cancel_author.html.erb +4 -4
- data/app/views/decidim/sortitions/sortitions/_tags.html.erb +1 -1
- data/app/views/decidim/sortitions/sortitions/show.html.erb +2 -2
- data/decidim-sortitions.gemspec +2 -2
- data/lib/decidim/sortitions/admin_engine.rb +1 -1
- data/lib/decidim/sortitions/version.rb +1 -1
- metadata +16 -17
- data/app/views/decidim/sortitions/sortitions/_proposal_badge.html.erb +0 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '09d9067968ff0e41444864d0ec53dac4ef48ee0684102c7ab342980fe035c965'
|
4
|
+
data.tar.gz: 26708470be5725d7496b8bafc6fbbad168cb335f914ec532e9200bd38db391f7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6bc2f623a0a19ac749c968949764fdffad1be79651f9cbe060210677d2dce04387f26f4e3eef12194a35855c6c1d365e80493df67c4ebb36e5d604bb57b05ad5
|
7
|
+
data.tar.gz: 71368d5d75369b87e2d8caf1187555549b5d587885340bcd75803ddf620dfc96b5357b6ffe3fda66bef892ae97e2dbebd9dcfec26e7b071cc1e69882328ded2c
|
@@ -7,7 +7,7 @@ module Decidim
|
|
7
7
|
include Decidim::TranslationsHelper
|
8
8
|
include Decidim::PaginateHelper
|
9
9
|
|
10
|
-
#
|
10
|
+
# Converts a list of components into a list of selectable options
|
11
11
|
def components_options(components)
|
12
12
|
components.map do |f|
|
13
13
|
[translated_attribute(f.name), f.id]
|
@@ -18,30 +18,23 @@ module Decidim
|
|
18
18
|
@request_timestamp = sortition.request_timestamp
|
19
19
|
end
|
20
20
|
|
21
|
-
# Given a
|
21
|
+
# Given a participatory process retrieves its proposals
|
22
22
|
#
|
23
23
|
# Returns an ActiveRecord::Relation.
|
24
24
|
def query
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
end
|
25
|
+
proposals = Decidim::Proposals::Proposal
|
26
|
+
.not_withdrawn
|
27
|
+
.published
|
28
|
+
.not_hidden
|
29
|
+
.where("decidim_proposals_proposals.created_at < ?", request_timestamp)
|
30
|
+
.where(component: sortition.decidim_proposals_component)
|
31
|
+
proposals = proposals.where.not(id: proposals.only_status(:rejected))
|
32
|
+
|
33
|
+
return proposals.order(id: :asc) if category.nil?
|
35
34
|
|
36
35
|
# categorization -> category
|
37
|
-
|
36
|
+
proposals
|
38
37
|
.joins(:categorization)
|
39
|
-
.except_withdrawn
|
40
|
-
.published
|
41
|
-
.except_rejected
|
42
|
-
.not_hidden
|
43
|
-
.where(component: sortition.decidim_proposals_component)
|
44
|
-
.where("decidim_proposals_proposals.created_at < ?", request_timestamp)
|
45
38
|
.where(decidim_categorizations: { decidim_category_id: category.id })
|
46
39
|
.order(id: :asc)
|
47
40
|
end
|
@@ -16,7 +16,7 @@
|
|
16
16
|
<th><%= t("models.sortition.fields.reference", scope: "decidim.sortitions.admin") %></th>
|
17
17
|
<th><%= t("models.sortition.fields.title", scope: "decidim.sortitions.admin") %></th>
|
18
18
|
<th><%= t("models.sortition.fields.created_at", scope: "decidim.sortitions.admin") %></th>
|
19
|
-
<th
|
19
|
+
<th></th>
|
20
20
|
</tr>
|
21
21
|
</thead>
|
22
22
|
<tbody>
|
@@ -25,9 +25,9 @@
|
|
25
25
|
<td><%= sortition.reference %></td>
|
26
26
|
<td>
|
27
27
|
<% if allowed_to? :update, :sortition, sortition: sortition %>
|
28
|
-
<%= link_to
|
28
|
+
<%= link_to decidim_escape_translated(sortition.title), edit_sortition_path(sortition) %>
|
29
29
|
<% else %>
|
30
|
-
<%=
|
30
|
+
<%= decidim_escape_translated(sortition.title) %>
|
31
31
|
<% end %>
|
32
32
|
</td>
|
33
33
|
<td><%= l sortition.created_at, format: :short %></td>
|
@@ -2,7 +2,7 @@
|
|
2
2
|
<div class="card" id="sortition">
|
3
3
|
<div class="item_show__header">
|
4
4
|
<h1 class="item_show__header-title">
|
5
|
-
<%=
|
5
|
+
<%= decidim_escape_translated(sortition.title) %>
|
6
6
|
</h1>
|
7
7
|
</div>
|
8
8
|
<div class="table-scroll">
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<div class="card card--action
|
1
|
+
<div class="card card--action">
|
2
2
|
<% resources.each do |sortition| %>
|
3
3
|
<div class="card--list__item">
|
4
4
|
<div class="card--list__text">
|
@@ -7,7 +7,7 @@
|
|
7
7
|
<% end %>
|
8
8
|
<div>
|
9
9
|
<%= link_to resource_locator(sortition).path, class: "card__link" do %>
|
10
|
-
<h5 class="card--list__heading"><%=
|
10
|
+
<h5 class="card--list__heading"><%= decidim_escape_translated(sortition.title) %></h5>
|
11
11
|
<% end %>
|
12
12
|
<div class="author">
|
13
13
|
<span class="author__avatar">
|
@@ -19,8 +19,8 @@
|
|
19
19
|
</div>
|
20
20
|
</div>
|
21
21
|
</div>
|
22
|
-
<div
|
23
|
-
<span
|
22
|
+
<div>
|
23
|
+
<span>
|
24
24
|
<%= sortition.selected_proposals.size %>
|
25
25
|
</span> <%= t(".selected_proposals", count: proposal.selected_proposals.size) %>
|
26
26
|
</div>
|
@@ -1,11 +1,11 @@
|
|
1
|
-
<div
|
2
|
-
<div class="author
|
3
|
-
<span class="author__avatar
|
1
|
+
<div>
|
2
|
+
<div class="author">
|
3
|
+
<span class="author__avatar">
|
4
4
|
<%= image_tag present(sortition.author).avatar_url %>
|
5
5
|
</span>
|
6
6
|
<span class="author__name">
|
7
7
|
<% if sortition.author&.deleted? %>
|
8
|
-
<span class="label
|
8
|
+
<span class="label">
|
9
9
|
<%= t(".deleted") %>
|
10
10
|
</span>
|
11
11
|
<% else %>
|
@@ -1,11 +1,11 @@
|
|
1
|
-
<div
|
2
|
-
<div class="author
|
3
|
-
<span class="author__avatar
|
1
|
+
<div>
|
2
|
+
<div class="author">
|
3
|
+
<span class="author__avatar">
|
4
4
|
<%= image_tag present(sortition.cancelled_by_user).avatar_url %>
|
5
5
|
</span>
|
6
6
|
<span class="author__name">
|
7
7
|
<% if sortition.cancelled_by_user&.deleted? %>
|
8
|
-
<span class="label
|
8
|
+
<span class="label">
|
9
9
|
<%= t(".deleted") %>
|
10
10
|
</span>
|
11
11
|
<% else %>
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<% add_decidim_meta_tags({
|
2
2
|
description: decidim_sanitize_editor(translated_attribute(sortition.additional_info)),
|
3
|
-
title:
|
3
|
+
title: decidim_escape_translated(sortition.title),
|
4
4
|
url: sortition_url(sortition.to_param)
|
5
5
|
}) %>
|
6
6
|
|
@@ -21,7 +21,7 @@ edit_link(
|
|
21
21
|
|
22
22
|
<section class="layout-main__section layout-main__heading">
|
23
23
|
<h1 class="h1 decorator mb-4">
|
24
|
-
<%=
|
24
|
+
<%= decidim_escape_translated(sortition.title) %>
|
25
25
|
</h1>
|
26
26
|
<div class="layout-author">
|
27
27
|
<%= cell "decidim/author", present(sortition.author), context_actions: [:date], from: sortition, layout: :compact %>
|
data/decidim-sortitions.gemspec
CHANGED
@@ -17,11 +17,11 @@ Gem::Specification.new do |s|
|
|
17
17
|
"homepage_uri" => "https://decidim.org",
|
18
18
|
"source_code_uri" => "https://github.com/decidim/decidim"
|
19
19
|
}
|
20
|
-
s.required_ruby_version = "~> 3.
|
20
|
+
s.required_ruby_version = "~> 3.2.0"
|
21
21
|
|
22
22
|
s.name = "decidim-sortitions"
|
23
23
|
s.summary = "Decidim sortitions module"
|
24
|
-
s.description = "This module makes possible to select
|
24
|
+
s.description = "This module makes possible to select amount a set of proposal by sortition"
|
25
25
|
|
26
26
|
s.files = Dir.chdir(__dir__) do
|
27
27
|
`git ls-files -z`.split("\x0").select do |f|
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
module Decidim
|
4
4
|
module Sortitions
|
5
|
-
# This is the engine that runs on the administration interface of `
|
5
|
+
# This is the engine that runs on the administration interface of `decidim_sortitions`.
|
6
6
|
# It mostly handles rendering the created projects associated to a participatory
|
7
7
|
# process.
|
8
8
|
class AdminEngine < ::Rails::Engine
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: decidim-sortitions
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.29.0.rc2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Juan Salvador Perez Garcia
|
@@ -16,71 +16,71 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
19
|
+
version: 0.29.0.rc2
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.
|
26
|
+
version: 0.29.0.rc2
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: decidim-comments
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - '='
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.
|
33
|
+
version: 0.29.0.rc2
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - '='
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 0.
|
40
|
+
version: 0.29.0.rc2
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: decidim-core
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - '='
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 0.
|
47
|
+
version: 0.29.0.rc2
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - '='
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 0.
|
54
|
+
version: 0.29.0.rc2
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: decidim-proposals
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - '='
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 0.
|
61
|
+
version: 0.29.0.rc2
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - '='
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: 0.
|
68
|
+
version: 0.29.0.rc2
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: decidim-dev
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - '='
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: 0.
|
75
|
+
version: 0.29.0.rc2
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - '='
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: 0.
|
83
|
-
description: This module makes possible to select
|
82
|
+
version: 0.29.0.rc2
|
83
|
+
description: This module makes possible to select amount a set of proposal by sortition
|
84
84
|
email:
|
85
85
|
- jsperezg@gmail.com
|
86
86
|
executables: []
|
@@ -127,7 +127,6 @@ files:
|
|
127
127
|
- app/views/decidim/sortitions/sortitions/_count.html.erb
|
128
128
|
- app/views/decidim/sortitions/sortitions/_linked_sortitions.html.erb
|
129
129
|
- app/views/decidim/sortitions/sortitions/_proposal.html.erb
|
130
|
-
- app/views/decidim/sortitions/sortitions/_proposal_badge.html.erb
|
131
130
|
- app/views/decidim/sortitions/sortitions/_results_count.html.erb
|
132
131
|
- app/views/decidim/sortitions/sortitions/_sortition.html.erb
|
133
132
|
- app/views/decidim/sortitions/sortitions/_sortition_author.html.erb
|
@@ -264,14 +263,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
264
263
|
requirements:
|
265
264
|
- - "~>"
|
266
265
|
- !ruby/object:Gem::Version
|
267
|
-
version: 3.
|
266
|
+
version: 3.2.0
|
268
267
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
269
268
|
requirements:
|
270
|
-
- - "
|
269
|
+
- - ">"
|
271
270
|
- !ruby/object:Gem::Version
|
272
|
-
version:
|
271
|
+
version: 1.3.1
|
273
272
|
requirements: []
|
274
|
-
rubygems_version: 3.
|
273
|
+
rubygems_version: 3.4.10
|
275
274
|
signing_key:
|
276
275
|
specification_version: 4
|
277
276
|
summary: Decidim sortitions module
|