decidim-proposals 0.0.6 → 0.0.7

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: 656e8df89f7b5ea02254e410d14a3df00eaa09fa
4
- data.tar.gz: 38eb1d3a952dd96d9172a1e3fc4bf1efa3dc8e32
3
+ metadata.gz: 05e3711ed4a9f525f365f4ea55d0f39d547d0de7
4
+ data.tar.gz: 706ae8059577cce78abf39a64e5a14a1c1a8635f
5
5
  SHA512:
6
- metadata.gz: 23eddcced0afdb41078c2af58a3e89762d424da02406a34eb44af66f174a062e2df76898ded03d0c4723892d248ebaf7307f11694686e6f864a6c193c6d4bd37
7
- data.tar.gz: 2884c6ef31744369f99efc80afb34556e100e225f45af3410949478832598669c9c941f7cfd2b75b49e490b1bcdd9fb682e3913e59538a41bc9820ea68738ebc
6
+ metadata.gz: 629035816274dda24c526187e7dde1d719f9830e795d549980090840f4162ae27e029c14fd72dbccfd10a2089df0696aebfe6290559eca46911d67c55f1efed9
7
+ data.tar.gz: 0441e9a5eb809353b8b9c416fe7fa74fc40276beadf745fe76762a1137cf95d1931bfac1a9a049986e42c38bb08ac92f93e0185f070f37c73d08025de230e885
@@ -32,7 +32,7 @@ module Decidim
32
32
  private
33
33
 
34
34
  def proposals
35
- @proposals ||= Proposal.where(feature: current_feature)
35
+ @proposals ||= Proposal.where(feature: current_feature).page(params[:page]).per(15)
36
36
  end
37
37
 
38
38
  def proposal
@@ -1,15 +1,21 @@
1
- <h3><%= t ".title", title: proposal.title %></h3>
1
+ <%= decidim_form_for(@form, url: proposal_proposal_answer_path(proposal, @form), html: { class: "form edit_proposal_answer" }) do |f| %>
2
+ <div class="card">
3
+ <div class="card-divider">
4
+ <h2 class="card-title"><%= t ".title", title: proposal.title %></h2>
5
+ </div>
2
6
 
3
- <%= decidim_form_for(@form, url: proposal_proposal_answer_path(proposal, @form)) do |f| %>
4
- <div class="field">
5
- <%= f.collection_radio_buttons :state, [["accepted", t('.accepted')], ["rejected", t('.rejected')]], :first, :last, prompt: true %>
6
- </div>
7
+ <div class="card-section">
8
+ <div class="row column">
9
+ <%= f.collection_radio_buttons :state, [["accepted", t('.accepted')], ["rejected", t('.rejected')]], :first, :last, prompt: true %>
10
+ </div>
7
11
 
8
- <div class="field">
9
- <%= f.translated :editor, :answer, autofocus: true, rows: 15 %>
12
+ <div class="row column">
13
+ <%= f.translated :editor, :answer, autofocus: true, rows: 15 %>
14
+ </div>
15
+ </div>
10
16
  </div>
11
17
 
12
- <div class="actions">
18
+ <div class="button--double form-general-submit">
13
19
  <%= f.submit t(".answer_proposal") %>
14
20
  </div>
15
21
  <% end %>
@@ -1,25 +1,33 @@
1
- <div class="field">
2
- <%= form.text_field :title %>
3
- </div>
1
+ <div class="card">
2
+ <div class="card-divider">
3
+ <h2 class="card-title"><%= title %></h2>
4
+ </div>
4
5
 
5
- <div class="field">
6
- <%= form.text_area :body, rows: 10 %>
7
- </div>
6
+ <div class="card-section">
7
+ <div class="row column">
8
+ <%= form.text_field :title %>
9
+ </div>
8
10
 
9
- <% if feature_settings.geocoding_enabled? %>
10
- <div class="field">
11
- <%= form.text_field :address %>
12
- </div>
13
- <% end %>
11
+ <div class="row column">
12
+ <%= form.text_area :body, rows: 10 %>
13
+ </div>
14
14
 
15
- <% if @form.categories&.any? %>
16
- <div class="field">
17
- <%= form.categories_select :category_id, @form.categories, prompt: t(".select_a_category") %>
18
- </div>
19
- <% end %>
15
+ <% if feature_settings.geocoding_enabled? %>
16
+ <div class="row column">
17
+ <%= form.text_field :address %>
18
+ </div>
19
+ <% end %>
20
+
21
+ <% if @form.categories&.any? %>
22
+ <div class="row column">
23
+ <%= form.categories_select :category_id, @form.categories, prompt: t(".select_a_category") %>
24
+ </div>
25
+ <% end %>
20
26
 
21
- <% if !@form.process_scope %>
22
- <div class="field">
23
- <%= form.collection_select :scope_id, organization_scopes, :id, :name %>
27
+ <% if !@form.process_scope %>
28
+ <div class="row column">
29
+ <%= form.collection_select :scope_id, organization_scopes, :id, :name %>
30
+ </div>
31
+ <% end %>
24
32
  </div>
25
- <% end %>
33
+ </div>
@@ -1,46 +1,63 @@
1
- <h2><%= t(".title") %></h2>
1
+ <div class="card">
2
+ <div class="card-divider">
3
+ <h2 class="card-title">
4
+ <%= t(".title") %>
2
5
 
3
- <div class="actions title">
4
- <% if feature_settings.official_proposals_enabled %>
5
- <%= link_to t("actions.new", scope: "decidim.proposals", name: t("models.proposal.name", scope: "decidim.proposals.admin")), new_proposal_path, class: 'new' if can? :manage, current_feature %>
6
- <% end %>
7
- </div>
6
+ <% if feature_settings.official_proposals_enabled %>
7
+ <%= link_to t("actions.new", scope: "decidim.proposals", name: t("models.proposal.name", scope: "decidim.proposals.admin")), new_proposal_path, class: 'button tiny button--title' if can? :manage, current_feature %>
8
+ <% end %>
9
+ </h2>
10
+ </div>
8
11
 
9
- <table class="stack">
10
- <thead>
11
- <tr>
12
- <th><%= t("models.proposal.fields.title", scope: "decidim.proposals") %></th>
13
- <th><%= t("models.proposal.fields.category", scope: "decidim.proposals") %></th>
14
- <th><%= t("models.proposal.fields.scope", scope: "decidim.proposals") %></th>
15
- <th><%= t("models.proposal.fields.state", scope: "decidim.proposals") %></th>
16
- <th class="actions"><%= t("actions.title", scope: "decidim.proposals") %></th>
17
- </tr>
18
- </thead>
19
- <tbody>
20
- <% proposals.each do |proposal| %>
21
- <tr data-id="<%= proposal.id %>">
22
- <td>
23
- <%= link_to proposal.title, decidim_proposals.proposal_path(id: proposal, feature_id: current_feature, participatory_process_id: current_participatory_process), target: :blank %><br />
24
- </td>
25
- <td>
26
- <% if proposal.category %>
27
- <%= translated_attribute proposal.category.name %>
28
- <% end %>
29
- </td>
30
- <td>
31
- <% if proposal.scope %>
32
- <%= proposal.scope.name %>
33
- <% else %>
34
- <%= t("decidim.participatory_processes.scopes.global") %>
12
+ <div class="card-section">
13
+ <div class="table-scroll">
14
+ <table class="table-list">
15
+ <thead>
16
+ <tr>
17
+ <th><%= t("models.proposal.fields.title", scope: "decidim.proposals") %></th>
18
+ <th><%= t("models.proposal.fields.category", scope: "decidim.proposals") %></th>
19
+ <th><%= t("models.proposal.fields.scope", scope: "decidim.proposals") %></th>
20
+ <th><%= t("models.proposal.fields.state", scope: "decidim.proposals") %></th>
21
+ <th class="actions"><%= t("actions.title", scope: "decidim.proposals") %></th>
22
+ </tr>
23
+ </thead>
24
+ <tbody>
25
+ <% proposals.each do |proposal| %>
26
+ <tr data-id="<%= proposal.id %>">
27
+ <td>
28
+ <%= proposal.title %><br />
29
+ </td>
30
+ <td>
31
+ <% if proposal.category %>
32
+ <%= translated_attribute proposal.category.name %>
33
+ <% end %>
34
+ </td>
35
+ <td>
36
+ <% if proposal.scope %>
37
+ <%= proposal.scope.name %>
38
+ <% else %>
39
+ <%= t("decidim.participatory_processes.scopes.global") %>
40
+ <% end %>
41
+ </td>
42
+ <td>
43
+ <% if proposal.state.nil? %>
44
+ <% if can? :update, proposal %>
45
+ <%= link_to t("actions.answer", scope: "decidim.proposals"), edit_proposal_proposal_answer_path(proposal_id: proposal.id, id: proposal.id), class: "button tiny" %>
46
+ <% end %>
47
+ <% else %>
48
+ <strong class="<%= proposal.state == 'accepted' ? 'text-success' : 'text-alert' %>">
49
+ <%= humanize_proposal_state proposal.state %>
50
+ </strong>
51
+ <% end %>
52
+ </td>
53
+ <td class="table-list__actions">
54
+ <%= icon_link_to "eye", decidim_proposals.proposal_path(id: proposal, feature_id: current_feature, participatory_process_id: current_participatory_process), t("actions.preview", scope: "decidim.proposals.admin"), class: "action-icon--preview", target: :blank %>
55
+ </td>
56
+ </tr>
35
57
  <% end %>
36
- </td>
37
- <td>
38
- <%= humanize_proposal_state proposal.state %>
39
- </td>
40
- <td class="actions">
41
- <%= link_to t("actions.answer", scope: "decidim.proposals"), edit_proposal_proposal_answer_path(proposal_id: proposal.id, id: proposal.id) if can? :update, proposal %>
42
- </td>
43
- </tr>
44
- <% end %>
45
- </tbody>
46
- </table>
58
+ </tbody>
59
+ </table>
60
+ <%= paginate proposals, theme: "decidim" %>
61
+ </div>
62
+ </div>
63
+ </div>
@@ -1,9 +1,7 @@
1
- <h3><%= t ".title" %></h3>
1
+ <%= decidim_form_for(@form, html: { class: "form new_proposal" }) do |f| %>
2
+ <%= render partial: 'form', object: f, locals: { title: t('.title') } %>
2
3
 
3
- <%= decidim_form_for(@form) do |f| %>
4
- <%= render partial: 'form', object: f %>
5
-
6
- <div class="actions">
4
+ <div class="button--double form-general-submit">
7
5
  <%= f.submit t(".create") %>
8
6
  </div>
9
7
  <% end %>
@@ -33,7 +33,7 @@
33
33
  <% end %>
34
34
 
35
35
  <% if current_feature.categories.any? %>
36
- <%= form.categories_select :category_id, current_feature.categories, legend_title: t('.category'), disable_parents: false, label: false, include_blank: true %>
36
+ <%= form.categories_select :category_id, current_feature.categories, legend_title: t('.category'), disable_parents: false, label: false, prompt: t('.category_prompt') %>
37
37
  <% end %>
38
38
 
39
39
  <%= hidden_field_tag :order, order, id: nil, class: "order_filter" %>
@@ -35,6 +35,8 @@ ca:
35
35
  new: Nova proposta
36
36
  title: Accions
37
37
  admin:
38
+ actions:
39
+ preview: Previsualitzar
38
40
  models:
39
41
  proposal:
40
42
  name: Proposta
@@ -83,6 +85,7 @@ ca:
83
85
  activity: Activitat
84
86
  all: Tots
85
87
  category: Categoria
88
+ category_prompt: Selecciona una categoria
86
89
  citizenship: Ciutadania
87
90
  official: Oficial
88
91
  origin: Origen
@@ -33,9 +33,11 @@ en:
33
33
  proposals:
34
34
  actions:
35
35
  answer: Answer
36
- new: New proposal
36
+ new: New Proposal
37
37
  title: Actions
38
38
  admin:
39
+ actions:
40
+ preview: Preview
39
41
  models:
40
42
  proposal:
41
43
  name: Proposal
@@ -84,6 +86,7 @@ en:
84
86
  activity: Activity
85
87
  all: All
86
88
  category: Category
89
+ category_prompt: Select a category
87
90
  citizenship: Citizenship
88
91
  official: Official
89
92
  origin: Origin
@@ -35,6 +35,8 @@ es:
35
35
  new: Nueva propuesta
36
36
  title: Acciones
37
37
  admin:
38
+ actions:
39
+ preview: Previsualizar
38
40
  models:
39
41
  proposal:
40
42
  name: Propuesta
@@ -83,6 +85,7 @@ es:
83
85
  activity: Actividad
84
86
  all: Todas
85
87
  category: Categoría
88
+ category_prompt: Selecciona una categoría
86
89
  citizenship: Ciudadanía
87
90
  official: Oficial
88
91
  origin: Origen
@@ -2,29 +2,41 @@ eu:
2
2
  activemodel:
3
3
  attributes:
4
4
  proposal:
5
- body: Testu-gorputza
5
+ body: Testua
6
6
  category_id: Kategoria
7
7
  scope_id: Esparrua
8
8
  title: Izenburua
9
9
  user_group_id: 'Sortu proposamen bat honako hau gisa:'
10
+ proposal_answer:
11
+ answer: Erantzuna
10
12
  decidim:
11
13
  features:
12
14
  proposals:
13
15
  actions:
14
16
  create: Sortu proposamenak
15
- vote: Bozkatu
17
+ vote: Proiektuaren alde egin
16
18
  name: Proposamenak
17
19
  settings:
20
+ global:
21
+ comments_enabled: Iruzkinak gaituta
22
+ geocoding_enabled: Geokodeketa gaituta
23
+ official_proposals_enabled: Proposamen ofizialak gaituta
24
+ proposal_answering_enabled: Erantzun ofiziala gaitutako proposamenei
25
+ vote_limit: Boto-muga
18
26
  step:
27
+ comments_blocked: Iruzkinak blokeatuta
19
28
  creation_enabled: Gaitu proposamenen sorrera
29
+ proposal_answering_enabled: Erantzuna aktibatutako proposamenei
20
30
  votes_blocked: Bozketa blokeatuta
21
- votes_enabled: Boto gaituak
31
+ votes_enabled: Botoak gaituta
22
32
  proposals:
23
33
  actions:
24
34
  answer: Erantzuna
25
35
  new: Proposamen berria
26
36
  title: Ekintzak
27
37
  admin:
38
+ actions:
39
+ preview: Aurreikusi
28
40
  models:
29
41
  proposal:
30
42
  name: Proposamena
@@ -32,7 +44,8 @@ eu:
32
44
  edit:
33
45
  accepted: Onartuta
34
46
  answer_proposal: Erantzuna proposamenari
35
- rejected: Uko eginda
47
+ rejected: Baztertuta
48
+ title: 'Erantzun proposamen honi: %{title}'
36
49
  proposals:
37
50
  answer:
38
51
  invalid: Arazo bat izan da proposamen honi erantzutean.
@@ -50,7 +63,7 @@ eu:
50
63
  answers:
51
64
  accepted: Onartuta
52
65
  not_answered: Erantzun gabe
53
- rejected: Uko eginda
66
+ rejected: Baztertuta
54
67
  create:
55
68
  error: Erroreak gertatu dira proposamena gordetzean.
56
69
  success: Proposamena zuzen sortu da.
@@ -65,17 +78,18 @@ eu:
65
78
  proposals:
66
79
  count:
67
80
  proposals_count:
68
- one: Proposamen bat
81
+ one: 1 proposamen
69
82
  other: "%{count} proposamen"
70
83
  filters:
71
84
  accepted: Onartuta
72
85
  activity: Jarduera
73
86
  all: Guztiak
74
87
  category: Kategoria
88
+ category_prompt: Aukeratu kategoria bat
75
89
  citizenship: Herritarrak
76
90
  official: Ofiziala
77
91
  origin: Jatorria
78
- rejected: Ezetsiak
92
+ rejected: Baztertuta
79
93
  related_to: Honekin lotuta
80
94
  scopes: Esparruak
81
95
  search: Bilatu
@@ -88,6 +102,7 @@ eu:
88
102
  unfold: Zabaldu
89
103
  index:
90
104
  new_proposal: Proposamen berria
105
+ view_proposal: Ikusi proposamena
91
106
  linked_proposals:
92
107
  proposal_votes:
93
108
  one: <span class="card--list__data__number">1</span>boto
@@ -99,25 +114,33 @@ eu:
99
114
  title: Proposamen berria
100
115
  orders:
101
116
  label: 'Antolatu proposamenak honen arabera:'
102
- most_voted: Bozkatuena
103
- random: Ausazkoa
104
- recent: Berri-berria
117
+ most_voted: Bozkatuenak
118
+ random: Ausazkoa eran
119
+ recent: Berrienak
105
120
  proposal:
106
- view_proposal: Proposamena ikusi
121
+ view_proposal: Ikusi proposamena
107
122
  show:
108
- proposal_rejected_reason: 'Proposamen hau baztertu da honako arrazoi hauengatik:'
123
+ proposal_accepted_reason: 'Proposamen hau onartu da arrazoi hauengatik:'
124
+ proposal_rejected_reason: 'Proposamen hau baztertu da arrazoi hauengatik:'
125
+ report: Salatu
109
126
  vote_button:
110
127
  already_voted: Bozkatuta duzu
111
128
  no_votes_remaining: Ez da gelditzen botorik
112
- vote: Bozkatu
129
+ vote: Proiektuaren alde egin
113
130
  votes_blocked: Bozketa desaktibatu da
114
131
  votes_count:
115
132
  count:
116
- one: BOTOA EMAN
117
- other: ZENBAT BOTO
133
+ one: SOSTENGU
134
+ other: SOSTENGU
118
135
  votes_limit:
119
136
  vote_limit:
120
- description: Nahi beste proposamen bozkatu ordez, gehienez ere %{limit} proposamen bozka ditzakezu.
121
- left: Gainerakoa
122
- title: Gehienez, %{limit} boto dituzu banatzeko
123
- votes: Zenbat boto
137
+ description: Nahi beste proposamenari sostengua eman ordez, gehienez ere %{limit} proposamenen alde egin dezakezu.
138
+ left: Emateke
139
+ title: Gehienez, %{limit} boto eman ditzakezu
140
+ votes: Boto
141
+ resource_links:
142
+ included_proposals:
143
+ proposal_projects: 'Proiektu hauetatik sortutako proposamena:'
144
+ proposal_results: 'Emaitza hauetatik sortutako proposamena:'
145
+ proposals_from_meeting:
146
+ proposal_meetings: Proposamenarekin lotutako topaketak
@@ -32,7 +32,6 @@ fi:
32
32
  proposals:
33
33
  actions:
34
34
  answer: Vastaa
35
- new: Uusi ehdotus
36
35
  title: Toiminnot
37
36
  admin:
38
37
  models:
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: decidim-proposals
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
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-03-24 00:00:00.000000000 Z
13
+ date: 2017-04-07 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.6
21
+ version: 0.0.7
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.6
28
+ version: 0.0.7
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.6
35
+ version: 0.0.7
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.6
42
+ version: 0.0.7
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.6
91
+ version: 0.0.7
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.6
98
+ version: 0.0.7
99
99
  - !ruby/object:Gem::Dependency
100
100
  name: decidim-meetings
101
101
  requirement: !ruby/object:Gem::Requirement
102
102
  requirements:
103
103
  - - '='
104
104
  - !ruby/object:Gem::Version
105
- version: 0.0.6
105
+ version: 0.0.7
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.6
112
+ version: 0.0.7
113
113
  - !ruby/object:Gem::Dependency
114
114
  name: decidim-results
115
115
  requirement: !ruby/object:Gem::Requirement
116
116
  requirements:
117
117
  - - '='
118
118
  - !ruby/object:Gem::Version
119
- version: 0.0.6
119
+ version: 0.0.7
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.6
126
+ version: 0.0.7
127
127
  - !ruby/object:Gem::Dependency
128
128
  name: decidim-budgets
129
129
  requirement: !ruby/object:Gem::Requirement
130
130
  requirements:
131
131
  - - '='
132
132
  - !ruby/object:Gem::Version
133
- version: 0.0.6
133
+ version: 0.0.7
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.6
140
+ version: 0.0.7
141
141
  description: A proposals component for decidim's participatory processes.
142
142
  email:
143
143
  - josepjaume@gmail.com
@@ -244,7 +244,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
244
244
  version: '0'
245
245
  requirements: []
246
246
  rubyforge_project:
247
- rubygems_version: 2.6.8
247
+ rubygems_version: 2.6.11
248
248
  signing_key:
249
249
  specification_version: 4
250
250
  summary: A proposals component for decidim's participatory processes.