decidim-proposals 0.12.2 → 0.13.0.pre1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/cells/decidim/proposals/coauthorships_cell.rb +40 -0
- data/app/cells/decidim/proposals/proposal_m_cell.rb +5 -0
- data/app/commands/decidim/proposals/admin/import_proposals.rb +3 -0
- data/app/commands/decidim/proposals/admin/update_proposal_category.rb +2 -2
- data/app/commands/decidim/proposals/create_proposal.rb +3 -4
- data/app/commands/decidim/proposals/destroy_proposal.rb +1 -1
- data/app/commands/decidim/proposals/publish_proposal.rb +12 -4
- data/app/commands/decidim/proposals/update_proposal.rb +4 -4
- data/app/controllers/decidim/proposals/proposals_controller.rb +1 -2
- data/app/events/decidim/proposals/publish_proposal_event.rb +1 -1
- data/app/forms/decidim/proposals/proposal_form.rb +1 -1
- data/app/helpers/decidim/proposals/application_helper.rb +4 -0
- data/app/helpers/decidim/proposals/proposal_endorsements_helper.rb +16 -10
- data/app/jobs/decidim/proposals/notify_proposals_mentioned_job.rb +2 -2
- data/app/models/decidim/proposals/proposal.rb +19 -2
- data/app/permissions/decidim/proposals/permissions.rb +1 -1
- data/app/presenters/decidim/proposals/proposal_presenter.rb +6 -3
- data/app/services/decidim/proposals/proposal_search.rb +2 -2
- data/app/views/decidim/proposals/admin/proposals/_bulk-actions.html.erb +1 -1
- data/app/views/decidim/proposals/admin/proposals/index.html.erb +1 -1
- data/app/views/decidim/proposals/proposal_endorsements/update_buttons_and_counters.js.erb +1 -1
- data/app/views/decidim/proposals/proposals/_endorsements_card_row.html.erb +1 -1
- data/app/views/decidim/proposals/proposals/_proposal_similar.html.erb +1 -1
- data/app/views/decidim/proposals/proposals/show.html.erb +1 -1
- data/config/locales/ca.yml +6 -6
- data/config/locales/en.yml +6 -6
- data/config/locales/es-PY.yml +6 -6
- data/config/locales/es.yml +6 -6
- data/config/locales/eu.yml +6 -6
- data/config/locales/fi.yml +6 -6
- data/config/locales/fr.yml +76 -76
- data/config/locales/gl.yml +6 -6
- data/config/locales/it.yml +6 -6
- data/config/locales/nl.yml +5 -5
- data/config/locales/pl.yml +6 -6
- data/config/locales/pt-BR.yml +6 -6
- data/config/locales/pt.yml +6 -6
- data/config/locales/ru.yml +1 -2
- data/config/locales/sv.yml +6 -6
- data/config/locales/uk.yml +3 -3
- data/db/migrate/20180529101323_add_counter_cache_coauthorships_to_proposals.rb +8 -0
- data/db/migrate/20180529110230_move_authorships_to_coauthorships.rb +28 -0
- data/db/migrate/20180529110830_remove_authorships_from_proposals.rb +8 -0
- data/lib/decidim/proposals/component.rb +3 -2
- data/lib/decidim/proposals/proposal_serializer.rb +1 -1
- data/lib/decidim/proposals/test/factories.rb +17 -3
- data/lib/decidim/proposals/version.rb +1 -1
- metadata +40 -37
- data/app/views/decidim/proposals/proposals/_endorsements_count.html.erb +0 -5
data/config/locales/gl.yml
CHANGED
@@ -82,8 +82,8 @@ gl:
|
|
82
82
|
endorsements_blocked: Aprobacións bloqueadas
|
83
83
|
endorsements_enabled: Aprobacións habilitadas
|
84
84
|
proposal_answering_enabled: Contestando a proposta habilitada
|
85
|
-
votes_blocked:
|
86
|
-
votes_enabled:
|
85
|
+
votes_blocked: Voto bloqueado
|
86
|
+
votes_enabled: Votación habilitada
|
87
87
|
votes_hidden: Votos ocultos (se os votos están habilitados, a comprobación ocultará o número de votos)
|
88
88
|
events:
|
89
89
|
proposals:
|
@@ -91,7 +91,7 @@ gl:
|
|
91
91
|
email_intro: 'Agora podes crear novas propostas en %{participatory_space_title}. Comezar a participar nesta páxina:'
|
92
92
|
email_outro: Recibiches esta notificación porque estás seguindo %{participatory_space_title}. Podes deixar de recibir notificacións seguindo a ligazón anterior.
|
93
93
|
email_subject: As propostas agora están dispoñibles en %{participatory_space_title}
|
94
|
-
notification_title: Agora podes
|
94
|
+
notification_title: Agora podes presentar <a href="%{resource_path}">novas propostas</a> en <a href="%{participatory_space_url}">%{participatory_space_title}</a>
|
95
95
|
endorsing_enabled:
|
96
96
|
email_intro: 'Podes aprobar propostas en %{participatory_space_title}. Comezar a participar nesta páxina:'
|
97
97
|
email_outro: Recibiches esta notificación porque estás seguindo %{participatory_space_title}. Podes deixar de recibir notificacións seguindo a ligazón anterior.
|
@@ -153,7 +153,7 @@ gl:
|
|
153
153
|
actions:
|
154
154
|
answer: Resposta
|
155
155
|
import: Importar dende outro compoñente
|
156
|
-
new:
|
156
|
+
new: Nova proposta
|
157
157
|
private_notes: Notas privadas
|
158
158
|
title: Accións
|
159
159
|
admin:
|
@@ -238,17 +238,17 @@ gl:
|
|
238
238
|
success: Proposta creada con éxito. Gardado como borrador.
|
239
239
|
destroy_draft:
|
240
240
|
error: Produciuse un erro ao eliminar o borrador da proposta.
|
241
|
-
success: O borrador da proposta
|
241
|
+
success: O borrador da proposta eliminouse con éxito.
|
242
242
|
models:
|
243
243
|
proposal:
|
244
244
|
fields:
|
245
245
|
category: Categoría
|
246
246
|
comments: Comentarios
|
247
|
-
created_at: Creado en
|
248
247
|
endorsements: Aprobacións
|
249
248
|
id: ID
|
250
249
|
notes: Notas
|
251
250
|
official_proposal: Proposta oficial
|
251
|
+
published_at: Publicado en
|
252
252
|
scope: Alcance
|
253
253
|
state: Estado
|
254
254
|
title: Título
|
data/config/locales/it.yml
CHANGED
@@ -82,8 +82,8 @@ it:
|
|
82
82
|
endorsements_blocked: Approvazioni bloccate
|
83
83
|
endorsements_enabled: Approvazioni abilitate
|
84
84
|
proposal_answering_enabled: Risposta alla proposta abilitata
|
85
|
-
votes_blocked:
|
86
|
-
votes_enabled:
|
85
|
+
votes_blocked: Votazione bloccata
|
86
|
+
votes_enabled: Voto abilitato
|
87
87
|
votes_hidden: Voti nascosti (se i voti sono abilitati, controllando questo si nasconderà il numero di voti)
|
88
88
|
events:
|
89
89
|
proposals:
|
@@ -91,7 +91,7 @@ it:
|
|
91
91
|
email_intro: 'Ora puoi creare nuove proposte in %{participatory_space_title}! Inizia a partecipare a questa pagina:'
|
92
92
|
email_outro: Hai ricevuto questa notifica perché stai seguendo %{participatory_space_title}. È possibile interrompere la ricezione di notifiche seguendo il collegamento precedente.
|
93
93
|
email_subject: Proposte ora disponibili in %{participatory_space_title}
|
94
|
-
notification_title: Ora puoi
|
94
|
+
notification_title: Ora puoi proporre <a href="%{resource_path}">nuove proposte</a> in <a href="%{participatory_space_url}">%{participatory_space_title}</a>
|
95
95
|
endorsing_enabled:
|
96
96
|
email_intro: 'Puoi sostenere proposte in %{participatory_space_title}! Inizia a partecipare a questa pagina:'
|
97
97
|
email_outro: Hai ricevuto questa notifica perché stai seguendo %{participatory_space_title}. È possibile interrompere la ricezione di notifiche seguendo il collegamento precedente.
|
@@ -153,7 +153,7 @@ it:
|
|
153
153
|
actions:
|
154
154
|
answer: Risposta
|
155
155
|
import: Importa da un altro componente
|
156
|
-
new:
|
156
|
+
new: Nuova proposta
|
157
157
|
private_notes: Note private
|
158
158
|
title: Azioni
|
159
159
|
admin:
|
@@ -238,17 +238,17 @@ it:
|
|
238
238
|
success: Proposta creata con successo. Salvato come bozza.
|
239
239
|
destroy_draft:
|
240
240
|
error: Si sono verificati errori durante l'eliminazione della bozza della proposta.
|
241
|
-
success: La bozza della proposta è stata
|
241
|
+
success: La bozza della proposta è stata cancellata con successo.
|
242
242
|
models:
|
243
243
|
proposal:
|
244
244
|
fields:
|
245
245
|
category: Categoria
|
246
246
|
comments: Commenti
|
247
|
-
created_at: Creato a
|
248
247
|
endorsements: Riconoscimenti
|
249
248
|
id: ID
|
250
249
|
notes: Gli appunti
|
251
250
|
official_proposal: Proposta ufficiale
|
251
|
+
published_at: Pubblicato a
|
252
252
|
scope: Visibilità
|
253
253
|
state: Stato
|
254
254
|
title: Titolo
|
data/config/locales/nl.yml
CHANGED
@@ -83,7 +83,7 @@ nl:
|
|
83
83
|
endorsements_enabled: "Aanbevelingen toegestaan\n"
|
84
84
|
proposal_answering_enabled: Formeel antwoord op voorstellen toegestaan.
|
85
85
|
votes_blocked: Stemmen geblokkeerd
|
86
|
-
votes_enabled: Stemmen
|
86
|
+
votes_enabled: Stemmen ingeschakeld
|
87
87
|
votes_hidden: Stemmen verborgen (als stemmen is ingeschakeld, zal dit controleren het aantal stemmen verbergen)
|
88
88
|
events:
|
89
89
|
proposals:
|
@@ -91,7 +91,7 @@ nl:
|
|
91
91
|
email_intro: 'Je kan nu nieuwe voorstellen maken in %{participatory_space_title}! Neem deel via deze link:'
|
92
92
|
email_outro: Je hebt deze melding ontvangen omdat je %{participatory_space_title} volgt. Schakel de meldingen uit door te klikken op de voorgaande link.
|
93
93
|
email_subject: Voorstellen nu beschikbaar in %{participatory_space_title}
|
94
|
-
notification_title:
|
94
|
+
notification_title: U kunt nu <a href="%{resource_path}">nieuwe voorstellen</a> in <a href="%{participatory_space_url}">%{participatory_space_title}</a>
|
95
95
|
endorsing_enabled:
|
96
96
|
email_intro: 'Je kan voorstellen in %{participatory_space_title} goedkeuren! Neem deel op deze pagina:'
|
97
97
|
email_outro: Je hebt deze melding ontvangen omdat je %{participatory_space_title}volgt. Je kan de meldingen uitschakelen door te klikken op de voorgaande link.
|
@@ -153,7 +153,7 @@ nl:
|
|
153
153
|
actions:
|
154
154
|
answer: Antwoord
|
155
155
|
import: Importeren vanuit een ander onderdeel
|
156
|
-
new:
|
156
|
+
new: Nieuw voorstel
|
157
157
|
private_notes: Privé-opmerkingen
|
158
158
|
title: Acties
|
159
159
|
admin:
|
@@ -238,17 +238,17 @@ nl:
|
|
238
238
|
success: Voorstel succesvol aangemaakt. Opgeslagen als concept.
|
239
239
|
destroy_draft:
|
240
240
|
error: Er zijn fouten opgetreden bij het verwijderen van het concept.
|
241
|
-
success: Voorstel concept is succesvol
|
241
|
+
success: Voorstel concept is succesvol verwijderd.
|
242
242
|
models:
|
243
243
|
proposal:
|
244
244
|
fields:
|
245
245
|
category: Categorie
|
246
246
|
comments: Reacties
|
247
|
-
created_at: Aangemaakt op
|
248
247
|
endorsements: Endorsements
|
249
248
|
id: ID
|
250
249
|
notes: Opmerkingen
|
251
250
|
official_proposal: Officieel voorstel
|
251
|
+
published_at: Gepubliceerd op
|
252
252
|
scope: Scope
|
253
253
|
state: Staat
|
254
254
|
title: Titel
|
data/config/locales/pl.yml
CHANGED
@@ -90,8 +90,8 @@ pl:
|
|
90
90
|
endorsements_blocked: Zatwierdzenia zostały zablokowane
|
91
91
|
endorsements_enabled: Adnotacje włączone
|
92
92
|
proposal_answering_enabled: Włączono odpowiadanie na propozycję
|
93
|
-
votes_blocked:
|
94
|
-
votes_enabled:
|
93
|
+
votes_blocked: Głosowanie zablokowane
|
94
|
+
votes_enabled: Włączone głosowanie
|
95
95
|
votes_hidden: Głosy są ukryte (jeśli głosy są włączone, zaznaczenie tego ukryje liczbę głosów)
|
96
96
|
events:
|
97
97
|
proposals:
|
@@ -99,7 +99,7 @@ pl:
|
|
99
99
|
email_intro: 'Możesz teraz tworzyć nowe propozycje w %{participatory_space_title}! Zacznij uczestniczyć w tej stronie:'
|
100
100
|
email_outro: Otrzymałeś to powiadomienie, ponieważ obserwujesz %{participatory_space_title}. Możesz przestać otrzymywać powiadomienia po poprzednim linku.
|
101
101
|
email_subject: Propozycje są teraz dostępne w %{participatory_space_title}
|
102
|
-
notification_title: Możesz teraz
|
102
|
+
notification_title: Możesz teraz przesłać <a href="%{resource_path}">nowych propozycji</a> w <a href="%{participatory_space_url}">%{participatory_space_title}</a>
|
103
103
|
endorsing_enabled:
|
104
104
|
email_intro: 'Możesz zgłaszać propozycje w %{participatory_space_title}! Zacznij uczestniczyć w tej stronie:'
|
105
105
|
email_outro: Otrzymałeś to powiadomienie, ponieważ obserwujesz %{participatory_space_title}. Możesz przestać otrzymywać powiadomienia po poprzednim linku.
|
@@ -161,7 +161,7 @@ pl:
|
|
161
161
|
actions:
|
162
162
|
answer: Odpowiedź
|
163
163
|
import: Importuj z innego komponentu
|
164
|
-
new:
|
164
|
+
new: Nowa propozycja
|
165
165
|
private_notes: Prywatne notatki
|
166
166
|
title: działania
|
167
167
|
admin:
|
@@ -246,17 +246,17 @@ pl:
|
|
246
246
|
success: Propozycja została utworzona pomyślnie. Zapisany jako wersja robocza.
|
247
247
|
destroy_draft:
|
248
248
|
error: Wystąpiły błędy podczas usuwania wersji roboczej propozycji.
|
249
|
-
success: Projekt propozycji został pomyślnie
|
249
|
+
success: Projekt propozycji został pomyślnie usunięty.
|
250
250
|
models:
|
251
251
|
proposal:
|
252
252
|
fields:
|
253
253
|
category: Kategoria
|
254
254
|
comments: Komentarze
|
255
|
-
created_at: Utworzono w
|
256
255
|
endorsements: Adnotacje
|
257
256
|
id: ID
|
258
257
|
notes: Uwagi
|
259
258
|
official_proposal: Oficjalny wniosek
|
259
|
+
published_at: Opublikowano na
|
260
260
|
scope: Zakres
|
261
261
|
state: Stan
|
262
262
|
title: Tytuł
|
data/config/locales/pt-BR.yml
CHANGED
@@ -82,8 +82,8 @@ pt-BR:
|
|
82
82
|
endorsements_blocked: Endossos bloqueados
|
83
83
|
endorsements_enabled: Endossos habilitados
|
84
84
|
proposal_answering_enabled: Resposta de proposta ativada
|
85
|
-
votes_blocked:
|
86
|
-
votes_enabled:
|
85
|
+
votes_blocked: Votação bloqueada
|
86
|
+
votes_enabled: Votação habilitada
|
87
87
|
votes_hidden: Votos ocultos (se os votos estiverem ativados, verificar isso esconderá o número de votos)
|
88
88
|
events:
|
89
89
|
proposals:
|
@@ -91,7 +91,7 @@ pt-BR:
|
|
91
91
|
email_intro: 'Agora você pode criar novas propostas em %{participatory_space_title}! Comece a participar nesta página:'
|
92
92
|
email_outro: Você recebeu esta notificação porque está seguindo %{participatory_space_title}. Você pode parar de receber notificações após o link anterior.
|
93
93
|
email_subject: Propostas agora disponíveis em %{participatory_space_title}
|
94
|
-
notification_title: Agora você pode
|
94
|
+
notification_title: Agora você pode apresentar <a href="%{resource_path}">novas propostas</a> em <a href="%{participatory_space_url}">%{participatory_space_title}</a>
|
95
95
|
endorsing_enabled:
|
96
96
|
email_intro: 'Você pode endossar propostas em %{participatory_space_title}! Comece a participar nesta página:'
|
97
97
|
email_outro: Você recebeu esta notificação porque está seguindo %{participatory_space_title}. Você pode parar de receber notificações após o link anterior.
|
@@ -153,7 +153,7 @@ pt-BR:
|
|
153
153
|
actions:
|
154
154
|
answer: Responda
|
155
155
|
import: Importar de outro componente
|
156
|
-
new:
|
156
|
+
new: Nova proposta
|
157
157
|
private_notes: Notas privadas
|
158
158
|
title: Ações
|
159
159
|
admin:
|
@@ -238,17 +238,17 @@ pt-BR:
|
|
238
238
|
success: Proposta criada com sucesso. Salvo como um rascunho.
|
239
239
|
destroy_draft:
|
240
240
|
error: Houve erros ao excluir o rascunho da proposta.
|
241
|
-
success: O rascunho da proposta foi
|
241
|
+
success: O rascunho da proposta foi excluído com sucesso.
|
242
242
|
models:
|
243
243
|
proposal:
|
244
244
|
fields:
|
245
245
|
category: Categoria
|
246
246
|
comments: Comentários
|
247
|
-
created_at: Criado em
|
248
247
|
endorsements: Endossos
|
249
248
|
id: ID
|
250
249
|
notes: Notas
|
251
250
|
official_proposal: Proposta oficial
|
251
|
+
published_at: Publicado em
|
252
252
|
scope: Âmbito
|
253
253
|
state: Estado
|
254
254
|
title: Título
|
data/config/locales/pt.yml
CHANGED
@@ -82,8 +82,8 @@ pt:
|
|
82
82
|
endorsements_blocked: Endossos bloqueados
|
83
83
|
endorsements_enabled: Endossos habilitados
|
84
84
|
proposal_answering_enabled: Resposta de proposta ativada
|
85
|
-
votes_blocked:
|
86
|
-
votes_enabled:
|
85
|
+
votes_blocked: Votação bloqueada
|
86
|
+
votes_enabled: Votação habilitada
|
87
87
|
votes_hidden: Votos ocultos (se os votos estiverem ativados, verificar isso esconderá o número de votos)
|
88
88
|
events:
|
89
89
|
proposals:
|
@@ -91,7 +91,7 @@ pt:
|
|
91
91
|
email_intro: 'Agora você pode criar novas propostas em %{participatory_space_title}! Comece a participar nesta página:'
|
92
92
|
email_outro: Você recebeu esta notificação porque está seguindo %{participatory_space_title}. Você pode parar de receber notificações após o link anterior.
|
93
93
|
email_subject: Propostas agora disponíveis em %{participatory_space_title}
|
94
|
-
notification_title: Agora você pode
|
94
|
+
notification_title: Agora você pode apresentar <a href="%{resource_path}">novas propostas</a> em <a href="%{participatory_space_url}">%{participatory_space_title}</a>
|
95
95
|
endorsing_enabled:
|
96
96
|
email_intro: 'Você pode endossar propostas em %{participatory_space_title}! Comece a participar nesta página:'
|
97
97
|
email_outro: Você recebeu esta notificação porque está seguindo %{participatory_space_title}. Você pode parar de receber notificações após o link anterior.
|
@@ -153,7 +153,7 @@ pt:
|
|
153
153
|
actions:
|
154
154
|
answer: Responda
|
155
155
|
import: Importar de outro componente
|
156
|
-
new:
|
156
|
+
new: Nova proposta
|
157
157
|
private_notes: Notas privadas
|
158
158
|
title: Ações
|
159
159
|
admin:
|
@@ -238,17 +238,17 @@ pt:
|
|
238
238
|
success: Proposta criada com sucesso. Salvo como um rascunho.
|
239
239
|
destroy_draft:
|
240
240
|
error: Houve erros ao excluir o rascunho da proposta.
|
241
|
-
success: O rascunho da proposta foi
|
241
|
+
success: O rascunho da proposta foi excluído com sucesso.
|
242
242
|
models:
|
243
243
|
proposal:
|
244
244
|
fields:
|
245
245
|
category: Categoria
|
246
246
|
comments: Comentários
|
247
|
-
created_at: Criado em
|
248
247
|
endorsements: Endossos
|
249
248
|
id: identidade
|
250
249
|
notes: Notas
|
251
250
|
official_proposal: Proposta oficial
|
251
|
+
published_at: Publicado em
|
252
252
|
scope: Âmbito
|
253
253
|
state: Estado
|
254
254
|
title: Título
|
data/config/locales/ru.yml
CHANGED
@@ -161,7 +161,7 @@ ru:
|
|
161
161
|
actions:
|
162
162
|
answer: Ответить
|
163
163
|
import: Позаимствовать из другой составляющей
|
164
|
-
new:
|
164
|
+
new: Внести новое предложение
|
165
165
|
private_notes: Частные примечания
|
166
166
|
title: Действия
|
167
167
|
admin:
|
@@ -252,7 +252,6 @@ ru:
|
|
252
252
|
fields:
|
253
253
|
category: Разряд
|
254
254
|
comments: Комментарии
|
255
|
-
created_at: 'Создано:'
|
256
255
|
endorsements: Выражения поддержки
|
257
256
|
id: Псевдоним
|
258
257
|
notes: Примечания
|
data/config/locales/sv.yml
CHANGED
@@ -82,8 +82,8 @@ sv:
|
|
82
82
|
endorsements_blocked: Anmärkningar blockerade
|
83
83
|
endorsements_enabled: Anmärkningar aktiverade
|
84
84
|
proposal_answering_enabled: Förslagsvarning aktiverat
|
85
|
-
votes_blocked:
|
86
|
-
votes_enabled:
|
85
|
+
votes_blocked: Röstning blockerad
|
86
|
+
votes_enabled: Röstning aktiverad
|
87
87
|
votes_hidden: Röster dolda (om röster är aktiverade, kommer detta att gömma antalet röster)
|
88
88
|
events:
|
89
89
|
proposals:
|
@@ -91,7 +91,7 @@ sv:
|
|
91
91
|
email_intro: 'Nu kan du skapa nya förslag på %{participatory_space_title}! Börja delta på den här sidan:'
|
92
92
|
email_outro: Du har fått den här meddelandet eftersom du följer %{participatory_space_title}. Du kan sluta ta emot meddelanden efter föregående länk.
|
93
93
|
email_subject: Förslag som nu finns tillgängliga på %{participatory_space_title}
|
94
|
-
notification_title:
|
94
|
+
notification_title: Nu kan du lägga fram <a href="%{resource_path}">nya förslag</a> i <a href="%{participatory_space_url}">%{participatory_space_title}</a>
|
95
95
|
endorsing_enabled:
|
96
96
|
email_intro: 'Du kan godkänna förslag på %{participatory_space_title}! Börja delta på den här sidan:'
|
97
97
|
email_outro: Du har fått den här meddelandet eftersom du följer %{participatory_space_title}. Du kan sluta ta emot meddelanden efter föregående länk.
|
@@ -153,7 +153,7 @@ sv:
|
|
153
153
|
actions:
|
154
154
|
answer: Svara
|
155
155
|
import: Importera från en annan komponent
|
156
|
-
new:
|
156
|
+
new: Nytt förslag
|
157
157
|
private_notes: Privata anteckningar
|
158
158
|
title: Handlingar
|
159
159
|
admin:
|
@@ -238,17 +238,17 @@ sv:
|
|
238
238
|
success: Förslaget skapades framgångsrikt. Sparat som ett formulär.
|
239
239
|
destroy_draft:
|
240
240
|
error: Det har funnits fel att radera förslaget.
|
241
|
-
success: Förslagsförslaget
|
241
|
+
success: Förslagsförslaget har tagits bort.
|
242
242
|
models:
|
243
243
|
proposal:
|
244
244
|
fields:
|
245
245
|
category: Kategori
|
246
246
|
comments: Kommentarer
|
247
|
-
created_at: Skapad vid
|
248
247
|
endorsements: påskrifter
|
249
248
|
id: ID
|
250
249
|
notes: Anteckningar
|
251
250
|
official_proposal: Officiellt förslag
|
251
|
+
published_at: Publicerad på
|
252
252
|
scope: Omfattning
|
253
253
|
state: Status
|
254
254
|
title: Titel
|
data/config/locales/uk.yml
CHANGED
@@ -91,7 +91,7 @@ uk:
|
|
91
91
|
endorsements_enabled: Надання підтримки увімкнено
|
92
92
|
proposal_answering_enabled: Відповіді на пропозиції увімкнено
|
93
93
|
votes_blocked: Голосування вимкнене
|
94
|
-
votes_enabled: Голосування
|
94
|
+
votes_enabled: Голосування ввімкнене
|
95
95
|
votes_hidden: Голоси приховані (якщо голосування увімкнене, то буде сховано кількість голосів)
|
96
96
|
events:
|
97
97
|
proposals:
|
@@ -161,7 +161,7 @@ uk:
|
|
161
161
|
actions:
|
162
162
|
answer: Відповісти
|
163
163
|
import: Запозичити з іншої складової
|
164
|
-
new:
|
164
|
+
new: Додати нову пропозицію
|
165
165
|
private_notes: Приватні примітки
|
166
166
|
title: Дії
|
167
167
|
admin:
|
@@ -252,11 +252,11 @@ uk:
|
|
252
252
|
fields:
|
253
253
|
category: Розряд
|
254
254
|
comments: Коментарі
|
255
|
-
created_at: 'Створено:'
|
256
255
|
endorsements: Прояви підтримки
|
257
256
|
id: Псевдонім
|
258
257
|
notes: Примітки
|
259
258
|
official_proposal: Службова пропозиція
|
259
|
+
published_at: 'Оприлюднено:'
|
260
260
|
scope: Обсяг
|
261
261
|
state: Стан
|
262
262
|
title: Назва
|
@@ -0,0 +1,8 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
class AddCounterCacheCoauthorshipsToProposals < ActiveRecord::Migration[5.1]
|
4
|
+
def change
|
5
|
+
add_column :decidim_proposals_proposals, :coauthorships_count, :integer, null: false, default: 0
|
6
|
+
add_index :decidim_proposals_proposals, :coauthorships_count, name: "idx_decidim_proposals_proposals_on_proposal_coauthorships_count"
|
7
|
+
end
|
8
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
class MoveAuthorshipsToCoauthorships < ActiveRecord::Migration[5.1]
|
4
|
+
class Proposal < ApplicationRecord
|
5
|
+
self.table_name = :decidim_proposals_proposals
|
6
|
+
end
|
7
|
+
class Coauthorship < ApplicationRecord
|
8
|
+
self.table_name = :decidim_coauthorships
|
9
|
+
end
|
10
|
+
|
11
|
+
def change
|
12
|
+
proposals = Proposal.all
|
13
|
+
|
14
|
+
proposals.each do |proposal|
|
15
|
+
author_id = proposal.attributes["decidim_author_id"]
|
16
|
+
user_group_id = proposal.attributes["decidim_user_group_id"]
|
17
|
+
|
18
|
+
next if author_id.nil?
|
19
|
+
|
20
|
+
Coauthorship.create!(
|
21
|
+
coauthorable_id: proposal.id,
|
22
|
+
coauthorable_type: "Decidim::Proposals::Proposal",
|
23
|
+
decidim_author_id: author_id,
|
24
|
+
decidim_user_group_id: user_group_id
|
25
|
+
)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,8 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
class RemoveAuthorshipsFromProposals < ActiveRecord::Migration[5.1]
|
4
|
+
def change
|
5
|
+
remove_column :decidim_proposals_proposals, :decidim_author_id, :integer
|
6
|
+
remove_column :decidim_proposals_proposals, :decidim_user_group_id, :integer
|
7
|
+
end
|
8
|
+
end
|
@@ -11,6 +11,8 @@ Decidim.register_component(:proposals) do |component|
|
|
11
11
|
raise "Can't destroy this component when there are proposals" if Decidim::Proposals::Proposal.where(component: instance).any?
|
12
12
|
end
|
13
13
|
|
14
|
+
component.data_portable_entities = ["Decidim::Proposals::Proposal"]
|
15
|
+
|
14
16
|
component.actions = %w(endorse vote create withdraw)
|
15
17
|
|
16
18
|
component.query_type = "Decidim::Proposals::ProposalsType"
|
@@ -144,13 +146,12 @@ Decidim.register_component(:proposals) do |component|
|
|
144
146
|
scope: Faker::Boolean.boolean(0.5) ? global : scopes.sample,
|
145
147
|
title: Faker::Lorem.sentence(2),
|
146
148
|
body: Faker::Lorem.paragraphs(2).join("\n"),
|
147
|
-
author: author,
|
148
|
-
user_group: user_group,
|
149
149
|
state: state,
|
150
150
|
answer: answer,
|
151
151
|
answered_at: Time.current,
|
152
152
|
published_at: Time.current
|
153
153
|
)
|
154
|
+
proposal.add_coauthor(author, user_group: user_group) if n.even?
|
154
155
|
|
155
156
|
(n % 3).times do |m|
|
156
157
|
email = "vote-author-#{participatory_space.underscored_name}-#{participatory_space.id}-#{n}-#{m}@example.org"
|