decidim-initiatives 0.14.4 → 0.15.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (40) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/images/decidim/initiatives/icon.svg +3 -0
  3. data/app/cells/decidim/initiative_activity_cell.rb +10 -0
  4. data/app/cells/decidim/initiatives/content_blocks/highlighted_initiatives_cell.rb +8 -1
  5. data/app/cells/decidim/initiatives/content_blocks/highlighted_initiatives_settings_form/show.erb +3 -0
  6. data/app/cells/decidim/initiatives/content_blocks/highlighted_initiatives_settings_form_cell.rb +19 -0
  7. data/app/commands/decidim/initiatives/admin/publish_initiative.rb +7 -2
  8. data/app/forms/decidim/initiatives/admin/initiative_form.rb +2 -2
  9. data/app/mailers/decidim/initiatives/initiatives_mailer.rb +4 -0
  10. data/app/permissions/decidim/initiatives/permissions.rb +4 -4
  11. data/app/services/decidim/initiatives/initiative_search.rb +1 -1
  12. data/app/views/decidim/initiatives/admin/initiatives/show.html.erb +3 -0
  13. data/app/views/decidim/initiatives/create_initiative/fill_data.html.erb +2 -2
  14. data/app/views/decidim/initiatives/initiatives/_vote_cabin.html.erb +1 -1
  15. data/app/views/decidim/initiatives/initiatives/signature_identities.html.erb +1 -1
  16. data/app/views/layouts/decidim/admin/initiative.html.erb +1 -0
  17. data/config/locales/ca.yml +9 -1
  18. data/config/locales/de.yml +9 -1
  19. data/config/locales/en.yml +9 -1
  20. data/config/locales/es-PY.yml +9 -1
  21. data/config/locales/es.yml +11 -3
  22. data/config/locales/eu.yml +9 -1
  23. data/config/locales/fi.yml +9 -1
  24. data/config/locales/fr.yml +9 -1
  25. data/config/locales/gl.yml +9 -1
  26. data/config/locales/hu.yml +9 -1
  27. data/config/locales/it.yml +9 -1
  28. data/config/locales/nl.yml +10 -2
  29. data/config/locales/pl.yml +9 -1
  30. data/config/locales/pt-BR.yml +9 -1
  31. data/config/locales/pt.yml +9 -1
  32. data/config/locales/sv.yml +9 -1
  33. data/db/migrate/20181003082010_fix_user_groups_ids_on_initiatives.rb +19 -0
  34. data/db/migrate/20181016095744_make_initiative_authors_polymorphic.rb +31 -0
  35. data/db/seeds/city2.jpeg +0 -0
  36. data/lib/decidim/initiatives/engine.rb +18 -4
  37. data/lib/decidim/initiatives/participatory_space.rb +12 -2
  38. data/lib/decidim/initiatives/test/factories.rb +4 -4
  39. data/lib/decidim/initiatives/version.rb +1 -1
  40. metadata +19 -13
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 77c14067bc7237757419f227e84ec0f721e9d57479f5ebdde27d7c41a404357b
4
- data.tar.gz: f927ab668492100bab589cd4545365de108886c2967de039f807b3fc9278af9b
3
+ metadata.gz: 902007a91cd56a0262dc940099b2a85490e971c84b0751028c400ad7f03a1912
4
+ data.tar.gz: 381db5f91900f557c77aa2becf61268a538e6c26f0c6980b6bcbdfd1b797c469
5
5
  SHA512:
6
- metadata.gz: 55a9527f0c4011b75f9cd488ca6a39303eb559843d216685f0a13b5714a56d876a054cd7cbc6e423ecb1f10e968b83e7f8ff9373eeb6b9ecce8323ac823be1f3
7
- data.tar.gz: 96a91b58d380aba2146df773e854fcc61a81ca95c433183811a616c63fd4888fc04ab2ad62929f6abe98317523e46ba2fa17d4130185f6a5dc4814167b426317
6
+ metadata.gz: 4202350870ac6c6d1e377c0e2a1f29d81db3e6b5306cf94b8c9e431caf12173cd2412ef2d60253dbacee46b31e8d434b9a3953fa17291b701ca205657125c3ff
7
+ data.tar.gz: 9728c457241db360f25f7a0862f8a3f1fa78fd9dfcab47ebf34a36205005d729a699ce50ee99944614569c23821bf008c800972caa0c8475d4ff3507adbfc7a7
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 34 34">
2
+ <path d="M17 1.889C8.654 1.889 1.889 8.654 1.889 17S8.654 32.111 17 32.111 32.111 25.346 32.111 17 25.346 1.889 17 1.889zM17 0c9.389 0 17 7.611 17 17s-7.611 17-17 17S0 26.389 0 17 7.611 0 17 0zm4.722 18.082v-2.97a.944.944 0 1 0-1.889 0v2.97a.944.944 0 1 0 1.89 0zm-2.833 0v-2.97a.944.944 0 0 0-1.889 0v2.97a.944.944 0 1 0 1.889 0zm-3.778.488V8.5a.944.944 0 0 0-1.889 0v10.07a.944.944 0 0 0 1.89 0zM8.5 16.92c.814 0 1.593.78 1.593 1.594v.2c0 4.131 3.302 7.432 7.373 7.356 4.114 0 7.415-3.301 7.339-7.373V15.11a.944.944 0 0 0-1.889 0v3.603c.056 3.025-2.385 5.468-5.467 5.468-3.025.056-5.467-2.386-5.467-5.468v-.2c0-1.857-1.625-3.482-3.482-3.482a.944.944 0 0 0 0 1.889z"/>
3
+ </svg>
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Decidim
4
+ # A cell to display when an initiative has been published.
5
+ class InitiativeActivityCell < ActivityCell
6
+ def title
7
+ I18n.t "decidim.initiatives.last_activity.new_initiative"
8
+ end
9
+ end
10
+ end
@@ -10,8 +10,15 @@ module Decidim
10
10
  render if highlighted_initiatives.any?
11
11
  end
12
12
 
13
+ def max_results
14
+ model.settings.max_results
15
+ end
16
+
13
17
  def highlighted_initiatives
14
- OrganizationPrioritizedInitiatives.new(current_organization)
18
+ @highlighted_initiatives ||= OrganizationPrioritizedInitiatives
19
+ .new(current_organization)
20
+ .query
21
+ .limit(max_results)
15
22
  end
16
23
 
17
24
  def i18n_scope
@@ -0,0 +1,3 @@
1
+ <% form.fields_for :settings, form.object.settings do |settings_fields| %>
2
+ <%= settings_fields.select :max_results, [4, 8, 12], prompt: "", label: label %>
3
+ <% end %>
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Decidim
4
+ module Initiatives
5
+ module ContentBlocks
6
+ class HighlightedInitiativesSettingsFormCell < Decidim::ViewModel
7
+ alias form model
8
+
9
+ def content_block
10
+ options[:content_block]
11
+ end
12
+
13
+ def label
14
+ I18n.t("decidim.initiatives.admin.content_blocks.highlighted_initiatives.max_results")
15
+ end
16
+ end
17
+ end
18
+ end
19
+ end
@@ -27,7 +27,8 @@ module Decidim
27
27
  @initiative = Decidim.traceability.perform_action!(
28
28
  :publish,
29
29
  initiative,
30
- current_user
30
+ current_user,
31
+ visibility: "all"
31
32
  ) do
32
33
  initiative.publish!
33
34
  increment_score
@@ -41,7 +42,11 @@ module Decidim
41
42
  attr_reader :initiative, :current_user
42
43
 
43
44
  def increment_score
44
- Decidim::Gamification.increment_score(initiative.author, :initiatives)
45
+ if initiative.user_group
46
+ Decidim::Gamification.increment_score(initiative.user_group, :initiatives)
47
+ else
48
+ Decidim::Gamification.increment_score(initiative.author, :initiatives)
49
+ end
45
50
  end
46
51
  end
47
52
  end
@@ -15,8 +15,8 @@ module Decidim
15
15
  attribute :type_id, Integer
16
16
  attribute :decidim_scope_id, Integer
17
17
  attribute :signature_type, String
18
- attribute :signature_start_date, Date
19
- attribute :signature_end_date, Date
18
+ attribute :signature_start_date, Decidim::Attributes::LocalizedDate
19
+ attribute :signature_end_date, Decidim::Attributes::LocalizedDate
20
20
  attribute :hashtag, String
21
21
  attribute :offline_votes, Integer
22
22
 
@@ -12,6 +12,7 @@ module Decidim
12
12
 
13
13
  # Notifies initiative creation
14
14
  def notify_creation(initiative)
15
+ return if initiative.author.email.blank?
15
16
  @initiative = initiative
16
17
  @organization = initiative.organization
17
18
 
@@ -27,6 +28,7 @@ module Decidim
27
28
 
28
29
  # Notify changes in state
29
30
  def notify_state_change(initiative, user)
31
+ return if user.email.blank?
30
32
  @organization = initiative.organization
31
33
 
32
34
  with_user(user) do
@@ -49,6 +51,7 @@ module Decidim
49
51
 
50
52
  # Notify an initiative requesting technical validation
51
53
  def notify_validating_request(initiative, user)
54
+ return if user.email.blank?
52
55
  @organization = initiative.organization
53
56
  @link = decidim_admin_initiatives.edit_initiative_url(initiative, host: @organization.host)
54
57
 
@@ -68,6 +71,7 @@ module Decidim
68
71
 
69
72
  # Notify progress to all initiative subscribers.
70
73
  def notify_progress(initiative, user)
74
+ return if user.email.blank?
71
75
  @organization = initiative.organization
72
76
  @link = initiative_url(initiative, host: @organization.host)
73
77
 
@@ -67,7 +67,7 @@ module Decidim
67
67
  Decidim::Initiatives.creation_enabled && (
68
68
  Decidim::Initiatives.do_not_require_authorization ||
69
69
  UserAuthorizations.for(user).any? ||
70
- user.user_groups.verified.any?
70
+ Decidim::UserGroups::ManageableUserGroups.for(user).verified.any?
71
71
  )
72
72
  end
73
73
 
@@ -80,7 +80,7 @@ module Decidim
80
80
  (
81
81
  Decidim::Initiatives.do_not_require_authorization ||
82
82
  UserAuthorizations.for(user).any? ||
83
- user.user_groups.verified.any?
83
+ Decidim::UserGroups::ManageableUserGroups.for(user).verified.any?
84
84
  )
85
85
 
86
86
  toggle_allow(can_request)
@@ -107,7 +107,7 @@ module Decidim
107
107
  can_vote = initiative.votes_enabled? &&
108
108
  initiative.organization&.id == user.organization&.id &&
109
109
  initiative.votes.where(decidim_author_id: user.id, decidim_user_group_id: decidim_user_group_id).empty? &&
110
- (can_user_support?(initiative) || user.user_groups.verified.any?)
110
+ (can_user_support?(initiative) || Decidim::UserGroups::ManageableUserGroups.for(user).verified.any?)
111
111
 
112
112
  toggle_allow(can_vote)
113
113
  end
@@ -119,7 +119,7 @@ module Decidim
119
119
  can_unvote = initiative.votes_enabled? &&
120
120
  initiative.organization&.id == user.organization&.id &&
121
121
  initiative.votes.where(decidim_author_id: user.id, decidim_user_group_id: decidim_user_group_id).any? &&
122
- (can_user_support?(initiative) || user.user_groups.verified.any?)
122
+ (can_user_support?(initiative) || Decidim::UserGroups::ManageableUserGroups.for(user).verified.any?)
123
123
 
124
124
  toggle_allow(can_unvote)
125
125
  end
@@ -47,7 +47,7 @@ module Decidim
47
47
  query
48
48
  .joins(:scoped_type)
49
49
  .where(
50
- "decidim_initiatives_type_scopes.decidim_initiatives_types_id = ?",
50
+ "decidim_initiatives_type_scopes.decidim_initiatives_types_id IN (?)",
51
51
  type
52
52
  )
53
53
  end
@@ -99,6 +99,9 @@
99
99
  <h2 class="print-section-title">Sol·liciten que sigui admesa a tràmit la Iniciativa Ciutadana que porta el títol de:</h2>
100
100
  <%= translated_attribute(current_initiative.title) %>
101
101
 
102
+ <h2 class="print-section-title">Tipus de la Iniciativa:</h2>
103
+ <%= translated_attribute(current_initiative.type.title) %>
104
+
102
105
  <h2 class="print-section-title">Definició de la Iniciativa:</h2>
103
106
  <%= decidim_sanitize translated_attribute(current_initiative.description) %>
104
107
 
@@ -46,10 +46,10 @@
46
46
  prompt: t(".select_scope") %>
47
47
  </div>
48
48
 
49
- <% if current_user.user_groups.verified.any? %>
49
+ <% if Decidim::UserGroups::ManageableUserGroups.for(current_user).verified.any? %>
50
50
  <div class="field">
51
51
  <%= f.select :decidim_user_group_id,
52
- current_user.user_groups.verified.map{ |g| [g.name, g.id] },
52
+ Decidim::UserGroups::ManageableUserGroups.for(current_user).verified.map{ |g| [g.name, g.id] },
53
53
  prompt: current_user.name %>
54
54
  </div>
55
55
  <% end %>
@@ -1,4 +1,4 @@
1
- <% if current_user && current_user.user_groups.verified.any? %>
1
+ <% if current_user && Decidim::UserGroups::ManageableUserGroups.for(current_user).verified.any? %>
2
2
  <button id="select-identity-button"
3
3
  class="card__button button expanded button--sc">
4
4
  <%= t(".vote") %>
@@ -9,7 +9,7 @@
9
9
  unvote_label: current_user.name
10
10
  } unless current_initiative.offline? %>
11
11
 
12
- <% current_user.user_groups.verified.each do |g| %>
12
+ <% Decidim::UserGroups::ManageableUserGroups.for(current_user).verified.each do |g| %>
13
13
  <br />
14
14
  <% if @voted_groups.include? g.id %>
15
15
  <%= button_to(
@@ -1,6 +1,7 @@
1
1
  <% content_for :secondary_nav do %>
2
2
  <div class="secondary-nav secondary-nav--subnav">
3
3
  <ul>
4
+ <%= public_page_link decidim_initiatives.initiative_path(current_initiative) %>
4
5
  <% if allowed_to? :edit, :initiative, initiative: current_initiative %>
5
6
  <li <% if is_active_link?(decidim_admin_initiatives.edit_initiative_path(current_initiative)) %> class="is-active" <% end %>>
6
7
  <%= aria_selected_link_to t(".information"), decidim_admin_initiatives.edit_initiative_path(current_initiative) %>
@@ -85,9 +85,12 @@ ca:
85
85
  gamification:
86
86
  badges:
87
87
  initiatives:
88
+ conditions:
89
+ - Anar a Inciatives
90
+ - Segueix els passos per crear una nova iniciativa
91
+ description: Aquest distintiu es concedeix quan es llancen noves iniciatives, unint-te amb altres per dur-les a terme.
88
92
  description_another: Aquest usuari ha publicat %{score} iniciatives.
89
93
  description_own: Tens %{score} iniciatives publicades.
90
- explanation: Els usuaris obtenen aquesta distinció mitjançant la publicació de les seves iniciatives.
91
94
  name: Iniciatives publicades
92
95
  next_level_in: Publica %{score} iniciatives més per arribar al següent nivell!
93
96
  unearned_another: Aquest usuari encara no ha publicat cap iniciativa.
@@ -102,6 +105,9 @@ ca:
102
105
  no_members_yet: No hi ha membres al comitè promotor
103
106
  revoke: Revocar
104
107
  title: Membres del comitè
108
+ content_blocks:
109
+ highlighted_initiatives:
110
+ max_results: Quantitat màxima d'elements que es mostraran
105
111
  initiatives:
106
112
  edit:
107
113
  accept: Accepta la iniciativa
@@ -327,6 +333,8 @@ ca:
327
333
  status_change_for: La iniciativa %{title} ha canviat d'estat
328
334
  technical_validation_body_for: La iniciativa %{title} ha demanat la seva validació tècnica.
329
335
  technical_validation_for: La iniciativa %{title} ha demanat la seva validació tècnica.
336
+ last_activity:
337
+ new_initiative: Nova iniciativa
330
338
  pages:
331
339
  home:
332
340
  highlighted_initiatives:
@@ -85,9 +85,12 @@ de:
85
85
  gamification:
86
86
  badges:
87
87
  initiatives:
88
+ conditions:
89
+ - Gehe zum Teilnehmerbereich von Intiativen
90
+ - Befolgen Sie die Schritte, um eine neue Initiative zu erstellen
91
+ description: Dieses Abzeichen wird gewährt, wenn Sie neue Initiativen starten und mit anderen zusammenarbeiten, um sie durchzuführen.
88
92
  description_another: Dieser Benutzer hat %{score} Initiativen veröffentlicht.
89
93
  description_own: Du hast %{score} Initiativen veröffentlicht.
90
- explanation: Benutzer erhalten dieses Abzeichen, indem sie ihre Initiativen veröffentlichen lassen.
91
94
  name: Veröffentlichte Initiativen
92
95
  next_level_in: Holen Sie sich %{score} weitere Initiativen veröffentlicht, um das nächste Level zu erreichen!
93
96
  unearned_another: Dieser Benutzer hat noch keine Initiativen veröffentlicht.
@@ -102,6 +105,9 @@ de:
102
105
  no_members_yet: Es gibt keine Mitglieder im Promoter-Ausschuss
103
106
  revoke: Widerrufen
104
107
  title: Ausschussmitglieder
108
+ content_blocks:
109
+ highlighted_initiatives:
110
+ max_results: Maximale Anzahl der Elemente, die angezeigt werden sollen
105
111
  initiatives:
106
112
  edit:
107
113
  accept: Initiative akzeptieren
@@ -326,6 +332,8 @@ de:
326
332
  status_change_for: Die Initiative %{title} hat ihren Status geändert
327
333
  technical_validation_body_for: Die Initiative %{title} hat ihre technische Validierung beantragt.
328
334
  technical_validation_for: Die Initiative %{title} hat ihre technische Validierung beantragt.
335
+ last_activity:
336
+ new_initiative: Neue Initiative
329
337
  pages:
330
338
  home:
331
339
  highlighted_initiatives:
@@ -86,9 +86,12 @@ en:
86
86
  gamification:
87
87
  badges:
88
88
  initiatives:
89
+ conditions:
90
+ - Go to the participation space of Intiatives
91
+ - Follow the steps to create a new initiative
92
+ description: This badge is granted when you launch new initiatives, partnering with others to carry them out.
89
93
  description_another: This user has gotten %{score} initiatives published.
90
94
  description_own: You've got %{score} initiatives published.
91
- explanation: Users get this badge by getting their initiatives published.
92
95
  name: Published initiatives
93
96
  next_level_in: Get %{score} more initiatives published to reach the next level!
94
97
  unearned_another: This user hasn't gotten any initiatives published yet.
@@ -103,6 +106,9 @@ en:
103
106
  no_members_yet: There are no members in the promoter committee
104
107
  revoke: Revoke
105
108
  title: Committee members
109
+ content_blocks:
110
+ highlighted_initiatives:
111
+ max_results: Maximum amount of elements to show
106
112
  initiatives:
107
113
  edit:
108
114
  accept: Accept initiative
@@ -328,6 +334,8 @@ en:
328
334
  status_change_for: The initiative %{title} has changed its state
329
335
  technical_validation_body_for: The initiative %{title} has requested its technical validation.
330
336
  technical_validation_for: The initiative %{title} has requested its technical validation.
337
+ last_activity:
338
+ new_initiative: New initiative
331
339
  pages:
332
340
  home:
333
341
  highlighted_initiatives:
@@ -85,9 +85,12 @@ es-PY:
85
85
  gamification:
86
86
  badges:
87
87
  initiatives:
88
+ conditions:
89
+ - Ir al espacio de participación de Iniciativas.
90
+ - Sigue los pasos para crear una nueva iniciativa.
91
+ description: Este distintivo se otorga cuando lanza nuevas iniciativas, asociándose con otros para llevarlas a cabo.
88
92
  description_another: Este usuario ha publicado %{score} iniciativas.
89
93
  description_own: Tienes %{score} iniciativas publicadas.
90
- explanation: Los usuarios obtienen esta insignia al publicar sus iniciativas.
91
94
  name: Iniciativas publicadas
92
95
  next_level_in: '¡Publica %{score} iniciativas más para llegar al siguiente nivel!'
93
96
  unearned_another: Este usuario aún no ha publicado ninguna iniciativa.
@@ -102,6 +105,9 @@ es-PY:
102
105
  no_members_yet: No hay miembros en el comité promotor
103
106
  revoke: Revocar
104
107
  title: Miembros del comité
108
+ content_blocks:
109
+ highlighted_initiatives:
110
+ max_results: Cantidad máxima de elementos para mostrar
105
111
  initiatives:
106
112
  edit:
107
113
  accept: Aceptar iniciativa
@@ -327,6 +333,8 @@ es-PY:
327
333
  status_change_for: La iniciativa %{title} ha cambiado su estado
328
334
  technical_validation_body_for: La iniciativa %{title} ha solicitado su validación técnica.
329
335
  technical_validation_for: La iniciativa %{title} ha solicitado su validación técnica.
336
+ last_activity:
337
+ new_initiative: Nueva iniciativa
330
338
  pages:
331
339
  home:
332
340
  highlighted_initiatives:
@@ -6,8 +6,8 @@ es:
6
6
  description: Descripción
7
7
  offline_votes: Apoyo cara a cara
8
8
  scope_id: Alcance
9
- signature_end_date: Fin del período de recolección de firmas
10
- signature_start_date: Inicio del período de recolección de firmas
9
+ signature_end_date: Fin del período de recogida de firmas
10
+ signature_start_date: Inicio del período de recogida de firmas
11
11
  signature_type: Tipo de colección de firma
12
12
  signature_type_values:
13
13
  any: Mezclado
@@ -85,9 +85,12 @@ es:
85
85
  gamification:
86
86
  badges:
87
87
  initiatives:
88
+ conditions:
89
+ - Ir al espacio de participación de Iniciativas
90
+ - Sigue los pasos para crear una nueva iniciativa.
91
+ description: Este distintivo se otorga cuando lanzas nuevas iniciativas, asociándote con otros para llevarlas a cabo.
88
92
  description_another: Este usuario ha publicado %{score} iniciativas.
89
93
  description_own: Tienes %{score} iniciativas publicadas.
90
- explanation: Los usuarios obtienen esta insignia al publicar sus iniciativas.
91
94
  name: Iniciativas publicadas
92
95
  next_level_in: '¡Publica %{score} iniciativas más para llegar al siguiente nivel!'
93
96
  unearned_another: Este usuario aún no ha publicado ninguna iniciativa.
@@ -102,6 +105,9 @@ es:
102
105
  no_members_yet: No hay miembros en el comité promotor
103
106
  revoke: Revocar
104
107
  title: Miembros del comité
108
+ content_blocks:
109
+ highlighted_initiatives:
110
+ max_results: Cantidad máxima de elementos para mostrar
105
111
  initiatives:
106
112
  edit:
107
113
  accept: Aceptar iniciativa
@@ -327,6 +333,8 @@ es:
327
333
  status_change_for: La iniciativa %{title} ha cambiado su estado
328
334
  technical_validation_body_for: La iniciativa %{title} ha solicitado su validación técnica.
329
335
  technical_validation_for: La iniciativa %{title} ha solicitado su validación técnica.
336
+ last_activity:
337
+ new_initiative: Nueva iniciativa
330
338
  pages:
331
339
  home:
332
340
  highlighted_initiatives:
@@ -85,9 +85,12 @@ eu:
85
85
  gamification:
86
86
  badges:
87
87
  initiatives:
88
+ conditions:
89
+ - Joan zaitez Intiatives-ko partaidetza eremura
90
+ - Jarraitu urrats berriak ekimen berri bat sortzeko
91
+ description: Idazmahaia ekimen berriak abiarazten dituzunean, besteekin elkarlanean aritzea ekartzen baduzu.
88
92
  description_another: Erabiltzaile honek argitaratutako %{score} ekimen lortu ditu.
89
93
  description_own: Argitaratutako %{score} ekimen dituzu.
90
- explanation: Erabiltzaileek txapela lortzen dute beren ekimenak argitaratuz.
91
94
  name: Argitaratutako ekimenak
92
95
  next_level_in: Talde %{score} ekimen gehiago argitaratu hurrengo mailara iristeko!
93
96
  unearned_another: Erabiltzaile honek oraindik ez du argitaratutako ekimenik lortu.
@@ -102,6 +105,9 @@ eu:
102
105
  no_members_yet: Ez dago bazkide promoziorako batzordean
103
106
  revoke: Baliogabetu
104
107
  title: Batzorde kideak
108
+ content_blocks:
109
+ highlighted_initiatives:
110
+ max_results: Erakusteko elementu gehienen kopurua
105
111
  initiatives:
106
112
  edit:
107
113
  accept: Onartu ekimena
@@ -327,6 +333,8 @@ eu:
327
333
  status_change_for: '%{title} ekimena bere egoera aldatu du'
328
334
  technical_validation_body_for: '%{title} ekimena balidazio teknikoa eskatu du.'
329
335
  technical_validation_for: '%{title} ekimena balidazio teknikoa eskatu du.'
336
+ last_activity:
337
+ new_initiative: Ekimen berria
330
338
  pages:
331
339
  home:
332
340
  highlighted_initiatives:
@@ -85,9 +85,12 @@ fi:
85
85
  gamification:
86
86
  badges:
87
87
  initiatives:
88
+ conditions:
89
+ - Siirry aloitteiden osallistumistilaan
90
+ - Luo uusi aloite ohjeiden mukaisesti
91
+ description: Tämä kunniamerkki myönnetään, kun laadit uusia aloitteita ja keräät verkoston ihmisiä toteuttamaan niitä.
88
92
  description_another: Tämä käyttäjä on julkaissut %{score} aloitetta.
89
93
  description_own: Olet julkaissut %{score} aloitetta.
90
- explanation: Käyttäjät saavat tämän kunniamerkin saamalla aloitteita julkaistua.
91
94
  name: Julkaistut aloitteet
92
95
  next_level_in: Julkaise %{score} uutta aloitetta saavuttaaksesi seuraavan tason!
93
96
  unearned_another: Tämä käyttäjä ei ole vielä julkaissut yhtään aloitetta.
@@ -102,6 +105,9 @@ fi:
102
105
  no_members_yet: Tukikomiteassa ei ole jäseniä
103
106
  revoke: Kumoa
104
107
  title: Komitean jäsenet
108
+ content_blocks:
109
+ highlighted_initiatives:
110
+ max_results: Näytettävien elementtien enimmäismäärä
105
111
  initiatives:
106
112
  edit:
107
113
  accept: Hyväksy aloite
@@ -327,6 +333,8 @@ fi:
327
333
  status_change_for: Aloitteen %{title} tila on muuttunut
328
334
  technical_validation_body_for: Aloitteelle %{title} on pyydetty teknistä validointia.
329
335
  technical_validation_for: Aloitteelle %{title} on pyydetty teknistä validointia.
336
+ last_activity:
337
+ new_initiative: Uusi aloite
330
338
  pages:
331
339
  home:
332
340
  highlighted_initiatives:
@@ -85,9 +85,12 @@ fr:
85
85
  gamification:
86
86
  badges:
87
87
  initiatives:
88
+ conditions:
89
+ - Accéder à l'espace de participation d'Initiatives
90
+ - Suivez les étapes pour créer une nouvelle initiative
91
+ description: Ce badge vous est attribué lorsque vous lancez de nouvelles initiatives, en partenariat avec d’autres pour les mener à bien.
88
92
  description_another: Cet utilisateur a reçu %{score} initiatives publiées.
89
93
  description_own: Vous avez publié %{score} initiatives.
90
- explanation: Les utilisateurs obtiennent ce badge en publiant leurs initiatives.
91
94
  name: Initiatives publiées
92
95
  next_level_in: Obtenez %{score} autres initiatives publiées pour atteindre le niveau supérieur!
93
96
  unearned_another: Cet utilisateur n'a pas encore publié d'initiative.
@@ -102,6 +105,9 @@ fr:
102
105
  no_members_yet: Il n'y a pas encore de membres dans le Comité de promotion
103
106
  revoke: Révoquer
104
107
  title: Membres du comité de promotion
108
+ content_blocks:
109
+ highlighted_initiatives:
110
+ max_results: Quantité maximale d'éléments à afficher
105
111
  initiatives:
106
112
  edit:
107
113
  accept: Signer la pétition
@@ -327,6 +333,8 @@ fr:
327
333
  status_change_for: L'initiative %{title} a changé de statut
328
334
  technical_validation_body_for: Une validation technique a été demandée pour l'initiative %{title}.
329
335
  technical_validation_for: Une validation technique a été demandée pour l'initiative %{title}.
336
+ last_activity:
337
+ new_initiative: Nouvelle initiative
330
338
  pages:
331
339
  home:
332
340
  highlighted_initiatives:
@@ -85,9 +85,12 @@ gl:
85
85
  gamification:
86
86
  badges:
87
87
  initiatives:
88
+ conditions:
89
+ - Ir ao espazo de participación de Intiatives
90
+ - Segue os pasos para crear unha nova iniciativa
91
+ description: Este distintivo concedeuse cando se lanzan novas iniciativas, se asocian con outras persoas para realizalas.
88
92
  description_another: Este usuario obtivo %{score} iniciativas publicadas.
89
93
  description_own: Tes publicado %{score} iniciativas.
90
- explanation: Os usuarios obtén esta insignia ao publicar as súas iniciativas.
91
94
  name: Iniciativas publicadas
92
95
  next_level_in: Recibe %{score} iniciativas máis publicadas para alcanzar o seguinte nivel!
93
96
  unearned_another: Este usuario aínda non recibiu ningunha iniciativa publicada.
@@ -102,6 +105,9 @@ gl:
102
105
  no_members_yet: Non hai membros no comité promotor
103
106
  revoke: Revocar
104
107
  title: Membros do comité
108
+ content_blocks:
109
+ highlighted_initiatives:
110
+ max_results: Cantidade máxima de elementos para mostrar
105
111
  initiatives:
106
112
  edit:
107
113
  accept: Acepte a iniciativa
@@ -327,6 +333,8 @@ gl:
327
333
  status_change_for: A iniciativa %{title} cambiou o seu estado
328
334
  technical_validation_body_for: A iniciativa %{title} solicitou a súa validación técnica.
329
335
  technical_validation_for: A iniciativa %{title} solicitou a súa validación técnica.
336
+ last_activity:
337
+ new_initiative: Nova iniciativa
330
338
  pages:
331
339
  home:
332
340
  highlighted_initiatives:
@@ -85,9 +85,12 @@ hu:
85
85
  gamification:
86
86
  badges:
87
87
  initiatives:
88
+ conditions:
89
+ - Menjen az Intiatives részvételi helyére
90
+ - Kövesse az új kezdeményezés létrehozásához szükséges lépéseket
91
+ description: Ezt a jelvényt akkor kapja meg, ha új kezdeményezéseket indít el, és másokkal partnerséget hajt végre.
88
92
  description_another: Ez a felhasználó %{score} kezdeményezést kapott.
89
93
  description_own: '%{score} kezdeményezéseid közzétéve.'
90
- explanation: A jelvényt kezdeményezések közzétételével szerezheted meg.
91
94
  name: Közzétett kezdeményezések
92
95
  next_level_in: Szerezz még %{score} kezdeményezéseket a következő szint eléréséhez!
93
96
  unearned_another: A felhasználó még nem tett közzé kezdeményezéseket.
@@ -102,6 +105,9 @@ hu:
102
105
  no_members_yet: A promóciós bizottságban nincsenek tagok
103
106
  revoke: Visszavonás
104
107
  title: Bizottsági tagok
108
+ content_blocks:
109
+ highlighted_initiatives:
110
+ max_results: A megjelenítendő elemek maximális száma
105
111
  initiatives:
106
112
  edit:
107
113
  accept: Kezdeményezés elfogadása
@@ -327,6 +333,8 @@ hu:
327
333
  status_change_for: A(z) %{title} kezdeményezés állapota változott
328
334
  technical_validation_body_for: A(z) %{title} kezdeményezés technikai érvényesítését kérted.
329
335
  technical_validation_for: A(z) %{title} kezdeményezés technikai érvényesítését kérted.
336
+ last_activity:
337
+ new_initiative: Új kezdeményezés
330
338
  pages:
331
339
  home:
332
340
  highlighted_initiatives:
@@ -85,9 +85,12 @@ it:
85
85
  gamification:
86
86
  badges:
87
87
  initiatives:
88
+ conditions:
89
+ - Vai allo spazio di partecipazione delle iniziative
90
+ - Segui i passaggi per creare una nuova iniziativa
91
+ description: Questo badge è garantito quando lanci nuove iniziative, collaborando con altri per realizzarle.
88
92
  description_another: Questo utente ha ottenuto %{score} iniziative pubblicate.
89
93
  description_own: Hai pubblicato %{score} iniziative.
90
- explanation: Gli utenti ottengono questo badge pubblicando le loro iniziative.
91
94
  name: Iniziative pubblicate
92
95
  next_level_in: Ricevi altre %{score} iniziative pubblicate per raggiungere il livello successivo!
93
96
  unearned_another: Questo utente non ha ancora ottenuto alcuna iniziativa pubblicata.
@@ -102,6 +105,9 @@ it:
102
105
  no_members_yet: Non ci sono membri nel comitato promotore
103
106
  revoke: Revocare
104
107
  title: membri del Comitato
108
+ content_blocks:
109
+ highlighted_initiatives:
110
+ max_results: Quantità massima di elementi da mostrare
105
111
  initiatives:
106
112
  edit:
107
113
  accept: Accetta l'iniziativa
@@ -327,6 +333,8 @@ it:
327
333
  status_change_for: L'iniziativa %{title} ha cambiato il suo stato
328
334
  technical_validation_body_for: L'iniziativa %{title} ha richiesto la sua convalida tecnica.
329
335
  technical_validation_for: L'iniziativa %{title} ha richiesto la sua convalida tecnica.
336
+ last_activity:
337
+ new_initiative: Nuova iniziativa
330
338
  pages:
331
339
  home:
332
340
  highlighted_initiatives:
@@ -85,9 +85,12 @@ nl:
85
85
  gamification:
86
86
  badges:
87
87
  initiatives:
88
+ conditions:
89
+ - Ga naar de participatieruimte van Intiatives
90
+ - Volg de stappen om een ​​nieuw initiatief te maken
91
+ description: Deze badge wordt toegekend wanneer u nieuwe initiatieven start en samenwerkt met anderen om ze uit te voeren.
88
92
  description_another: Deze gebruiker heeft %{score} initiatieven gepubliceerd.
89
93
  description_own: Je hebt %{score} initiatieven gepubliceerd.
90
- explanation: Gebruikers krijgen deze badge door hun initiatieven gepubliceerd te krijgen.
91
94
  name: Gepubliceerde initiatieven
92
95
  next_level_in: Ontvang nog %{score} initiatieven die zijn gepubliceerd om het volgende niveau te bereiken!
93
96
  unearned_another: Deze gebruiker heeft nog geen initiatieven gepubliceerd.
@@ -102,6 +105,9 @@ nl:
102
105
  no_members_yet: Er zijn geen leden in de promotieraad
103
106
  revoke: Intrekken
104
107
  title: Commissieleden
108
+ content_blocks:
109
+ highlighted_initiatives:
110
+ max_results: Maximum aantal elementen dat kan worden weergegeven
105
111
  initiatives:
106
112
  edit:
107
113
  accept: Accepteer initiatief
@@ -327,6 +333,8 @@ nl:
327
333
  status_change_for: Het initiatief %{title} is van status veranderd
328
334
  technical_validation_body_for: Het initiatief %{title} heeft om technische validatie ervan verzocht.
329
335
  technical_validation_for: Het initiatief %{title} heeft om technische validatie ervan verzocht.
336
+ last_activity:
337
+ new_initiative: Nieuw initiatief
330
338
  pages:
331
339
  home:
332
340
  highlighted_initiatives:
@@ -354,7 +362,7 @@ nl:
354
362
  show_similar_initiatives: Vergelijken
355
363
  initiative_header:
356
364
  initiative_menu_item: Initiatief
357
- unfold: Ontvouwen
365
+ unfold: Uitvouwen
358
366
  initiatives:
359
367
  initiative:
360
368
  check: Bekijken
@@ -91,9 +91,12 @@ pl:
91
91
  gamification:
92
92
  badges:
93
93
  initiatives:
94
+ conditions:
95
+ - Idź do miejsca uczestnictwa Intiatives
96
+ - Postępuj zgodnie z instrukcjami, aby utworzyć nową inicjatywę
97
+ description: Ta odznaka jest przyznawana, gdy uruchamiasz nowe inicjatywy, współpracując z innymi, aby je zrealizować.
94
98
  description_another: Ten użytkownik otrzymał %{score} opublikowanych inicjatyw.
95
99
  description_own: Masz opublikowanych %{score} inicjatyw.
96
- explanation: Użytkownicy otrzymują tę odznakę, publikując swoje inicjatywy.
97
100
  name: Opublikowane inicjatywy
98
101
  next_level_in: Uzyskaj %{score} dodatkowych inicjatyw opublikowanych, aby przejść do następnego poziomu!
99
102
  unearned_another: Ten użytkownik nie otrzymał jeszcze żadnych inicjatyw.
@@ -108,6 +111,9 @@ pl:
108
111
  no_members_yet: W komisji promotorskiej nie ma członków
109
112
  revoke: Unieważnić
110
113
  title: członkowie Komitetu
114
+ content_blocks:
115
+ highlighted_initiatives:
116
+ max_results: Maksymalna ilość elementów do pokazania
111
117
  initiatives:
112
118
  edit:
113
119
  accept: Przyjmij inicjatywę
@@ -341,6 +347,8 @@ pl:
341
347
  status_change_for: Inicjatywa %{title} zmieniła swój stan
342
348
  technical_validation_body_for: Inicjatywa %{title} zażądała technicznej weryfikacji.
343
349
  technical_validation_for: Inicjatywa %{title} zażądała technicznej weryfikacji.
350
+ last_activity:
351
+ new_initiative: Nowa inicjatywa
344
352
  pages:
345
353
  home:
346
354
  highlighted_initiatives:
@@ -85,9 +85,12 @@ pt-BR:
85
85
  gamification:
86
86
  badges:
87
87
  initiatives:
88
+ conditions:
89
+ - Ir para o espaço de participação de Iniciativas
90
+ - Siga os passos para criar uma nova iniciativa
91
+ description: Esse selo é concedido quando você lança novas iniciativas, estabelecendo parcerias com outras pessoas para realizá-las.
88
92
  description_another: Este usuário obteve %{score} iniciativas publicadas.
89
93
  description_own: Você tem %{score} iniciativas publicadas.
90
- explanation: Os usuários recebem esse selo ao publicar suas iniciativas.
91
94
  name: Iniciativas publicadas
92
95
  next_level_in: Obtenha mais %{score} iniciativas publicadas para alcançar o próximo nível!
93
96
  unearned_another: Este usuário ainda não publicou nenhuma iniciativa.
@@ -102,6 +105,9 @@ pt-BR:
102
105
  no_members_yet: Não há membros no comitê de promotores
103
106
  revoke: Revogar
104
107
  title: membros do Comitê
108
+ content_blocks:
109
+ highlighted_initiatives:
110
+ max_results: Quantidade máxima de elementos para mostrar
105
111
  initiatives:
106
112
  edit:
107
113
  accept: Aceitar iniciativa
@@ -327,6 +333,8 @@ pt-BR:
327
333
  status_change_for: A iniciativa %{title} mudou seu estado
328
334
  technical_validation_body_for: A iniciativa %{title} solicitou sua validação técnica.
329
335
  technical_validation_for: A iniciativa %{title} solicitou sua validação técnica.
336
+ last_activity:
337
+ new_initiative: Nova iniciativa
330
338
  pages:
331
339
  home:
332
340
  highlighted_initiatives:
@@ -85,9 +85,12 @@ pt:
85
85
  gamification:
86
86
  badges:
87
87
  initiatives:
88
+ conditions:
89
+ - Ir para o espaço de participação de Intiatives
90
+ - Siga os passos para criar uma nova iniciativa
91
+ description: Esse selo é concedido quando você lança novas iniciativas, estabelecendo parcerias com outras pessoas para realizá-las.
88
92
  description_another: Este usuário obteve %{score} iniciativas publicadas.
89
93
  description_own: Você tem %{score} iniciativas publicadas.
90
- explanation: Os usuários recebem esse selo ao publicar suas iniciativas.
91
94
  name: Iniciativas publicadas
92
95
  next_level_in: Obtenha mais %{score} iniciativas publicadas para alcançar o próximo nível!
93
96
  unearned_another: Este usuário ainda não publicou nenhuma iniciativa.
@@ -102,6 +105,9 @@ pt:
102
105
  no_members_yet: Não há membros no comitê de promotores
103
106
  revoke: Revogar
104
107
  title: membros do Comitê
108
+ content_blocks:
109
+ highlighted_initiatives:
110
+ max_results: Quantidade máxima de elementos para mostrar
105
111
  initiatives:
106
112
  edit:
107
113
  accept: Aceitar iniciativa
@@ -327,6 +333,8 @@ pt:
327
333
  status_change_for: A iniciativa %{title} mudou seu estado
328
334
  technical_validation_body_for: A iniciativa %{title} solicitou sua validação técnica.
329
335
  technical_validation_for: A iniciativa %{title} solicitou sua validação técnica.
336
+ last_activity:
337
+ new_initiative: Nova iniciativa
330
338
  pages:
331
339
  home:
332
340
  highlighted_initiatives:
@@ -85,9 +85,12 @@ sv:
85
85
  gamification:
86
86
  badges:
87
87
  initiatives:
88
+ conditions:
89
+ - Gå till Intiatives deltagande utrymme
90
+ - Följ stegen för att skapa ett nytt initiativ
91
+ description: Detta märke beviljas när du startar nya initiativ, samarbetar med andra för att utföra dem.
88
92
  description_another: Den här användaren har fått %{score} initiativ publicerade.
89
93
  description_own: Du har %{score} initiativ publicerade.
90
- explanation: Användare får detta märke genom att få sina initiativ publicerade.
91
94
  name: Publicerade initiativ
92
95
  next_level_in: Få %{score} fler initiativ publicerade för att nå nästa nivå!
93
96
  unearned_another: Den här användaren har inte fått några initiativ publicerade än.
@@ -102,6 +105,9 @@ sv:
102
105
  no_members_yet: Det finns inga medlemmar i promotorkommittén
103
106
  revoke: Återkalla
104
107
  title: kommittémedlemmar
108
+ content_blocks:
109
+ highlighted_initiatives:
110
+ max_results: Maximal mängd element att visa
105
111
  initiatives:
106
112
  edit:
107
113
  accept: Acceptera initiativ
@@ -327,6 +333,8 @@ sv:
327
333
  status_change_for: Initiativet %{title} har ändrat sitt tillstånd
328
334
  technical_validation_body_for: Initiativet %{title} har begärt sin tekniska validering.
329
335
  technical_validation_for: Initiativet %{title} har begärt sin tekniska validering.
336
+ last_activity:
337
+ new_initiative: Nytt initiativ
330
338
  pages:
331
339
  home:
332
340
  highlighted_initiatives:
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ class FixUserGroupsIdsOnInitiatives < ActiveRecord::Migration[5.2]
4
+ # rubocop:disable Rails/SkipsModelValidations
5
+ def change
6
+ Decidim::UserGroup.find_each do |group|
7
+ old_id = group.extended_data["old_user_group_id"]
8
+ next unless old_id
9
+
10
+ Decidim::Initiative
11
+ .where(decidim_user_group_id: old_id)
12
+ .update_all(decidim_user_group_id: group.id)
13
+ Decidim::InitiativesVote
14
+ .where(decidim_user_group_id: old_id)
15
+ .update_all(decidim_user_group_id: group.id)
16
+ end
17
+ end
18
+ # rubocop:enable Rails/SkipsModelValidations
19
+ end
@@ -0,0 +1,31 @@
1
+ # frozen_string_literal: true
2
+
3
+ class MakeInitiativeAuthorsPolymorphic < ActiveRecord::Migration[5.2]
4
+ class Initiative < ApplicationRecord
5
+ self.table_name = :decidim_initiatives
6
+ end
7
+
8
+ def change
9
+ remove_index :decidim_initiatives, :decidim_author_id
10
+
11
+ add_column :decidim_initiatives, :decidim_author_type, :string
12
+
13
+ reversible do |direction|
14
+ direction.up do
15
+ execute <<~SQL.squish
16
+ UPDATE decidim_initiatives
17
+ SET decidim_author_type = 'Decidim::UserBaseEntity'
18
+ SQL
19
+ end
20
+ end
21
+
22
+ add_index :decidim_initiatives,
23
+ [:decidim_author_id, :decidim_author_type],
24
+ name: "index_decidim_initiatives_on_decidim_author"
25
+
26
+ change_column_null :decidim_initiatives, :decidim_author_id, false
27
+ change_column_null :decidim_initiatives, :decidim_author_type, false
28
+
29
+ Initiative.reset_column_information
30
+ end
31
+ end
Binary file
@@ -65,6 +65,11 @@ module Decidim
65
65
  Decidim.content_blocks.register(:homepage, :highlighted_initiatives) do |content_block|
66
66
  content_block.cell = "decidim/initiatives/content_blocks/highlighted_initiatives"
67
67
  content_block.public_name_key = "decidim.initiatives.content_blocks.highlighted_initiatives.name"
68
+ content_block.settings_form_cell = "decidim/initiatives/content_blocks/highlighted_initiatives_settings_form"
69
+
70
+ content_block.settings do |settings|
71
+ settings.attribute :max_results, type: :integer, default: 4
72
+ end
68
73
  end
69
74
  end
70
75
 
@@ -86,10 +91,19 @@ module Decidim
86
91
  Decidim::Gamification.register_badge(:initiatives) do |badge|
87
92
  badge.levels = [1, 5, 15, 30, 50]
88
93
 
89
- badge.reset = lambda { |user|
90
- Decidim::Initiative.where(
91
- author: user
92
- ).published.count
94
+ badge.valid_for = [:user, :user_group]
95
+
96
+ badge.reset = lambda { |model|
97
+ if model.is_a?(User)
98
+ Decidim::Initiative.where(
99
+ author: model,
100
+ user_group: nil
101
+ ).published.count
102
+ elsif model.is_a?(UserGroup)
103
+ Decidim::Initiative.where(
104
+ user_group: model
105
+ ).published.count
106
+ end
93
107
  }
94
108
  end
95
109
  end
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  Decidim.register_participatory_space(:initiatives) do |participatory_space|
4
+ participatory_space.icon = "decidim/initiatives/icon.svg"
4
5
  participatory_space.stylesheet = "decidim/initiatives/initiatives"
5
6
 
6
7
  participatory_space.context(:public) do |context|
@@ -58,7 +59,7 @@ Decidim.register_participatory_space(:initiatives) do |participatory_space|
58
59
  Decidim::Initiative.skip_callback(:save, :after, :notify_state_change, raise: false)
59
60
  Decidim::Initiative.skip_callback(:create, :after, :notify_creation, raise: false)
60
61
 
61
- initiative = Decidim::Initiative.create!(
62
+ params = {
62
63
  title: Decidim::Faker::Localized.sentence(3),
63
64
  description: Decidim::Faker::Localized.sentence(25),
64
65
  scoped_type: Decidim::InitiativesTypeScope.reorder(Arel.sql("RANDOM()")).first,
@@ -69,7 +70,16 @@ Decidim.register_participatory_space(:initiatives) do |participatory_space|
69
70
  published_at: Time.current - 7.days,
70
71
  author: Decidim::User.reorder(Arel.sql("RANDOM()")).first,
71
72
  organization: organization
72
- )
73
+ }
74
+
75
+ initiative = Decidim.traceability.perform_action!(
76
+ "publish",
77
+ Decidim::Initiative,
78
+ organization.users.first,
79
+ visibility: "all"
80
+ ) do
81
+ Decidim::Initiative.create!(params)
82
+ end
73
83
 
74
84
  Decidim::Comments::Seed.comments_for(initiative)
75
85
 
@@ -5,8 +5,8 @@ require "decidim/dev"
5
5
 
6
6
  FactoryBot.define do
7
7
  factory :initiatives_type, class: Decidim::InitiativesType do
8
- title { Decidim::Faker::Localized.sentence(3) }
9
- description { Decidim::Faker::Localized.wrapped("<p>", "</p>") { Decidim::Faker::Localized.sentence(4) } }
8
+ title { generate_localized_title }
9
+ description { Decidim::Faker::Localized.wrapped("<p>", "</p>") { generate_localized_title } }
10
10
  banner_image { Decidim::Dev.test_file("city2.jpeg", "image/jpeg") }
11
11
  organization
12
12
  end
@@ -18,8 +18,8 @@ FactoryBot.define do
18
18
  end
19
19
 
20
20
  factory :initiative, class: Decidim::Initiative do
21
- title { Decidim::Faker::Localized.sentence(3) }
22
- description { Decidim::Faker::Localized.wrapped("<p>", "</p>") { Decidim::Faker::Localized.sentence(4) } }
21
+ title { generate_localized_title }
22
+ description { Decidim::Faker::Localized.wrapped("<p>", "</p>") { generate_localized_title } }
23
23
  organization
24
24
  author { create(:user, :confirmed, organization: organization) }
25
25
  published_at { Time.current }
@@ -4,7 +4,7 @@ module Decidim
4
4
  # This holds the decidim-initiatives version.
5
5
  module Initiatives
6
6
  def self.version
7
- "0.14.4"
7
+ "0.15.0"
8
8
  end
9
9
  end
10
10
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: decidim-initiatives
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.14.4
4
+ version: 0.15.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juan Salvador Perez Garcia
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-10-24 00:00:00.000000000 Z
11
+ date: 2018-11-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: decidim-admin
@@ -16,56 +16,56 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 0.14.4
19
+ version: 0.15.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 0.14.4
26
+ version: 0.15.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: decidim-comments
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: 0.14.4
33
+ version: 0.15.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - '='
39
39
  - !ruby/object:Gem::Version
40
- version: 0.14.4
40
+ version: 0.15.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: decidim-core
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - '='
46
46
  - !ruby/object:Gem::Version
47
- version: 0.14.4
47
+ version: 0.15.0
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - '='
53
53
  - !ruby/object:Gem::Version
54
- version: 0.14.4
54
+ version: 0.15.0
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: decidim-verifications
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - '='
60
60
  - !ruby/object:Gem::Version
61
- version: 0.14.4
61
+ version: 0.15.0
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - '='
67
67
  - !ruby/object:Gem::Version
68
- version: 0.14.4
68
+ version: 0.15.0
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: kaminari
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -114,14 +114,14 @@ dependencies:
114
114
  requirements:
115
115
  - - '='
116
116
  - !ruby/object:Gem::Version
117
- version: 0.14.4
117
+ version: 0.15.0
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
122
  - - '='
123
123
  - !ruby/object:Gem::Version
124
- version: 0.14.4
124
+ version: 0.15.0
125
125
  description: Citizen initiatives plugin for decidim.
126
126
  email:
127
127
  - jsperezg@gmail.com
@@ -135,6 +135,7 @@ files:
135
135
  - app/assets/config/decidim_initiatives_manifest.css
136
136
  - app/assets/config/decidim_initiatives_manifest.js
137
137
  - app/assets/images/decidim/gamification/badges/initiatives.svg
138
+ - app/assets/images/decidim/initiatives/icon.svg
138
139
  - app/assets/javascripts/decidim/initiatives/admin/invite_users.js
139
140
  - app/assets/javascripts/decidim/initiatives/application.js
140
141
  - app/assets/javascripts/decidim/initiatives/identity_selector_dialog.js
@@ -146,8 +147,11 @@ files:
146
147
  - app/assets/stylesheet/decidim/initiatives/print-initiative.css.scss
147
148
  - app/assets/stylesheet/decidim/initiatives/social_share.css.scss
148
149
  - app/assets/stylesheet/decidim/initiatives/statistics.css.scss
150
+ - app/cells/decidim/initiative_activity_cell.rb
149
151
  - app/cells/decidim/initiatives/content_blocks/highlighted_initiatives/show.erb
150
152
  - app/cells/decidim/initiatives/content_blocks/highlighted_initiatives_cell.rb
153
+ - app/cells/decidim/initiatives/content_blocks/highlighted_initiatives_settings_form/show.erb
154
+ - app/cells/decidim/initiatives/content_blocks/highlighted_initiatives_settings_form_cell.rb
151
155
  - app/cells/decidim/initiatives/initiative_cell.rb
152
156
  - app/cells/decidim/initiatives/initiative_m/author.erb
153
157
  - app/cells/decidim/initiatives/initiative_m/footer.erb
@@ -331,6 +335,8 @@ files:
331
335
  - db/migrate/20171204103119_remove_requires_validation_from_decidim_initiatives_type.rb
332
336
  - db/migrate/20171214161410_add_unique_on_votes.rb
333
337
  - db/migrate/20180726071704_rename_signature_time_fields_to_signature_date.rb
338
+ - db/migrate/20181003082010_fix_user_groups_ids_on_initiatives.rb
339
+ - db/migrate/20181016095744_make_initiative_authors_polymorphic.rb
334
340
  - db/seeds/city2.jpeg
335
341
  - lib/decidim/initiatives.rb
336
342
  - lib/decidim/initiatives/admin.rb
@@ -363,7 +369,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
363
369
  version: '0'
364
370
  requirements: []
365
371
  rubyforge_project:
366
- rubygems_version: 2.7.7
372
+ rubygems_version: 2.7.6
367
373
  signing_key:
368
374
  specification_version: 4
369
375
  summary: Decidim initiatives module