decidim-results 0.4.4 → 0.5.0

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: 0e87f3b4a655ec87ba8ed404f0237dca5b971586
4
- data.tar.gz: e349dc188dd9b5f9ceb058d3c743509b187054e2
3
+ metadata.gz: aeb2b7c606a8af81848a7180086ad201a4e8c4fd
4
+ data.tar.gz: a26b0f2352010b97f67435e04574a55da56001e0
5
5
  SHA512:
6
- metadata.gz: 4af6cfb80daee17b9079e84f7470282e57e8137f3902d5578071a848788d143fefb6135e094e6b6e592d4f7f90935546572f0f0880ebf82dc51d5aeffc3e6942
7
- data.tar.gz: ad3cff5a527eed0dc1a672ea0527ae9e1b1858b283f03de858d3cd80c8fb7edc0a83685f568b97d88fd6e5a9d02bcab28307f6efeb303dd29702206491929814
6
+ metadata.gz: b5fba1ad7200a3a1a4fdccf91ab38f09e71f58844f7f9a457151466ab14944568b5a3f91809097de61ff392df747a1779d7c5a6c259202eb13823eb6b5b6cf6d
7
+ data.tar.gz: 4c3094fb4a01c02a26d155a5fe4d8466aa70afd3992172b7d120e8242ad0ccbe63cb54982240f69412c803a954859fe14b9c62db4b5d5a5fcec019213225d39d
@@ -1 +1 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 35 35"><path d="M17.5 35A17.5 17.5 0 1 1 35 17.5 17.52 17.52 0 0 1 17.5 35zm0-33.06A15.56 15.56 0 1 0 33.06 17.5 15.57 15.57 0 0 0 17.5 1.94zM16 22.48a1 1 0 0 1-.68-.28l-4.08-4a1 1 0 0 1 1.36-1.39l3.4 3.3 8-8.8a1 1 0 0 1 1.44 1.31l-8.69 9.55a1 1 0 0 1-.69.32z"/></svg>
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 35 35"><path d="M17.5 35A17.5 17.5 0 1 1 35 17.5 17.52 17.52 0 0 1 17.5 35zm0-33.06A15.56 15.56 0 1 0 33.06 17.5 15.57 15.57 0 0 0 17.5 1.94zM16 22.48a1 1 0 0 1-.68-.28l-4.08-4a1 1 0 0 1 1.36-1.39l3.4 3.3 8-8.8a1 1 0 0 1 1.44 1.31l-8.69 9.55a1 1 0 0 1-.69.32z"/></svg>
@@ -41,7 +41,7 @@ module Decidim
41
41
  end
42
42
 
43
43
  def scope
44
- @scope ||= process_scope || organization_scopes.where(id: decidim_scope_id).first
44
+ @scope ||= organization_scopes.where(id: decidim_scope_id).first || process_scope
45
45
  end
46
46
 
47
47
  def category
@@ -12,9 +12,9 @@
12
12
  <%= form.translated :editor, :description %>
13
13
  </div>
14
14
 
15
- <% if !@form.process_scope %>
16
- <div class="row column">
17
- <%= form.collection_select :decidim_scope_id, organization_scopes, :id, :name %>
15
+ <% if current_participatory_process.has_subscopes? %>
16
+ <div class="row column">
17
+ <%= form.scopes_select :decidim_scope_id, prompt: I18n.t("decidim.scopes.global"), remote_path: decidim.scopes_search_path(root: current_participatory_process.scope) %>
18
18
  </div>
19
19
  <% end %>
20
20
 
@@ -31,4 +31,4 @@
31
31
  <% end %>
32
32
  </div>
33
33
  </div>
34
- </div>
34
+ </div>
@@ -12,8 +12,8 @@
12
12
  </div>
13
13
  </div>
14
14
 
15
- <% if current_organization.scopes.any? && !current_participatory_process.scope %>
16
- <%= form.collection_check_boxes :scope_id, search_organization_scopes, lambda {|scope| scope.id.to_s}, :name, legend_title: t('.scopes') %>
15
+ <% if current_participatory_process.has_subscopes? %>
16
+ <%= form.scopes_select :scope_id, legend_title: t(".scopes"), label: false, prompt: t('.scope_prompt'), remote_path: decidim.scopes_search_path(include_root: true), multiple: true %>
17
17
  <% end %>
18
18
 
19
19
  <% if current_feature.categories.any? %>
@@ -15,4 +15,4 @@
15
15
  <div class="filters">
16
16
  <%= render partial: "filters" %>
17
17
  </div>
18
- </div>
18
+ </div>
@@ -9,7 +9,7 @@
9
9
  <h5 class="card__title"><%= translated_attribute result.title %></h5>
10
10
  <% end %>
11
11
  <%== translated_attribute result.description %>
12
- <%= render partial: "tags", locals: { result: result } %>
12
+ <%= render partial: "decidim/shared/tags", locals: { resource: result, tags_class_extra: "tags--result" } %>
13
13
  </div>
14
14
  </article>
15
15
  </div>
@@ -1,3 +1,5 @@
1
+ <%= render partial: "decidim/shared/feature_announcement" %>
2
+
1
3
  <div class="row columns">
2
4
  <div class="title-action">
3
5
  <h2 id="proposals-count" class="title-action__title section-heading">
@@ -1,2 +1,5 @@
1
1
  var $results = $('#results');
2
2
  $results.html('<%= j(render partial: "results") %>');
3
+
4
+ var $dropdownMenu = $('.dropdown.menu', $results);
5
+ $dropdownMenu.foundation();
@@ -45,7 +45,7 @@
45
45
  <div class="columns mediumlarge-8 mediumlarge-pull-4">
46
46
  <div class="section">
47
47
  <%== translated_attribute result.description %>
48
- <%= render partial: "tags", locals: { result: result } %>
48
+ <%= render partial: "decidim/shared/tags", locals: { resource: result, tags_class_extra: "tags--result" } %>
49
49
  </div>
50
50
  <%= linked_resources_for result, :proposals, "included_proposals" %>
51
51
  <%= linked_resources_for result, :meetings, "meetings_through_proposals" %>
@@ -5,5 +5,7 @@ ignore_unused:
5
5
  - "decidim.resource_links.*"
6
6
  - activerecord.attributes.*
7
7
  - activemodel.attributes.*
8
+ ignore_missing:
9
+ - decidim.scopes.global
8
10
  search:
9
11
  strict: false
@@ -62,6 +62,7 @@ ca:
62
62
  filters:
63
63
  category: Categoria
64
64
  category_prompt: Selecciona una categoria
65
+ scope_prompt: Seleccioneu un àmbit
65
66
  scopes: Àmbits
66
67
  search: Cerca
67
68
  filters_small_view:
@@ -76,4 +77,4 @@ ca:
76
77
  contributions: Aportacions
77
78
  meetings: Trobades
78
79
  proposals: Propostes
79
- votes: Suports
80
+ votes: Suports
@@ -14,8 +14,10 @@ en:
14
14
  name: Results
15
15
  settings:
16
16
  global:
17
+ announcement: Announcement
17
18
  comments_enabled: Comments enabled
18
19
  step:
20
+ announcement: Announcement
19
21
  comments_blocked: Comments blocked
20
22
  resource_links:
21
23
  included_proposals:
@@ -63,6 +65,7 @@ en:
63
65
  filters:
64
66
  category: Category
65
67
  category_prompt: Select a category
68
+ scope_prompt: Select a scope
66
69
  scopes: Scopes
67
70
  search: Search
68
71
  filters_small_view:
@@ -62,6 +62,7 @@ es:
62
62
  filters:
63
63
  category: Categoría
64
64
  category_prompt: Selecciona una categoría
65
+ scope_prompt: Seleccione un ámbito
65
66
  scopes: Ámbitos
66
67
  search: Buscar
67
68
  filters_small_view:
@@ -76,4 +77,4 @@ es:
76
77
  contributions: Aportes
77
78
  meetings: Lista de encuentros
78
79
  proposals: Propuestas
79
- votes: Soportes
80
+ votes: Soportes
@@ -76,4 +76,4 @@ eu:
76
76
  contributions: Ekarpenak
77
77
  meetings: Topaketa-zerrenda
78
78
  proposals: Proposamenak
79
- votes: Sostenguak
79
+ votes: Sostenguak
@@ -71,4 +71,4 @@ fi:
71
71
  contributions: Kontribuutiot
72
72
  meetings: Tapaamiset
73
73
  proposals: Ehdotukset
74
- votes: Kannatukset
74
+ votes: Kannatukset
@@ -76,4 +76,4 @@ fr:
76
76
  contributions: Contributions
77
77
  meetings: Rencontre
78
78
  proposals: Propositions
79
- votes: Soutiens
79
+ votes: Soutiens
@@ -75,4 +75,4 @@ it:
75
75
  comments: Commenti
76
76
  contributions: Contributi
77
77
  proposals: Proposte
78
- votes: Voti
78
+ votes: Voti
@@ -2,4 +2,4 @@ nl:
2
2
  activemodel:
3
3
  attributes:
4
4
  result:
5
- title: Titel
5
+ title: Titel
@@ -0,0 +1,5 @@
1
+ pl:
2
+ decidim:
3
+ results:
4
+ actions:
5
+ new: Nowy
@@ -27,10 +27,12 @@ Decidim.register_feature(:results) do |feature|
27
27
 
28
28
  feature.settings(:global) do |settings|
29
29
  settings.attribute :comments_enabled, type: :boolean, default: true
30
+ settings.attribute :announcement, type: :text, translated: true, editor: true
30
31
  end
31
32
 
32
33
  feature.settings(:step) do |settings|
33
34
  settings.attribute :comments_blocked, type: :boolean, default: false
35
+ settings.attribute :announcement, type: :text, translated: true, editor: true
34
36
  end
35
37
 
36
38
  feature.seeds do |process|
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.4.4
4
+ version: 0.5.0
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-08-02 00:00:00.000000000 Z
13
+ date: 2017-08-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.4.4
21
+ version: 0.5.0
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.4.4
28
+ version: 0.5.0
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.4.4
35
+ version: 0.5.0
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.4.4
42
+ version: 0.5.0
43
43
  - !ruby/object:Gem::Dependency
44
44
  name: rectify
45
45
  requirement: !ruby/object:Gem::Requirement
@@ -88,70 +88,70 @@ dependencies:
88
88
  requirements:
89
89
  - - '='
90
90
  - !ruby/object:Gem::Version
91
- version: 0.4.4
91
+ version: 0.5.0
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.4.4
98
+ version: 0.5.0
99
99
  - !ruby/object:Gem::Dependency
100
100
  name: decidim-admin
101
101
  requirement: !ruby/object:Gem::Requirement
102
102
  requirements:
103
103
  - - '='
104
104
  - !ruby/object:Gem::Version
105
- version: 0.4.4
105
+ version: 0.5.0
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.4.4
112
+ version: 0.5.0
113
113
  - !ruby/object:Gem::Dependency
114
114
  name: decidim-comments
115
115
  requirement: !ruby/object:Gem::Requirement
116
116
  requirements:
117
117
  - - '='
118
118
  - !ruby/object:Gem::Version
119
- version: 0.4.4
119
+ version: 0.5.0
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.4.4
126
+ version: 0.5.0
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.4.4
133
+ version: 0.5.0
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.4.4
140
+ version: 0.5.0
141
141
  - !ruby/object:Gem::Dependency
142
142
  name: decidim-meetings
143
143
  requirement: !ruby/object:Gem::Requirement
144
144
  requirements:
145
145
  - - '='
146
146
  - !ruby/object:Gem::Version
147
- version: 0.4.4
147
+ version: 0.5.0
148
148
  type: :development
149
149
  prerelease: false
150
150
  version_requirements: !ruby/object:Gem::Requirement
151
151
  requirements:
152
152
  - - '='
153
153
  - !ruby/object:Gem::Version
154
- version: 0.4.4
154
+ version: 0.5.0
155
155
  description: A results component for decidim's participatory processes.
156
156
  email:
157
157
  - josepjaume@gmail.com
@@ -188,7 +188,6 @@ files:
188
188
  - app/views/decidim/results/results/_filters_small_view.html.erb
189
189
  - app/views/decidim/results/results/_linked_results.html.erb
190
190
  - app/views/decidim/results/results/_results.html.erb
191
- - app/views/decidim/results/results/_tags.html.erb
192
191
  - app/views/decidim/results/results/index.html.erb
193
192
  - app/views/decidim/results/results/index.js.erb
194
193
  - app/views/decidim/results/results/show.html.erb
@@ -201,6 +200,7 @@ files:
201
200
  - config/locales/fr.yml
202
201
  - config/locales/it.yml
203
202
  - config/locales/nl.yml
203
+ - config/locales/pl.yml
204
204
  - db/migrate/20170116104125_create_results.rb
205
205
  - db/migrate/20170129164553_remove_short_description_from_results.rb
206
206
  - db/migrate/20170215132624_add_reference_to_results.rb
@@ -1,10 +0,0 @@
1
- <% if result.category.present? || result.scope.present? %>
2
- <ul class="tags tags--result" >
3
- <% if result.category.present? %>
4
- <li><%= link_to translated_attribute(result.category.name), resource_locator(result).index(filter: { category_id: result.category.id }) %></li>
5
- <% end %>
6
- <% if !current_participatory_process.scope && result.scope.present? %>
7
- <li><%= link_to result.scope.name, resource_locator(result).index(filter: { scope_id: [result.scope.id] }) %></li>
8
- <% end %>
9
- </ul>
10
- <% end %>