decidim-admin 0.2.0 → 0.3.0
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.
Potentially problematic release.
This version of decidim-admin might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/app/assets/javascripts/decidim/admin/application.js.es6 +21 -9
- data/app/assets/javascripts/decidim/admin/sort_list.component.js.es6 +35 -0
- data/app/assets/stylesheets/decidim/admin/extra/_language-chooser.scss +4 -0
- data/app/assets/stylesheets/decidim/admin/extra/_sort.scss +12 -0
- data/app/controllers/decidim/admin/application_controller.rb +1 -0
- data/app/controllers/decidim/admin/participatory_process_attachments_controller.rb +4 -0
- data/app/helpers/decidim/admin/menu_helper.rb +0 -1
- data/app/models/decidim/admin/participatory_process_user_role.rb +2 -2
- data/app/views/decidim/admin/categories/index.html.erb +7 -1
- data/app/views/decidim/admin/exports/_dropdown.html.erb +1 -1
- data/app/views/decidim/admin/moderations/index.html.erb +6 -2
- data/app/views/decidim/admin/participatory_process_steps/index.html.erb +1 -0
- data/app/views/layouts/decidim/admin/_title_bar.html.erb +10 -0
- data/config/locales/ca.yml +3 -1
- data/config/locales/en.yml +3 -1
- data/config/locales/es.yml +3 -1
- data/config/locales/eu.yml +0 -1
- data/config/locales/fi.yml +0 -1
- data/config/locales/fr.yml +0 -1
- data/config/locales/it.yml +490 -0
- data/db/migrate/20161102144648_add_admin_participatory_process_user_roles.rb +5 -3
- data/db/migrate/20170128112958_change_user_groups_verified_to_timestamp.rb +2 -0
- data/lib/decidim/admin/engine.rb +1 -1
- data/lib/decidim/admin/test/manage_attachments_examples.rb +3 -3
- metadata +12 -9
- data/app/assets/javascripts/decidim/admin/sort_steps.js.es6 +0 -30
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e8b37d53f2b47cad57afc6b15797b418bc9633d4
|
4
|
+
data.tar.gz: 100c38043776714dcc7c829685fd6431c835a8ca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c5b491662a61278cf36649966d7c27f5fb8a48401f918de5d1298654aba1fc42e6173ef4e62d26b067be7943e6b9162d7064bdcdb46e60ddb0432b48fc45ccd2
|
7
|
+
data.tar.gz: d80edff9b9c490167d5e91fbaefc34a6a0d2040b22ac0725f7ecab0a466fab2fa23577e1edd8afa85e193136b1592c95ca924ff6c21f5b94f3322aaaef6a58b0
|
@@ -1,12 +1,9 @@
|
|
1
|
-
/* global sortSteps */
|
2
|
-
|
3
1
|
// = require jquery
|
4
2
|
// = require jquery_ujs
|
5
3
|
// = require foundation
|
6
|
-
// = require html.sortable
|
7
|
-
// = require ./sort_steps
|
8
4
|
// = require ./tab_focus
|
9
5
|
// = require ./toggle_nav
|
6
|
+
// = require ./sort_list.component
|
10
7
|
// = require decidim/editor
|
11
8
|
// = require foundation-datepicker
|
12
9
|
// = require form_datepicker
|
@@ -16,17 +13,32 @@
|
|
16
13
|
window.Decidim = window.Decidim || {};
|
17
14
|
|
18
15
|
const pageLoad = () => {
|
16
|
+
const { toggleNav, createSortList } = window.DecidimAdmin;
|
17
|
+
|
19
18
|
$(document).foundation();
|
20
|
-
sortSteps();
|
21
19
|
|
22
|
-
|
23
|
-
|
24
|
-
|
20
|
+
toggleNav();
|
21
|
+
|
22
|
+
createSortList('#steps tbody', {
|
23
|
+
placeholder: $('<tr style="border-style: dashed; border-color: #000"><td colspan="4"> </td></tr>')[0],
|
24
|
+
onSortUpdate: ($children) => {
|
25
|
+
const sortUrl = $('#steps tbody').data('sort-url')
|
26
|
+
const order = $children.map((index, child) => $(child).data('id')).toArray();
|
27
|
+
|
28
|
+
$.ajax({
|
29
|
+
method: 'POST',
|
30
|
+
url: sortUrl,
|
31
|
+
contentType: 'application/json',
|
32
|
+
data: JSON.stringify({ items_ids: order }) }, // eslint-disable-line camelcase
|
33
|
+
);
|
34
|
+
}
|
35
|
+
})
|
25
36
|
};
|
26
37
|
|
27
38
|
$(() => {
|
28
39
|
pageLoad();
|
29
|
-
|
40
|
+
|
41
|
+
if (window.Decidim.formDatePicker) {
|
30
42
|
window.Decidim.formDatePicker();
|
31
43
|
}
|
32
44
|
});
|
@@ -0,0 +1,35 @@
|
|
1
|
+
// = require html.sortable
|
2
|
+
|
3
|
+
((exports) => {
|
4
|
+
|
5
|
+
class SortListComponent {
|
6
|
+
|
7
|
+
/**
|
8
|
+
* Creates a sortable list using hmtl5sortable function.
|
9
|
+
*
|
10
|
+
* @param {String} sortListSelector The list selector that has to be sortable.
|
11
|
+
* @param {Object} options An object containing the same options as html5sortable. It also includes
|
12
|
+
* an extra option `onSortUpdate`, a callback which returns the children collection
|
13
|
+
* whenever the list order has been changed.
|
14
|
+
*
|
15
|
+
* @returns {void} Nothing.
|
16
|
+
*/
|
17
|
+
constructor(sortListSelector, options) {
|
18
|
+
if ($(sortListSelector).length > 0) {
|
19
|
+
exports.sortable(sortListSelector, options)[0].addEventListener('sortupdate', (event) => {
|
20
|
+
const $children = $(event.target).children();
|
21
|
+
|
22
|
+
if (options.onSortUpdate) {
|
23
|
+
options.onSortUpdate($children);
|
24
|
+
}
|
25
|
+
});
|
26
|
+
}
|
27
|
+
}
|
28
|
+
}
|
29
|
+
|
30
|
+
exports.DecidimAdmin = exports.DecidimAdmin || {};
|
31
|
+
exports.DecidimAdmin.SortListComponent = SortListComponent;
|
32
|
+
exports.DecidimAdmin.createSortList = (sortListSelector, options) => {
|
33
|
+
return new SortListComponent(sortListSelector, options);
|
34
|
+
};
|
35
|
+
})(window);
|
@@ -11,6 +11,10 @@ module Decidim
|
|
11
11
|
include Concerns::ParticipatoryProcessAdmin
|
12
12
|
include Concerns::HasAttachments
|
13
13
|
|
14
|
+
def after_destroy_path
|
15
|
+
participatory_process_attachments_path(participatory_process.id)
|
16
|
+
end
|
17
|
+
|
14
18
|
def attached_to
|
15
19
|
participatory_process
|
16
20
|
end
|
@@ -5,8 +5,8 @@ module Decidim
|
|
5
5
|
# Defines a relation between a user and a participatory process, and what
|
6
6
|
# kind of relation does the user has.
|
7
7
|
class ParticipatoryProcessUserRole < ApplicationRecord
|
8
|
-
belongs_to :user, foreign_key: "decidim_user_id", class_name: "Decidim::User"
|
9
|
-
belongs_to :participatory_process, foreign_key: "decidim_participatory_process_id", class_name: "Decidim::ParticipatoryProcess"
|
8
|
+
belongs_to :user, foreign_key: "decidim_user_id", class_name: "Decidim::User", optional: true
|
9
|
+
belongs_to :participatory_process, foreign_key: "decidim_participatory_process_id", class_name: "Decidim::ParticipatoryProcess", optional: true
|
10
10
|
|
11
11
|
ROLES = %w(admin collaborator).freeze
|
12
12
|
validates :role, inclusion: { in: ROLES }, uniqueness: { scope: [:user, :participatory_process] }
|
@@ -30,7 +30,13 @@
|
|
30
30
|
<% end %>
|
31
31
|
|
32
32
|
<% if can? :destroy, category %>
|
33
|
-
|
33
|
+
<% if category.unused? %>
|
34
|
+
<%= icon_link_to "circle-x", participatory_process_category_path(participatory_process, category), t("actions.destroy", scope: "decidim.admin"), class: "action-icon--remove", method: :delete, data: { confirm: t("actions.confirm_destroy", scope: "decidim.admin") } %>
|
35
|
+
<% else %>
|
36
|
+
<span class="action-icon" title="<%= t('.category_used') %>" data-tooltip="true" data-disable-hover="false">
|
37
|
+
<%= icon "circle-x", class: "action-icon action-icon--disabled" %>
|
38
|
+
</span>
|
39
|
+
<% end %>
|
34
40
|
<% end %>
|
35
41
|
</td>
|
36
42
|
</tr>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<
|
1
|
+
<span class="exports dropdown tiny button button--simple" data-toggle="export-dropdown"><%= t "actions.export", scope: "decidim.admin" %></span>
|
2
2
|
<div class="dropdown-pane" id="export-dropdown" data-dropdown data-auto-focus="true" data-close-on-click="true">
|
3
3
|
<ul class="vertical menu add-features">
|
4
4
|
<% feature.manifest.export_manifests.each do |manifest| %>
|
@@ -17,7 +17,7 @@
|
|
17
17
|
<thead>
|
18
18
|
<tr>
|
19
19
|
<th><%= t("models.moderation.fields.reportable", scope: "decidim.moderations") %></th>
|
20
|
-
<th><%= t("models.moderation.fields.
|
20
|
+
<th><%= t("models.moderation.fields.reported_content_url", scope: "decidim.moderations") %></th>
|
21
21
|
<th><%= t("models.moderation.fields.reports", scope: "decidim.moderations") %></th>
|
22
22
|
<th><%= t("models.moderation.fields.report_count", scope: "decidim.moderations") %></th>
|
23
23
|
<% if params[:hidden] %>
|
@@ -33,7 +33,11 @@
|
|
33
33
|
<%= moderation.reportable.class.name.demodulize %>
|
34
34
|
</td>
|
35
35
|
<td>
|
36
|
-
<%=
|
36
|
+
<%=
|
37
|
+
link_to moderation.reportable.reported_content_url, target: "_blank" do
|
38
|
+
(moderation.reportable.reported_content_url + " " + icon("external-link")).html_safe
|
39
|
+
end
|
40
|
+
%>
|
37
41
|
</td>
|
38
42
|
<td>
|
39
43
|
<% reports = moderation.reports.map { |report| render 'report', report: report } %>
|
@@ -8,6 +8,16 @@
|
|
8
8
|
<% end %>
|
9
9
|
<% end %>
|
10
10
|
<div class="user-login">
|
11
|
+
<ul class="dropdown menu language-chooser" data-dropdown-menu>
|
12
|
+
<li class="is-dropdown-submenu-parent">
|
13
|
+
<%= link_to t("name", scope: "locale") %>
|
14
|
+
<ul class="menu is-dropdown-submenu">
|
15
|
+
<% (available_locales - [I18n.locale.to_s]).each do |locale| %>
|
16
|
+
<li><%= link_to locale_name(locale), decidim.locale_path(locale: locale), method: :post%></li>
|
17
|
+
<% end %>
|
18
|
+
</ul>
|
19
|
+
</li>
|
20
|
+
</ul>
|
11
21
|
<ul class="dropdown menu" data-dropdown-menu>
|
12
22
|
<li class="is-dropdown-submenu-parent">
|
13
23
|
<a href="#"><%= current_user.email %></a>
|
data/config/locales/ca.yml
CHANGED
@@ -155,6 +155,8 @@ ca:
|
|
155
155
|
edit:
|
156
156
|
title: Edita categoria
|
157
157
|
update: Actualitzar
|
158
|
+
index:
|
159
|
+
category_used: Aquesta categoria no es pot suprimir perquè és en ús.
|
158
160
|
new:
|
159
161
|
create: Crea una categoria
|
160
162
|
title: Nova categoria
|
@@ -542,7 +544,7 @@ ca:
|
|
542
544
|
hidden_at: Data d'ocultació
|
543
545
|
report_count: Recompte
|
544
546
|
reportable: Tipus
|
545
|
-
|
547
|
+
reported_content_url: URL contingut del contingut reportat
|
546
548
|
reports: Denúncies
|
547
549
|
participatory_processes:
|
548
550
|
participatory_process_groups:
|
data/config/locales/en.yml
CHANGED
@@ -156,6 +156,8 @@ en:
|
|
156
156
|
edit:
|
157
157
|
title: Edit category
|
158
158
|
update: Update
|
159
|
+
index:
|
160
|
+
category_used: This category cannot be removed because it is in use.
|
159
161
|
new:
|
160
162
|
create: Create category
|
161
163
|
title: New category
|
@@ -543,7 +545,7 @@ en:
|
|
543
545
|
hidden_at: Hidden at
|
544
546
|
report_count: Count
|
545
547
|
reportable: Reportable
|
546
|
-
|
548
|
+
reported_content_url: Reported content URL
|
547
549
|
reports: Reports
|
548
550
|
participatory_processes:
|
549
551
|
participatory_process_groups:
|
data/config/locales/es.yml
CHANGED
@@ -155,6 +155,8 @@ es:
|
|
155
155
|
edit:
|
156
156
|
title: Editar categoría
|
157
157
|
update: Actualizar
|
158
|
+
index:
|
159
|
+
category_used: Esta categoría no se puede eliminar porque está en uso.
|
158
160
|
new:
|
159
161
|
create: Crear categoría
|
160
162
|
title: Nueva categoría
|
@@ -542,7 +544,7 @@ es:
|
|
542
544
|
hidden_at: Fecha de ocultación
|
543
545
|
report_count: Recuento
|
544
546
|
reportable: Tipo
|
545
|
-
|
547
|
+
reported_content_url: URL del contenido reportado
|
546
548
|
reports: Denuncias
|
547
549
|
participatory_processes:
|
548
550
|
participatory_process_groups:
|
data/config/locales/eu.yml
CHANGED
data/config/locales/fi.yml
CHANGED
data/config/locales/fr.yml
CHANGED
@@ -0,0 +1,490 @@
|
|
1
|
+
it:
|
2
|
+
actions:
|
3
|
+
confirm_destroy: Conferma eliminazione
|
4
|
+
activemodel:
|
5
|
+
attributes:
|
6
|
+
attachment:
|
7
|
+
description: Descrizione
|
8
|
+
title: Titolo
|
9
|
+
category:
|
10
|
+
description: Descrizione
|
11
|
+
name: Nome
|
12
|
+
parent_id: Su
|
13
|
+
feature:
|
14
|
+
weight: Peso
|
15
|
+
newsletter:
|
16
|
+
body: Testo
|
17
|
+
subject: Oggetto
|
18
|
+
organization:
|
19
|
+
default_locale: Lingua predefinita
|
20
|
+
description: Descrizione
|
21
|
+
favicon: Icona
|
22
|
+
homepage_image: immagine per la Homepage
|
23
|
+
official_img_footer: Logo ufficiale a piè pagina
|
24
|
+
official_img_header: Logo ufficiale per l'intestazione
|
25
|
+
official_url: URL ufficiale dell'organizzazione
|
26
|
+
reference_prefix: Prefisso
|
27
|
+
show_statistics: Mostra statistiche
|
28
|
+
welcome_text: Testo di benvenuto
|
29
|
+
participatory_process:
|
30
|
+
banner_image: Immagine Banner
|
31
|
+
description: Descrizione
|
32
|
+
developer_group: Gruppo di sviluppo
|
33
|
+
domain: Dominio
|
34
|
+
end_date: Data di fine
|
35
|
+
hero_image: Immagine per la Home
|
36
|
+
participatory_process_group_id: Gruppo di processi
|
37
|
+
participatory_structure: Struttura partecipativa
|
38
|
+
promoted: Promosso
|
39
|
+
short_description: Descrizione breve
|
40
|
+
subtitle: Sottotitolo
|
41
|
+
title: Titolo
|
42
|
+
participatory_process_group:
|
43
|
+
description: Descrizione
|
44
|
+
hero_image: Immagine
|
45
|
+
participatory_process_ids: Processi correlati
|
46
|
+
participatory_process_step:
|
47
|
+
description: Descrizione
|
48
|
+
end_date: Data di fine
|
49
|
+
short_description: Descrizione breve
|
50
|
+
start_date: Data di inizio
|
51
|
+
title: Titolo
|
52
|
+
participatory_process_user_role:
|
53
|
+
name: Nome
|
54
|
+
role: Ruolo
|
55
|
+
scope:
|
56
|
+
name: Nome
|
57
|
+
organization: Organizzazione
|
58
|
+
static_page:
|
59
|
+
content: Contenuto
|
60
|
+
organization: Organizzazione
|
61
|
+
title: Titolo
|
62
|
+
errors:
|
63
|
+
messages:
|
64
|
+
invalid_json: Problemi con la trasmissione tramite JSON (JSON non valido)
|
65
|
+
activerecord:
|
66
|
+
attributes:
|
67
|
+
decidim/participatory_process:
|
68
|
+
banner_image: Immagine banner
|
69
|
+
description: Descrizione
|
70
|
+
developer_group: Gruppo di sviluppo
|
71
|
+
domain: Dominio
|
72
|
+
end_date: Data di fine
|
73
|
+
hero_image: Immagine sulla Home Page
|
74
|
+
participatory_scope: Visibilità/ambito partecipativo
|
75
|
+
participatory_structure: Struttura partecipativa
|
76
|
+
promoted: Promossa
|
77
|
+
scope: Visibilità/ambito
|
78
|
+
short_description: Descrizione breve
|
79
|
+
subtitle: Sottotitolo
|
80
|
+
title: Titolo
|
81
|
+
decidim/participatory_process_step:
|
82
|
+
end_date: Data di fine
|
83
|
+
start_date: Date di inizio
|
84
|
+
decidim/static_page:
|
85
|
+
content: Contenuto
|
86
|
+
title: Titolo
|
87
|
+
decidim:
|
88
|
+
admin:
|
89
|
+
actions:
|
90
|
+
activate: Attiva
|
91
|
+
configure: Configura
|
92
|
+
confirm_destroy: Sei sicuro di volerlo cancellare?
|
93
|
+
destroy: Elimina
|
94
|
+
duplicate: Duplica
|
95
|
+
edit: Modifica
|
96
|
+
export: Esporta
|
97
|
+
manage: Gestisci
|
98
|
+
new: Nuovo
|
99
|
+
permissions: Permessi
|
100
|
+
preview: Anteprima
|
101
|
+
publish: Pubblica
|
102
|
+
resend_invitation: Manda di nuovo l'invito
|
103
|
+
unpublish: Non pubblicarlo
|
104
|
+
verify: Verifica
|
105
|
+
attachments:
|
106
|
+
create:
|
107
|
+
error: Si è verificato un errore creando il nuovo allegato.
|
108
|
+
success: Allegato creato con successo.
|
109
|
+
destroy:
|
110
|
+
success: Allegato eliminato con successo.
|
111
|
+
edit:
|
112
|
+
title: Modifica allegato
|
113
|
+
update: Aggiorna
|
114
|
+
form:
|
115
|
+
current_file: File corrente
|
116
|
+
url: URL
|
117
|
+
new:
|
118
|
+
create: Crea allegato
|
119
|
+
title: Nuovo allegato
|
120
|
+
update:
|
121
|
+
error: Si è verificato un errore durante l'aggiornamento di questo allegato.
|
122
|
+
success: Allegato modificato con successo.
|
123
|
+
categories:
|
124
|
+
create:
|
125
|
+
error: Si è verificato un errore durante la creazione di questa categoria.
|
126
|
+
success: OK, la categoria è stata creata.
|
127
|
+
destroy:
|
128
|
+
error: Si è verificato un errore durante la cancellazione di questa categoria. Assicurarsi di aver cancellato prima di tutto le eventuali sotto-categorie, assicurarsi che nessuna altra entità appartengaa questa categoria e provare di nuovo.
|
129
|
+
success: OK, categoria cancellata.
|
130
|
+
edit:
|
131
|
+
title: Modifica categoria
|
132
|
+
update: Aggiorna
|
133
|
+
new:
|
134
|
+
create: Crea nuova categoria
|
135
|
+
title: Nuova categoria
|
136
|
+
update:
|
137
|
+
error: Si è verificato un errore aggiornando questa categoria.
|
138
|
+
success: OK, la categoria è stata aggiornata.
|
139
|
+
dashboard:
|
140
|
+
show:
|
141
|
+
welcome: Benvenuto nel nuovo pannello di amministarzione.
|
142
|
+
decidim:
|
143
|
+
admin:
|
144
|
+
attachments:
|
145
|
+
index:
|
146
|
+
attachments_title: Allegati
|
147
|
+
categories:
|
148
|
+
index:
|
149
|
+
categories_title: Categorie
|
150
|
+
participatory_process_steps:
|
151
|
+
index:
|
152
|
+
steps_title: Fasi
|
153
|
+
participatory_process_user_roles:
|
154
|
+
index:
|
155
|
+
process_admins_title: Utenti del processo partecipativo.
|
156
|
+
exports:
|
157
|
+
export_as: "%{name} esporta come %{export_format}"
|
158
|
+
notice: Export in fase di elaborazione. Riceverai un'email quando l'export sarà terminato.
|
159
|
+
feature_permissions:
|
160
|
+
edit:
|
161
|
+
everyone: Tutti
|
162
|
+
submit: Salva la configurazione dei permessi
|
163
|
+
title: Modifica i permessi
|
164
|
+
update:
|
165
|
+
success: OK, i permessi sono stati aggiornati.
|
166
|
+
features:
|
167
|
+
create:
|
168
|
+
error: Si è verificato un errore durante l'aggiunta di questa funzionalità (feature).
|
169
|
+
success: OK, la feature è stata creata.
|
170
|
+
destroy:
|
171
|
+
error: Si è verificato un errore durante l'eliminazione di questa funzionalità (feature).
|
172
|
+
success: OK, la feature è stata cancellata.
|
173
|
+
edit:
|
174
|
+
title: Modifica feature
|
175
|
+
update: Aggiorna
|
176
|
+
form:
|
177
|
+
global_settings: Impostazioni globali
|
178
|
+
step_settings: Imposta le fasi (Step)
|
179
|
+
index:
|
180
|
+
add: Aggiungi una funzionalità (feature)
|
181
|
+
headers:
|
182
|
+
actions: Azioni
|
183
|
+
name: Nome della funzionalità (feature)
|
184
|
+
type: Tipo di funzionalità (feature)
|
185
|
+
new:
|
186
|
+
add: Aggiungi una funzionalità (feature)
|
187
|
+
title: 'Aggiungi la feature: %{name}'
|
188
|
+
publish:
|
189
|
+
success: OK, la feature è stata pubblicata.
|
190
|
+
title: Funzionalità (features)
|
191
|
+
unpublish:
|
192
|
+
success: OK, questa feature adesso non è più pubblicata.
|
193
|
+
update:
|
194
|
+
error: Si è verificato un errore durante l'aggiornamento di questa funzionalità (feature).
|
195
|
+
success: OK, la funzionalità (feature) è stata aggiornata.
|
196
|
+
menu:
|
197
|
+
admins: Amministratori
|
198
|
+
dashboard: Cruscotto (Dashboard)
|
199
|
+
participatory_process_groups: Gruppo di processi
|
200
|
+
participatory_processes: Processi
|
201
|
+
participatory_processes_submenu:
|
202
|
+
attachments: Allegati
|
203
|
+
categories: Categorie
|
204
|
+
features: Funzionalità (features)
|
205
|
+
info: Informazioni
|
206
|
+
moderations: Moderazioni
|
207
|
+
process_admins: Utenti
|
208
|
+
steps: Fasi (Steps)
|
209
|
+
scopes: Visibilità/ambito (Scopes)
|
210
|
+
settings: Impostazioni
|
211
|
+
static_pages: Pagine
|
212
|
+
user_groups: Gruppi di utenti
|
213
|
+
users: Utenti
|
214
|
+
models:
|
215
|
+
attachment:
|
216
|
+
fields:
|
217
|
+
content_type: Tipo
|
218
|
+
title: Titolo
|
219
|
+
name: Allegato
|
220
|
+
category:
|
221
|
+
name: Categorie
|
222
|
+
newsletter:
|
223
|
+
fields:
|
224
|
+
created_at: Creato il
|
225
|
+
progress: Avanzamento
|
226
|
+
sent_at: Inviato alle
|
227
|
+
subject: Oggetto
|
228
|
+
participatory_process:
|
229
|
+
fields:
|
230
|
+
created_at: Creato il
|
231
|
+
promoted: Evidenziato
|
232
|
+
published: Pubblicato
|
233
|
+
title: Titolo
|
234
|
+
name: Processo partecipativo
|
235
|
+
participatory_process_group:
|
236
|
+
fields:
|
237
|
+
name: Nome
|
238
|
+
name: Gruppo di processi
|
239
|
+
participatory_process_step:
|
240
|
+
fields:
|
241
|
+
end_date: Data di fine
|
242
|
+
start_date: Data di inizio
|
243
|
+
title: Titolo
|
244
|
+
name: Fase del processo partecipativo
|
245
|
+
participatory_process_user_role:
|
246
|
+
fields:
|
247
|
+
name: Nome
|
248
|
+
role: Ruolo
|
249
|
+
name: Utente del processo partecipativo
|
250
|
+
roles:
|
251
|
+
admin: Amministratore
|
252
|
+
collaborator: Collaboratore
|
253
|
+
scope:
|
254
|
+
fields:
|
255
|
+
created_at: Creato il
|
256
|
+
name: Nome
|
257
|
+
static_page:
|
258
|
+
fields:
|
259
|
+
created_at: Creato il
|
260
|
+
title: Titolo
|
261
|
+
user:
|
262
|
+
fields:
|
263
|
+
created_at: Data di creazione
|
264
|
+
invitation_accepted_at: Data dell'invito di accettazione
|
265
|
+
invitation_sent_at: Data di invio dell'invito
|
266
|
+
last_sign_in_at: Data dell'ultimo accesso
|
267
|
+
name: Nome
|
268
|
+
name: Utente
|
269
|
+
user_group:
|
270
|
+
fields:
|
271
|
+
created_at: Creato il
|
272
|
+
document_number: Numero del documento
|
273
|
+
name: Nome
|
274
|
+
phone: Telefono
|
275
|
+
users_count: Conteggio degli utenti
|
276
|
+
moderations:
|
277
|
+
index:
|
278
|
+
title: Moderazione
|
279
|
+
newsletters:
|
280
|
+
create:
|
281
|
+
error: Si è verificato un errore durante la creazione di questa newsletter.
|
282
|
+
success: OK, la Newsletter è stata creata. Adesso è possibile controllarla ed eventualmente inviarla.
|
283
|
+
deliver:
|
284
|
+
error: Si è verificato un errore durante l'invio di questa newsletter.
|
285
|
+
destroy:
|
286
|
+
error_already_sent: 'Non è possibile eliminare questa newsletter: è già stata inviata.'
|
287
|
+
success: OK, la Newsletter è stata eliminata.
|
288
|
+
edit:
|
289
|
+
save_and_preview: Salva e vedi l'anteprima
|
290
|
+
title: Modifica la Newsletter
|
291
|
+
form:
|
292
|
+
interpolations_hint: 'Suggerimento: puoi utilizzare "%{name}" ovunque nel corpo del testo o nell''oggetto e sarà sostituito con il nome del contenitore.'
|
293
|
+
index:
|
294
|
+
confirm_delete: Sei sicuro di voler cancellare questa newsletter?
|
295
|
+
new:
|
296
|
+
save: Salva
|
297
|
+
title: Nuova newsletter
|
298
|
+
show:
|
299
|
+
confirm_deliver: Sei certo di voler inviare questa Newsletter? Questa azione sarà irrevocabile.
|
300
|
+
deliver: Invia la newsletter
|
301
|
+
preview: Anteprima
|
302
|
+
subject: Oggetto
|
303
|
+
update:
|
304
|
+
success: OK, la Newsletter è stata aggiornata. Conviene controllarla prima di inviarla.
|
305
|
+
organization:
|
306
|
+
edit:
|
307
|
+
title: Modifica l'organizzazione
|
308
|
+
update: Modifica
|
309
|
+
form:
|
310
|
+
current_image: immagine corrente
|
311
|
+
update:
|
312
|
+
error: Si è verificato un errore durante la modifica di questa organizzazione.
|
313
|
+
success: OK, l'organizzazione è stata modificata.
|
314
|
+
participatory_process_copies:
|
315
|
+
new:
|
316
|
+
copy: Copia
|
317
|
+
select: Scegli quale quale dato vuoi duplicare
|
318
|
+
title: Duplicazione di un processo partecipativo.
|
319
|
+
participatory_process_groups:
|
320
|
+
edit:
|
321
|
+
title: Aggiorna un gruppo di processi
|
322
|
+
update: Aggiorna
|
323
|
+
new:
|
324
|
+
create: Crea
|
325
|
+
title: Nuovo gruppo di processi
|
326
|
+
update:
|
327
|
+
error: Si è verificato un errore aggiornando questo gruppo di processi partecipativi.
|
328
|
+
success: OK, il gruppo di processi partecipativi è stato modificato.
|
329
|
+
participatory_process_publications:
|
330
|
+
create:
|
331
|
+
error: Si è verificato un errore durante la pubblicazione di questo processo partecipativo.
|
332
|
+
success: OK, il processo partecipativo è stato pubblicato.
|
333
|
+
destroy:
|
334
|
+
error: Si è verificato un errore cercando di togliere dalla pubblicazione questo processo partecipativo.
|
335
|
+
success: OK, il processo partecipativo è stato tolto dalla pubblicazione.
|
336
|
+
participatory_process_step_activations:
|
337
|
+
create:
|
338
|
+
error: Si è verificato un errore cercando di attivare questa fase del processo partecipativo.
|
339
|
+
success: OK, il processo partecipativo è stato attivato.
|
340
|
+
participatory_process_steps:
|
341
|
+
create:
|
342
|
+
error: Si è verificato un errore creando questa nuova fase (step) di processo partecipativo.
|
343
|
+
success: OK, è stato creato il nuovo processo partecipativo.
|
344
|
+
default_title: Introduzione
|
345
|
+
destroy:
|
346
|
+
error:
|
347
|
+
active_step: Non è possibile cancellare questa fase poiché è attiva.
|
348
|
+
last_step: Non è possibile cancellare l'ultima fase di un processo.
|
349
|
+
success: OK, il processo partecipativo è stato eliminato.
|
350
|
+
edit:
|
351
|
+
title: Modifica una fase del processo partecipativo.
|
352
|
+
update: Aggiorna
|
353
|
+
new:
|
354
|
+
create: Crea
|
355
|
+
title: Nuova fase del processo partecipativo.
|
356
|
+
ordering:
|
357
|
+
error: Si è verificato un errore cercando di ri-ordinare le fasi di questo processo partecipativo.
|
358
|
+
update:
|
359
|
+
error: Si è verificato un errore durante l'aggiornamento di questa fase del processo partecipativo.
|
360
|
+
success: OK, questa fase del processo partecipativo è stata aggiornata.
|
361
|
+
participatory_process_user_roles:
|
362
|
+
create:
|
363
|
+
error: Si è verificato un errore cercando di aggiungere un nuovo utente per questo processo partecipativo.
|
364
|
+
success: OK, è stato creato l'utente per questo processo partecipativo.
|
365
|
+
destroy:
|
366
|
+
success: L'utente per questo processo processo partecipativo è stato eliminato.
|
367
|
+
edit:
|
368
|
+
title: Aggiornamento utente di un processo partecipativo.
|
369
|
+
update: Aggiorna
|
370
|
+
new:
|
371
|
+
create: Crea
|
372
|
+
title: Nuovo utente per un processo partecipativo.
|
373
|
+
update:
|
374
|
+
error: Si è verificato un errore durante la fase di aggiornamento per questo processo partecipativo.
|
375
|
+
success: OK, è stato aggiornato l'utente per questo processo partecipativo.
|
376
|
+
participatory_processes:
|
377
|
+
create:
|
378
|
+
error: Si è verificato un errore durante la creazione del processo partecipativo.
|
379
|
+
destroy:
|
380
|
+
success: OK, il processo partecipativo è stato eliminato.
|
381
|
+
edit:
|
382
|
+
update: Aggiorna
|
383
|
+
form:
|
384
|
+
current_image: Immagine corrente
|
385
|
+
title: Informazioni generali
|
386
|
+
url: URL
|
387
|
+
index:
|
388
|
+
not_published: Non pubblicato
|
389
|
+
published: Pubblicato
|
390
|
+
new:
|
391
|
+
create: Crea
|
392
|
+
title: Nuovo processo partecipativo.
|
393
|
+
update:
|
394
|
+
error: Si è verificato un errore durante l'aggiornamento di questo processo partecipativo.
|
395
|
+
success: OK, il processo partecipativo è stato aggiornato.
|
396
|
+
participatory_processes_copies:
|
397
|
+
create:
|
398
|
+
error: Si è verificato un errore cercando di duplicare questo processo partecipativo.
|
399
|
+
success: OK, il processo partecipativo è stato duplicato.
|
400
|
+
participatory_processes_group:
|
401
|
+
create:
|
402
|
+
error: Si è verificato un errore cercando di creare il nuovo gruppo di processi partecipativi.
|
403
|
+
success: OK, il gruppo di processi partecipativi è stato creato.
|
404
|
+
scopes:
|
405
|
+
create:
|
406
|
+
error: Si è verificato un errore creando un nuovo ambito.
|
407
|
+
success: OK, è stato creato il nuovo àmbito.
|
408
|
+
destroy:
|
409
|
+
success: Ok, l'ambito è stato eliminato.
|
410
|
+
edit:
|
411
|
+
title: Modifica l'àmbito
|
412
|
+
update: Aggiorna
|
413
|
+
new:
|
414
|
+
create: Crea un àmbito
|
415
|
+
title: Nuovo ambito
|
416
|
+
update:
|
417
|
+
error: Si è verificato un errore durante l'aggiornamento di questo àmbito.
|
418
|
+
success: OK, l'àmbito è stato aggiornato.
|
419
|
+
static_pages:
|
420
|
+
actions:
|
421
|
+
view: Visualizza la pagina pubblica
|
422
|
+
create:
|
423
|
+
error: Si è verificato un errore creando una nuova pagina.
|
424
|
+
success: OK, la nuova pagina è stata creata.
|
425
|
+
destroy:
|
426
|
+
success: OK, la pagina è stata eliminata.
|
427
|
+
edit:
|
428
|
+
title: Modifica la pagina
|
429
|
+
update: Aggiorna
|
430
|
+
new:
|
431
|
+
create: Nuovo
|
432
|
+
title: Nuova pagina
|
433
|
+
update:
|
434
|
+
error: Si è verificato un errore durante l'aggiornamento di questa pagina.
|
435
|
+
success: OK, la pagina è stata aggiornata.
|
436
|
+
titles:
|
437
|
+
dashboard: Cruscotto (Dashboard)
|
438
|
+
participatory_process_groups: Gruppo di processi partecipativi
|
439
|
+
participatory_processes: Processi partecipativi
|
440
|
+
scopes: Ambiti
|
441
|
+
static_pages: Pagine
|
442
|
+
user_groups: Gruppi di utenti
|
443
|
+
users: Utenti
|
444
|
+
users:
|
445
|
+
create:
|
446
|
+
error: Si è verificato un errore cercando di mandare l'invito a questo utente.
|
447
|
+
success: OK, utente invitato.
|
448
|
+
destroy:
|
449
|
+
error: Si è verificato un errore cercando di eliminare questo utente.
|
450
|
+
success: Questo utente non è più un amministratore.
|
451
|
+
form:
|
452
|
+
name: Nome
|
453
|
+
new:
|
454
|
+
create: Invita
|
455
|
+
title: Invita l'utente in qualità di amministratore
|
456
|
+
resend_invitation:
|
457
|
+
error: Si è verificato C'è stato un errore cercando di mandare l'invito tramite email.
|
458
|
+
success: OK, mandato inviato tramite email
|
459
|
+
moderations:
|
460
|
+
actions:
|
461
|
+
hidden: Nascosto
|
462
|
+
hide: Nascondi
|
463
|
+
not_hidden: Non nascosto
|
464
|
+
title: Azioni
|
465
|
+
unreport: Non inserire
|
466
|
+
admin:
|
467
|
+
reportable:
|
468
|
+
hide:
|
469
|
+
invalid: Si è verificato un problema cercando di nascondere la risorsa.
|
470
|
+
success: OK, la risorsa è stata nascosta.
|
471
|
+
unreport:
|
472
|
+
invalid: Si è verificato un problema cercando di visualizzare la risorsa .
|
473
|
+
success: OK, la risorda è visualizzabile.
|
474
|
+
models:
|
475
|
+
moderation:
|
476
|
+
fields:
|
477
|
+
hidden_at: Nascosto a
|
478
|
+
report_count: Conteggio
|
479
|
+
reportable: Inseribile
|
480
|
+
reports: Report
|
481
|
+
participatory_processes:
|
482
|
+
participatory_process_groups:
|
483
|
+
none: Nessuno
|
484
|
+
layouts:
|
485
|
+
decidim:
|
486
|
+
admin:
|
487
|
+
settings:
|
488
|
+
title: Impostazioni
|
489
|
+
users:
|
490
|
+
title: Utenti
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
class AddAdminParticipatoryProcessUserRoles < ActiveRecord::Migration[5.0]
|
2
4
|
def change
|
3
5
|
create_table :decidim_admin_participatory_process_user_roles do |t|
|
@@ -8,8 +10,8 @@ class AddAdminParticipatoryProcessUserRoles < ActiveRecord::Migration[5.0]
|
|
8
10
|
end
|
9
11
|
|
10
12
|
add_index :decidim_admin_participatory_process_user_roles,
|
11
|
-
|
12
|
-
|
13
|
-
|
13
|
+
[:decidim_participatory_process_id, :decidim_user_id, :role],
|
14
|
+
unique: true,
|
15
|
+
name: "index_unique_user_and_process_role"
|
14
16
|
end
|
15
17
|
end
|
data/lib/decidim/admin/engine.rb
CHANGED
@@ -13,7 +13,7 @@ require "foundation_rails_helper"
|
|
13
13
|
require "autoprefixer-rails"
|
14
14
|
require "rectify"
|
15
15
|
|
16
|
-
require_dependency File.join(
|
16
|
+
require_dependency File.join(__dir__, "..", "..", "..", "app/models/decidim/admin/abilities/admin_user")
|
17
17
|
|
18
18
|
module Decidim
|
19
19
|
module Admin
|
@@ -35,7 +35,7 @@ RSpec.shared_examples "manage attachments examples" do
|
|
35
35
|
within ".new_participatory_process_attachment" do
|
36
36
|
fill_in_i18n(
|
37
37
|
:attachment_title,
|
38
|
-
"#title-tabs",
|
38
|
+
"#attachment-title-tabs",
|
39
39
|
en: "Very Important Document",
|
40
40
|
es: "Documento Muy Importante",
|
41
41
|
ca: "Document Molt Important"
|
@@ -43,7 +43,7 @@ RSpec.shared_examples "manage attachments examples" do
|
|
43
43
|
|
44
44
|
fill_in_i18n(
|
45
45
|
:attachment_description,
|
46
|
-
"#description-tabs",
|
46
|
+
"#attachment-description-tabs",
|
47
47
|
en: "This document contains important information",
|
48
48
|
es: "Este documento contiene información importante",
|
49
49
|
ca: "Aquest document conté informació important"
|
@@ -84,7 +84,7 @@ RSpec.shared_examples "manage attachments examples" do
|
|
84
84
|
within ".edit_participatory_process_attachment" do
|
85
85
|
fill_in_i18n(
|
86
86
|
:attachment_title,
|
87
|
-
"#title-tabs",
|
87
|
+
"#attachment-title-tabs",
|
88
88
|
en: "This is a nice photo",
|
89
89
|
es: "Una foto muy guay",
|
90
90
|
ca: "Aquesta foto és ben xula"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: decidim-admin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Josep Jaume Rey Peroy
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2017-06-
|
13
|
+
date: 2017-06-16 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: decidim-core
|
@@ -18,28 +18,28 @@ dependencies:
|
|
18
18
|
requirements:
|
19
19
|
- - '='
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: 0.
|
21
|
+
version: 0.3.0
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
25
|
requirements:
|
26
26
|
- - '='
|
27
27
|
- !ruby/object:Gem::Version
|
28
|
-
version: 0.
|
28
|
+
version: 0.3.0
|
29
29
|
- !ruby/object:Gem::Dependency
|
30
30
|
name: rails
|
31
31
|
requirement: !ruby/object:Gem::Requirement
|
32
32
|
requirements:
|
33
33
|
- - "~>"
|
34
34
|
- !ruby/object:Gem::Version
|
35
|
-
version: 5.
|
35
|
+
version: 5.1.1
|
36
36
|
type: :runtime
|
37
37
|
prerelease: false
|
38
38
|
version_requirements: !ruby/object:Gem::Requirement
|
39
39
|
requirements:
|
40
40
|
- - "~>"
|
41
41
|
- !ruby/object:Gem::Version
|
42
|
-
version: 5.
|
42
|
+
version: 5.1.1
|
43
43
|
- !ruby/object:Gem::Dependency
|
44
44
|
name: devise
|
45
45
|
requirement: !ruby/object:Gem::Requirement
|
@@ -158,14 +158,14 @@ dependencies:
|
|
158
158
|
requirements:
|
159
159
|
- - '='
|
160
160
|
- !ruby/object:Gem::Version
|
161
|
-
version: 0.
|
161
|
+
version: 0.3.0
|
162
162
|
type: :development
|
163
163
|
prerelease: false
|
164
164
|
version_requirements: !ruby/object:Gem::Requirement
|
165
165
|
requirements:
|
166
166
|
- - '='
|
167
167
|
- !ruby/object:Gem::Version
|
168
|
-
version: 0.
|
168
|
+
version: 0.3.0
|
169
169
|
description: Organization administration to manage a single organization.
|
170
170
|
email:
|
171
171
|
- josepjaume@gmail.com
|
@@ -179,7 +179,7 @@ files:
|
|
179
179
|
- Rakefile
|
180
180
|
- app/assets/config/decidim_admin_manifest.js
|
181
181
|
- app/assets/javascripts/decidim/admin/application.js.es6
|
182
|
-
- app/assets/javascripts/decidim/admin/
|
182
|
+
- app/assets/javascripts/decidim/admin/sort_list.component.js.es6
|
183
183
|
- app/assets/javascripts/decidim/admin/tab_focus.js.es6
|
184
184
|
- app/assets/javascripts/decidim/admin/toggle_nav.js.es6
|
185
185
|
- app/assets/stylesheets/decidim/admin/_decidim.scss
|
@@ -191,8 +191,10 @@ files:
|
|
191
191
|
- app/assets/stylesheets/decidim/admin/extra/_dropdown_inverted.scss
|
192
192
|
- app/assets/stylesheets/decidim/admin/extra/_editor.scss
|
193
193
|
- app/assets/stylesheets/decidim/admin/extra/_email_preview.scss
|
194
|
+
- app/assets/stylesheets/decidim/admin/extra/_language-chooser.scss
|
194
195
|
- app/assets/stylesheets/decidim/admin/extra/_login.scss
|
195
196
|
- app/assets/stylesheets/decidim/admin/extra/_select_multiple.scss
|
197
|
+
- app/assets/stylesheets/decidim/admin/extra/_sort.scss
|
196
198
|
- app/assets/stylesheets/decidim/admin/extra/_title_bar.scss
|
197
199
|
- app/assets/stylesheets/decidim/admin/modules/_action-icon.scss
|
198
200
|
- app/assets/stylesheets/decidim/admin/modules/_buttons.scss
|
@@ -427,6 +429,7 @@ files:
|
|
427
429
|
- config/locales/eu.yml
|
428
430
|
- config/locales/fi.yml
|
429
431
|
- config/locales/fr.yml
|
432
|
+
- config/locales/it.yml
|
430
433
|
- config/locales/nl.yml
|
431
434
|
- config/routes.rb
|
432
435
|
- db/migrate/20161102144648_add_admin_participatory_process_user_roles.rb
|
@@ -1,30 +0,0 @@
|
|
1
|
-
/* eslint-disable camelcase */
|
2
|
-
/* global sortable */
|
3
|
-
|
4
|
-
// Needs a `tbody` element inside a `#steps` section. The `tbody` element
|
5
|
-
// should have a `data-sort-url` attribute with the URL where the data should
|
6
|
-
// be posted to.
|
7
|
-
const sortSteps = () => {
|
8
|
-
const $sortableElement = $('#steps tbody');
|
9
|
-
|
10
|
-
if ($sortableElement.length > 0) {
|
11
|
-
const sortUrl = $sortableElement.data('sort-url');
|
12
|
-
|
13
|
-
sortable('#steps tbody', {
|
14
|
-
placeholder: $('<tr style="border-style: dashed; border-color: #000"><td colspan="4"> </td></tr>')[0]
|
15
|
-
})[0].addEventListener('sortupdate', (event) => {
|
16
|
-
const order = $(event.target).children().
|
17
|
-
map((index, child) => $(child).data('id')).
|
18
|
-
toArray();
|
19
|
-
|
20
|
-
$.ajax({
|
21
|
-
method: 'POST',
|
22
|
-
url: sortUrl,
|
23
|
-
contentType: 'application/json',
|
24
|
-
data: JSON.stringify({ items_ids: order }) },
|
25
|
-
);
|
26
|
-
});
|
27
|
-
}
|
28
|
-
};
|
29
|
-
|
30
|
-
window.sortSteps = sortSteps;
|