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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6b31f33002d2e563b304b59e39a656bd5f8cce64
4
- data.tar.gz: f38e1469828e9db0a67349ddc217a734d7c0bb64
3
+ metadata.gz: 261211327c81628f79052e961210bac9bea4bcf6
4
+ data.tar.gz: eac6d159d8e9fc48bd38a17f5ca64c8363f756f1
5
5
  SHA512:
6
- metadata.gz: a18ff00b0d57bcaed24fbc52df0f50cbb5d8bf7c457b0651588bd70156411d28e5eab45ccd3295d53c261e213faf11ce3408a27fd06d4ebbb9d08761c25f2cce
7
- data.tar.gz: e3e967335b57634c6ab80b73c4d9abfe37d92350f0b00cb007e9ef9512aa33ca4cbfd627c4ba029f638aee263a9ebc14c6d3eb0388de1b4792525f03b5f8c2cd
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,6 +1,6 @@
1
1
  <h3><%= t ".title" %></h3>
2
2
 
3
- <%= form_for(@form) do |f| %>
3
+ <%= decidim_form_for(@form) do |f| %>
4
4
  <%= render partial: 'form', object: f %>
5
5
 
6
6
  <div class="actions">
@@ -1,6 +1,6 @@
1
1
  <h3><%= t ".title" %></h3>
2
2
 
3
- <%= form_for(@form) do |f| %>
3
+ <%= decidim_form_for(@form) do |f| %>
4
4
  <%= render partial: 'form', object: f %>
5
5
 
6
6
  <div class="actions">
@@ -1,5 +1,3 @@
1
- <% content_for(:title, t(".title")) %>
2
-
3
1
  <div class="row columns">
4
2
  <div class="title-action">
5
3
  <h2 id="proposals-count" class="title-action__title section-heading">
@@ -1,4 +1,8 @@
1
- <% content_for(:title, translated_attribute(result.title)) %>
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
- <%= content_for :expanded do %>
49
- <% if feature_settings.comments_always_enabled || current_settings.comments_enabled %>
50
- <%= comments_for result, arguable: true, votable: true %>
51
- <% end %>
52
- <% end %>
53
+ <%= comments_for result %>
54
+
55
+ <%= javascript_include_tag "decidim/proposals/social_share" %>
56
+ <%= stylesheet_link_tag "decidim/proposals/social_share" %>
@@ -2,4 +2,5 @@ base_locale: en
2
2
  locales: [en]
3
3
  ignore_unused:
4
4
  - "decidim.features.results.name"
5
+ - "decidim.features.results.settings.*"
5
6
  - "decidim.resource_links.*"
@@ -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: Llistat de trobades
62
+ meetings: Trobades
60
63
  proposals: Propostes
61
64
  votes: Suports
@@ -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
@@ -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
@@ -0,0 +1,5 @@
1
+ eu:
2
+ decidim:
3
+ features:
4
+ results:
5
+ name: Emaitzak
@@ -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 :comments_always_enabled, type: :boolean, default: true
20
+ settings.attribute :comments_enabled, type: :boolean, default: true
21
21
  end
22
22
 
23
23
  feature.settings(:step) do |settings|
24
- settings.attribute :comments_enabled, type: :boolean, default: true
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.3
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-02 00:00:00.000000000 Z
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.3
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.3
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.3
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.3
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.3
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.3
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.3
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.3
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.3
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.3
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.3
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.3
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