decidim-admin 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of decidim-admin might be problematic. Click here for more details.

Files changed (47) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +1 -1
  3. data/app/assets/javascripts/decidim/admin/application.js.es6 +0 -1
  4. data/app/assets/stylesheets/decidim/admin/_foundation_and_overrides.scss +1 -0
  5. data/app/assets/stylesheets/decidim/admin/_icons.scss +9 -0
  6. data/app/assets/stylesheets/decidim/admin/application.scss +1 -0
  7. data/app/commands/decidim/admin/create_feature.rb +3 -1
  8. data/app/commands/decidim/admin/create_participatory_process.rb +26 -14
  9. data/app/commands/decidim/admin/destroy_feature.rb +5 -0
  10. data/app/commands/decidim/admin/destroy_participatory_process_step.rb +29 -0
  11. data/app/commands/decidim/admin/update_feature.rb +47 -0
  12. data/app/commands/decidim/admin/update_organization.rb +3 -1
  13. data/app/controllers/decidim/admin/features_controller.rb +37 -2
  14. data/app/controllers/decidim/admin/participatory_process_step_activations_controller.rb +0 -16
  15. data/app/controllers/decidim/admin/participatory_process_steps_controller.rb +10 -3
  16. data/app/controllers/decidim/admin/static_pages_controller.rb +4 -4
  17. data/app/controllers/decidim/admin/user_groups_controller.rb +32 -0
  18. data/app/controllers/decidim/admin/users_controller.rb +87 -0
  19. data/app/forms/decidim/admin/category_form.rb +1 -7
  20. data/app/forms/decidim/admin/feature_form.rb +26 -0
  21. data/app/forms/decidim/admin/organization_form.rb +2 -0
  22. data/app/forms/decidim/admin/participatory_process_step_form.rb +1 -1
  23. data/app/forms/decidim/admin/static_page_form.rb +2 -3
  24. data/app/models/decidim/admin/abilities/admin_user.rb +6 -0
  25. data/app/views/decidim/admin/features/_feature.html.erb +4 -1
  26. data/app/views/decidim/admin/features/_form.html.erb +49 -0
  27. data/app/views/decidim/admin/features/_settings_fields.html.erb +5 -0
  28. data/app/views/decidim/admin/features/edit.html.erb +9 -0
  29. data/app/views/decidim/admin/features/index.html.erb +6 -0
  30. data/app/views/decidim/admin/features/new.html.erb +1 -1
  31. data/app/views/decidim/admin/organization/_form.html.erb +8 -0
  32. data/app/views/decidim/admin/participatory_process_attachments/_form.html.erb +1 -1
  33. data/app/views/decidim/admin/participatory_process_steps/index.html.erb +2 -6
  34. data/app/views/decidim/admin/user_groups/index.html.erb +32 -0
  35. data/app/views/decidim/admin/users/_form.html.erb +6 -0
  36. data/app/views/decidim/admin/users/index.html.erb +54 -0
  37. data/app/views/decidim/admin/users/new.html.erb +11 -0
  38. data/app/views/layouts/decidim/admin/_sidebar.html.erb +2 -0
  39. data/app/views/layouts/decidim/admin/participatory_process.html.erb +1 -1
  40. data/config/i18n-tasks.yml +1 -0
  41. data/config/locales/ca.yml +103 -5
  42. data/config/locales/en.yml +57 -4
  43. data/config/locales/es.yml +103 -5
  44. data/config/routes.rb +11 -0
  45. data/lib/decidim/admin/features/base_controller.rb +7 -3
  46. data/lib/decidim/admin/test/factories.rb +8 -0
  47. metadata +23 -25
@@ -1,4 +1,50 @@
1
1
  es:
2
+ activemodel:
3
+ attributes:
4
+ category:
5
+ description: Descripción
6
+ name: Nombre
7
+ parent: Padre
8
+ feature:
9
+ name: Nombre
10
+ organization:
11
+ default_locale: Configuración regional predeterminada
12
+ description: Descripción
13
+ homepage_image: Imagen de portada
14
+ logo: Logotipo
15
+ name: Nombre
16
+ show_statistics: Mostrar estadísticas
17
+ welcome_text: Texto de bienvenida
18
+ participatory_process:
19
+ banner_image: Imagen de bandera
20
+ description: Descripción
21
+ hashtag: Hashtag
22
+ hero_image: Imagen de portada
23
+ promoted: Destacado
24
+ short_description: Breve descripción
25
+ slug: Texto corto de URL
26
+ subtitle: Subtítulo
27
+ title: Título
28
+ participatory_process_attachment:
29
+ description: Descripción
30
+ file: Archivo
31
+ title: Título
32
+ participatory_process_step:
33
+ description: Descripción
34
+ end_date: Fecha de finalización
35
+ short_description: Breve descripción
36
+ start_date: Fecha de inicio
37
+ title: Título
38
+ participatory_process_user_role:
39
+ email: Email
40
+ scope:
41
+ name: Nombre
42
+ organization: Organización
43
+ static_page:
44
+ content: Contenido
45
+ organization: Organización
46
+ slug: Texto corto de URL
47
+ title: Título
2
48
  activerecord:
3
49
  attributes:
4
50
  decidim/participatory_process:
@@ -10,14 +56,16 @@ es:
10
56
  configure: Configurar
11
57
  confirm_destroy: '¿Seguro que lo quieres eliminar?'
12
58
  create: Crear
13
- deactivate: Desactivar
14
59
  destroy: Eliminar
15
60
  edit: Editar
61
+ manage: Gestionar
16
62
  new: Nuevo %{name}
17
63
  preview: Previsualizar
18
64
  publish: Publicar
65
+ resend_invitation: Reenviar invitación
19
66
  title: Acciones
20
67
  unpublish: Despublicar
68
+ verify: Verificar
21
69
  categories:
22
70
  create:
23
71
  error: Se ha producido un error al crear esta categoría.
@@ -56,12 +104,25 @@ es:
56
104
  destroy:
57
105
  error: Se ha producido un error destruir esta funcionalidad.
58
106
  success: Funcionalidad eliminada correctamente.
107
+ edit:
108
+ title: Editar funcionalidad
109
+ update: Actualizar
110
+ form:
111
+ global_settings: Ajustes globales
112
+ step_settings: Configuración de fase
59
113
  index:
60
114
  add: Añadir funcionalidad
115
+ headers:
116
+ actions: Acciones
117
+ name: Nombre de la funcionalidad
118
+ type: Tipo de funcionalidad
61
119
  new:
62
120
  add: Añadir funcionalidad
63
121
  title: 'Añadir funcionalidad: %{name}'
64
122
  title: Funcionalidades
123
+ update:
124
+ error: Se ha producido un error al actualizar esta funcionalidad.
125
+ success: La funcionalidad se ha actualizado correctamente.
65
126
  menu:
66
127
  dashboard: Panel de control
67
128
  participatory_processes: Procesos participativos
@@ -76,6 +137,8 @@ es:
76
137
  scopes: Ámbitos
77
138
  settings: Configuración
78
139
  static_pages: Páginas
140
+ user_groups: Grupos de usuarios
141
+ users: Administradores
79
142
  models:
80
143
  category:
81
144
  fields:
@@ -113,6 +176,22 @@ es:
113
176
  created_at: Fecha de creación
114
177
  title: Título
115
178
  name: Página
179
+ user:
180
+ fields:
181
+ created_at: Fecha de creación
182
+ email: Correo electrónico
183
+ invitation_accepted_at: Fecha de aceptación de la invitación
184
+ invitation_sent_at: Fecha de envío de la invitación
185
+ last_sign_in_at: Última fecha de identificación
186
+ name: Nombre
187
+ name: Usuario
188
+ user_group:
189
+ fields:
190
+ created_at: Fecha de creación
191
+ document_number: Número del documento
192
+ name: Nombre
193
+ phone: Teléfono
194
+ users_count: Número de usuarios
116
195
  organization:
117
196
  edit:
118
197
  title: Editar organización
@@ -146,14 +225,15 @@ es:
146
225
  create:
147
226
  error: Se ha producido un error al activar esta fase de proceso participativo.
148
227
  success: La fase de proceso participativo se ha activado correctamente.
149
- destroy:
150
- error: Se ha producido un error al desactivar esta fase de proceso participativo.
151
- success: La fase de proceso participativo se ha desactivado correctamente.
152
228
  participatory_process_steps:
153
229
  create:
154
230
  error: Se ha producido un error al crear una nueva fase de proceso participativo.
155
231
  success: La fase de proceso participativo se ha creado correctamente.
232
+ default_title: Introducción
156
233
  destroy:
234
+ error:
235
+ active_step: No se puede eliminar la fase activa.
236
+ last_step: No se puede eliminar la última fase de un proceso.
157
237
  success: La fase de proceso participativo se ha eliminado correctamente.
158
238
  edit:
159
239
  title: Editar fase de proceso participativo
@@ -222,4 +302,22 @@ es:
222
302
  dashboard: Panel de control
223
303
  participatory_processes: Procesos participativos
224
304
  scopes: Ámbitos
225
- static_pages: Páginas
305
+ static_pages: Páginas
306
+ user_groups: Grupos de usuarios
307
+ users: Usuarios
308
+ user_groups:
309
+ verify:
310
+ success: El grupo de usuarios se verificó con éxito.
311
+ users:
312
+ create:
313
+ error: Hubo un error al invitar a este usuario.
314
+ success: Usuario invitado con éxito.
315
+ destroy:
316
+ error: Hubo un error al tratar de eliminar este usuario.
317
+ success: El usuario ya no es un administrador.
318
+ new:
319
+ create: Invitar
320
+ title: Invitar a un usuario como administrador
321
+ resend_invitation:
322
+ error: Se produjo un error al intentar enviar el mensaje de invitación.
323
+ success: Invitación enviada con éxito.
data/config/routes.rb CHANGED
@@ -32,6 +32,17 @@ Decidim::Admin::Engine.routes.draw do
32
32
 
33
33
  resources :static_pages
34
34
  resources :scopes, except: [:show]
35
+ resources :users, except: [:edit, :update], controller: "users" do
36
+ member do
37
+ post :resend_invitation, to: "users#resend_invitation"
38
+ end
39
+ end
40
+
41
+ resources :user_groups, only: [:index] do
42
+ member do
43
+ put :verify
44
+ end
45
+ end
35
46
 
36
47
  root to: "dashboard#show"
37
48
  end
@@ -8,14 +8,18 @@ module Decidim
8
8
  skip_authorize_resource
9
9
  include Concerns::ParticipatoryProcessAdmin
10
10
  include NeedsParticipatoryProcess
11
- helper_method :current_feature, :current_participatory_process, :parent_path
11
+ include FeatureSettings
12
+
13
+ helper_method :current_feature,
14
+ :current_participatory_process,
15
+ :parent_path
16
+
17
+ delegate :active_step, to: :current_participatory_process, prefix: false
12
18
 
13
19
  before_action do
14
20
  authorize! :manage, current_feature
15
21
  end
16
22
 
17
- private
18
-
19
23
  def current_feature
20
24
  request.env["decidim.current_feature"]
21
25
  end
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+ FactoryGirl.define do
3
+ factory :participatory_process_user_role, class: Decidim::Admin::ParticipatoryProcessUserRole do
4
+ user
5
+ participatory_process
6
+ role "admin"
7
+ end
8
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: decidim-admin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
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: 2016-12-21 00:00:00.000000000 Z
13
+ date: 2017-01-23 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: decidim-core
@@ -18,14 +18,14 @@ dependencies:
18
18
  requirements:
19
19
  - - '='
20
20
  - !ruby/object:Gem::Version
21
- version: 0.0.1
21
+ version: 0.0.2
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.1
28
+ version: 0.0.2
29
29
  - !ruby/object:Gem::Dependency
30
30
  name: rails
31
31
  requirement: !ruby/object:Gem::Requirement
@@ -102,20 +102,6 @@ dependencies:
102
102
  - - "~>"
103
103
  - !ruby/object:Gem::Version
104
104
  version: 1.7.0
105
- - !ruby/object:Gem::Dependency
106
- name: foundation-rails
107
- requirement: !ruby/object:Gem::Requirement
108
- requirements:
109
- - - "~>"
110
- - !ruby/object:Gem::Version
111
- version: 6.2.4.0
112
- type: :runtime
113
- prerelease: false
114
- version_requirements: !ruby/object:Gem::Requirement
115
- requirements:
116
- - - "~>"
117
- - !ruby/object:Gem::Version
118
- version: 6.2.4.0
119
105
  - !ruby/object:Gem::Dependency
120
106
  name: sassc-rails
121
107
  requirement: !ruby/object:Gem::Requirement
@@ -136,14 +122,14 @@ dependencies:
136
122
  requirements:
137
123
  - - "~>"
138
124
  - !ruby/object:Gem::Version
139
- version: '4.0'
125
+ version: 4.2.2
140
126
  type: :runtime
141
127
  prerelease: false
142
128
  version_requirements: !ruby/object:Gem::Requirement
143
129
  requirements:
144
130
  - - "~>"
145
131
  - !ruby/object:Gem::Version
146
- version: '4.0'
132
+ version: 4.2.2
147
133
  - !ruby/object:Gem::Dependency
148
134
  name: turbolinks
149
135
  requirement: !ruby/object:Gem::Requirement
@@ -170,14 +156,14 @@ dependencies:
170
156
  requirements:
171
157
  - - "~>"
172
158
  - !ruby/object:Gem::Version
173
- version: 2.0.0
159
+ version: 3.0.0.rc
174
160
  type: :runtime
175
161
  prerelease: false
176
162
  version_requirements: !ruby/object:Gem::Requirement
177
163
  requirements:
178
164
  - - "~>"
179
165
  - !ruby/object:Gem::Version
180
- version: 2.0.0
166
+ version: 3.0.0.rc
181
167
  - !ruby/object:Gem::Dependency
182
168
  name: active_link_to
183
169
  requirement: !ruby/object:Gem::Requirement
@@ -226,14 +212,14 @@ dependencies:
226
212
  requirements:
227
213
  - - '='
228
214
  - !ruby/object:Gem::Version
229
- version: 0.0.1
215
+ version: 0.0.2
230
216
  type: :development
231
217
  prerelease: false
232
218
  version_requirements: !ruby/object:Gem::Requirement
233
219
  requirements:
234
220
  - - '='
235
221
  - !ruby/object:Gem::Version
236
- version: 0.0.1
222
+ version: 0.0.2
237
223
  description: Organization administration to manage a single organization.
238
224
  email:
239
225
  - josepjaume@gmail.com
@@ -252,6 +238,7 @@ files:
252
238
  - app/assets/stylesheets/decidim/admin/_actions.scss
253
239
  - app/assets/stylesheets/decidim/admin/_forms.scss
254
240
  - app/assets/stylesheets/decidim/admin/_foundation_and_overrides.scss
241
+ - app/assets/stylesheets/decidim/admin/_icons.scss
255
242
  - app/assets/stylesheets/decidim/admin/_layout.scss
256
243
  - app/assets/stylesheets/decidim/admin/_login.scss
257
244
  - app/assets/stylesheets/decidim/admin/_settings.scss
@@ -270,10 +257,12 @@ files:
270
257
  - app/commands/decidim/admin/deactivate_participatory_process_step.rb
271
258
  - app/commands/decidim/admin/destroy_category.rb
272
259
  - app/commands/decidim/admin/destroy_feature.rb
260
+ - app/commands/decidim/admin/destroy_participatory_process_step.rb
273
261
  - app/commands/decidim/admin/publish_participatory_process.rb
274
262
  - app/commands/decidim/admin/reorder_participatory_process_steps.rb
275
263
  - app/commands/decidim/admin/unpublish_participatory_process.rb
276
264
  - app/commands/decidim/admin/update_category.rb
265
+ - app/commands/decidim/admin/update_feature.rb
277
266
  - app/commands/decidim/admin/update_organization.rb
278
267
  - app/commands/decidim/admin/update_participatory_process.rb
279
268
  - app/commands/decidim/admin/update_participatory_process_attachment.rb
@@ -296,6 +285,8 @@ files:
296
285
  - app/controllers/decidim/admin/participatory_processes_controller.rb
297
286
  - app/controllers/decidim/admin/scopes_controller.rb
298
287
  - app/controllers/decidim/admin/static_pages_controller.rb
288
+ - app/controllers/decidim/admin/user_groups_controller.rb
289
+ - app/controllers/decidim/admin/users_controller.rb
299
290
  - app/forms/decidim/admin/category_form.rb
300
291
  - app/forms/decidim/admin/feature_form.rb
301
292
  - app/forms/decidim/admin/organization_form.rb
@@ -327,6 +318,8 @@ files:
327
318
  - app/views/decidim/admin/devise/mailers/reset_password_instructions.html.erb
328
319
  - app/views/decidim/admin/features/_feature.html.erb
329
320
  - app/views/decidim/admin/features/_form.html.erb
321
+ - app/views/decidim/admin/features/_settings_fields.html.erb
322
+ - app/views/decidim/admin/features/edit.html.erb
330
323
  - app/views/decidim/admin/features/index.html.erb
331
324
  - app/views/decidim/admin/features/new.html.erb
332
325
  - app/views/decidim/admin/organization/_form.html.erb
@@ -356,6 +349,10 @@ files:
356
349
  - app/views/decidim/admin/static_pages/index.html.erb
357
350
  - app/views/decidim/admin/static_pages/new.html.erb
358
351
  - app/views/decidim/admin/static_pages/show.html.erb
352
+ - app/views/decidim/admin/user_groups/index.html.erb
353
+ - app/views/decidim/admin/users/_form.html.erb
354
+ - app/views/decidim/admin/users/index.html.erb
355
+ - app/views/decidim/admin/users/new.html.erb
359
356
  - app/views/layouts/decidim/admin/_application.html.erb
360
357
  - app/views/layouts/decidim/admin/_header.html.erb
361
358
  - app/views/layouts/decidim/admin/_login_items.html.erb
@@ -374,6 +371,7 @@ files:
374
371
  - lib/decidim/admin/engine.rb
375
372
  - lib/decidim/admin/features.rb
376
373
  - lib/decidim/admin/features/base_controller.rb
374
+ - lib/decidim/admin/test/factories.rb
377
375
  - lib/tasks/decidim/admin_tasks.rake
378
376
  - vendor/assets/javascripts/html.sortable.js
379
377
  homepage: https://github.com/AjuntamentdeBarcelona/decidim
@@ -396,7 +394,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
396
394
  version: '0'
397
395
  requirements: []
398
396
  rubyforge_project:
399
- rubygems_version: 2.5.2
397
+ rubygems_version: 2.6.8
400
398
  signing_key:
401
399
  specification_version: 4
402
400
  summary: Organization administration