decidim-accountability 0.7.4 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (35) hide show
  1. checksums.yaml +5 -5
  2. data/README.md +5 -2
  3. data/app/assets/config/decidim_accountability_manifest.js +1 -0
  4. data/app/assets/javascripts/decidim/accountability/accountability.js.es6 +1 -0
  5. data/app/assets/javascripts/decidim/accountability/version_diff.js.es6 +37 -0
  6. data/app/assets/stylesheets/decidim/accountability/accountability/_versions.scss +8 -0
  7. data/app/commands/decidim/accountability/admin/create_result.rb +3 -1
  8. data/app/commands/decidim/accountability/admin/update_result.rb +3 -1
  9. data/app/controllers/decidim/accountability/results_controller.rb +3 -19
  10. data/app/controllers/decidim/accountability/versions_controller.rb +24 -0
  11. data/app/helpers/decidim/accountability/breadcrumb_helper.rb +27 -0
  12. data/app/models/decidim/accountability/result.rb +1 -0
  13. data/app/models/decidim/accountability/status.rb +1 -1
  14. data/app/services/decidim/accountability/diff_renderer.rb +83 -0
  15. data/app/views/decidim/accountability/results/_show_parent.html.erb +9 -5
  16. data/app/views/decidim/accountability/results/_stats_box.html.erb +46 -27
  17. data/app/views/decidim/accountability/versions/_version.html.erb +20 -0
  18. data/app/views/decidim/accountability/versions/index.html.erb +30 -0
  19. data/app/views/decidim/accountability/versions/show.html.erb +41 -0
  20. data/config/locales/ca.yml +17 -0
  21. data/config/locales/en.yml +17 -0
  22. data/config/locales/es.yml +17 -0
  23. data/config/locales/eu.yml +17 -0
  24. data/config/locales/fi.yml +17 -0
  25. data/config/locales/fr.yml +17 -0
  26. data/config/locales/it.yml +44 -27
  27. data/config/locales/nl.yml +33 -16
  28. data/config/locales/pl.yml +17 -0
  29. data/config/locales/pt.yml +174 -0
  30. data/config/locales/uk.yml +11 -0
  31. data/lib/decidim/accountability/engine.rb +1 -0
  32. data/lib/decidim/accountability/feature.rb +11 -2
  33. data/lib/decidim/accountability/test/factories.rb +7 -4
  34. data/lib/decidim/accountability/version.rb +1 -1
  35. metadata +45 -36
@@ -0,0 +1,30 @@
1
+ <div class="row accountability">
2
+ <div class="small-12 columns">
3
+ <%= render partial: "decidim/accountability/results/nav_breadcrumb", locals: { category: result.parent.try(:category) || result.try(:category) } %>
4
+ </div>
5
+ <div class="small-12 columns">
6
+ <h2 class="heading2"><%= t(".changes_at_title", title: translated_attribute(result.title)) %></h2>
7
+ <h3 class="section-heading"><%= t(".title") %></h3>
8
+ <div class="row">
9
+ <div class="mediumlarge-8 columns">
10
+ <div class="section">
11
+ <div class="card card--list">
12
+ <% result.versions.each_with_index do |version, index| %>
13
+ <%= render partial: "version", locals: { version: version, index: index }%>
14
+ <% end %>
15
+ </div>
16
+ </div>
17
+ </div>
18
+
19
+ <div class="columns section mediumlarge-4 large-3">
20
+ <div class="card extra definition-data">
21
+ <div class="definition-data__item versions_count">
22
+ <span class="definition-data__title"><%= t("results.show.stats.number_of_versions", scope: "decidim.accountability") %></span>
23
+ <%= result.versions.count %>
24
+ <%= link_to t("results.show.stats.back_to_result", scope: "decidim.accountability"), result_path(result), class: "button button--sc hollow secondary small expanded" %>
25
+ </div>
26
+ </div>
27
+ </div>
28
+ </div>
29
+ </div>
30
+ </div>
@@ -0,0 +1,41 @@
1
+ <%= javascript_include_tag "diff.js" %>
2
+ <%= javascript_include_tag "decidim/accountability/accountability" %>
3
+ <div class="row accountability">
4
+ <div class="small-12 columns">
5
+ <%= render partial: "decidim/accountability/results/nav_breadcrumb", locals: { category: result.parent.try(:category) || result.try(:category) } %>
6
+ </div>
7
+ <div class="small-12 columns">
8
+ <h2 class="heading2"><%= t(".changes_at_title", title: translated_attribute(result.title)) %></h2>
9
+ <div class="row">
10
+ <div class="mediumlarge-8 columns">
11
+ <div class="section">
12
+ <% diff_renderer.diff.each_value do |data| %>
13
+ <h3 class="section-heading"><%= data[:label] %></h3>
14
+ <%= render_diff_data(data) %>
15
+ <% end %>
16
+ </div>
17
+ </div>
18
+
19
+ <div class="columns section mediumlarge-4 large-3">
20
+ <div class="card extra definition-data">
21
+ <div class="definition-data__item versions_count">
22
+ <span class="definition-data__title"><%= t("results.show.stats.version_number", scope: "decidim.accountability") %></span>
23
+ <%= t("results.show.stats.version_number_out_of_total", scope: "decidim.accountability", current_version: params[:id], total_count: result.versions_count) %>
24
+ <%= link_to t("results.show.stats.show_all_versions", scope: "decidim.accountability"), result_versions_path(result), class: "button button--sc hollow secondary small expanded" %>
25
+ <%= link_to t("results.show.stats.back_to_result", scope: "decidim.accountability"), result_path(result), class: "button button--sc hollow secondary small expanded" %>
26
+ </div>
27
+ <% if current_version.whodunnit.present? %>
28
+ <div class="definition-data__item last_revision_by">
29
+ <span class="definition-data__title"><%= t("results.show.stats.version_author", scope: "decidim.accountability") %></span>
30
+ <%= render_resource_editor(current_version) %>
31
+ </div>
32
+ <% end %>
33
+ <div class="definition-data__item versions_count">
34
+ <span class="definition-data__title"><%= t("results.show.stats.version_created_at", scope: "decidim.accountability") %></span>
35
+ <%= l current_version.created_at, format: :decidim_short %>
36
+ </div>
37
+ </div>
38
+ </div>
39
+ </div>
40
+ </div>
41
+ </div>
@@ -133,13 +133,30 @@ ca:
133
133
  show:
134
134
  stats:
135
135
  attendees: Assistents
136
+ back_to_result: Torna al resultat
136
137
  comments: Comentaris
137
138
  contributions: Aportacions
139
+ last_edited_by: Editat per última vegada per
140
+ last_updated_at: Darrera actualització el
138
141
  meetings: Trobades
142
+ number_of_versions: Versions
139
143
  proposals: Propostes
144
+ show_all_versions: Mostra totes les versions
145
+ version_author: Autor de la versió
146
+ version_created_at: Versió creada el
147
+ version_number: Número de versió
148
+ version_number_out_of_total: "%{current_version} de %{total_count}"
140
149
  votes: Suports
141
150
  timeline:
142
151
  title: Evolució del projecte
152
+ versions:
153
+ index:
154
+ changes_at_title: Canvis a "%{title}"
155
+ title: Versions
156
+ show:
157
+ changes_at_title: Canvis a "%{title}"
158
+ version:
159
+ version_index: Versió %{index}
143
160
  features:
144
161
  accountability:
145
162
  name: Seguiment
@@ -133,13 +133,30 @@ en:
133
133
  show:
134
134
  stats:
135
135
  attendees: Attendees
136
+ back_to_result: Go back to result
136
137
  comments: Comments
137
138
  contributions: Contributions
139
+ last_edited_by: Last edited by
140
+ last_updated_at: Last updated at
138
141
  meetings: Meetings
142
+ number_of_versions: Versions
139
143
  proposals: Proposals
144
+ show_all_versions: Show all versions
145
+ version_author: Version author
146
+ version_created_at: Version created at
147
+ version_number: Version number
148
+ version_number_out_of_total: "%{current_version} out of %{total_count}"
140
149
  votes: Supports
141
150
  timeline:
142
151
  title: Project evolution
152
+ versions:
153
+ index:
154
+ changes_at_title: Changes at "%{title}"
155
+ title: Versions
156
+ show:
157
+ changes_at_title: Changes at "%{title}"
158
+ version:
159
+ version_index: Version %{index}
143
160
  features:
144
161
  accountability:
145
162
  name: Accountability
@@ -133,13 +133,30 @@ es:
133
133
  show:
134
134
  stats:
135
135
  attendees: Asistentes
136
+ back_to_result: Volver al resultado
136
137
  comments: Comentarios
137
138
  contributions: Aportes
139
+ last_edited_by: Última edición por
140
+ last_updated_at: Última actualización en
138
141
  meetings: Lista de encuentros
142
+ number_of_versions: Versiones
139
143
  proposals: Propuestas
144
+ show_all_versions: Mostrar todas las versiones
145
+ version_author: Autor de la versión
146
+ version_created_at: Versión creada en
147
+ version_number: Número de versión
148
+ version_number_out_of_total: "%{current_version} de %{total_count}"
140
149
  votes: Soportes
141
150
  timeline:
142
151
  title: Evolución del proyecto
152
+ versions:
153
+ index:
154
+ changes_at_title: Cambios en "%{title}"
155
+ title: Versiones
156
+ show:
157
+ changes_at_title: Cambios en "%{title}"
158
+ version:
159
+ version_index: Versión %{index}
143
160
  features:
144
161
  accountability:
145
162
  name: Seguimiento
@@ -132,13 +132,30 @@ eu:
132
132
  show:
133
133
  stats:
134
134
  attendees: Bertaratuak
135
+ back_to_result: Joan emaitza batera
135
136
  comments: Iruzkinak
136
137
  contributions: Ekarpenak
138
+ last_edited_by: Azkenean editatua
139
+ last_updated_at: Azkenekoz eguneratuta
137
140
  meetings: Topaketa-zerrenda
141
+ number_of_versions: bertsioak
138
142
  proposals: Proposamenak
143
+ show_all_versions: Erakutsi bertsio guztiak
144
+ version_author: Egile-bertsioa
145
+ version_created_at: Bertsioa sortua
146
+ version_number: Bertsio zenbakia
147
+ version_number_out_of_total: "%{current_version} %{total_count}tik kanpo"
139
148
  votes: Sostenguak
140
149
  timeline:
141
150
  title: Proiektuen bilakaera
151
+ versions:
152
+ index:
153
+ changes_at_title: Aldaketak "%{title}" atalean
154
+ title: bertsioak
155
+ show:
156
+ changes_at_title: Aldaketak "%{title}" atalean
157
+ version:
158
+ version_index: '%{index} bertsioa'
142
159
  features:
143
160
  accountability:
144
161
  name: Emaitzak
@@ -132,13 +132,30 @@ fi:
132
132
  show:
133
133
  stats:
134
134
  attendees: Osallistujat
135
+ back_to_result: Palaa tulokseen
135
136
  comments: Kommentit
136
137
  contributions: Kontribuutiot
138
+ last_edited_by: Viimeksi muokannut
139
+ last_updated_at: Päivitetty viimeksi
137
140
  meetings: Tapaamiset
141
+ number_of_versions: versiot
138
142
  proposals: Ehdotukset
143
+ show_all_versions: Näytä kaikki versiot
144
+ version_author: Versio kirjoittaja
145
+ version_created_at: Versio luotu osoitteessa
146
+ version_number: Versiomäärä
147
+ version_number_out_of_total: "%{current_version} / %{total_count}"
139
148
  votes: Kannatukset
140
149
  timeline:
141
150
  title: Projektin kehitys
151
+ versions:
152
+ index:
153
+ changes_at_title: Muutokset osoitteessa "%{title}"
154
+ title: versiot
155
+ show:
156
+ changes_at_title: Muutokset osoitteessa "%{title}"
157
+ version:
158
+ version_index: Versio %{index}
142
159
  features:
143
160
  accountability:
144
161
  name: Tulokset
@@ -132,13 +132,30 @@ fr:
132
132
  show:
133
133
  stats:
134
134
  attendees: Participants
135
+ back_to_result: Retour aux résultats
135
136
  comments: Commentaires
136
137
  contributions: Contributions
138
+ last_edited_by: Dernière édition par
139
+ last_updated_at: Dernière mise à jour à
137
140
  meetings: Réunions
141
+ number_of_versions: Versions
138
142
  proposals: Propositions
143
+ show_all_versions: Afficher toutes les versions
144
+ version_author: Auteur de la version
145
+ version_created_at: Version créée à
146
+ version_number: Numéro de version
147
+ version_number_out_of_total: "%{current_version} sur %{total_count}"
139
148
  votes: Soutiens
140
149
  timeline:
141
150
  title: Evolution du projet
151
+ versions:
152
+ index:
153
+ changes_at_title: Changements à "%{title}"
154
+ title: Versions
155
+ show:
156
+ changes_at_title: Changements à "%{title}"
157
+ version:
158
+ version_index: Version %{index}
142
159
  features:
143
160
  accountability:
144
161
  name: Responsabilité
@@ -4,10 +4,10 @@ it:
4
4
  result:
5
5
  decidim_accountability_status_id: stato
6
6
  decidim_category_id: Categoria
7
- decidim_scope_id: Objetivos
7
+ decidim_scope_id: Scopi
8
8
  description: Descrizione
9
- end_date: Data di fine
10
- progress: Avanzamento
9
+ end_date: Data finale
10
+ progress: Progresso
11
11
  proposal_ids: Proposte incluse
12
12
  start_date: Date di inizio
13
13
  title: Nome
@@ -15,7 +15,7 @@ it:
15
15
  description: Descrizione
16
16
  key: Chiave
17
17
  name: Nome
18
- progress: Avanzamento
18
+ progress: Progresso
19
19
  timeline_entry:
20
20
  description: Descrizione
21
21
  entry_date: Data
@@ -42,65 +42,65 @@ it:
42
42
  results:
43
43
  create:
44
44
  invalid: C'è stato un problema durante la creazione di questo risultato
45
- success: OK, il risultato è stato creato
45
+ success: Risultato creato con successo
46
46
  destroy:
47
- success: Il risultato è stato cancellato
47
+ success: Risultato eliminato con successo
48
48
  edit:
49
- title: Modifica il risultato (Ambito)
49
+ title: Modifica il risultato
50
50
  update: Aggiorna il risultato
51
51
  index:
52
52
  title: Risultati
53
53
  new:
54
- create: Crea il risultato
54
+ create: Crea un risultato
55
55
  title: Nuovo risultato
56
56
  update:
57
57
  invalid: C'è stato un problema durante l'aggiornamento di questo risultato
58
- success: OK, il risultato è stato modificato
58
+ success: Risultato modificato con successo
59
59
  shared:
60
60
  subnav:
61
- statuses: Gli stati
61
+ statuses: Status
62
62
  statuses:
63
63
  create:
64
- invalid: È stato un problema che crea questo stato
64
+ invalid: C'è stato un problema nella creazione di questo stato
65
65
  success: Stato creato con successo
66
66
  destroy:
67
67
  success: Stato eliminato con successo
68
68
  edit:
69
69
  title: Modifica lo stato
70
- update: Aggiorna stato
70
+ update: Aggiorna lo stato
71
71
  index:
72
- title: Gli stati
72
+ title: Status
73
73
  new:
74
- create: Crea stato
74
+ create: Crea uno stato
75
75
  title: Nuovo stato
76
76
  update:
77
- invalid: È stato un problema che aggiorna questo stato
77
+ invalid: C'è stato un problema nel aggiornamento di questo stato
78
78
  success: Stato aggiornato con successo
79
79
  timeline_entries:
80
80
  create:
81
- invalid: C'è stato un problema creando questa voce
82
- success: Entrata creata con successo
81
+ invalid: C'è stato un problema nella creazione di questa voce
82
+ success: Voce creata con successo
83
83
  destroy:
84
- success: L'iscrizione è stata eliminata correttamente
84
+ success: La voce è stata eliminata correttamente
85
85
  edit:
86
- title: Modifica voce
86
+ title: Modifica la voce
87
87
  update: Aggiorna la voce
88
88
  index:
89
- title: Inserimento di timeline di progetto
89
+ title: Voci della cronologia del progetto
90
90
  new:
91
- create: Crea voce
92
- title: Nuovo arrivato
91
+ create: Crea una voce
92
+ title: Nuova voce
93
93
  update:
94
- invalid: È stato un problema che aggiorna questa voce
95
- success: Entrata aggiornata con successo
94
+ invalid: C'è stato un problema nel aggiornamento di questa voce
95
+ success: Voce aggiornata con successo
96
96
  models:
97
97
  result:
98
98
  fields:
99
- end_date: Data di fine
99
+ end_date: Data finale
100
100
  progress: Avanzamento
101
- start_date: Date di inizio
101
+ start_date: Data di inizio
102
102
  status: Stato
103
- title: Nome
103
+ title: Titolo
104
104
  status:
105
105
  fields:
106
106
  description: Descrizione
@@ -132,13 +132,30 @@ it:
132
132
  show:
133
133
  stats:
134
134
  attendees: Partecipanti
135
+ back_to_result: Torna al risultato
135
136
  comments: Commenti
136
137
  contributions: Contributi
138
+ last_edited_by: Ultima modifica di
139
+ last_updated_at: Ultimo aggiornamento alle
137
140
  meetings: Riunioni
141
+ number_of_versions: versioni
138
142
  proposals: Proposte
143
+ show_all_versions: Mostra tutte le versioni
144
+ version_author: Autore della versione
145
+ version_created_at: Versione creata a
146
+ version_number: Numero della versione
147
+ version_number_out_of_total: "%{current_version} su %{total_count}"
139
148
  votes: Voti
140
149
  timeline:
141
150
  title: Evoluzione del progetto
151
+ versions:
152
+ index:
153
+ changes_at_title: Modifiche a "%{title}"
154
+ title: versioni
155
+ show:
156
+ changes_at_title: Modifiche a "%{title}"
157
+ version:
158
+ version_index: Versione %{index}
142
159
  features:
143
160
  accountability:
144
161
  name: Responsabilità
@@ -2,13 +2,13 @@ nl:
2
2
  activemodel:
3
3
  attributes:
4
4
  result:
5
- decidim_accountability_status_id: staat
5
+ decidim_accountability_status_id: status
6
6
  decidim_category_id: Categorie
7
- decidim_scope_id: Reikwijdte
7
+ decidim_scope_id: Scope
8
8
  description: Beschrijving
9
9
  end_date: Einddatum
10
10
  progress: Vooruitgang
11
- proposal_ids: Inclusief voorstellen
11
+ proposal_ids: Opgenomen voorstellen
12
12
  start_date: Begin datum
13
13
  title: Titel
14
14
  status:
@@ -36,9 +36,9 @@ nl:
36
36
  result:
37
37
  name: Resultaat
38
38
  status:
39
- name: staat
39
+ name: Status
40
40
  timeline_entry:
41
- name: Tijdlijn invoer
41
+ name: Tijdlijn gebeurtenis
42
42
  results:
43
43
  create:
44
44
  invalid: Er is een probleem opgetreden bij het maken van dit resultaat
@@ -58,7 +58,7 @@ nl:
58
58
  success: Resultaat met succes bijgewerkt
59
59
  shared:
60
60
  subnav:
61
- statuses: statussen
61
+ statuses: Statussen
62
62
  statuses:
63
63
  create:
64
64
  invalid: Er is een probleem opgetreden bij het maken van deze status
@@ -69,12 +69,12 @@ nl:
69
69
  title: Bewerk status
70
70
  update: Status bijwerken
71
71
  index:
72
- title: statussen
72
+ title: Statussen
73
73
  new:
74
74
  create: Maak een status
75
75
  title: Nieuwe status
76
76
  update:
77
- invalid: Er is een probleem opgedaan bij het updaten van deze status
77
+ invalid: Er is een probleem opgetreden bij het maken van deze status
78
78
  success: Status succesvol bijgewerkt
79
79
  timeline_entries:
80
80
  create:
@@ -88,23 +88,23 @@ nl:
88
88
  index:
89
89
  title: Project tijdlijn inzendingen
90
90
  new:
91
- create: Maak een entry
92
- title: Nieuwe invoer
91
+ create: Item maken
92
+ title: Nieuw item
93
93
  update:
94
94
  invalid: Er is een probleem opgetreden met het bijwerken van dit item
95
- success: Invoer succesvol bijgewerkt
95
+ success: Item succesvol bijgewerkt
96
96
  models:
97
97
  result:
98
98
  fields:
99
99
  end_date: Einddatum
100
100
  progress: Vooruitgang
101
101
  start_date: Begin datum
102
- status: staat
102
+ status: Status
103
103
  title: Titel
104
104
  status:
105
105
  fields:
106
106
  description: Beschrijving
107
- key: sleutel
107
+ key: Sleutel
108
108
  name: Naam
109
109
  progress: Vooruitgang
110
110
  timeline_entry:
@@ -132,13 +132,30 @@ nl:
132
132
  show:
133
133
  stats:
134
134
  attendees: Deelnemers
135
- comments: Comments
136
- contributions: bijdragen
135
+ back_to_result: Ga terug naar resultaat
136
+ comments: Reacties
137
+ contributions: Bijdrage
138
+ last_edited_by: Laatst bewerkt door
139
+ last_updated_at: Laatst bijgewerkt om
137
140
  meetings: Vergaderingen
141
+ number_of_versions: versies
138
142
  proposals: Voorstellen
139
- votes: steunen
143
+ show_all_versions: Toon alle versies
144
+ version_author: Versie auteur
145
+ version_created_at: Versie gemaakt om
146
+ version_number: Versienummer
147
+ version_number_out_of_total: "%{current_version} van %{total_count}"
148
+ votes: Ondersteunt
140
149
  timeline:
141
150
  title: Project evolutie
151
+ versions:
152
+ index:
153
+ changes_at_title: Veranderingen bij "%{title}"
154
+ title: versies
155
+ show:
156
+ changes_at_title: Veranderingen bij "%{title}"
157
+ version:
158
+ version_index: Versie %{index}
142
159
  features:
143
160
  accountability:
144
161
  name: Verantwoording