decidim-results 0.0.3 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/decidim/results/result.rb +21 -0
- data/app/views/decidim/results/admin/results/edit.html.erb +1 -1
- data/app/views/decidim/results/admin/results/new.html.erb +1 -1
- data/app/views/decidim/results/results/index.html.erb +0 -2
- data/app/views/decidim/results/results/show.html.erb +10 -6
- data/config/i18n-tasks.yml +1 -0
- data/config/locales/ca.yml +6 -3
- data/config/locales/en.yml +5 -2
- data/config/locales/es.yml +5 -2
- data/config/locales/eu.yml +5 -0
- data/lib/decidim/results/feature.rb +3 -2
- metadata +15 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 261211327c81628f79052e961210bac9bea4bcf6
|
4
|
+
data.tar.gz: eac6d159d8e9fc48bd38a17f5ca64c8363f756f1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9286d8c4a2ecc6fed04858739afd96158f7fff82c57b956d5520d794c0a267313c18c5150f05fd67acc035bf068dc7bd58d675e9dbb310b34a2e3aaf196df5a0
|
7
|
+
data.tar.gz: 1a98a65bd335620cb04a26203d427fd820894e89f4544cdfdb28aa17bbacbf0eb5c5e124aa2a1dab47604318e9611ec27ebb8f8a77c8e9bbb8be83d33c1612dd
|
@@ -8,8 +8,29 @@ module Decidim
|
|
8
8
|
include Decidim::HasFeature
|
9
9
|
include Decidim::HasScope
|
10
10
|
include Decidim::HasCategory
|
11
|
+
include Decidim::Comments::Commentable
|
11
12
|
|
12
13
|
feature_manifest_name "results"
|
14
|
+
|
15
|
+
# Public: Overrides the `commentable?` Commentable concern method.
|
16
|
+
def commentable?
|
17
|
+
feature.settings.comments_enabled?
|
18
|
+
end
|
19
|
+
|
20
|
+
# Public: Overrides the `accepts_new_comments?` Commentable concern method.
|
21
|
+
def accepts_new_comments?
|
22
|
+
commentable? && !feature.active_step_settings.comments_blocked
|
23
|
+
end
|
24
|
+
|
25
|
+
# Public: Overrides the `comments_have_alignment?` Commentable concern method.
|
26
|
+
def comments_have_alignment?
|
27
|
+
true
|
28
|
+
end
|
29
|
+
|
30
|
+
# Public: Overrides the `comments_have_votes?` Commentable concern method.
|
31
|
+
def comments_have_votes?
|
32
|
+
true
|
33
|
+
end
|
13
34
|
end
|
14
35
|
end
|
15
36
|
end
|
@@ -1,4 +1,8 @@
|
|
1
|
-
<%
|
1
|
+
<% add_decidim_meta_tags({
|
2
|
+
description: translated_attribute(result.description),
|
3
|
+
title: translated_attribute(result.title),
|
4
|
+
url: result_url(result.id)
|
5
|
+
}) %>
|
2
6
|
|
3
7
|
<div class="row column view-header">
|
4
8
|
<h2 class="heading2"><%= translated_attribute result.title %></h2>
|
@@ -34,6 +38,7 @@
|
|
34
38
|
</div>
|
35
39
|
</div>
|
36
40
|
</div>
|
41
|
+
<%= render partial: "decidim/shared/share_modal" %>
|
37
42
|
</div>
|
38
43
|
<div class="columns mediumlarge-8 mediumlarge-pull-4">
|
39
44
|
<div class="section">
|
@@ -45,8 +50,7 @@
|
|
45
50
|
</div>
|
46
51
|
</div>
|
47
52
|
|
48
|
-
<%=
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
<% end %>
|
53
|
+
<%= comments_for result %>
|
54
|
+
|
55
|
+
<%= javascript_include_tag "decidim/proposals/social_share" %>
|
56
|
+
<%= stylesheet_link_tag "decidim/proposals/social_share" %>
|
data/config/i18n-tasks.yml
CHANGED
data/config/locales/ca.yml
CHANGED
@@ -3,6 +3,11 @@ ca:
|
|
3
3
|
features:
|
4
4
|
results:
|
5
5
|
name: Resultats
|
6
|
+
settings:
|
7
|
+
global:
|
8
|
+
comments_enabled: Comentaris habilitats
|
9
|
+
step:
|
10
|
+
comments_blocked: Comentaris bloquejats
|
6
11
|
resource_links:
|
7
12
|
included_proposals:
|
8
13
|
proposals: Propostes incloses en aquest resultat
|
@@ -49,13 +54,11 @@ ca:
|
|
49
54
|
category: Categoria
|
50
55
|
scopes: Àmbits
|
51
56
|
search: Cerca
|
52
|
-
index:
|
53
|
-
title: Resultats
|
54
57
|
show:
|
55
58
|
stats:
|
56
59
|
attendees: Assistents
|
57
60
|
comments: Comentaris
|
58
61
|
contributions: Aportacions
|
59
|
-
meetings:
|
62
|
+
meetings: Trobades
|
60
63
|
proposals: Propostes
|
61
64
|
votes: Suports
|
data/config/locales/en.yml
CHANGED
@@ -4,6 +4,11 @@ en:
|
|
4
4
|
features:
|
5
5
|
results:
|
6
6
|
name: Results
|
7
|
+
settings:
|
8
|
+
global:
|
9
|
+
comments_enabled: Comments enabled
|
10
|
+
step:
|
11
|
+
comments_blocked: Comments blocked
|
7
12
|
resource_links:
|
8
13
|
included_proposals:
|
9
14
|
proposals: Proposals included in this result
|
@@ -50,8 +55,6 @@ en:
|
|
50
55
|
category: Category
|
51
56
|
scopes: Scopes
|
52
57
|
search: Search
|
53
|
-
index:
|
54
|
-
title: Results
|
55
58
|
show:
|
56
59
|
stats:
|
57
60
|
attendees: Attendees
|
data/config/locales/es.yml
CHANGED
@@ -3,6 +3,11 @@ es:
|
|
3
3
|
features:
|
4
4
|
results:
|
5
5
|
name: Resultados
|
6
|
+
settings:
|
7
|
+
global:
|
8
|
+
comments_enabled: Comentarios habilitados
|
9
|
+
step:
|
10
|
+
comments_blocked: Comentarios bloqueados
|
6
11
|
resource_links:
|
7
12
|
included_proposals:
|
8
13
|
proposals: Propuestas incluidas en este resultado
|
@@ -49,8 +54,6 @@ es:
|
|
49
54
|
category: Categoría
|
50
55
|
scopes: Ámbitos
|
51
56
|
search: Buscar
|
52
|
-
index:
|
53
|
-
title: Resultados
|
54
57
|
show:
|
55
58
|
stats:
|
56
59
|
attendees: Asistentes
|
@@ -17,11 +17,11 @@ Decidim.register_feature(:results) do |feature|
|
|
17
17
|
end
|
18
18
|
|
19
19
|
feature.settings(:global) do |settings|
|
20
|
-
settings.attribute :
|
20
|
+
settings.attribute :comments_enabled, type: :boolean, default: true
|
21
21
|
end
|
22
22
|
|
23
23
|
feature.settings(:step) do |settings|
|
24
|
-
settings.attribute :
|
24
|
+
settings.attribute :comments_blocked, type: :boolean, default: false
|
25
25
|
end
|
26
26
|
|
27
27
|
feature.seeds do
|
@@ -31,6 +31,7 @@ Decidim.register_feature(:results) do |feature|
|
|
31
31
|
feature = Decidim::Feature.create!(
|
32
32
|
name: Decidim::Features::Namer.new(process.organization.available_locales, :results).i18n_name,
|
33
33
|
manifest_name: :results,
|
34
|
+
published_at: Time.current,
|
34
35
|
participatory_process: process
|
35
36
|
)
|
36
37
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: decidim-results
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
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: 2017-02-
|
13
|
+
date: 2017-02-17 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: decidim-core
|
@@ -18,28 +18,28 @@ dependencies:
|
|
18
18
|
requirements:
|
19
19
|
- - '='
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: 0.0.
|
21
|
+
version: 0.0.5
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
25
|
requirements:
|
26
26
|
- - '='
|
27
27
|
- !ruby/object:Gem::Version
|
28
|
-
version: 0.0.
|
28
|
+
version: 0.0.5
|
29
29
|
- !ruby/object:Gem::Dependency
|
30
30
|
name: decidim-comments
|
31
31
|
requirement: !ruby/object:Gem::Requirement
|
32
32
|
requirements:
|
33
33
|
- - '='
|
34
34
|
- !ruby/object:Gem::Version
|
35
|
-
version: 0.0.
|
35
|
+
version: 0.0.5
|
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.0.
|
42
|
+
version: 0.0.5
|
43
43
|
- !ruby/object:Gem::Dependency
|
44
44
|
name: rectify
|
45
45
|
requirement: !ruby/object:Gem::Requirement
|
@@ -88,56 +88,56 @@ dependencies:
|
|
88
88
|
requirements:
|
89
89
|
- - '='
|
90
90
|
- !ruby/object:Gem::Version
|
91
|
-
version: 0.0.
|
91
|
+
version: 0.0.5
|
92
92
|
type: :development
|
93
93
|
prerelease: false
|
94
94
|
version_requirements: !ruby/object:Gem::Requirement
|
95
95
|
requirements:
|
96
96
|
- - '='
|
97
97
|
- !ruby/object:Gem::Version
|
98
|
-
version: 0.0.
|
98
|
+
version: 0.0.5
|
99
99
|
- !ruby/object:Gem::Dependency
|
100
100
|
name: decidim-comments
|
101
101
|
requirement: !ruby/object:Gem::Requirement
|
102
102
|
requirements:
|
103
103
|
- - '='
|
104
104
|
- !ruby/object:Gem::Version
|
105
|
-
version: 0.0.
|
105
|
+
version: 0.0.5
|
106
106
|
type: :development
|
107
107
|
prerelease: false
|
108
108
|
version_requirements: !ruby/object:Gem::Requirement
|
109
109
|
requirements:
|
110
110
|
- - '='
|
111
111
|
- !ruby/object:Gem::Version
|
112
|
-
version: 0.0.
|
112
|
+
version: 0.0.5
|
113
113
|
- !ruby/object:Gem::Dependency
|
114
114
|
name: decidim-meetings
|
115
115
|
requirement: !ruby/object:Gem::Requirement
|
116
116
|
requirements:
|
117
117
|
- - '='
|
118
118
|
- !ruby/object:Gem::Version
|
119
|
-
version: 0.0.
|
119
|
+
version: 0.0.5
|
120
120
|
type: :development
|
121
121
|
prerelease: false
|
122
122
|
version_requirements: !ruby/object:Gem::Requirement
|
123
123
|
requirements:
|
124
124
|
- - '='
|
125
125
|
- !ruby/object:Gem::Version
|
126
|
-
version: 0.0.
|
126
|
+
version: 0.0.5
|
127
127
|
- !ruby/object:Gem::Dependency
|
128
128
|
name: decidim-proposals
|
129
129
|
requirement: !ruby/object:Gem::Requirement
|
130
130
|
requirements:
|
131
131
|
- - '='
|
132
132
|
- !ruby/object:Gem::Version
|
133
|
-
version: 0.0.
|
133
|
+
version: 0.0.5
|
134
134
|
type: :development
|
135
135
|
prerelease: false
|
136
136
|
version_requirements: !ruby/object:Gem::Requirement
|
137
137
|
requirements:
|
138
138
|
- - '='
|
139
139
|
- !ruby/object:Gem::Version
|
140
|
-
version: 0.0.
|
140
|
+
version: 0.0.5
|
141
141
|
description: ''
|
142
142
|
email:
|
143
143
|
- josepjaume@gmail.com
|
@@ -178,6 +178,7 @@ files:
|
|
178
178
|
- config/locales/ca.yml
|
179
179
|
- config/locales/en.yml
|
180
180
|
- config/locales/es.yml
|
181
|
+
- config/locales/eu.yml
|
181
182
|
- db/migrate/20170116104125_create_results.rb
|
182
183
|
- db/migrate/20170129164553_remove_short_description_from_results.rb
|
183
184
|
- lib/decidim/results.rb
|