decidim-results 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: c066d1ecdece68bae8448750981b11706737c8c4
4
- data.tar.gz: e89b37fd8c66171a1389f78cfd5e47e8aa711682
3
+ metadata.gz: 6bce1cb6ba23326936c124fdff52091a3b88d475
4
+ data.tar.gz: 2dbacdf87d94a066fb1ab0ed62a33ce58d5ce2ec
5
5
  SHA512:
6
- metadata.gz: 5d1d9ba2bb0e7fe263f15face6169526a8f73d45682102faf72222d316a107429d9207469892dca98c34f2b79f58c043655de036bd0b7c4e1d80b604e1bb4a68
7
- data.tar.gz: fa9ed6e4f5e366609e30e93ff97227cf4d2cb888300a2786b23d65ec8ff15f2fafbdcf8d5a6904e61f7aa6ba419e13e4309da288d8d2df6f9778d6ac3b9ac5fc
6
+ metadata.gz: 5e210bf12e1a3c0adf709cb6b26052b11af284d1279379d38faf1bf27fe32dca58f87e479420f5a54c60e0a372f096610ba387802c5043c34b660ccfc3572b79
7
+ data.tar.gz: 91fd009e2c25038bd8c54a79ebcff60043125071bd31f49073e58d4d40b8e34569ab0fcf94648405bb428a7d1db4c280024f21f274627df25241ac8215c20b0a
data/README.md CHANGED
@@ -8,7 +8,7 @@ results will be available as a Feature for a Participatory Process.
8
8
  Add this line to your application's Gemfile:
9
9
 
10
10
  ```ruby
11
- gem 'decidim-results
11
+ gem 'decidim-results'
12
12
  ```
13
13
 
14
14
  And then execute:
@@ -57,7 +57,7 @@ module Decidim
57
57
  private
58
58
 
59
59
  def results
60
- @results ||= Result.where(feature: current_feature)
60
+ @results ||= Result.where(feature: current_feature).page(params[:page]).per(15)
61
61
  end
62
62
 
63
63
  def result
@@ -1,25 +1,34 @@
1
- <div class="field" >
2
- <%= form.translated :text_field, :title, autofocus: true %>
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.translated :editor, :description %>
7
- </div>
6
+ <div class="card-section">
7
+ <div class="row column">
8
+ <%= form.translated :text_field, :title, autofocus: true %>
9
+ </div>
8
10
 
9
- <% if !@form.process_scope %>
10
- <div class="field" >
11
- <%= form.collection_select :decidim_scope_id, organization_scopes, :id, :name %>
12
- </div>
13
- <% end %>
11
+ <div class="row column">
12
+ <%= form.translated :editor, :description %>
13
+ </div>
14
14
 
15
- <div class="field" >
16
- <%= form.categories_select :decidim_category_id, current_participatory_process.categories, include_blank: true, disable_parents: false %>
17
- </div>
15
+ <% if !@form.process_scope %>
16
+ <div class="row column">
17
+ <%= form.collection_select :decidim_scope_id, organization_scopes, :id, :name %>
18
+ </div>
19
+ <% end %>
18
20
 
19
- <% if @form.proposals %>
20
- <%= form.select :proposal_ids,
21
- @form.proposals,
22
- {},
23
- { multiple: true, class: "chosen-select" }
24
- %>
25
- <% end %>
21
+ <div class="row column">
22
+ <%= form.categories_select :decidim_category_id, current_participatory_process.categories, include_blank: true, disable_parents: false %>
23
+ </div>
24
+ <div class="row column">
25
+ <% if @form.proposals %>
26
+ <%= form.select :proposal_ids,
27
+ @form.proposals,
28
+ {},
29
+ { multiple: true, class: "chosen-select" }
30
+ %>
31
+ <% end %>
32
+ </div>
33
+ </div>
34
+ </div>
@@ -1,9 +1,8 @@
1
- <h3><%= t ".title" %></h3>
1
+ <%= decidim_form_for(@form, html: { class: "form edit_result" }) 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(".update") %>
8
6
  </div>
9
7
  <% end %>
8
+
@@ -1,27 +1,42 @@
1
- <h2><%= t(".title") %></h2>
1
+ <div class="card">
2
+ <div class="card-divider">
3
+ <h2 class="card-title">
4
+ <%= t(".title") %>
5
+ <%= link_to t("actions.new", scope: "decidim.results", name: t("models.result.name", scope: "decidim.results.admin")), new_result_path, class: 'button tiny button--title' if can? :manage, current_feature %>
6
+ </h2>
7
+ </div>
2
8
 
3
- <div class="actions title">
4
- <%= link_to t("actions.new", scope: "decidim.results", name: t("models.result.name", scope: "decidim.results.admin")), new_result_path, class: 'new' if can? :manage, current_feature %>
5
- </div>
9
+ <div class="card-section">
10
+ <div class="table-scroll">
11
+ <table class="table-list">
12
+ <thead>
13
+ <tr>
14
+ <th><%= t("models.result.fields.title", scope: "decidim.results") %></th>
15
+ <th class="actions"><%= t("actions.title", scope: "decidim.results") %></th>
16
+ </tr>
17
+ </thead>
18
+ <tbody>
19
+ <% results.each do |result| %>
20
+ <tr data-id="<%= result.id %>">
21
+ <td>
22
+ <%= translated_attribute(result.title) %><br />
23
+ </td>
24
+ <td class="table-list__actions">
25
+ <%= icon_link_to "eye", decidim_results.result_path(id: result, feature_id: current_feature, participatory_process_id: current_participatory_process), t("actions.preview", scope: "decidim.results"), class: "action-icon--preview", target: :blank %>
26
+
27
+ <% if can? :update, current_feature %>
28
+ <%= icon_link_to "pencil", edit_result_path(result), t("actions.edit", scope: "decidim.results"), class: "action-icon--edit" %>
29
+ <% end %>
6
30
 
7
- <table class="stack">
8
- <thead>
9
- <tr>
10
- <th><%= t("models.result.fields.title", scope: "decidim.results") %></th>
11
- <th class="actions"><%= t("actions.title", scope: "decidim.results") %></th>
12
- </tr>
13
- </thead>
14
- <tbody>
15
- <% results.each do |result| %>
16
- <tr data-id="<%= result.id %>">
17
- <td>
18
- <%= link_to translated_attribute(result.title), decidim_results.result_path(id: result, feature_id: current_feature, participatory_process_id: current_participatory_process), target: :blank %><br />
19
- </td>
20
- <td class="actions">
21
- <%= link_to t("actions.edit", scope: "decidim.results"), edit_result_path(result) if can? :update, current_feature %>
22
- <%= link_to t("actions.destroy", scope: "decidim.results"), result_path(result), method: :delete, class: "small alert button", data: { confirm: t("actions.confirm_destroy", scope: "decidim.results") } if can? :destroy, current_feature %>
23
- </td>
24
- </tr>
25
- <% end %>
26
- </tbody>
27
- </table>
31
+ <% if can? :destroy, current_feature %>
32
+ <%= icon_link_to "circle-x", result_path(result), t("actions.destroy", scope: "decidim.results"), class: "action-icon--remove", method: :delete, data: { confirm: t("actions.confirm_destroy", scope: "decidim.results") } %>
33
+ <% end %>
34
+ </td>
35
+ </tr>
36
+ <% end %>
37
+ </tbody>
38
+ </table>
39
+ <%= paginate results, theme: "decidim" %>
40
+ </div>
41
+ </div>
42
+ </div>
@@ -1,9 +1,8 @@
1
- <h3><%= t ".title" %></h3>
1
+ <%= decidim_form_for(@form, html: { class: "form new_result" }) 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 %>
8
+
@@ -17,6 +17,6 @@
17
17
  <% end %>
18
18
 
19
19
  <% if current_feature.categories.any? %>
20
- <%= form.categories_select :category_id, current_feature.categories, legend_title: t('.category'), disable_parents: false, label: false, include_blank: true %>
20
+ <%= form.categories_select :category_id, current_feature.categories, legend_title: t('.category'), disable_parents: false, label: false, prompt: t('.category_prompt') %>
21
21
  <% end %>
22
22
  <% end %>
@@ -27,6 +27,7 @@ ca:
27
27
  destroy: Esborra
28
28
  edit: Edita
29
29
  new: Nou/va %{name}
30
+ preview: Previsualitzar
30
31
  title: Accions
31
32
  admin:
32
33
  models:
@@ -60,6 +61,7 @@ ca:
60
61
  other: "%{count} resultats"
61
62
  filters:
62
63
  category: Categoria
64
+ category_prompt: Selecciona una categoria
63
65
  scopes: Àmbits
64
66
  search: Cerca
65
67
  filters_small_view:
@@ -28,6 +28,7 @@ en:
28
28
  destroy: Delete
29
29
  edit: Edit
30
30
  new: New %{name}
31
+ preview: Preview
31
32
  title: Actions
32
33
  admin:
33
34
  models:
@@ -61,6 +62,7 @@ en:
61
62
  other: "%{count} results"
62
63
  filters:
63
64
  category: Category
65
+ category_prompt: Select a category
64
66
  scopes: Scopes
65
67
  search: Search
66
68
  filters_small_view:
@@ -27,6 +27,7 @@ es:
27
27
  destroy: Borrar
28
28
  edit: Editar
29
29
  new: Nuevo/a %{name}
30
+ preview: Previsualizar
30
31
  title: Acciones
31
32
  admin:
32
33
  models:
@@ -60,6 +61,7 @@ es:
60
61
  other: "%{count} resultados"
61
62
  filters:
62
63
  category: Categoría
64
+ category_prompt: Selecciona una categoría
63
65
  scopes: Ámbitos
64
66
  search: Buscar
65
67
  filters_small_view:
@@ -1,19 +1,33 @@
1
1
  eu:
2
+ activemodel:
3
+ attributes:
4
+ result:
5
+ decidim_category_id: Kategoria
6
+ decidim_scope_id: Esparrua
7
+ description: Deskribapena
8
+ proposal_ids: Sartutako proposamenak
9
+ title: Izenburua
2
10
  decidim:
3
11
  features:
4
12
  results:
5
13
  name: Emaitzak
14
+ settings:
15
+ global:
16
+ comments_enabled: Iruzkinak gaituta
17
+ step:
18
+ comments_blocked: Iruzkinak blokeatuta
6
19
  resource_links:
7
20
  included_proposals:
8
21
  result_proposals: Emaitza honetan jasotako proposamenak
9
22
  meetings_through_proposals:
10
- result_meetings: Honekin lotutako topaketak
23
+ result_meetings: Proposamenarekin lotutako topaketak
11
24
  results:
12
25
  actions:
13
26
  confirm_destroy: Ziur zaude emaitza hau ezabatu nahi duzula?
14
- destroy: Garbitu
27
+ destroy: Ezabatu
15
28
  edit: Editatu
16
29
  new: '%{name} berria'
30
+ preview: Aurreikusi
17
31
  title: Ekintzak
18
32
  admin:
19
33
  models:
@@ -43,14 +57,18 @@ eu:
43
57
  results:
44
58
  count:
45
59
  results_count:
46
- one: Emaitza bat
60
+ one: 1 emaitza
47
61
  other: "%{count} emaitza"
48
62
  filters:
49
63
  category: Kategoria
64
+ category_prompt: Aukeratu kategoria bat
50
65
  scopes: Esparruak
51
66
  search: Bilatu
52
67
  filters_small_view:
68
+ close_modal: Itxi leihoa
69
+ filter: Iragazi
53
70
  filter_by: 'Iragazi honen arabera:'
71
+ unfold: Zabaldu
54
72
  show:
55
73
  stats:
56
74
  attendees: Bertaratuak
@@ -58,4 +76,4 @@ eu:
58
76
  contributions: Ekarpenak
59
77
  meetings: Topaketa-zerrenda
60
78
  proposals: Proposamenak
61
- votes: Euskarria
79
+ votes: Sostenguak
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.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-comments
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-meetings
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-proposals
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: ''
142
142
  email:
143
143
  - josepjaume@gmail.com
@@ -210,7 +210,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
210
210
  version: '0'
211
211
  requirements: []
212
212
  rubyforge_project:
213
- rubygems_version: 2.6.8
213
+ rubygems_version: 2.6.11
214
214
  signing_key:
215
215
  specification_version: 4
216
216
  summary: A results component for decidim's participatory processes.