decidim-budgets 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: 3debe1a36f353528b0a6f984a08b394a0a139206
4
- data.tar.gz: 0a521313f8811adf0ce0fda874a59243a6f89924
3
+ metadata.gz: 9807a5d16469bb8cac02ef1e5319d89615d8675f
4
+ data.tar.gz: 29af156a2f599e0ca52f00ca53dcc80c1776f745
5
5
  SHA512:
6
- metadata.gz: 025f22841ce01de2247d3d60a303d44eb4029fa48db20bad3592cba101bbdcf8e64c9413c803cb2b463bb27a6782479af88988e62171965fb7d510c4661964a0
7
- data.tar.gz: 73662198661b01573401e304e8e2179abdfdfa34401c29828683a07fbf11cda6f8e86f979bf67db8f66b8ea7f199e05df30289f5626cbc4777dd8d405e2fa694
6
+ metadata.gz: 713b3582ae9cae421b38b2b1e2ccefb185bc29ad0a0722d764159f8e9e9e2383e99a272499a924b96bac2ea1a74a512e84cb54980c31b6a21c934cc3a5c06a50
7
+ data.tar.gz: 585d6f983b02afc003ddbf682c489a49a418c784fb269239286a8e7d0777175d43175b4a0813dac311c59a83a2f1f6648f7a2389c64baeb6614b6100649a2469
@@ -1 +1 @@
1
- @import "budget/*";
1
+ @import "budget/*";
@@ -40,7 +40,7 @@ module Decidim
40
40
  end
41
41
 
42
42
  def scope
43
- @scope ||= process_scope || current_organization.scopes.where(id: decidim_scope_id).first
43
+ @scope ||= current_organization.scopes.where(id: decidim_scope_id).first || process_scope
44
44
  end
45
45
 
46
46
  def category
@@ -16,9 +16,9 @@
16
16
  <%= form.number_field :budget %>
17
17
  </div>
18
18
 
19
- <% if !current_participatory_process.scope %>
19
+ <% if current_participatory_process.has_subscopes? %>
20
20
  <div class="row column" >
21
- <%= form.collection_select :decidim_scope_id, organization_scopes, :id, :name %>
21
+ <%= form.scopes_select :decidim_scope_id, prompt: I18n.t("decidim.scopes.global"), remote_path: decidim.scopes_search_path(root: current_participatory_process.scope) %>
22
22
  </div>
23
23
  <% end %>
24
24
 
@@ -36,4 +36,4 @@
36
36
  <% end %>
37
37
  </div>
38
38
  </div>
39
- </div>
39
+ </div>
@@ -11,4 +11,4 @@
11
11
  <button data-close class="button expanded"><%= t('.ok') %></button>
12
12
  </div>
13
13
  </div>
14
- </div>
14
+ </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) %>
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>
@@ -6,7 +6,7 @@
6
6
  <%= translated_attribute project.title %>
7
7
  </h5>
8
8
  <% end %>
9
- <%= render partial: "decidim/budgets/projects/tags", locals: { project: project } %>
9
+ <%= render partial: "decidim/shared/tags", locals: { resource: project, tags_class_extra: "tags--project" } %>
10
10
  </div>
11
11
  </div>
12
12
  <% if current_user.present? %>
@@ -1,3 +1,5 @@
1
+ <%= render partial: "decidim/shared/feature_announcement" %>
2
+
1
3
  <% if current_user.present? && current_settings.votes_enabled? %>
2
4
  <div class="row column">
3
5
  <%= render partial: "budget_summary", locals: { include_heading: true } %>
@@ -37,7 +37,7 @@
37
37
  <div class="columns mediumlarge-8 mediumlarge-pull-4">
38
38
  <div class="section">
39
39
  <%== translated_attribute project.description %>
40
- <%= render partial: "tags", locals: { project: project } %>
40
+ <%= render partial: "decidim/shared/tags", locals: { resource: project, tags_class_extra: "tags--project" } %>
41
41
  </div>
42
42
  <%= linked_resources_for project, :proposals, "included_proposals" %>
43
43
  </div>
@@ -6,6 +6,7 @@ ignore_unused:
6
6
  - "decidim.features.budgets.actions.*"
7
7
  - "activemodel.attributes.project.*"
8
8
  - "decidim.resource_links.*"
9
-
9
+ ignore_missing:
10
+ - decidim.scopes.global
10
11
  search:
11
12
  strict: false
@@ -73,6 +73,7 @@ ca:
73
73
  filters:
74
74
  category: Categoria
75
75
  category_prompt: Selecciona una categoria
76
+ scope_prompt: Seleccioneu un àmbit
76
77
  scopes: Àmbits
77
78
  search: Cerca
78
79
  filters_small_view:
@@ -126,4 +127,4 @@ ca:
126
127
  project_proposals: 'Propostes incloses en aquest projecte:'
127
128
  index:
128
129
  confirmed_orders_count: Nombre de vots
129
- total_budget: Pressupost total
130
+ total_budget: Pressupost total
@@ -80,6 +80,7 @@ en:
80
80
  filters:
81
81
  category: Category
82
82
  category_prompt: Select a category
83
+ scope_prompt: Select a scope
83
84
  scopes: Scopes
84
85
  search: Search
85
86
  filters_small_view:
@@ -114,10 +115,12 @@ en:
114
115
  name: Budgets
115
116
  settings:
116
117
  global:
118
+ announcement: Announcement
117
119
  comments_enabled: Comments enabled
118
120
  total_budget: Total budget
119
121
  vote_threshold_percent: Vote threshold percent
120
122
  step:
123
+ announcement: Announcement
121
124
  comments_blocked: Comments blocked
122
125
  show_votes: Show votes
123
126
  votes_enabled: Votes enabled
@@ -73,6 +73,7 @@ es:
73
73
  filters:
74
74
  category: Categoría
75
75
  category_prompt: Selecciona una categoría
76
+ scope_prompt: Seleccione un ámbito
76
77
  scopes: Ámbitos
77
78
  search: Buscar
78
79
  filters_small_view:
@@ -126,4 +127,4 @@ es:
126
127
  project_proposals: 'Propuestas incluidas en este proyecto:'
127
128
  index:
128
129
  confirmed_orders_count: Número de votos
129
- total_budget: Presupuesto total
130
+ total_budget: Presupuesto total
@@ -73,6 +73,7 @@ eu:
73
73
  filters:
74
74
  category: Kategoria
75
75
  category_prompt: Aukeratu kategoria bat
76
+ scope_prompt: Hautatu esparrua
76
77
  scopes: Esparruak
77
78
  search: Bilatu
78
79
  filters_small_view:
@@ -126,4 +127,4 @@ eu:
126
127
  project_proposals: 'Proiektu honetan jasotako proposamenak:'
127
128
  index:
128
129
  confirmed_orders_count: Boto-kopurua
129
- total_budget: Guztizko aurrekontua
130
+ total_budget: Guztizko aurrekontua
@@ -117,4 +117,4 @@ fi:
117
117
  success: Äänesi on peruttu onnistuneesti
118
118
  index:
119
119
  confirmed_orders_count: Tilauksien määrä
120
- total_budget: Koko budjetti
120
+ total_budget: Koko budjetti
@@ -126,4 +126,4 @@ fr:
126
126
  project_proposals: 'Propositions incluses dans ce projet:'
127
127
  index:
128
128
  confirmed_orders_count: Nombre de votes comptés
129
- total_budget: Budget total
129
+ total_budget: Budget total
@@ -123,4 +123,4 @@ it:
123
123
  project_proposals: 'Proposte incluse in questo progetto:'
124
124
  index:
125
125
  confirmed_orders_count: Conteggio ordini
126
- total_budget: Budget totale
126
+ total_budget: Budget totale
@@ -2,4 +2,4 @@ nl:
2
2
  activemodel:
3
3
  attributes:
4
4
  project:
5
- description: Beschrijving
5
+ description: Beschrijving
@@ -0,0 +1,5 @@
1
+ pl:
2
+ decidim:
3
+ budgets:
4
+ actions:
5
+ new: Nowy
@@ -39,12 +39,14 @@ Decidim.register_feature(:budgets) do |feature|
39
39
  settings.attribute :total_budget, type: :integer, default: 100_000_000
40
40
  settings.attribute :vote_threshold_percent, type: :integer, default: 70
41
41
  settings.attribute :comments_enabled, type: :boolean, default: true
42
+ settings.attribute :announcement, type: :text, translated: true, editor: true
42
43
  end
43
44
 
44
45
  feature.settings(:step) do |settings|
45
46
  settings.attribute :comments_blocked, type: :boolean, default: false
46
47
  settings.attribute :votes_enabled, type: :boolean, default: true
47
48
  settings.attribute :show_votes, type: :boolean, default: false
49
+ settings.attribute :announcement, type: :text, translated: true, editor: true
48
50
  end
49
51
 
50
52
  feature.seeds do |process|
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: decidim-budgets
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,42 +88,42 @@ 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-proposals
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
  description: A budgets component for decidim's participatory processes.
128
128
  email:
129
129
  - josepjaume@gmail.com
@@ -184,7 +184,6 @@ files:
184
184
  - app/views/decidim/budgets/projects/_project.html.erb
185
185
  - app/views/decidim/budgets/projects/_project_budget_button.html.erb
186
186
  - app/views/decidim/budgets/projects/_projects.html.erb
187
- - app/views/decidim/budgets/projects/_tags.html.erb
188
187
  - app/views/decidim/budgets/projects/index.html.erb
189
188
  - app/views/decidim/budgets/projects/index.js.erb
190
189
  - app/views/decidim/budgets/projects/show.html.erb
@@ -197,6 +196,7 @@ files:
197
196
  - config/locales/fr.yml
198
197
  - config/locales/it.yml
199
198
  - config/locales/nl.yml
199
+ - config/locales/pl.yml
200
200
  - db/migrate/20170127114122_create_projects.rb
201
201
  - db/migrate/20170130095615_create_orders.rb
202
202
  - db/migrate/20170130101825_create_line_items.rb
@@ -1,10 +0,0 @@
1
- <% if project.category.present? || project.scope.present? %>
2
- <ul class="tags tags--project" >
3
- <% if project.category.present? %>
4
- <li><%= link_to translated_attribute(project.category.name), resource_locator(project).index(filter: { category_id: project.category.id }) %></li>
5
- <% end %>
6
- <% if project.scope.present? && !current_participatory_process.scope %>
7
- <li><%= link_to project.scope.name, resource_locator(project).index(filter: { scope_id: [project.scope.id] }) %></li>
8
- <% end %>
9
- </ul>
10
- <% end %>