decidim-decidim_awesome 0.5.1 → 0.6.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +30 -14
- data/Rakefile +6 -0
- data/app/assets/config/decidim_admin_decidim_awesome_manifest.js +1 -0
- data/app/assets/config/decidim_decidim_awesome_manifest.js +1 -0
- data/app/assets/javascripts/decidim/decidim_awesome/admin/form_exit_warn.js.es6 +30 -0
- data/app/assets/javascripts/decidim/decidim_awesome/awesome_map/legacy_map.js.es6 +225 -0
- data/app/assets/javascripts/decidim/decidim_awesome/awesome_map/legacy_proposals.js.es6 +82 -0
- data/app/assets/javascripts/decidim/decidim_awesome/awesome_map/map.js.es6 +20 -20
- data/app/assets/javascripts/decidim/decidim_awesome/awesome_map/meetings.js.es6 +15 -13
- data/app/assets/javascripts/decidim/decidim_awesome/awesome_map/proposals.js.es6 +29 -13
- data/app/assets/javascripts/decidim/decidim_awesome/editors/quill_editor.js.es6 +2 -4
- data/app/awesome_overrides/presenters/decidim/proposals/proposal_presenter_override.rb +39 -6
- data/app/commands/decidim/decidim_awesome/admin/create_scoped_style.rb +34 -0
- data/app/commands/decidim/decidim_awesome/admin/destroy_scoped_style.rb +40 -0
- data/app/commands/decidim/decidim_awesome/create_editor_image.rb +5 -3
- data/app/controllers/decidim/decidim_awesome/admin/checks_controller.rb +29 -1
- data/app/controllers/decidim/decidim_awesome/admin/config_controller.rb +29 -2
- data/app/controllers/decidim/decidim_awesome/admin/constraints_controller.rb +0 -2
- data/app/controllers/decidim/decidim_awesome/editor_images_controller.rb +1 -1
- data/app/controllers/decidim/decidim_awesome/map_component/map_controller.rb +8 -1
- data/app/forms/decidim/decidim_awesome/admin/config_form.rb +11 -0
- data/app/forms/decidim/decidim_awesome/editor_image_form.rb +2 -0
- data/app/helpers/decidim/decidim_awesome/admin/config_constraints_helpers.rb +4 -0
- data/app/helpers/decidim/decidim_awesome/map_helper.rb +37 -1
- data/app/models/decidim/decidim_awesome/editor_image.rb +4 -3
- data/app/uploaders/decidim/decidim_awesome/image_uploader.rb +9 -0
- data/app/views/decidim/decidim_awesome/admin/checks/index.html.erb +49 -7
- data/app/views/decidim/decidim_awesome/admin/config/_form_styles.html.erb +28 -0
- data/app/views/decidim/decidim_awesome/admin/config/show.html.erb +1 -1
- data/app/views/decidim/decidim_awesome/iframe_component/iframe/show.html.erb +6 -1
- data/app/views/decidim/decidim_awesome/map_component/map/show.html.erb +46 -20
- data/app/views/layouts/decidim/admin/decidim_awesome.html.erb +5 -0
- data/app/views/layouts/decidim/decidim_awesome/_awesome_config.html.erb +1 -1
- data/app/views/layouts/decidim/decidim_awesome/_custom_styles.html.erb +3 -0
- data/app/views/v0.22/layouts/decidim/_head.html.erb +1 -0
- data/app/views/{v0.21 → v0.23}/layouts/decidim/_head.html.erb +5 -0
- data/app/views/{v0.21 → v0.23}/layouts/decidim/admin/_header.html.erb +3 -0
- data/config/locales/ca.yml +53 -7
- data/config/locales/cs.yml +47 -1
- data/config/locales/en.yml +32 -2
- data/config/locales/es.yml +84 -38
- data/config/locales/eu.yml +171 -0
- data/config/locales/fr.yml +47 -1
- data/config/locales/sv.yml +47 -1
- data/lib/decidim/decidim_awesome.rb +12 -0
- data/lib/decidim/decidim_awesome/admin_engine.rb +2 -0
- data/lib/decidim/decidim_awesome/awesome_helpers.rb +17 -3
- data/lib/decidim/decidim_awesome/checksums.yml +6 -4
- data/lib/decidim/decidim_awesome/config.rb +13 -12
- data/lib/decidim/decidim_awesome/iframe_component/component.rb +3 -3
- data/lib/decidim/decidim_awesome/map_component/component.rb +6 -0
- data/lib/decidim/decidim_awesome/test/factories.rb +1 -1
- data/lib/decidim/decidim_awesome/test/layouts/decidim/_head.html.erb +2 -0
- data/lib/decidim/decidim_awesome/test/layouts/decidim/admin/_header.html.erb +3 -0
- data/lib/decidim/decidim_awesome/test/shared_examples/editor_examples.rb +71 -0
- data/lib/decidim/decidim_awesome/version.rb +2 -3
- data/vendor/assets/javascripts/jsrender.min.js +4 -0
- metadata +29 -18
- data/app/helpers/decidim/decidim_awesome/application_helper.rb +0 -10
@@ -0,0 +1,171 @@
|
|
1
|
+
eu:
|
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
|
+
decidim:
|
28
|
+
admin:
|
29
|
+
menu:
|
30
|
+
decidim_awesome: Decidim awesome
|
31
|
+
components:
|
32
|
+
awesome_iframe:
|
33
|
+
name: Fullscreen Iframe
|
34
|
+
settings:
|
35
|
+
global:
|
36
|
+
announcement: Oharra
|
37
|
+
iframe: Iframe code
|
38
|
+
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.'
|
39
|
+
no_margins: No margins between the iframe and the rest of the page
|
40
|
+
viewport_width: Limit maximum width to the application viewport
|
41
|
+
step:
|
42
|
+
announcement: Oharra
|
43
|
+
iframe: Iframe code
|
44
|
+
awesome_map:
|
45
|
+
name: Awesome Map
|
46
|
+
settings:
|
47
|
+
global:
|
48
|
+
announcement: Oharra
|
49
|
+
collapse: Start with collapsed menu
|
50
|
+
map_height: Map height (px)
|
51
|
+
step:
|
52
|
+
announcement: Oharra
|
53
|
+
show_accepted: Show accepted proposals
|
54
|
+
show_evaluating: Show evaluating proposals
|
55
|
+
show_not_answered: Show not answered proposals
|
56
|
+
show_rejected: Show rejected proposals
|
57
|
+
show_withdrawn: Show withdrawn proposals
|
58
|
+
decidim_awesome:
|
59
|
+
admin:
|
60
|
+
checks:
|
61
|
+
index:
|
62
|
+
admin_head_tags: Awesome tags included in the admin application header
|
63
|
+
decidim-admin: From Admin module
|
64
|
+
decidim-core: From Core module
|
65
|
+
decidim-proposals: From Proposals module
|
66
|
+
decidim_version: Decidim version %{version}
|
67
|
+
errors:
|
68
|
+
CSS: Head does not contain the required <link> stylesheet entries. To solve it, you can manually add it to your custom _head.html.erb
|
69
|
+
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
|
70
|
+
head_tags: Awesome tags included in the application header
|
71
|
+
title: System compatibility checks
|
72
|
+
config:
|
73
|
+
constraints:
|
74
|
+
add_condition: Add case
|
75
|
+
always: Always
|
76
|
+
delete: Ezabatu
|
77
|
+
edit: Editatu
|
78
|
+
title: 'Applicable only in these cases:'
|
79
|
+
create_scoped_style:
|
80
|
+
error: Error creating a new CSS box! %{error}
|
81
|
+
success: CSS box %{key} created successfully!
|
82
|
+
destroy_scoped_style:
|
83
|
+
error: Error removing CSS box! %{error}
|
84
|
+
success: CSS box %{key} removed successfully!
|
85
|
+
experimental: Experimental options
|
86
|
+
form:
|
87
|
+
help:
|
88
|
+
allow_images_in_full_editor: This will add an image uploader icon in all the editors WYSIWYG with the full toolbar enabled.
|
89
|
+
allow_images_in_markdown_editor: This will allow markdown editor to upload images by copy & paste or drag & drop.
|
90
|
+
allow_images_in_proposals: This will allow to upload images in the proposals editor, available to any user
|
91
|
+
allow_images_in_small_editor: This will add an image uploader icon in all the editors WYSIWYG with minimal options in the toolbar enabled.
|
92
|
+
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.
|
93
|
+
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).
|
94
|
+
intergram_about: Intergram uses Telegram messenger to handle a live support chat widget embedded in the bottom of the page.
|
95
|
+
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>'
|
96
|
+
scoped_styles: Create custom CSS that applies only in certain parts of the public web (use the restrictions editor for that)
|
97
|
+
scoped_styles_variables: 'You can use the following CSS variables for organization customized colors:'
|
98
|
+
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)
|
99
|
+
form_styles:
|
100
|
+
new: Add a new CSS box
|
101
|
+
remove: Remove this CSS box
|
102
|
+
sure_to_remove: Are you sure you want to destroy this CSS box?
|
103
|
+
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.'
|
104
|
+
show:
|
105
|
+
title: Tweaks for %{setting}
|
106
|
+
update: Update configuration
|
107
|
+
system: Everywhere except participatory spaces
|
108
|
+
update:
|
109
|
+
error: Error updating configuration! %{error}
|
110
|
+
success: Configuration updated successfully!
|
111
|
+
constraints:
|
112
|
+
create:
|
113
|
+
error: Error creating condition case
|
114
|
+
success: Condition case created successfully
|
115
|
+
destroy:
|
116
|
+
error: Error removing condition case
|
117
|
+
success: Condition case removed successfully
|
118
|
+
errors:
|
119
|
+
not_unique: Same condition already exists
|
120
|
+
new:
|
121
|
+
cancel: Ezeztatu
|
122
|
+
constraint: New condition case
|
123
|
+
save: Save
|
124
|
+
show:
|
125
|
+
cancel: Ezeztatu
|
126
|
+
constraint: Edit condition case
|
127
|
+
save: Save
|
128
|
+
update:
|
129
|
+
error: Error updating condition case
|
130
|
+
success: Condition case updated successfully
|
131
|
+
menu:
|
132
|
+
checks: System compatibility
|
133
|
+
editors: Editor hacks
|
134
|
+
livechat: Live Chat
|
135
|
+
proposals: Proposals hacks
|
136
|
+
styles: Custom styles
|
137
|
+
surveys: Surveys & forms
|
138
|
+
config:
|
139
|
+
intergram:
|
140
|
+
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.
|
141
|
+
auto_response: Looking for the first available admin (It might take a minute)
|
142
|
+
intro_message: Hello! How can we help you?
|
143
|
+
title_closed: Click to chat!
|
144
|
+
title_open: Let's chat!
|
145
|
+
credits: Decidim Awesome %{version} · Made with ♥ by Platoniq
|
146
|
+
editor_images:
|
147
|
+
create:
|
148
|
+
error: Error uploading image!
|
149
|
+
success: Image uploaded successfully!
|
150
|
+
map_component:
|
151
|
+
map:
|
152
|
+
error:
|
153
|
+
unavailable: The map is unavailable. Please configure geocoding to enable this component.
|
154
|
+
show:
|
155
|
+
view_meeting: Ikusi bilera
|
156
|
+
view_proposal: Ikusi proposamena
|
157
|
+
layouts:
|
158
|
+
decidim:
|
159
|
+
admin:
|
160
|
+
decidim_awesome:
|
161
|
+
title: Decidim Tweaks
|
162
|
+
decidim_awesome:
|
163
|
+
awesome_config:
|
164
|
+
amendments: Zuzenketak
|
165
|
+
autosaved_error: LocalStorage ez da onartzen zure arakatzailean, inprimakia ezin da automatikoki gorde.
|
166
|
+
autosaved_retrieved: Data for this form has been recovered from a previous session
|
167
|
+
autosaved_success: Tokiko biltegian gordetako datuak
|
168
|
+
categories: Kategoriak
|
169
|
+
drag_and_drop_image: Gehitu irudiak arrastatuz, jareginez edo itsatsita.
|
170
|
+
meetings: Topaketa-zerrenda
|
171
|
+
proposals: Proposamenak
|
data/config/locales/fr.yml
CHANGED
@@ -7,6 +7,17 @@ fr:
|
|
7
7
|
allow_images_in_proposals: Allow images in the proposals editor
|
8
8
|
allow_images_in_small_editor: Allow images in the minimal HTML editor
|
9
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}'
|
10
21
|
use_markdown_editor: Use a Markdown editor instead of the HTML editor
|
11
22
|
constraint:
|
12
23
|
component_id: or specifically in
|
@@ -22,11 +33,13 @@ fr:
|
|
22
33
|
name: Fullscreen Iframe
|
23
34
|
settings:
|
24
35
|
global:
|
36
|
+
announcement: Announcement
|
25
37
|
iframe: Iframe code
|
26
38
|
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.'
|
27
39
|
no_margins: No margins between the iframe and the rest of the page
|
28
40
|
viewport_width: Limit maximum width to the application viewport
|
29
41
|
step:
|
42
|
+
announcement: Announcement
|
30
43
|
iframe: Iframe code
|
31
44
|
awesome_map:
|
32
45
|
name: Awesome Map
|
@@ -37,14 +50,24 @@ fr:
|
|
37
50
|
map_height: Map height (px)
|
38
51
|
step:
|
39
52
|
announcement: Announcement
|
53
|
+
show_accepted: Show accepted proposals
|
54
|
+
show_evaluating: Show evaluating proposals
|
55
|
+
show_not_answered: Show not answered proposals
|
56
|
+
show_rejected: Show rejected proposals
|
57
|
+
show_withdrawn: Show withdrawn proposals
|
40
58
|
decidim_awesome:
|
41
59
|
admin:
|
42
60
|
checks:
|
43
61
|
index:
|
62
|
+
admin_head_tags: Awesome tags included in the admin application header
|
44
63
|
decidim-admin: From Admin module
|
45
64
|
decidim-core: From Core module
|
46
65
|
decidim-proposals: From Proposals module
|
47
66
|
decidim_version: Decidim version %{version}
|
67
|
+
errors:
|
68
|
+
CSS: Head does not contain the required <link> stylesheet entries. To solve it, you can manually add it to your custom _head.html.erb
|
69
|
+
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
|
70
|
+
head_tags: Awesome tags included in the application header
|
48
71
|
title: System compatibility checks
|
49
72
|
config:
|
50
73
|
constraints:
|
@@ -53,6 +76,12 @@ fr:
|
|
53
76
|
delete: Supprimer
|
54
77
|
edit: Modifier
|
55
78
|
title: 'Applicable only in these cases:'
|
79
|
+
create_scoped_style:
|
80
|
+
error: Error creating a new CSS box! %{error}
|
81
|
+
success: CSS box %{key} created successfully!
|
82
|
+
destroy_scoped_style:
|
83
|
+
error: Error removing CSS box! %{error}
|
84
|
+
success: CSS box %{key} removed successfully!
|
56
85
|
experimental: Experimental options
|
57
86
|
form:
|
58
87
|
help:
|
@@ -62,7 +91,15 @@ fr:
|
|
62
91
|
allow_images_in_small_editor: This will add an image uploader icon in all the editors WYSIWYG with minimal options in the toolbar enabled.
|
63
92
|
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.
|
64
93
|
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).
|
65
|
-
|
94
|
+
intergram_about: Intergram uses Telegram messenger to handle a live support chat widget embedded in the bottom of the page.
|
95
|
+
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>'
|
96
|
+
scoped_styles: Create custom CSS that applies only in certain parts of the public web (use the restrictions editor for that)
|
97
|
+
scoped_styles_variables: 'You can use the following CSS variables for organization customized colors:'
|
98
|
+
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)
|
99
|
+
form_styles:
|
100
|
+
new: Add a new CSS box
|
101
|
+
remove: Remove this CSS box
|
102
|
+
sure_to_remove: Are you sure you want to destroy this CSS box?
|
66
103
|
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.'
|
67
104
|
show:
|
68
105
|
title: Tweaks for %{setting}
|
@@ -94,8 +131,17 @@ fr:
|
|
94
131
|
menu:
|
95
132
|
checks: System compatibility
|
96
133
|
editors: Editor hacks
|
134
|
+
livechat: Live Chat
|
97
135
|
proposals: Proposals hacks
|
136
|
+
styles: Custom styles
|
98
137
|
surveys: Surveys & forms
|
138
|
+
config:
|
139
|
+
intergram:
|
140
|
+
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.
|
141
|
+
auto_response: Looking for the first available admin (It might take a minute)
|
142
|
+
intro_message: Hello! How can we help you?
|
143
|
+
title_closed: Click to chat!
|
144
|
+
title_open: Let's chat!
|
99
145
|
credits: Decidim Awesome %{version} · Made with ♥ by Platoniq
|
100
146
|
editor_images:
|
101
147
|
create:
|
data/config/locales/sv.yml
CHANGED
@@ -7,6 +7,17 @@ sv:
|
|
7
7
|
allow_images_in_proposals: Allow images in the proposals editor
|
8
8
|
allow_images_in_small_editor: Allow images in the minimal HTML editor
|
9
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}'
|
10
21
|
use_markdown_editor: Use a Markdown editor instead of the HTML editor
|
11
22
|
constraint:
|
12
23
|
component_id: or specifically in
|
@@ -22,11 +33,13 @@ sv:
|
|
22
33
|
name: Fullscreen Iframe
|
23
34
|
settings:
|
24
35
|
global:
|
36
|
+
announcement: Announcement
|
25
37
|
iframe: Iframe code
|
26
38
|
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.'
|
27
39
|
no_margins: No margins between the iframe and the rest of the page
|
28
40
|
viewport_width: Limit maximum width to the application viewport
|
29
41
|
step:
|
42
|
+
announcement: Announcement
|
30
43
|
iframe: Iframe code
|
31
44
|
awesome_map:
|
32
45
|
name: Awesome Map
|
@@ -37,14 +50,24 @@ sv:
|
|
37
50
|
map_height: Map height (px)
|
38
51
|
step:
|
39
52
|
announcement: Announcement
|
53
|
+
show_accepted: Show accepted proposals
|
54
|
+
show_evaluating: Show evaluating proposals
|
55
|
+
show_not_answered: Show not answered proposals
|
56
|
+
show_rejected: Show rejected proposals
|
57
|
+
show_withdrawn: Show withdrawn proposals
|
40
58
|
decidim_awesome:
|
41
59
|
admin:
|
42
60
|
checks:
|
43
61
|
index:
|
62
|
+
admin_head_tags: Awesome tags included in the admin application header
|
44
63
|
decidim-admin: From Admin module
|
45
64
|
decidim-core: From Core module
|
46
65
|
decidim-proposals: From Proposals module
|
47
66
|
decidim_version: Decidim version %{version}
|
67
|
+
errors:
|
68
|
+
CSS: Head does not contain the required <link> stylesheet entries. To solve it, you can manually add it to your custom _head.html.erb
|
69
|
+
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
|
70
|
+
head_tags: Awesome tags included in the application header
|
48
71
|
title: System compatibility checks
|
49
72
|
config:
|
50
73
|
constraints:
|
@@ -53,6 +76,12 @@ sv:
|
|
53
76
|
delete: Delete
|
54
77
|
edit: Edit
|
55
78
|
title: 'Applicable only in these cases:'
|
79
|
+
create_scoped_style:
|
80
|
+
error: Error creating a new CSS box! %{error}
|
81
|
+
success: CSS box %{key} created successfully!
|
82
|
+
destroy_scoped_style:
|
83
|
+
error: Error removing CSS box! %{error}
|
84
|
+
success: CSS box %{key} removed successfully!
|
56
85
|
experimental: Experimental options
|
57
86
|
form:
|
58
87
|
help:
|
@@ -62,7 +91,15 @@ sv:
|
|
62
91
|
allow_images_in_small_editor: This will add an image uploader icon in all the editors WYSIWYG with minimal options in the toolbar enabled.
|
63
92
|
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.
|
64
93
|
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).
|
65
|
-
|
94
|
+
intergram_about: Intergram uses Telegram messenger to handle a live support chat widget embedded in the bottom of the page.
|
95
|
+
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>'
|
96
|
+
scoped_styles: Create custom CSS that applies only in certain parts of the public web (use the restrictions editor for that)
|
97
|
+
scoped_styles_variables: 'You can use the following CSS variables for organization customized colors:'
|
98
|
+
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)
|
99
|
+
form_styles:
|
100
|
+
new: Add a new CSS box
|
101
|
+
remove: Remove this CSS box
|
102
|
+
sure_to_remove: Are you sure you want to destroy this CSS box?
|
66
103
|
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.'
|
67
104
|
show:
|
68
105
|
title: Tweaks for %{setting}
|
@@ -94,8 +131,17 @@ sv:
|
|
94
131
|
menu:
|
95
132
|
checks: System compatibility
|
96
133
|
editors: Editor hacks
|
134
|
+
livechat: Live Chat
|
97
135
|
proposals: Proposals hacks
|
136
|
+
styles: Custom styles
|
98
137
|
surveys: Surveys & forms
|
138
|
+
config:
|
139
|
+
intergram:
|
140
|
+
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.
|
141
|
+
auto_response: Looking for the first available admin (It might take a minute)
|
142
|
+
intro_message: Hello! How can we help you?
|
143
|
+
title_closed: Click to chat!
|
144
|
+
title_open: Let's chat!
|
99
145
|
credits: Decidim Awesome %{version} · Made with ♥ by Platoniq
|
100
146
|
editor_images:
|
101
147
|
create:
|
@@ -59,6 +59,18 @@ module Decidim
|
|
59
59
|
false
|
60
60
|
end
|
61
61
|
|
62
|
+
# allows admins to created specific CSS snippets affecting only some specific parts
|
63
|
+
# Valid values differ a little from the previous convention:
|
64
|
+
# :disabled => false and non available, hidden from admins
|
65
|
+
# Hash => hash of different css text, each key will be used for the contraints
|
66
|
+
# Admins create this hash dynamically but some pre-defined css boxes can be created here as:
|
67
|
+
# {
|
68
|
+
# some_identifier: ".wrapper { background: red; }"
|
69
|
+
# }
|
70
|
+
config_accessor :scoped_styles do
|
71
|
+
{}
|
72
|
+
end
|
73
|
+
|
62
74
|
# these settings do not follow the :disabled convention but
|
63
75
|
# depends on the previous intergram configurations
|
64
76
|
config_accessor :intergram_url do
|
@@ -13,6 +13,8 @@ module Decidim
|
|
13
13
|
# Add admin engine routes here
|
14
14
|
resources :constraints
|
15
15
|
resources :config, param: :var, only: [:show, :update]
|
16
|
+
post :new_scoped_style, to: "config#new_scoped_style"
|
17
|
+
post :destroy_scoped_style, param: :key, to: "config#destroy_scoped_style"
|
16
18
|
get :checks, to: "checks#index"
|
17
19
|
root to: "config#show", var: :editors
|
18
20
|
end
|
@@ -19,6 +19,10 @@ module Decidim
|
|
19
19
|
@awesome_config ||= awesome_config_instance.config
|
20
20
|
end
|
21
21
|
|
22
|
+
def javascript_config_vars
|
23
|
+
awesome_config.except(:scoped_styles).to_json.html_safe
|
24
|
+
end
|
25
|
+
|
22
26
|
def show_public_intergram?
|
23
27
|
return unless awesome_config[:intergram_for_public]
|
24
28
|
return true unless awesome_config[:intergram_for_public_settings][:require_login]
|
@@ -45,10 +49,20 @@ module Decidim
|
|
45
49
|
return @tenant_stylesheets = current_organization.host.to_s if File.exist?("#{prefix}.css") || File.exist?("#{prefix}.scss") || File.exist?("#{prefix}.scss.erb")
|
46
50
|
end
|
47
51
|
|
48
|
-
|
49
|
-
|
52
|
+
# Collects all CSS that is applied in the current URL context
|
53
|
+
def awesome_custom_styles
|
54
|
+
return unless awesome_config[:scoped_styles]
|
55
|
+
return @awesome_custom_styles if @awesome_custom_styles
|
50
56
|
|
51
|
-
|
57
|
+
styles = awesome_config[:scoped_styles]&.filter do |key, _value|
|
58
|
+
config = AwesomeConfig.find_by(var: "scoped_style_#{key}", organization: current_organization)
|
59
|
+
@awesome_config_instance.valid_in_context?(config&.constraints)
|
60
|
+
end
|
61
|
+
@awesome_custom_styles = styles.values.join("\n")
|
62
|
+
end
|
63
|
+
|
64
|
+
def version_prefix
|
65
|
+
"v#{Decidim.version[0..3]}"
|
52
66
|
end
|
53
67
|
end
|
54
68
|
end
|
@@ -1,15 +1,17 @@
|
|
1
1
|
decidim-admin:
|
2
2
|
/app/views/layouts/decidim/admin/_header.html.erb:
|
3
|
-
decidim-0.21: 6f0c010b1dcf912be1b3e0ff9f156026
|
4
3
|
decidim-0.22: 6af51ec6b8a760b0ee6e00a7834f5f9a
|
4
|
+
decidim-0.23: 45f0e15f1b02a1c1a73b1a2184fd55af
|
5
5
|
decidim-core:
|
6
6
|
/app/views/layouts/decidim/_head.html.erb:
|
7
|
-
decidim-0.21: b261c55492d047ba730eed8b39be0304
|
8
7
|
decidim-0.22: bf16a58cd9e6d3f73e6875ff3d0b1e48
|
8
|
+
decidim-0.23: e7f5eea07e884665474948ea750fc720
|
9
9
|
/app/assets/javascripts/decidim/editor.js.es6:
|
10
|
-
decidim-0.21: 797d0ec1c9e79453cf6718f82d2fdd27
|
11
10
|
decidim-0.22: 797d0ec1c9e79453cf6718f82d2fdd27
|
11
|
+
decidim-0.23: cb059b8ff0ffc62c67eb99d8d7a6637b
|
12
|
+
decidim-0.23.1: 4787f73f0f33661e3897404f10019d26
|
12
13
|
decidim-proposals:
|
13
14
|
/app/presenters/decidim/proposals/proposal_presenter.rb:
|
14
|
-
decidim-0.21: d7a6e1e55613de8949ace284307a7674
|
15
15
|
decidim-0.22: 7d60c8310d7fa4e38d9a27080c22b12c
|
16
|
+
decidim-0.23: 437c0c25151f605401a4f14d090ba5ea
|
17
|
+
decidim-0.23.1: 892021b2ce9ac10c2e1b738e6948cde0
|