decidim-decidim_awesome 0.9.1 → 0.9.3

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

Potentially problematic release.


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

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9ada19fbdb65b2b209a2b65791d392684413373d0ab9c5ed82d01c68c5e632e2
4
- data.tar.gz: 1f255d53965277523841e002fe45bdf524f5b055bf8ff94f9df0b1f5aaf7e907
3
+ metadata.gz: fc4186635bb63b150df6c031e3ef9337fcfb71ce7057eddf5a990564ca1cd065
4
+ data.tar.gz: c9eaffa1131d1cd81ddb14b45e35928d76901a89e6c5141b3bb03ebb5acac244
5
5
  SHA512:
6
- metadata.gz: 58a26aa8f0b5da17b1628fcc22ad23a452389ddc53376401220d007a2eb2f2f7a13a3801235d9596c10f64fd3853df69ebe5f7777585daf305faf0ebb1573dd6
7
- data.tar.gz: bf9a64bb47fcda049f8ed317aa5c0658977a7b38e1d937054c80e41dff0f2daef3b58920468c0e0f569fc97eacca3075689c694f45f0bec9039485c0dfd89ec0
6
+ metadata.gz: 4c42aced89189c8f99c5ad6370ba1f490e0ec77ce9df796d007754f2f45bc9e3fbba0583ef2db6a4e1d63127d1d299123a69f1ac6fa23b8a3e5c7a65e20d706b
7
+ data.tar.gz: 51cefc6f281d1006ac905ac0fcd3e8c5461caa47403d815077d7fe9cb42e5df213f60a9998de4528c1b2caca47e87878f313752452c739a8186b75b8ed3cece5
data/CHANGELOG.md CHANGED
@@ -1,6 +1,26 @@
1
1
  CHANGELOG
2
2
  =========
3
3
 
4
+ v0.9.3
5
+ ------
6
+
7
+ Compatibility:
8
+ - Decidim v0.27.3
9
+ - Decidim v0.26.7
10
+
11
+ Features:
12
+ - Fixes for admin accountability leaking other tenants data
13
+
14
+ v0.9.2
15
+ ------
16
+
17
+ Compatibility:
18
+ - Decidim v0.27.3
19
+ - Decidim v0.26.7
20
+
21
+ Features:
22
+ - Fixes for the menu hacker
23
+
4
24
  v0.9.1
5
25
  ------
6
26
 
data/README.md CHANGED
@@ -209,6 +209,7 @@ Depending on your Decidim version, choose the corresponding Awesome version to e
209
209
 
210
210
  | Awesome version | Compatible Decidim versions |
211
211
  |---|---|
212
+ | 0.9.2 | >= 0.26.7, >= 0.27.3 |
212
213
  | 0.9.x | 0.26.x, 0.27.x |
213
214
  | 0.8.x | 0.25.x, 0.26.x |
214
215
  | 0.7.x | 0.23.x, 0.24.x |
@@ -7,7 +7,7 @@ module Decidim
7
7
  include NeedsAwesomeConfig
8
8
  include Decidim::DecidimAwesome::AdminAccountability::Admin::Filterable
9
9
 
10
- helper_method :admin_actions, :collection, :export_params, :global?
10
+ helper_method :admin_actions, :collection, :export_params, :global?, :global_users_missing_date
11
11
 
12
12
  layout "decidim/admin/users"
13
13
 
@@ -35,7 +35,15 @@ module Decidim
35
35
  end
36
36
 
37
37
  def collection
38
- @collection ||= paginate(global? ? PaperTrailVersion.admin_role_actions(params[:admin_role_type]) : PaperTrailVersion.space_role_actions)
38
+ @collection = global? ? paginate(admin_role_actions) : paginate(space_role_actions)
39
+ end
40
+
41
+ def space_role_actions
42
+ @space_role_actions ||= Decidim::DecidimAwesome::PaperTrailVersion.space_role_actions(current_organization)
43
+ end
44
+
45
+ def admin_role_actions
46
+ @admin_role_actions ||= Decidim::DecidimAwesome::PaperTrailVersion.in_organization(current_organization).admin_role_actions(params[:admin_role_type])
39
47
  end
40
48
 
41
49
  def export_params
@@ -45,6 +53,19 @@ module Decidim
45
53
  def global?
46
54
  params[:admins] == "true"
47
55
  end
56
+
57
+ # User traceability was introduced in version 0.24. Users created before that might appear in the list.
58
+ # Returns the first traceability record available if there are users created before.
59
+ # Returns nil otherwise
60
+ def global_users_missing_date
61
+ return unless global?
62
+
63
+ @global_users_missing_date ||= begin
64
+ first_version = Decidim::DecidimAwesome::PaperTrailVersion.where(item_type: "Decidim::UserBaseEntity").last
65
+ first_user = Decidim::User.first
66
+ first_version.created_at if first_user && first_version && (first_version.created_at > first_user.created_at + 1.second)
67
+ end
68
+ end
48
69
  end
49
70
  end
50
71
  end
@@ -3,13 +3,27 @@
3
3
  module Decidim
4
4
  module DecidimAwesome
5
5
  class PaperTrailVersion < PaperTrail::Version
6
- default_scope { order("created_at DESC") }
6
+ default_scope { order("versions.created_at DESC") }
7
7
 
8
8
  def self.safe_user_roles
9
9
  DecidimAwesome.participatory_space_roles.filter(&:safe_constantize)
10
10
  end
11
11
 
12
- scope :space_role_actions, -> { where(item_type: PaperTrailVersion.safe_user_roles, event: "create") }
12
+ scope :space_role_actions, lambda { |organization|
13
+ role_changes = where(item_type: PaperTrailVersion.safe_user_roles, event: "create")
14
+ user_ids_from_object_changes = role_changes.pluck(:object_changes).map { |change| change.match(/decidim_user_id:\n- ?\n- (\d+)/)[1].to_i }
15
+ relevant_user_ids = Decidim::User.select(:id).where(id: user_ids_from_object_changes, organization: organization).pluck(:id)
16
+ # add users that might have been completly destroyed in any organization
17
+ relevant_user_ids += user_ids_from_object_changes - Decidim::User.select("id").where(id: user_ids_from_object_changes).pluck(:id)
18
+
19
+ role_changes.where("object_changes ~ ANY (array[?])", relevant_user_ids.map { |id| "decidim_user_id:\n- ?\n- #{id}" })
20
+ }
21
+
22
+ scope :in_organization, lambda { |organization|
23
+ joins("LEFT JOIN decidim_users ON decidim_users.id = item_id")
24
+ .where("item_type = 'Decidim::UserBaseEntity' AND decidim_users.decidim_organization_id = ?", organization.id)
25
+ .order("versions.created_at DESC")
26
+ }
13
27
 
14
28
  def self.admin_role_actions(filter = nil)
15
29
  base = where(item_type: "Decidim::UserBaseEntity", event: %w(create update))
@@ -92,7 +106,7 @@ module Decidim
92
106
  end
93
107
 
94
108
  ransacker :created_at, type: :date do
95
- Arel.sql("date(created_at)")
109
+ Arel.sql("date(versions.created_at)")
96
110
  end
97
111
  end
98
112
  end
@@ -22,15 +22,32 @@ export default class Controller {
22
22
  }
23
23
 
24
24
  setFetcher(Fetcher) {
25
+ let checkProposalState = function (node, map) {
26
+ const showConfig = map.config.show;
27
+ const { withdrawn, accepted, evaluating, notAnswered, rejected } = showConfig;
28
+
29
+ return withdrawn && node.state === "withdrawn" ||
30
+ accepted && node.state === "accepted" ||
31
+ evaluating && node.state === "evaluating" ||
32
+ notAnswered && node.state === "notAnswered" ||
33
+ rejected && node.state === "rejected";
34
+ }
35
+
25
36
  this.fetcher = new Fetcher(this);
26
37
  this.fetcher.onFinished = () => {
27
38
  // console.log(`all ${this.component.type} loaded`, this)
28
39
  this._onFinished();
29
40
  };
30
41
  this.fetcher.onCollection = (collection) => {
31
- if (collection && collection.edges) {
42
+ if (collection && collection.edges) {
32
43
  // Add markers to the main cluster group
33
- const collectionEdges = collection.edges.filter((item) => item.node.coordinates && item.node.coordinates.latitude && item.node.coordinates.longitude);
44
+ let collectionEdges = [];
45
+ if (this.fetcher.collection === "meetings") {
46
+ collectionEdges = collection.edges.filter((item) => item.node.coordinates && item.node.coordinates.latitude && item.node.coordinates.longitude);
47
+ } else {
48
+ collectionEdges = collection.edges.filter((item) => item.node.coordinates && item.node.coordinates.latitude && item.node.coordinates.longitude && checkProposalState(item.node, this.awesomeMap));
49
+ }
50
+
34
51
  try {
35
52
  this.awesomeMap.cluster.addLayers(collectionEdges.map((item) => item.node.marker));
36
53
  } catch (evt) {
@@ -58,7 +75,7 @@ export default class Controller {
58
75
 
59
76
  addMarker(marker, node) {
60
77
 
61
- /*
78
+ /*
62
79
  theorically, this should be enough to create popups on markers but it looks that
63
80
  there is some bug in leaflet that sometimes prevents this to work
64
81
  */
@@ -101,7 +118,7 @@ export default class Controller {
101
118
  } catch (evt) {
102
119
  console.error("Failed category marker assignation", marker, evt.message);
103
120
  }
104
- }
121
+ }
105
122
  }
106
123
 
107
124
  addMarkerHashtags(marker, hashtags) {
@@ -22,6 +22,11 @@
22
22
 
23
23
  <div class="card-section">
24
24
  <p class="help-text"><%= t(global? ? ".global_description" : ".description") %></p>
25
+
26
+ <% if global_users_missing_date %>
27
+ <div class="callout warning"><%= t(".missing_users", date: l(global_users_missing_date, format: :decidim_short)) %></div>
28
+ <% end %>
29
+
25
30
  <div class="table-scroll">
26
31
  <table class="table-list">
27
32
  <thead>
@@ -50,7 +50,23 @@ ca:
50
50
  proposal_custom_fields: Camps personalitzats
51
51
  decidim:
52
52
  admin:
53
+ filters:
54
+ admin_accountability:
55
+ admin_role_type:
56
+ label: Tipus de rol
57
+ participatory_space_type_eq:
58
+ label: Tipus d'espai participatiu
59
+ role:
60
+ label: Rol
61
+ role_type_eq:
62
+ label: Tipus de rol
63
+ label:
64
+ search_field_end_date: 'Fins al dia:'
65
+ search_field_start_date: 'Des del dia:'
66
+ search_placeholder:
67
+ user_name_or_user_email_cont: Cerca per nom de participant, email
53
68
  menu:
69
+ admin_accountability: Històric d'administradores
54
70
  decidim_awesome: Decidim Awesome
55
71
  components:
56
72
  awesome_iframe:
@@ -91,6 +107,41 @@ ca:
91
107
  show_withdrawn: Mostra les propostes retirades
92
108
  decidim_awesome:
93
109
  admin:
110
+ admin_accountability:
111
+ admin_roles:
112
+ admin: Administradora de plataforma
113
+ user_manager: Administradora de participants
114
+ created_at: Rol creat el
115
+ currently_active: Actiu
116
+ deleted_user: Rol eliminat
117
+ email: Email
118
+ exports:
119
+ button: Exporta aquesta cerca
120
+ export_as: Exporta com %{export_format}
121
+ export_format:
122
+ csv: CSV
123
+ json: JSON
124
+ xlsx: XLSX
125
+ notice: L'exportació s'està enviant. Rebràs un correu electrònic quan estigui llest.
126
+ index:
127
+ description: Aquí trobareu totes les participants que han tingut algun paper en l'administració d'un espai participatiu. Les administradores de plataforma no apareixen a la llista.
128
+ global_description: Aquí trobareu totes les participants que han tingut algun paper en l'administració de la plataforma. Les administradores d'un espai participatiu no apareixen a la llista.
129
+ see_global: Llista global d'administradores de plataforma
130
+ see_spaces: Llista global d'administradores d'un espai participatiu
131
+ title: Històric d'administradores
132
+ last_login: Darrera data d'identificació
133
+ missing_info: "(falta informació)"
134
+ missing_user: La participant no existeix a la base de dades
135
+ name: Nom
136
+ never_logged: No loguejat encara
137
+ participatory_space: Espai participatiu
138
+ removal_date: Rol eliminat el
139
+ role: Rol
140
+ roles:
141
+ admin: Administradora
142
+ collaborator: Col·laboradora
143
+ moderator: Moderadora
144
+ valuator: Avaluadora
94
145
  checks:
95
146
  index:
96
147
  admin_head_tags: Etiquetes Awesome incloses a la capçalera de l'aplicació d'administració
@@ -320,7 +371,7 @@ ca:
320
371
  text_settings: Configuració del text
321
372
  title: Títol
322
373
  truncate: Nombre màxim de caràcters per les descripcions emergents
323
- credits: Decidim Awesome %{version} · Maintained withby %{company}
374
+ credits: Decidim Awesome %{version} · Mantingut ambper %{company}
324
375
  custom_fields:
325
376
  errors:
326
377
  invalid_fields: No s'ha pogut analitzar el contingut però s'ha assignat al camp '%{field}'
@@ -24,7 +24,11 @@ cs:
24
24
  validate_body_max_caps_percent: Maximální povolený procentní podíl velkých písmen pro tělo zprávy
25
25
  validate_body_max_marks_together: Maximální počet po sobě jdoucích značek povolených v těle zprávy
26
26
  validate_body_min_length: Minimální požadované znaky pro tělo zprávy
27
+ validate_body_start_with_caps: Vynutit začít tělo textu velkým písmenem
27
28
  validate_title_max_caps_percent: Maximální povolený procentní podíl velkých písmen pro nadpis zprávy
29
+ validate_title_max_marks_together: Maximální počet po sobě jdoucích značek povolených v těle zprávy
30
+ validate_title_min_length: Minimální počet znaků pro tělo zprávy
31
+ validate_title_start_with_caps: Vynutit začít tělo textu velkým písmenem
28
32
  constraint:
29
33
  component_id: nebo konkrétně v
30
34
  component_manifest: Pouze v komponentách typu
@@ -46,7 +50,23 @@ cs:
46
50
  proposal_custom_fields: Vlastní pole
47
51
  decidim:
48
52
  admin:
53
+ filters:
54
+ admin_accountability:
55
+ admin_role_type:
56
+ label: Typ role
57
+ participatory_space_type_eq:
58
+ label: Typ participačního prostoru
59
+ role:
60
+ label: Role
61
+ role_type_eq:
62
+ label: Typ role
63
+ label:
64
+ search_field_end_date: 'Do dne:'
65
+ search_field_start_date: 'Od dne:'
66
+ search_placeholder:
67
+ user_name_or_user_email_cont: Hledat podle uživatelského jména, emailu
49
68
  menu:
69
+ admin_accountability: Odpovědnost správce
50
70
  decidim_awesome: Úžasné Decidim
51
71
  components:
52
72
  awesome_iframe:
@@ -87,6 +107,41 @@ cs:
87
107
  show_withdrawn: Zobrazit stažené návrhy
88
108
  decidim_awesome:
89
109
  admin:
110
+ admin_accountability:
111
+ admin_roles:
112
+ admin: Super správce
113
+ user_manager: Správce uživatelů
114
+ created_at: Role vytvořena v
115
+ currently_active: Nyní aktivní
116
+ deleted_user: Smazat uživatele
117
+ email: E-mail
118
+ exports:
119
+ button: Exportovat toto hledání
120
+ export_as: Export jako %{export_format}
121
+ export_format:
122
+ csv: CSV
123
+ json: JSON
124
+ xlsx: XLSX
125
+ notice: Export úlohy byl zařazen do fronty. Až bude připraven, obdržíte e-mail.
126
+ index:
127
+ description: Zde najdete všechny uživatele, kteří měli nějakou roli ve správě participačního prostoru. Běžní správci nejsou uvedeni.
128
+ global_description: Zde najdete všechny uživatele, kteří měli nějakou globální roli ve správě participačního prostoru. Běžní správci nejsou uvedeni.
129
+ see_global: Seznam globálních správců
130
+ see_spaces: Seznam administrátorů participačního prostoru
131
+ title: Odpovědnost správce
132
+ last_login: Datum posledního přihlášení
133
+ missing_info: "(chybějící informace)"
134
+ missing_user: Uživatel není v databázi
135
+ name: Jméno
136
+ never_logged: Nikdy nepřihlášen
137
+ participatory_space: Participační prostor
138
+ removal_date: Role odebrána v
139
+ role: Role
140
+ roles:
141
+ admin: Administrátor
142
+ collaborator: Spolupracovník
143
+ moderator: Moderátor
144
+ valuator: Hodnotitel
90
145
  checks:
91
146
  index:
92
147
  admin_head_tags: Úžasné tagy zahrnuté v hlavičce administrace aplikace
@@ -155,6 +210,10 @@ cs:
155
210
  scoped_styles: Vytvořte vlastní CSS aplikovaný pouze na určitých částech veřejného webu (použijte pro to editor omezení)
156
211
  scoped_styles_variables: 'Můžete použít následující CSS proměnné pro nastavené barvy organizace:'
157
212
  use_markdown_editor: Toto nahradí WYSIWYG editor, místo toho použijte Markdown editor. Text bude vykreslen jako HTML na veřejných stránkách (text v databázi bude uložen jako text markdown)
213
+ validate_body_max_caps_percent: Nula nedovolí žádné velké písmeno, 100 bude nutit psát vše velkými písmeny
214
+ validate_body_max_marks_together: 'Omezit počet otazníků a vykřičníků, které lze psát dohromada. Např: Pokud je 2, pak ''!!!'' nebude v textu povoleno'
215
+ validate_body_min_length: Toto číslo může být nulové, toto pole bude ve skutečnosti nepovinné
216
+ validate_title_max_caps_percent: Nula nedovolí žádné velké písmeno, 100 bude nutit psát vše velkými písmeny
158
217
  form_proposal_custom_fields:
159
218
  new: Přidat nové pole "vlastní pole"
160
219
  remove: Odstranit toto "vlastní pole"
@@ -50,7 +50,23 @@ de:
50
50
  proposal_custom_fields: Eingabefelder
51
51
  decidim:
52
52
  admin:
53
+ filters:
54
+ admin_accountability:
55
+ admin_role_type:
56
+ label: Rollen-Typ
57
+ participatory_space_type_eq:
58
+ label: Partizipativer Raumtyp
59
+ role:
60
+ label: Rolle
61
+ role_type_eq:
62
+ label: Rollen-Typ
63
+ label:
64
+ search_field_end_date: 'Bis heute:'
65
+ search_field_start_date: 'Ab Datum:'
66
+ search_placeholder:
67
+ user_name_or_user_email_cont: Suche nach Benutzernamen oder E-Mail
53
68
  menu:
69
+ admin_accountability: Admin Verantwortlichkeit
54
70
  decidim_awesome: Decidim Awesome
55
71
  components:
56
72
  awesome_iframe:
@@ -91,6 +107,41 @@ de:
91
107
  show_withdrawn: Zurückgezogene Vorschläge anzeigen
92
108
  decidim_awesome:
93
109
  admin:
110
+ admin_accountability:
111
+ admin_roles:
112
+ admin: Superadministrator
113
+ user_manager: Benutzer Manager
114
+ created_at: Rolle erstellt am
115
+ currently_active: Derzeit aktiv
116
+ deleted_user: Gelöschter Benutzer
117
+ email: E-Mail
118
+ exports:
119
+ button: Diese Suche exportieren
120
+ export_as: Exportieren als %{export_format}
121
+ export_format:
122
+ csv: CSV
123
+ json: JSON
124
+ xlsx: XLSX
125
+ notice: Der Exportauftrag wurde in die Warteschlange gestellt. Sie erhalten eine E-Mail, wenn er fertig ist.
126
+ index:
127
+ description: Hier finden Sie alle Benutzer, die eine administrator-Rolle in der Verwaltung eines partizipatorischen Raumes gespielt haben. Superadministratoren sind nicht aufgeführt.
128
+ global_description: Hier finden Sie alle Benutzer, die eine superadministratoren-Rolle in der Verwaltung eines partizipatorischen Raumes gespielt haben. Normalen administrator-Rolle sind nicht aufgeführt.
129
+ see_global: Globale Admins auflisten
130
+ see_spaces: Admins von partizipativen Räumen auflisten
131
+ title: Admin-Verantwortung
132
+ last_login: Letztes Anmeldedatum
133
+ missing_info: "(fehlende Informationen)"
134
+ missing_user: Benutzer nicht in der Datenbank
135
+ name: Name
136
+ never_logged: Nie angemeldet
137
+ participatory_space: Partizipativer Raum
138
+ removal_date: Rolle entfernt am
139
+ role: Rolle
140
+ roles:
141
+ admin: Admin
142
+ collaborator: Mitarbeiter
143
+ moderator: Moderator
144
+ valuator: Schätzer
94
145
  checks:
95
146
  index:
96
147
  admin_head_tags: Angezeigte Awesome Tags im Admin Application Header
@@ -316,6 +367,7 @@ de:
316
367
  text_settings: Text-Einstellungen
317
368
  title: Titel
318
369
  truncate: Maximale Zeichenanzahl für Popup-Beschreibungen
370
+ credits: Decidim awesome %{version} · Gepflegt mit ❤️ durch %{company}
319
371
  custom_fields:
320
372
  errors:
321
373
  invalid_fields: Der Inhalt konnte nicht geparst werden, wurde aber dem Feld '%{field}' zugewiesen.
@@ -144,6 +144,9 @@ en:
144
144
  global_description: Listed here you'll find all users that have had some
145
145
  global role in administrating this organization. Participatory space
146
146
  admins are not listed.
147
+ missing_users: 'NOTE: This list might not include users created/removed
148
+ before %{date}. This is because "user traceability" was introduced in
149
+ Decidim v0.24 and this installation is probably older.'
147
150
  see_global: List global admins
148
151
  see_spaces: List participatory space admins
149
152
  title: Admin accountability
@@ -21,6 +21,14 @@ es:
21
21
  scoped_admins: 'Grupo de administradoras acotadas #%{id}'
22
22
  scoped_styles: 'Estilos personalizados #%{id}'
23
23
  use_markdown_editor: Utilizar el editor Markdown en lugar del editor HTML
24
+ validate_body_max_caps_percent: Porcentaje máximo permitido de letras mayúsculas para el cuerpo
25
+ validate_body_max_marks_together: Máximo número de símbolos consecutivos permitidos en el cuerpo
26
+ validate_body_min_length: Mínimo de caracteres requeridos para el cuerpo
27
+ validate_body_start_with_caps: Forzar al cuerpo a comenzar con una letra mayúscula
28
+ validate_title_max_caps_percent: Porcentaje máximo permitido de letras mayúsculas para el título
29
+ validate_title_max_marks_together: Máximo número de símbolos consecutivos permitidos en el título
30
+ validate_title_min_length: Mínimo de caracteres requeridos para el título
31
+ validate_title_start_with_caps: Forzar al título a comenzar con una letra mayúscula
24
32
  constraint:
25
33
  component_id: o específicamente en
26
34
  component_manifest: Solo en componentes de tipo
@@ -42,7 +50,23 @@ es:
42
50
  proposal_custom_fields: Campos personalizados
43
51
  decidim:
44
52
  admin:
53
+ filters:
54
+ admin_accountability:
55
+ admin_role_type:
56
+ label: Tipo de rol
57
+ participatory_space_type_eq:
58
+ label: Tipo de espacio participativo
59
+ role:
60
+ label: Rol
61
+ role_type_eq:
62
+ label: Tipo de rol
63
+ label:
64
+ search_field_end_date: 'Hasta la fecha:'
65
+ search_field_start_date: 'Desde la fecha:'
66
+ search_placeholder:
67
+ user_name_or_user_email_cont: Buscar por nombre de participante, email
45
68
  menu:
69
+ admin_accountability: Histórico de administradoras
46
70
  decidim_awesome: Decidim Awesome
47
71
  components:
48
72
  awesome_iframe:
@@ -83,6 +107,41 @@ es:
83
107
  show_withdrawn: Muestra las propuestas retiradas
84
108
  decidim_awesome:
85
109
  admin:
110
+ admin_accountability:
111
+ admin_roles:
112
+ admin: Administradora de plataforma
113
+ user_manager: Administradora de participantes
114
+ created_at: Rol creado en
115
+ currently_active: Activo
116
+ deleted_user: Participante eliminada
117
+ email: Correo electrónico
118
+ exports:
119
+ button: Exportar esta búsqueda
120
+ export_as: Exporta como %{export_format}
121
+ export_format:
122
+ csv: CSV
123
+ json: JSON
124
+ xlsx: XLSX
125
+ notice: La exportación se está preparando. Recibirá un correo electrónico cuando esté listo.
126
+ index:
127
+ description: Listado aquí encontrarás todas las participantes que han tenido algún papel en la administración de un espacio participativo. Las administradoras de plataforma no aparecen en la lista.
128
+ global_description: Listado aquí encontrarás todos los usuarios que han tenido un papel en la administración de la plataforma. Las administradoras de espacio participativo no están listadas.
129
+ see_global: Lista de administradoras de plataforma
130
+ see_spaces: Lista de administradoras de espacio participativo
131
+ title: Histórico de administradoras
132
+ last_login: Última fecha de conexión
133
+ missing_info: "(falta información)"
134
+ missing_user: Participante no está en la base de datos
135
+ name: Nombre
136
+ never_logged: Nunca ha iniciado sesión aún
137
+ participatory_space: Espacio participativo
138
+ removal_date: Rol eliminado en
139
+ role: Rol
140
+ roles:
141
+ admin: Administradora
142
+ collaborator: Colaborador/a
143
+ moderator: Moderadora
144
+ valuator: Evaluador/a
86
145
  checks:
87
146
  index:
88
147
  admin_head_tags: Etiquetas Awesome incluidas en el encabezado de la aplicación de administración
@@ -151,6 +210,15 @@ es:
151
210
  scoped_styles: Crea CSS personalizados que solo se apliquen en ciertas partes de la web pública (para ello, utiliza el editor de restricciones)
152
211
  scoped_styles_variables: 'Puedes utilizar las siguientes variables CSS para los colores personalizados de la organización:'
153
212
  use_markdown_editor: Esto sustituirá al editor HTML (Quill), utilice un editor de Markdown en su lugar. El texto se mostrará como HTML en las páginas públicas (en la base de datos, el texto se almacenará como markdown)
213
+ validate_body_max_caps_percent: Cero no permitirá ninguna letra mayúscula, 100 forzará a escribir todo en mayúsculas
214
+ validate_body_max_marks_together: 'Limitar el número de símbolos de preguntas y exclamaciones que se pueden escribir juntos. Es decir, si es 2, entonces ''!!!'' no estará permitido en el texto'
215
+ validate_body_min_length: Este número puede ser cero, lo que permite que este campo no sea obligatorio
216
+ validate_title_max_caps_percent: Cero no permitirá ninguna letra mayúscula, 100 forzará a escribir todo en mayúsculas
217
+ validate_title_max_marks_together: 'Limitar el número de símbolos de preguntas y exclamaciones que se pueden escribir juntos. Es decir, si es 2, entonces ''!!!'' no estará permitido en el texto'
218
+ validate_title_min_length: El título siempre es obligatorio y este número no puede ser cero
219
+ validators:
220
+ body: Validaciones de entrada de usuario para el campo "cuerpo"
221
+ title: Validaciones de entrada de usuario para el campo "título"
154
222
  form_proposal_custom_fields:
155
223
  new: Añadir una nueva caja de "campos personalizados"
156
224
  remove: Eliminar esta caja de "campos personalizados"
@@ -260,6 +328,7 @@ es:
260
328
  hidden: Siempre oculto
261
329
  logged: Solo visible para usuarias logeadas
262
330
  non_logged: Solo visible para usuarias no logeadas
331
+ verified_user: Sólo visible para usuarios con una autorización válida
263
332
  index:
264
333
  confirm_destroy: '¿Estás segura que quieres eliminar este elemento?'
265
334
  edit: Editar
@@ -302,7 +371,6 @@ es:
302
371
  text_settings: Ajustes del texto
303
372
  title: Título
304
373
  truncate: Número máximo de caracteres para las descripciones emergentes
305
- credits: Decidim Awesome %{version} · Maintained with ♥ by %{company}
306
374
  custom_fields:
307
375
  errors:
308
376
  invalid_fields: No se ha podido analizar el contenido pero se ha asignado al campo '%{field}'
@@ -328,6 +396,8 @@ es:
328
396
  show:
329
397
  view_meeting: Ver encuentro
330
398
  view_proposal: Ver propuesta
399
+ validators:
400
+ too_much_caps: Contiene demasiadas letras mayúsculas (más del %{percent}% del texto)
331
401
  layouts:
332
402
  decidim:
333
403
  admin:
@@ -50,7 +50,23 @@ fr:
50
50
  proposal_custom_fields: Champs personnalisés
51
51
  decidim:
52
52
  admin:
53
+ filters:
54
+ admin_accountability:
55
+ admin_role_type:
56
+ label: Type de rôle
57
+ participatory_space_type_eq:
58
+ label: Type d'espace participatif
59
+ role:
60
+ label: Rôle
61
+ role_type_eq:
62
+ label: Type de rôle
63
+ label:
64
+ search_field_end_date: 'Jusqu''à:'
65
+ search_field_start_date: 'De:'
66
+ search_placeholder:
67
+ user_name_or_user_email_cont: Recherche par nom d'utilisateur ou email
53
68
  menu:
69
+ admin_accountability: Suivi administrateur
54
70
  decidim_awesome: Decidim awesome
55
71
  components:
56
72
  awesome_iframe:
@@ -91,6 +107,41 @@ fr:
91
107
  show_withdrawn: Afficher les propositions retirées
92
108
  decidim_awesome:
93
109
  admin:
110
+ admin_accountability:
111
+ admin_roles:
112
+ admin: Super administrateur
113
+ user_manager: Gestionnaire d'utilisateurs
114
+ created_at: Rôle créé le
115
+ currently_active: Actuellement actif
116
+ deleted_user: Utilisateur supprimé
117
+ email: Email
118
+ exports:
119
+ button: Exporter cette recherche
120
+ export_as: Exporter en tant que %{export_format}
121
+ export_format:
122
+ csv: CSV
123
+ json: JSON
124
+ xlsx: XLSX
125
+ notice: La tâche d'exportation a été mise en file d'attente. Vous recevrez un email quand elle sera réalisée.
126
+ index:
127
+ description: Vous trouverez ici la liste de tous les utilisateurs ayant un rôle dans l'administration d'un espace participatif. Les administrateurs "normaux" ne sont pas listés.
128
+ global_description: Vous trouverez ici la liste de tous les utilisateurs ayant un rôle global dans l'administration de cette organisation. Les administrateurs d'espaces participatifs ne sont pas listés.
129
+ see_global: Lister les administrateurs globaux
130
+ see_spaces: Lister les administrateurs d'espace participatif
131
+ title: Suivi administrateur
132
+ last_login: Date de la dernière connexion
133
+ missing_info: "(informations manquantes)"
134
+ missing_user: Utilisateur introuvable dans la base de données
135
+ name: Nom
136
+ never_logged: Ne s'est jamais connecté
137
+ participatory_space: Espace participatif
138
+ removal_date: Rôle retiré le
139
+ role: Rôle
140
+ roles:
141
+ admin: Administrateur
142
+ collaborator: Collaborateur
143
+ moderator: Modérateur
144
+ valuator: Evaluateur
94
145
  checks:
95
146
  index:
96
147
  admin_head_tags: '"Awesome tags" (balises) inclus dans l''en-tête de l''application d''administration'
@@ -320,7 +371,7 @@ fr:
320
371
  text_settings: Paramètres de texte
321
372
  title: Titre
322
373
  truncate: Caractères maximum pour les descriptions des popups
323
- credits: Décidim Awesome %{version} · Maintained withby %{company}
374
+ credits: Décidim Awesome %{version} · Fait avecpar %{company}
324
375
  custom_fields:
325
376
  errors:
326
377
  invalid_fields: Le contenu n'a pas pu être analysé mais a été assigné au champ '%{field}'
@@ -302,7 +302,6 @@ it:
302
302
  text_settings: Impostazioni Testo
303
303
  title: Titolo
304
304
  truncate: Numero massimo di caratteri per le descrizioni nei popup
305
- credits: Decidim Awesome %{version} · Maintained with ♥ by %{company}
306
305
  custom_fields:
307
306
  errors:
308
307
  invalid_fields: Il contenuto non può essere analizzato ma è stato assegnato al campo '%{field}'
@@ -21,10 +21,18 @@ ja:
21
21
  scoped_admins: 'スコープ付き管理者グループ #%{id}'
22
22
  scoped_styles: 'カスタムスタイル #%{id}'
23
23
  use_markdown_editor: HTMLエディターの代わりにMarkdownエディターを使用する
24
+ validate_body_max_caps_percent: 本文内での大文字の最大許容割合
25
+ validate_body_max_marks_together: 本文で許容される最多連続記号文字数
26
+ validate_body_min_length: 本文に必要な最小文字数
27
+ validate_body_start_with_caps: 本文を大文字で始めることを強制する
28
+ validate_title_max_caps_percent: タイトル内での大文字の最大許容割合
29
+ validate_title_max_marks_together: タイトルで許容される最多連続記号文字数
30
+ validate_title_min_length: タイトルに必要な最小文字数
31
+ validate_title_start_with_caps: タイトルを大文字で始めることを強制する
24
32
  constraint:
25
33
  component_id: 以下のみに適用
26
34
  component_manifest: このタイプのコンポーネントのみ有効
27
- participatory_space_manifest: 以下のタイプの参加スペースに適用
35
+ participatory_space_manifest: 以下のタイプの参加型スペースに適用
28
36
  participatory_space_slug: あるいは、以下の参加スペースに適用
29
37
  custom_redirect:
30
38
  active: 有効
@@ -42,7 +50,23 @@ ja:
42
50
  proposal_custom_fields: カスタム項目
43
51
  decidim:
44
52
  admin:
53
+ filters:
54
+ admin_accountability:
55
+ admin_role_type:
56
+ label: ロールの種別
57
+ participatory_space_type_eq:
58
+ label: 参加型スペース種別
59
+ role:
60
+ label: ロール
61
+ role_type_eq:
62
+ label: ロールの種別
63
+ label:
64
+ search_field_end_date: '終了日:'
65
+ search_field_start_date: '開始日:'
66
+ search_placeholder:
67
+ user_name_or_user_email_cont: ユーザー名、メールアドレスで検索する
45
68
  menu:
69
+ admin_accountability: 管理者のアカウンタビリティ
46
70
  decidim_awesome: Decidim awesome
47
71
  components:
48
72
  awesome_iframe:
@@ -83,6 +107,41 @@ ja:
83
107
  show_withdrawn: 撤回された提案を表示
84
108
  decidim_awesome:
85
109
  admin:
110
+ admin_accountability:
111
+ admin_roles:
112
+ admin: スーパー管理者
113
+ user_manager: ユーザーマネージャー
114
+ created_at: ロールの作成日時
115
+ currently_active: 現在アクティブ
116
+ deleted_user: 削除されたユーザー
117
+ email: メールアドレス
118
+ exports:
119
+ button: この検索結果をエクスポート
120
+ export_as: '%{export_format} としてエクスポート'
121
+ export_format:
122
+ csv: CSV
123
+ json: JSON
124
+ xlsx: XLSX
125
+ notice: エクスポート処理がキューに追加されました。準備ができたらメールが届きます。
126
+ index:
127
+ description: ここには、参加型スペースの管理に何らかの役割を持っていたすべてのユーザーが表示されます。一般の管理者は表示されません。
128
+ global_description: ここには、この組織を管理するためにグローバルな役割を持っているすべてのユーザーが表示されます。参加型スペースの管理者は表示されません。
129
+ see_global: グローバル管理者一覧
130
+ see_spaces: 参加型スペース管理者一覧
131
+ title: 管理者のアカウンタビリティ
132
+ last_login: 最終ログイン日
133
+ missing_info: "(不足情報)"
134
+ missing_user: データベースにいないユーザー
135
+ name: 名前
136
+ never_logged: 未ログイン
137
+ participatory_space: 参加型スペース
138
+ removal_date: ロールの削除日時
139
+ role: ロール
140
+ roles:
141
+ admin: 管理者
142
+ collaborator: コラボレーター
143
+ moderator: モデレーター
144
+ valuator: 評価者
86
145
  checks:
87
146
  index:
88
147
  admin_head_tags: 管理者向けアプリケーションヘッダーに含まれる Awesome tags
@@ -151,6 +210,15 @@ ja:
151
210
  scoped_styles: 公開ウェブの特定の部分にのみ適用されるカスタムCSSを作成します (制限されたエディタを使用してください)
152
211
  scoped_styles_variables: '組織の色のカスタマイズには、以下のCSS変数が使用できます。'
153
212
  use_markdown_editor: これはQuill WYSIWYGエディターを置き換えて、代わりにMarkdownエディターを使えるようにします。テキストはDB内ではHTML形式に変換・保存されます。
213
+ validate_body_max_caps_percent: ゼロの場合大文字を許可しません。100の場合すべてを大文字で書くことを強制します。
214
+ validate_body_max_marks_together: '並べて入力できる「?」と「!」の数を制限します。 すなわち、それが2の場合、「!!!」はテキストに記入できません'
215
+ validate_body_min_length: この数字はゼロにできます。その場合、このフィールドを必須ではなくする効果があります。
216
+ validate_title_max_caps_percent: ゼロの場合大文字を許可しません。100の場合すべてを大文字で書くことを強制します。
217
+ validate_title_max_marks_together: '並べて入力できる「?」と「!」の数を制限します。 すなわち、それが2の場合、「!!!」はテキストに記入できません'
218
+ validate_title_min_length: タイトルは常に必須です。この数字はゼロにはできません
219
+ validators:
220
+ body: '「body」フィールドのユーザー入力検証'
221
+ title: '「タイトル」フィールドのユーザー入力検証'
154
222
  form_proposal_custom_fields:
155
223
  new: 新しい「カスタム項目」ボックスを追加
156
224
  remove: '「カスタム項目」ボックスを削除'
@@ -169,7 +237,7 @@ ja:
169
237
  show:
170
238
  title: '%{setting} の詳細設定'
171
239
  update: 設定を更新する
172
- system: 参加スペース以外のすべて
240
+ system: 参加型スペース以外のすべて
173
241
  update:
174
242
  error: 設定更新エラー %{error}
175
243
  success: 設定は正常に更新されました
@@ -328,6 +396,8 @@ ja:
328
396
  show:
329
397
  view_meeting: ミーティングを表示
330
398
  view_proposal: 提案を表示
399
+ validators:
400
+ too_much_caps: 大文字が多すぎます(テキストの %{percent}%以上)
331
401
  layouts:
332
402
  decidim:
333
403
  admin:
@@ -211,7 +211,6 @@ nl:
211
211
  show_rejected: Toon afgewezen voorstellen
212
212
  show_withdrawn: Toon ingetrokken voorstellen
213
213
  truncate: Maximaal aantal tekens voor popup beschrijvingen
214
- credits: Decidim Awesome %{version} · Maintained with ♥ by %{company}
215
214
  editor_images:
216
215
  create:
217
216
  error: Fout bij uploaden afbeelding!
@@ -302,7 +302,6 @@ pt-BR:
302
302
  text_settings: Configurações de texto
303
303
  title: Título
304
304
  truncate: Máximo de caracteres para descrições em popup
305
- credits: Decidim Incrível %{version} · Maintained with ♥ by %{company}
306
305
  custom_fields:
307
306
  errors:
308
307
  invalid_fields: O conteúdo não pode ser analisado, mas foi atribuído ao campo '%{field}'
@@ -12,6 +12,7 @@ decidim-core:
12
12
  decidim-0.25: 742698903a30034094c01aecaca6de84
13
13
  decidim-0.26: 651830d87aeeeff39316a787fc70d461
14
14
  decidim-0.26.4: eac4ea47c09762aa2e56300bf7e98f31
15
+ decidim-0.27.3: a9585960d5979aa3adbf5561010513fe
15
16
  /app/presenters/decidim/menu_presenter.rb:
16
17
  decidim-0.25: f3b05daf279f909f8b3b628658dd5810
17
18
  /app/presenters/decidim/menu_item_presenter.rb:
@@ -28,13 +29,18 @@ decidim-proposals:
28
29
  /app/helpers/decidim/proposals/application_helper.rb:
29
30
  decidim-0.26: 216c974bc425393c18b01bfc4eed4f0b
30
31
  decidim-0.26.4: 2e673d2aabe66a80a971d7ff80ebdbb8
32
+ decidim-0.26.7: ddd9a1f88609c8c7b60c07882d026441
31
33
  decidim-0.27: c0ebeac39ebe4926bf0e5fc585a384d7
32
34
  decidim-0.27.1: a4f902d1c4829a7f7f62299686f8604e
33
- /app/views/decidim/proposals/collaborative_drafts/show.html.erb:
34
- decidim-0.24: 2a7e0a4c65361f238fd1b917f39c8642
35
+ decidim-0.27.3: a9c9ed5eedaf7bf80afaf9ff5a89c254
35
36
  /app/views/decidim/proposals/collaborative_drafts/_edit_form_fields.html.erb:
36
- decidim-0.26: 97fa28043a26fc2940d30d38d9a7369b
37
- decidim-0.27: f356c7611279e76f16d12bb164e11e83
37
+ # this file is not overriden anymore but it needs to be the last version
38
+ decidim-0.26: 519a0d34a9ffbd8b9c26d9b68ff4e2a3
39
+ decidim-0.27.3: 949b2163c547742549531320bf5e0de1
40
+ /app/views/decidim/proposals/collaborative_drafts/show.html.erb:
41
+ # this file is not overriden anymore but it needs to be the last version
42
+ decidim-0.26: 519a0d34a9ffbd8b9c26d9b68ff4e2a3
43
+ decidim-0.27.3: b1ec22d35263a2ac96fe4604c0ceb752
38
44
  /app/views/decidim/proposals/admin/proposals/_form.html.erb:
39
45
  decidim-0.25: 90a04984d4269398b7cd21aa33763a1f
40
46
  decidim-0.27: f60168e432e1d419e5aec5d3d1e53f0e
@@ -36,7 +36,7 @@ module Decidim
36
36
  attr_reader :name, :view
37
37
 
38
38
  def default_items
39
- @default_items ||= build_menu.instance_variable_get(:@items).map do |item|
39
+ @default_items ||= build_menu.items.map do |item|
40
40
  item.instance_variable_set(:@active, method(:activate?)) unless item.active == :exact
41
41
  item
42
42
  end
@@ -3,7 +3,7 @@
3
3
  module Decidim
4
4
  # This holds the decidim-decidim_awesome version.
5
5
  module DecidimAwesome
6
- VERSION = "0.9.1"
6
+ VERSION = "0.9.3"
7
7
  COMPAT_DECIDIM_VERSION = [">= 0.26.0", "< 0.28"].freeze
8
8
  end
9
9
  end
data/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "decidim-module-decidim_awesome",
3
- "version": "0.9.0",
3
+ "version": "0.9.2",
4
4
  "description": "Mods and tweaks for Decidim",
5
5
  "main": "index.js",
6
6
  "directories": {
@@ -29,7 +29,7 @@
29
29
  "homepage": "https://github.com/decidim-ice/decidim-module-decidim_awesome#readme",
30
30
  "stylelint": {
31
31
  "extends": "@decidim/stylelint-config",
32
- "rules" : {
32
+ "rules": {
33
33
  "block-opening-brace-space-before": "always"
34
34
  }
35
35
  },
@@ -37,7 +37,7 @@
37
37
  "@babel/eslint-parser": "^7.19.1",
38
38
  "@babel/plugin-proposal-class-properties": "^7.18.6",
39
39
  "@babel/plugin-proposal-private-methods": "^7.18.6",
40
- "@babel/plugin-proposal-private-property-in-object": "^7.20.5",
40
+ "@babel/plugin-proposal-private-property-in-object": "^7.21.11",
41
41
  "@babel/plugin-transform-classes": "^7.20.7",
42
42
  "@babel/plugin-transform-regenerator": "^7.20.5",
43
43
  "@babel/plugin-transform-runtime": "^7.19.6",
@@ -63,6 +63,7 @@
63
63
  "jquery-ui": "^1.13.0",
64
64
  "jsrender": "^1.0.9",
65
65
  "leaflet.featuregroup.subgroup": "^1.0.2",
66
+ "marked": "^5.1.2",
66
67
  "select2": "^4.1.0-rc.0"
67
68
  }
68
69
  }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: decidim-decidim_awesome
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.1
4
+ version: 0.9.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ivan Vergés
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-04-14 00:00:00.000000000 Z
11
+ date: 2023-07-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: decidim-admin
@@ -258,18 +258,14 @@ files:
258
258
  - app/views/decidim/decidim_awesome/map_component/map/error.html.erb
259
259
  - app/views/decidim/decidim_awesome/map_component/map/show.html.erb
260
260
  - app/views/decidim/proposals/admin/proposals/_form.html.erb
261
- - app/views/decidim/proposals/collaborative_drafts/_edit_form_fields.html.erb
262
- - app/views/decidim/proposals/collaborative_drafts/show.html.erb
263
261
  - app/views/layouts/decidim/_head.html.erb
264
262
  - app/views/layouts/decidim/admin/_header.html.erb
265
263
  - app/views/layouts/decidim/admin/decidim_awesome.html.erb
266
264
  - app/views/layouts/decidim/decidim_awesome/_awesome_config.html.erb
267
265
  - app/views/layouts/decidim/decidim_awesome/_custom_styles.html.erb
268
266
  - app/views/layouts/decidim/decidim_awesome/_intergram_widget.html.erb
269
- - app/views/v0.26/decidim/proposals/collaborative_drafts/_show.html.erb
270
267
  - app/views/v0.26/layouts/decidim/_head.html.erb
271
268
  - app/views/v0.26/layouts/decidim/admin/_header.html.erb
272
- - app/views/v0.27/decidim/proposals/collaborative_drafts/_show.html.erb
273
269
  - app/views/v0.27/layouts/decidim/_head.html.erb
274
270
  - app/views/v0.27/layouts/decidim/admin/_header.html.erb
275
271
  - config/assets.rb
@@ -1,75 +0,0 @@
1
- <%= form_required_explanation %>
2
-
3
- <div class="field hashtags__container">
4
- <%= form.text_field :title, class: "js-hashtags", value: form_presenter.title %>
5
- </div>
6
-
7
- <div class="field hashtags__container">
8
- <%= text_editor_for_proposal_body(form) %>
9
- </div>
10
-
11
- <% if @form.component_automatic_hashtags.any? %>
12
- <div class="field">
13
- <%= form.label :automatic_hashtags %>
14
- <div class="checkboxes hashtags">
15
- <% @form.component_automatic_hashtags.each do |hashtag| %>
16
- <label>
17
- <%= check_box_tag "", "", { checked: true }, { disabled: true } %>#<%= hashtag %>
18
- </label>
19
- <% end %>
20
- </div>
21
- </div>
22
- <% end %>
23
-
24
- <% if @form.component_suggested_hashtags.any? %>
25
- <div class="field">
26
- <%= form.label :suggested_hashtags, nil, for: nil %>
27
- <div class="checkboxes hashtags">
28
- <%= form.collection_check_boxes :suggested_hashtags, @form.component_suggested_hashtags.map {|hashtag| [hashtag.downcase, "##{hashtag}"]}, :first, :last do |option|
29
- option.label { option.check_box(checked: @form.suggested_hashtag_checked?(option.value)) + option.text }
30
- end %>
31
- </div>
32
- </div>
33
- <% end %>
34
-
35
- <% if @form.geocoding_enabled? %>
36
- <div class="field">
37
- <%= form.check_box :has_address, checked: form_has_address? %>
38
- </div>
39
-
40
- <div class="field" id="address_input">
41
- <%= form.geocoding_field :address %>
42
- </div>
43
- <% end %>
44
-
45
- <% if @form.categories&.any? %>
46
- <div class="field">
47
- <%= form.categories_select :category_id, @form.categories, include_blank: t("decidim.proposals.collaborative_drafts.edit.select_a_category") %>
48
- </div>
49
- <% end %>
50
-
51
- <% if current_component.has_subscopes? %>
52
- <div class="field">
53
- <%= scopes_picker_field form, :scope_id, root: current_component.scope %>
54
- </div>
55
- <% end %>
56
-
57
- <% if current_organization.user_groups_enabled? && Decidim::UserGroups::ManageableUserGroups.for(current_user).verified.any? %>
58
- <div class="field">
59
- <%= user_group_select_field form, :user_group_id %>
60
- </div>
61
- <% end %>
62
-
63
- <% if component_settings.attachments_allowed? %>
64
- <fieldset class="attachments_container">
65
- <legend><%= t("attachment_legend", scope: "decidim.proposals.collaborative_drafts.edit") %></legend>
66
- <div class="row column">
67
- <%= form.attachment :documents,
68
- multiple: false,
69
- label: t("decidim.proposals.collaborative_drafts.new.add_file"),
70
- button_label: t("decidim.proposals.collaborative_drafts.new.add_file"),
71
- button_edit_label: t("decidim.proposals.collaborative_drafts.new.edit_file"),
72
- help_i18n_scope: "decidim.forms.file_help.file" %>
73
- </div>
74
- </fieldset>
75
- <% end %>
@@ -1 +0,0 @@
1
- <%= render partial: "#{version_prefix}/decidim/proposals/collaborative_drafts/show" %>
@@ -1,128 +0,0 @@
1
- <% add_decidim_page_title(Decidim::Proposals::CollaborativeDraft.model_name.human(count: 2)) %>
2
- <% add_decidim_meta_tags({
3
- description: present(@collaborative_draft).body,
4
- title: present(@collaborative_draft).title,
5
- url: collaborative_draft_url(@collaborative_draft.id)
6
- }) %>
7
-
8
- <% if current_user.nil? || allowed_to?(:request_access, :collaborative_draft, collaborative_draft: @collaborative_draft) %>
9
- <div class="row">
10
- <div class="columns">
11
- <div class="callout secondary"><%= t("info-message", scope:"decidim.proposals.collaborative_drafts.show").html_safe %></div>
12
- </div>
13
- </div>
14
- <% end %>
15
-
16
- <div class="row column view-header">
17
- <div class="m-bottom">
18
- <%= link_to collaborative_drafts_path do %>
19
- <%= icon "chevron-left", class: "icon--small", role: "img", "aria-hidden": true %>
20
- <%= t("back", scope:"decidim.proposals.collaborative_drafts.show") %>
21
- <% end %>
22
- </div>
23
-
24
- <h2 class="heading2">
25
- <%= present(@collaborative_draft).title(links: true, html_escape: true) %>
26
- </h2>
27
-
28
- <%= cell("decidim/coauthorships", @collaborative_draft, has_actions: true, size: 3, context: { current_user: current_user }) %>
29
- </div>
30
-
31
- <div class="row">
32
- <div class="columns mediumlarge-8 large-9">
33
- <div class="section">
34
- <%== cell("decidim/proposals/collaborative_draft_m", @collaborative_draft, full_badge: true).badge %>
35
-
36
- <%= render_proposal_body(@collaborative_draft) %>
37
-
38
- <% if component_settings.geocoding_enabled? %>
39
- <%= render partial: "decidim/shared/static_map", locals: { icon_name: "proposals", geolocalizable: @collaborative_draft } %>
40
- <% end %>
41
-
42
- <%= cell "decidim/tags", @collaborative_draft, context: { extra_classes: ["tags--collaborative-draft"] } %>
43
- </div>
44
- </div>
45
-
46
- <div class="columns section view-side mediumlarge-4 large-3">
47
- <% if allowed_to?(:publish, :collaborative_draft, collaborative_draft: @collaborative_draft) %>
48
- <div class="card text-center" id="collaborative_draft_publish">
49
- <div class="card__content">
50
- <%= cell "decidim/proposals/irreversible_action_modal", @collaborative_draft, action: :publish %>
51
- <div class="text-small">
52
- <%= t("publish_info", scope:"decidim.proposals.collaborative_drafts.show") %>
53
- <%= cell "decidim/proposals/irreversible_action_modal", @collaborative_draft, action: :withdraw %>
54
- </div>
55
- </div>
56
- </div>
57
- <% end %>
58
-
59
- <div class="card text-center">
60
- <div class="card__content">
61
- <% if @collaborative_draft.published? %>
62
- <%= cell "decidim/proposals/collaborative_draft_link_to_proposal", @collaborative_draft %>
63
- <% else %>
64
- <div>
65
- <%= resource_version_number(@collaborative_draft.versions_count, "text-large") %>
66
- <div class="text-medium">
67
- <%= resource_version_of(@collaborative_draft.versions_count) %>
68
- </div>
69
- </div>
70
-
71
- <div>
72
- <span class="text-medium">
73
- <%= link_to_other_resource_versions(collaborative_draft_versions_path(@collaborative_draft)) %>
74
- </span>
75
- </div>
76
- <% end %>
77
-
78
- <% if allowed_to?(:edit, :collaborative_draft, collaborative_draft: @collaborative_draft) %>
79
- <%= link_to t("edit", scope:"decidim.proposals.collaborative_drafts.show"), edit_collaborative_draft_path(@collaborative_draft), class: "button hollow expanded button--sc mt-s", id: "collaborative_draft_edit" %>
80
- <% end %>
81
-
82
- <%= render "request_access_form" %>
83
-
84
- <% if @collaborative_draft.requesters.include? current_user %>
85
- <button type="button" class="button expanded button--sc mt-s">
86
- <%= t("requested_access", scope:"decidim.proposals.collaborative_drafts.show") %>
87
- </button>
88
- <% end %>
89
- </div>
90
-
91
- <div class="card__status">
92
- <ul class="card-data">
93
- <li class="card-data__item authors_status">
94
- <%= with_tooltip t("decidim.proposals.models.collaborative_draft.fields.authors") do %>
95
- <%= icon("people", class: "icon--small", role: "img", "aria-hidden": true) + " " + "#{@collaborative_draft.versions.group_by(&:whodunnit).size}" %>
96
- <% end %>
97
- </li>
98
-
99
- <li class="card-data__item versions_status">
100
- <%= link_to collaborative_draft_versions_path(@collaborative_draft) do %>
101
- <%= with_tooltip t("decidim.proposals.models.collaborative_draft.fields.contributions") do %>
102
- <%= icon("pencil", class: "icon--small", role: "img", "aria-hidden": true) + " " + "#{@collaborative_draft.versions.count}" %>
103
- <% end %>
104
- <% end %>
105
- </li>
106
- <li class="card-data__item">
107
- <%= link_to "#comments" do %>
108
- <%= with_tooltip t("decidim.proposals.models.collaborative_draft.fields.comments") do %>
109
- <%= icon("comment-square", class: "icon--small", role: "img", "aria-hidden": true) + " " + "#{@collaborative_draft.comments_count}" %>
110
- <% end %>
111
- <% end %>
112
- </li>
113
- </ul>
114
- </div>
115
- </div>
116
-
117
- <%= render partial: "collaborator_requests" %>
118
-
119
- <%= resource_reference(@collaborative_draft) %>
120
-
121
- <%= render partial: "decidim/shared/share_modal" %>
122
- </div>
123
- </div>
124
-
125
- <%= attachments_for @collaborative_draft %>
126
- <%= comments_for @collaborative_draft %>
127
-
128
- <%= cell("decidim/flag_modal", @collaborative_draft) %>
@@ -1,128 +0,0 @@
1
- <% add_decidim_page_title(Decidim::Proposals::CollaborativeDraft.model_name.human(count: 2)) %>
2
- <% add_decidim_meta_tags({
3
- description: present(@collaborative_draft).body,
4
- title: present(@collaborative_draft).title,
5
- url: collaborative_draft_url(@collaborative_draft.id)
6
- }) %>
7
-
8
- <% if current_user.nil? || allowed_to?(:request_access, :collaborative_draft, collaborative_draft: @collaborative_draft) %>
9
- <div class="row">
10
- <div class="columns">
11
- <div class="callout secondary"><%= t("info-message", scope:"decidim.proposals.collaborative_drafts.show").html_safe %></div>
12
- </div>
13
- </div>
14
- <% end %>
15
-
16
- <div class="row column view-header">
17
- <div class="m-bottom">
18
- <%= link_to collaborative_drafts_path do %>
19
- <%= icon "chevron-left", class: "icon--small", role: "img", "aria-hidden": true %>
20
- <%= t("back", scope:"decidim.proposals.collaborative_drafts.show") %>
21
- <% end %>
22
- </div>
23
-
24
- <h2 class="heading2">
25
- <%= present(@collaborative_draft).title(links: true, html_escape: true) %>
26
- </h2>
27
-
28
- <%= cell("decidim/coauthorships", @collaborative_draft, has_actions: true, size: 3, context: { current_user: current_user }) %>
29
- </div>
30
-
31
- <div class="row">
32
- <div class="columns mediumlarge-8 large-9">
33
- <div class="section">
34
- <%== cell("decidim/proposals/collaborative_draft_m", @collaborative_draft, full_badge: true).badge %>
35
-
36
- <%= render_proposal_body(@collaborative_draft) %>
37
-
38
- <% if component_settings.geocoding_enabled? %>
39
- <%= render partial: "decidim/shared/static_map", locals: { icon_name: "proposals", geolocalizable: @collaborative_draft } %>
40
- <% end %>
41
-
42
- <%= cell "decidim/tags", @collaborative_draft, context: { extra_classes: ["tags--collaborative-draft"] } %>
43
- </div>
44
- </div>
45
-
46
- <div class="columns section view-side mediumlarge-4 large-3">
47
- <% if allowed_to?(:publish, :collaborative_draft, collaborative_draft: @collaborative_draft) %>
48
- <div class="card text-center" id="collaborative_draft_publish">
49
- <div class="card__content">
50
- <%= cell "decidim/proposals/irreversible_action_modal", @collaborative_draft, action: :publish %>
51
- <div class="text-small">
52
- <%= t("publish_info", scope:"decidim.proposals.collaborative_drafts.show") %>
53
- <%= cell "decidim/proposals/irreversible_action_modal", @collaborative_draft, action: :withdraw %>
54
- </div>
55
- </div>
56
- </div>
57
- <% end %>
58
-
59
- <div class="card text-center">
60
- <div class="card__content">
61
- <% if @collaborative_draft.published? %>
62
- <%= cell "decidim/proposals/collaborative_draft_link_to_proposal", @collaborative_draft %>
63
- <% else %>
64
- <div>
65
- <%= resource_version_number(@collaborative_draft.versions_count, "text-large") %>
66
- <div class="text-medium">
67
- <%= resource_version_of(@collaborative_draft.versions_count) %>
68
- </div>
69
- </div>
70
-
71
- <div>
72
- <span class="text-medium">
73
- <%= link_to_other_resource_versions(collaborative_draft_versions_path(@collaborative_draft)) %>
74
- </span>
75
- </div>
76
- <% end %>
77
-
78
- <% if allowed_to?(:edit, :collaborative_draft, collaborative_draft: @collaborative_draft) %>
79
- <%= link_to t("edit", scope:"decidim.proposals.collaborative_drafts.show"), edit_collaborative_draft_path(@collaborative_draft), class: "button hollow expanded button--sc mt-s", id: "collaborative_draft_edit" %>
80
- <% end %>
81
-
82
- <%= render "request_access_form" %>
83
-
84
- <% if @collaborative_draft.requesters.include? current_user %>
85
- <button type="button" class="button expanded button--sc mt-s">
86
- <%= t("requested_access", scope:"decidim.proposals.collaborative_drafts.show") %>
87
- </button>
88
- <% end %>
89
- </div>
90
-
91
- <div class="card__status">
92
- <ul class="card-data">
93
- <li class="card-data__item authors_status">
94
- <%= with_tooltip t("decidim.proposals.models.collaborative_draft.fields.authors") do %>
95
- <%= icon("people", class: "icon--small", role: "img", "aria-hidden": true) + " " + "#{@collaborative_draft.versions.group_by(&:whodunnit).size}" %>
96
- <% end %>
97
- </li>
98
-
99
- <li class="card-data__item versions_status">
100
- <%= link_to collaborative_draft_versions_path(@collaborative_draft) do %>
101
- <%= with_tooltip t("decidim.proposals.models.collaborative_draft.fields.contributions") do %>
102
- <%= icon("pencil", class: "icon--small", role: "img", "aria-hidden": true) + " " + "#{@collaborative_draft.versions.count}" %>
103
- <% end %>
104
- <% end %>
105
- </li>
106
- <li class="card-data__item">
107
- <%= link_to "#comments" do %>
108
- <%= with_tooltip t("decidim.proposals.models.collaborative_draft.fields.comments") do %>
109
- <%= icon("comment-square", class: "icon--small", role: "img", "aria-hidden": true) + " " + "#{@collaborative_draft.comments_count}" %>
110
- <% end %>
111
- <% end %>
112
- </li>
113
- </ul>
114
- </div>
115
- </div>
116
-
117
- <%= render partial: "collaborator_requests" %>
118
-
119
- <%= resource_reference(@collaborative_draft) %>
120
-
121
- <%= render partial: "decidim/shared/share_modal" %>
122
- </div>
123
- </div>
124
-
125
- <%= attachments_for @collaborative_draft %>
126
- <%= comments_for @collaborative_draft %>
127
-
128
- <%= cell("decidim/flag_modal", @collaborative_draft) %>