decidim-decidim_awesome 0.6.4 → 0.6.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (42) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +14 -6
  3. data/app/assets/stylesheets/decidim/decidim_awesome/admin.scss +4 -0
  4. data/app/awesome_overrides/presenters/decidim/menu_presenter_override.rb +31 -0
  5. data/app/commands/decidim/decidim_awesome/admin/create_menu_hack.rb +51 -0
  6. data/app/commands/decidim/decidim_awesome/admin/destroy_menu_hack.rb +47 -0
  7. data/app/commands/decidim/decidim_awesome/admin/update_config.rb +1 -1
  8. data/app/commands/decidim/decidim_awesome/admin/update_menu_hack.rb +47 -0
  9. data/app/controllers/decidim/decidim_awesome/admin/application_controller.rb +4 -3
  10. data/app/controllers/decidim/decidim_awesome/admin/config_controller.rb +9 -0
  11. data/app/controllers/decidim/decidim_awesome/admin/constraints_controller.rb +13 -0
  12. data/app/controllers/decidim/decidim_awesome/admin/menu_hacks_controller.rb +116 -0
  13. data/app/forms/decidim/decidim_awesome/admin/config_form.rb +5 -7
  14. data/app/forms/decidim/decidim_awesome/admin/constraint_form.rb +0 -2
  15. data/app/forms/decidim/decidim_awesome/admin/intergram_form.rb +0 -2
  16. data/app/forms/decidim/decidim_awesome/admin/menu_form.rb +39 -0
  17. data/app/helpers/decidim/decidim_awesome/admin/config_constraints_helpers.rb +5 -1
  18. data/app/permissions/decidim/decidim_awesome/admin/permissions.rb +19 -0
  19. data/app/permissions/decidim/decidim_awesome/permissions.rb +2 -0
  20. data/app/views/decidim/decidim_awesome/admin/config/_form_styles.html.erb +0 -1
  21. data/app/views/decidim/decidim_awesome/admin/menu_hacks/_form.html.erb +7 -0
  22. data/app/views/decidim/decidim_awesome/admin/menu_hacks/edit.html.erb +13 -0
  23. data/app/views/decidim/decidim_awesome/admin/menu_hacks/index.html.erb +44 -0
  24. data/app/views/decidim/decidim_awesome/admin/menu_hacks/new.html.erb +13 -0
  25. data/app/views/layouts/decidim/admin/decidim_awesome.html.erb +5 -0
  26. data/config/locales/ca.yml +45 -4
  27. data/config/locales/cs.yml +46 -5
  28. data/config/locales/en.yml +47 -4
  29. data/config/locales/es.yml +45 -4
  30. data/config/locales/eu.yml +45 -4
  31. data/config/locales/fr.yml +45 -4
  32. data/config/locales/nl.yml +212 -0
  33. data/config/locales/sv.yml +45 -4
  34. data/lib/decidim/decidim_awesome.rb +15 -0
  35. data/lib/decidim/decidim_awesome/admin_engine.rb +1 -0
  36. data/lib/decidim/decidim_awesome/checksums.yml +6 -0
  37. data/lib/decidim/decidim_awesome/engine.rb +1 -1
  38. data/lib/decidim/decidim_awesome/menu_hacker.rb +88 -0
  39. data/lib/decidim/decidim_awesome/test/shared_examples/config_examples.rb +4 -2
  40. data/lib/decidim/decidim_awesome/test/shared_examples/menu_hack_contexts.rb +71 -0
  41. data/lib/decidim/decidim_awesome/version.rb +1 -1
  42. metadata +16 -2
@@ -24,6 +24,12 @@ es:
24
24
  component_manifest: Solo en componentes de tipo
25
25
  participatory_space_manifest: Aplicar en los espacios participativos de tipo
26
26
  participatory_space_slug: Solo en
27
+ menu:
28
+ position: Posición
29
+ raw_label: Etiqueta
30
+ target: Abrir en
31
+ url: URL
32
+ visibility: Visibilidad
27
33
  decidim:
28
34
  admin:
29
35
  menu:
@@ -78,10 +84,10 @@ es:
78
84
  title: 'Se aplica solo en estos casos:'
79
85
  create_scoped_style:
80
86
  error: '¡Error al crear una nueva caja CSS! %{error}'
81
- success: Caja CSS %{key} creada correctamente!'
87
+ success: Caja CSS %{key} creada correctamente
82
88
  destroy_scoped_style:
83
89
  error: '¡Error al eliminar la caja CSS! %{error}'
84
- success: Caja CSS %{key} eliminada correctamente!'
90
+ success: Caja CSS %{key} eliminada correctamente
85
91
  experimental: Opciones experimentales
86
92
  form:
87
93
  help:
@@ -107,7 +113,7 @@ es:
107
113
  system: En todas partes excepto en espacios participativos
108
114
  update:
109
115
  error: '¡Error actualizando la configuración! %{error}'
110
- success: Configuración actualizada correctamente!'
116
+ success: Configuración actualizada correctamente
111
117
  constraints:
112
118
  create:
113
119
  error: Error creando una nueva restricción
@@ -132,9 +138,44 @@ es:
132
138
  checks: Compatibilidad del sistema
133
139
  editors: Modificaciones a los editores
134
140
  livechat: Chat en vivo
141
+ menu_hacks: Ajustes en el menú
135
142
  proposals: Modificaciones a las propuestas
136
143
  styles: Estilos personalizados
137
144
  surveys: Encuestas y formularios
145
+ menu_hacks:
146
+ create:
147
+ error: 'Error al crear nuevo ítem de menú: %{error}'
148
+ success: Ítem de menú creado correctamente
149
+ destroy:
150
+ error: 'Error al eliminar ítem de menú: %{error}'
151
+ success: Ítem de menú eliminado correctamente
152
+ edit:
153
+ save: Guardar
154
+ title: Editar ítem de menú
155
+ form:
156
+ label_help: Las traducciones no se detectan automáticamente, ¡asegúrate de rellenar todos los campos!
157
+ target:
158
+ blank: Nueva ventana
159
+ self: La misma ventana
160
+ visibility:
161
+ default: Visible
162
+ hidden: Siempre oculto
163
+ logged: Solo visible para usuarias logeadas
164
+ non_logged: Solo visible para usuarias no logeadas
165
+ index:
166
+ confirm_destroy: '¿Estás segura que quieres eliminar este elemento?'
167
+ edit: Editar
168
+ new: Crear nuevo ítem
169
+ remove: Eliminar adición
170
+ remove_hack: Eliminar personalización
171
+ title: Menú principal
172
+ new:
173
+ save: Guardar
174
+ title: Nuevo ítem de menú
175
+ update:
176
+ error: 'Error al actualizar el ítem de menú: %{error}'
177
+ success: Ítem de menú actualizado correctamente
178
+ url_exists: Esta URL ya ha sido configurada en otro ítem de menú, por favor edítalo en lugar de crear uno nuevo.
138
179
  config:
139
180
  intergram:
140
181
  auto_no_response: Parece que no hay nadie disponible para responder en este momento. Por favor, indícanos cómo te podemos contactar y nos comunicaremos contigo lo antes posible.
@@ -146,7 +187,7 @@ es:
146
187
  editor_images:
147
188
  create:
148
189
  error: '¡Error cargando imagen!'
149
- success: '¡La imagen se ha cargado correctamente!'
190
+ success: Imagen subida correctamente
150
191
  map_component:
151
192
  map:
152
193
  error:
@@ -24,6 +24,12 @@ eu:
24
24
  component_manifest: Only in components of type
25
25
  participatory_space_manifest: Apply to participatory spaces of type
26
26
  participatory_space_slug: Only in
27
+ menu:
28
+ position: Position
29
+ raw_label: Label
30
+ target: Opens in
31
+ url: URL
32
+ visibility: Visibility
27
33
  decidim:
28
34
  admin:
29
35
  menu:
@@ -78,10 +84,10 @@ eu:
78
84
  title: 'Applicable only in these cases:'
79
85
  create_scoped_style:
80
86
  error: Error creating a new CSS box! %{error}
81
- success: CSS box %{key} created successfully!
87
+ success: CSS box %{key} created successfully
82
88
  destroy_scoped_style:
83
89
  error: Error removing CSS box! %{error}
84
- success: CSS box %{key} removed successfully!
90
+ success: CSS box %{key} removed successfully
85
91
  experimental: Experimental options
86
92
  form:
87
93
  help:
@@ -107,7 +113,7 @@ eu:
107
113
  system: Everywhere except participatory spaces
108
114
  update:
109
115
  error: Error updating configuration! %{error}
110
- success: Configuration updated successfully!
116
+ success: Configuration updated successfully
111
117
  constraints:
112
118
  create:
113
119
  error: Error creating condition case
@@ -132,9 +138,44 @@ eu:
132
138
  checks: System compatibility
133
139
  editors: Editor hacks
134
140
  livechat: Live Chat
141
+ menu_hacks: Menu tweaks
135
142
  proposals: Proposals hacks
136
143
  styles: Custom styles
137
144
  surveys: Surveys & forms
145
+ menu_hacks:
146
+ create:
147
+ error: Error creating menu item! %{error}
148
+ success: Menu item created successfully
149
+ destroy:
150
+ error: Error removing menu item! %{error}
151
+ success: Menu item removed successfully
152
+ edit:
153
+ save: Save
154
+ title: Edit menu item
155
+ form:
156
+ label_help: Translations aren't automatically detected, be sure to fill in all the fields!
157
+ target:
158
+ blank: New window
159
+ self: Same window
160
+ visibility:
161
+ default: Visible
162
+ hidden: Always hidden
163
+ logged: Only visible for logged users
164
+ non_logged: Only visible for non-logged users
165
+ index:
166
+ confirm_destroy: Are you sure to remove this customization?
167
+ edit: Edit
168
+ new: New item
169
+ remove: Remove addition
170
+ remove_hack: Remove customization
171
+ title: Main menu
172
+ new:
173
+ save: Save
174
+ title: New menu item
175
+ update:
176
+ error: Error updating menu item! %{error}
177
+ success: Menu item updated successfully
178
+ url_exists: The same URL is already configured, please edit that instead of creating it again.
138
179
  config:
139
180
  intergram:
140
181
  auto_no_response: It seems that no one is available to answer right now. Please tell us how we can contact you, and we will get back to you as soon as we can.
@@ -146,7 +187,7 @@ eu:
146
187
  editor_images:
147
188
  create:
148
189
  error: Error uploading image!
149
- success: Image uploaded successfully!
190
+ success: Image uploaded successfully
150
191
  map_component:
151
192
  map:
152
193
  error:
@@ -24,6 +24,12 @@ fr:
24
24
  component_manifest: Only in components of type
25
25
  participatory_space_manifest: Apply to participatory spaces of type
26
26
  participatory_space_slug: Only in
27
+ menu:
28
+ position: Position
29
+ raw_label: Label
30
+ target: Opens in
31
+ url: URL
32
+ visibility: Visibility
27
33
  decidim:
28
34
  admin:
29
35
  menu:
@@ -78,10 +84,10 @@ fr:
78
84
  title: 'Applicable only in these cases:'
79
85
  create_scoped_style:
80
86
  error: Error creating a new CSS box! %{error}
81
- success: CSS box %{key} created successfully!
87
+ success: CSS box %{key} created successfully
82
88
  destroy_scoped_style:
83
89
  error: Error removing CSS box! %{error}
84
- success: CSS box %{key} removed successfully!
90
+ success: CSS box %{key} removed successfully
85
91
  experimental: Experimental options
86
92
  form:
87
93
  help:
@@ -107,7 +113,7 @@ fr:
107
113
  system: Everywhere except participatory spaces
108
114
  update:
109
115
  error: Error updating configuration! %{error}
110
- success: Configuration updated successfully!
116
+ success: Configuration updated successfully
111
117
  constraints:
112
118
  create:
113
119
  error: Error creating condition case
@@ -132,9 +138,44 @@ fr:
132
138
  checks: System compatibility
133
139
  editors: Editor hacks
134
140
  livechat: Live Chat
141
+ menu_hacks: Menu tweaks
135
142
  proposals: Proposals hacks
136
143
  styles: Custom styles
137
144
  surveys: Surveys & forms
145
+ menu_hacks:
146
+ create:
147
+ error: Error creating menu item! %{error}
148
+ success: Menu item created successfully
149
+ destroy:
150
+ error: Error removing menu item! %{error}
151
+ success: Menu item removed successfully
152
+ edit:
153
+ save: Save
154
+ title: Edit menu item
155
+ form:
156
+ label_help: Translations aren't automatically detected, be sure to fill in all the fields!
157
+ target:
158
+ blank: New window
159
+ self: Same window
160
+ visibility:
161
+ default: Visible
162
+ hidden: Always hidden
163
+ logged: Only visible for logged users
164
+ non_logged: Only visible for non-logged users
165
+ index:
166
+ confirm_destroy: Are you sure to remove this customization?
167
+ edit: Edit
168
+ new: New item
169
+ remove: Remove addition
170
+ remove_hack: Remove customization
171
+ title: Main menu
172
+ new:
173
+ save: Save
174
+ title: New menu item
175
+ update:
176
+ error: Error updating menu item! %{error}
177
+ success: Menu item updated successfully
178
+ url_exists: The same URL is already configured, please edit that instead of creating it again.
138
179
  config:
139
180
  intergram:
140
181
  auto_no_response: It seems that no one is available to answer right now. Please tell us how we can contact you, and we will get back to you as soon as we can.
@@ -146,7 +187,7 @@ fr:
146
187
  editor_images:
147
188
  create:
148
189
  error: Error uploading image!
149
- success: Image uploaded successfully!
190
+ success: Image uploaded successfully
150
191
  map_component:
151
192
  map:
152
193
  error:
@@ -0,0 +1,212 @@
1
+ nl:
2
+ activemodel:
3
+ attributes:
4
+ config:
5
+ allow_images_in_full_editor: Allow images in the full HTML editor
6
+ allow_images_in_markdown_editor: Allow images in the markdown editor
7
+ allow_images_in_proposals: Allow images in the proposals editor
8
+ allow_images_in_small_editor: Allow images in the minimal HTML editor
9
+ auto_save_forms: Auto save forms in local storage
10
+ intergram_auto_no_response: A message that is sent one minute after the user sends its first message and no response was received
11
+ intergram_auto_response: A message that is sent immediately after the user sends its first message
12
+ intergram_chat_id: Chat ID
13
+ intergram_color: Color of the widget
14
+ intergram_for_admins: Enable Intergram Chat in the admin backend
15
+ intergram_intro_message: First message when the user opens the chat for the first time
16
+ intergram_require_login: Only for logged users
17
+ intergram_title_closed: Closed chat title
18
+ intergram_title_open: Opened chat title
19
+ intergram_use_floating_button: If checked, the closed chat is always a button instead of a text
20
+ scoped_styles: 'Custom styles #%{id}'
21
+ use_markdown_editor: Use a Markdown editor instead of the HTML editor
22
+ constraint:
23
+ component_id: or specifically in
24
+ component_manifest: Only in components of type
25
+ participatory_space_manifest: Apply to participatory spaces of type
26
+ participatory_space_slug: Only in
27
+ menu:
28
+ position: Position
29
+ raw_label: Label
30
+ target: Opens in
31
+ url: URL
32
+ visibility: Visibility
33
+ decidim:
34
+ admin:
35
+ menu:
36
+ decidim_awesome: Decidim awesome
37
+ components:
38
+ awesome_iframe:
39
+ name: Fullscreen Iframe
40
+ settings:
41
+ global:
42
+ announcement: Announcement
43
+ iframe: Iframe code
44
+ iframe_help: 'Put your code as html: <iframe width="100%" height="700" frameBorder="0" allowFullscreen src="..."></iframe>. Content will be sanitized from other HTML tags. Ensure to use 100% as width to fill the screen.'
45
+ no_margins: No margins between the iframe and the rest of the page
46
+ viewport_width: Limit maximum width to the application viewport
47
+ step:
48
+ announcement: Announcement
49
+ iframe: Iframe code
50
+ awesome_map:
51
+ name: Awesome Map
52
+ settings:
53
+ global:
54
+ announcement: Announcement
55
+ collapse: Start with collapsed menu
56
+ map_height: Map height (px)
57
+ step:
58
+ announcement: Announcement
59
+ show_accepted: Show accepted proposals
60
+ show_evaluating: Show evaluating proposals
61
+ show_not_answered: Show not answered proposals
62
+ show_rejected: Show rejected proposals
63
+ show_withdrawn: Show withdrawn proposals
64
+ decidim_awesome:
65
+ admin:
66
+ checks:
67
+ index:
68
+ admin_head_tags: Awesome tags included in the admin application header
69
+ decidim-admin: From Admin module
70
+ decidim-core: From Core module
71
+ decidim-proposals: From Proposals module
72
+ decidim_version: Decidim version %{version}
73
+ errors:
74
+ CSS: Head does not contain the required <link> stylesheet entries. To solve it, you can manually add it to your custom _head.html.erb
75
+ JavaScript: Head does not contain the required <script> Javascript entries. To solve it, you can manually add it to your custom admin/_header.html.erb
76
+ head_tags: Awesome tags included in the application header
77
+ title: System compatibility checks
78
+ config:
79
+ constraints:
80
+ add_condition: Add case
81
+ always: Always
82
+ delete: Delete
83
+ edit: Edit
84
+ title: 'Applicable only in these cases:'
85
+ create_scoped_style:
86
+ error: Error creating a new CSS box! %{error}
87
+ success: CSS box %{key} created successfully
88
+ destroy_scoped_style:
89
+ error: Error removing CSS box! %{error}
90
+ success: CSS box %{key} removed successfully
91
+ experimental: Experimental options
92
+ form:
93
+ help:
94
+ allow_images_in_full_editor: This will add an image uploader icon in all the editors WYSIWYG with the full toolbar enabled.
95
+ allow_images_in_markdown_editor: This will allow markdown editor to upload images by copy & paste or drag & drop.
96
+ allow_images_in_proposals: This will allow to upload images in the proposals editor, available to any user
97
+ allow_images_in_small_editor: This will add an image uploader icon in all the editors WYSIWYG with minimal options in the toolbar enabled.
98
+ auto_save_forms: This will use LocalStorage to automatically save data introduced by users in surveys and other forms while they are filling it. Data will be restored in a future visit with the same browser in case the form is not submitted. If the form is submitted, data will be removed. If users remove their LocalStorage data, data won't be restored either.
99
+ drag_and_drop_supported: When uploading images, Drag & Drop is supported. Images will be uploaded to the server and inserted as external resources (it doesn't use base64 inline encoding).
100
+ intergram_about: Intergram uses Telegram messenger to handle a live support chat widget embedded in the bottom of the page.
101
+ intergram_config: 'Invite the <a href="https://web.telegram.org/#/im?p=@IntergramBot">@Intergram bot</a> to your group or start a chat with it directly. <a href="https://github.com/idoco/intergram#embed-intergram-in-your-website-with-these-2-simple-steps">+ info</a>'
102
+ scoped_styles: Create custom CSS that applies only in certain parts of the public web (use the restrictions editor for that)
103
+ scoped_styles_variables: 'You can use the following CSS variables for organization customized colors:'
104
+ use_markdown_editor: This will substitute the Quill WYSIWYG editor, use a Markdown editor instead. Text will be rendered as HTML in the public pages (text in database will be saved as markdown text)
105
+ form_styles:
106
+ new: Add a new CSS box
107
+ remove: Remove this CSS box
108
+ sure_to_remove: Are you sure you want to destroy this CSS box?
109
+ rich_text_editor_in_public_views: 'NOTE: "Rich text editor for participants" is enabled, this option won''t apply. Use the editors hacks instead to enable images in proposals.'
110
+ show:
111
+ title: Tweaks for %{setting}
112
+ update: Update configuration
113
+ system: Everywhere except participatory spaces
114
+ update:
115
+ error: Error updating configuration! %{error}
116
+ success: Configuration updated successfully
117
+ constraints:
118
+ create:
119
+ error: Error creating condition case
120
+ success: Condition case created successfully
121
+ destroy:
122
+ error: Error removing condition case
123
+ success: Condition case removed successfully
124
+ errors:
125
+ not_unique: Same condition already exists
126
+ new:
127
+ cancel: Cancel
128
+ constraint: New condition case
129
+ save: Save
130
+ show:
131
+ cancel: Cancel
132
+ constraint: Edit condition case
133
+ save: Save
134
+ update:
135
+ error: Error updating condition case
136
+ success: Condition case updated successfully
137
+ menu:
138
+ checks: System compatibility
139
+ editors: Editor hacks
140
+ livechat: Live Chat
141
+ menu_hacks: Menu tweaks
142
+ proposals: Proposals hacks
143
+ styles: Custom styles
144
+ surveys: Surveys & forms
145
+ menu_hacks:
146
+ create:
147
+ error: Error creating menu item! %{error}
148
+ success: Menu item created successfully
149
+ destroy:
150
+ error: Error removing menu item! %{error}
151
+ success: Menu item removed successfully
152
+ edit:
153
+ save: Save
154
+ title: Edit menu item
155
+ form:
156
+ label_help: Translations aren't automatically detected, be sure to fill in all the fields!
157
+ target:
158
+ blank: New window
159
+ self: Same window
160
+ visibility:
161
+ default: Visible
162
+ hidden: Always hidden
163
+ logged: Only visible for logged users
164
+ non_logged: Only visible for non-logged users
165
+ index:
166
+ confirm_destroy: Are you sure to remove this customization?
167
+ edit: Edit
168
+ new: New item
169
+ remove: Remove addition
170
+ remove_hack: Remove customization
171
+ title: Main menu
172
+ new:
173
+ save: Save
174
+ title: New menu item
175
+ update:
176
+ error: Error updating menu item! %{error}
177
+ success: Menu item updated successfully
178
+ url_exists: The same URL is already configured, please edit that instead of creating it again.
179
+ config:
180
+ intergram:
181
+ auto_no_response: It seems that no one is available to answer right now. Please tell us how we can contact you, and we will get back to you as soon as we can.
182
+ auto_response: Looking for the first available admin (It might take a minute)
183
+ intro_message: Hello! How can we help you?
184
+ title_closed: Click to chat!
185
+ title_open: Let's chat!
186
+ credits: Decidim Awesome %{version} · Made with ♥ by Platoniq
187
+ editor_images:
188
+ create:
189
+ error: Error uploading image!
190
+ success: Image uploaded successfully
191
+ map_component:
192
+ map:
193
+ error:
194
+ unavailable: The map is unavailable. Please configure geocoding to enable this component.
195
+ show:
196
+ view_meeting: View meeting
197
+ view_proposal: View proposal
198
+ layouts:
199
+ decidim:
200
+ admin:
201
+ decidim_awesome:
202
+ title: Decidim Tweaks
203
+ decidim_awesome:
204
+ awesome_config:
205
+ amendments: Amendments
206
+ autosaved_error: LocalStorage is not supported in your browser, form cannot be saved automatically.
207
+ autosaved_retrieved: Data for this form has been recovered from a previous session
208
+ autosaved_success: Data saved in local storage
209
+ categories: Categories
210
+ drag_and_drop_image: Add images by dragging & dropping or pasting them.
211
+ meetings: Meetings
212
+ proposals: Proposals