udongo 2.0.4 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/backend/application.js +1 -0
- data/app/assets/javascripts/backend/bootstrap.js +3 -3569
- data/app/assets/javascripts/backend/tree.js +106 -65
- data/app/assets/stylesheets/backend/application.scss +2 -0
- data/app/assets/stylesheets/backend/bootstrap.scss +29 -51
- data/app/assets/stylesheets/backend/components/_page_tree.scss +9 -0
- data/app/assets/stylesheets/backend/custom.scss +0 -0
- data/app/assets/stylesheets/backend/font-awesome.scss +644 -1977
- data/app/assets/stylesheets/backend/udongo.scss +1 -0
- data/app/controllers/backend/admins_controller.rb +2 -2
- data/app/controllers/{backend_controller.rb → backend/base_controller.rb} +13 -5
- data/app/controllers/backend/content/rows/columns_controller.rb +1 -1
- data/app/controllers/backend/content/rows/images_controller.rb +1 -1
- data/app/controllers/backend/content/rows/texts_controller.rb +1 -1
- data/app/controllers/backend/content/rows_controller.rb +1 -1
- data/app/controllers/backend/dashboard_controller.rb +1 -1
- data/app/controllers/backend/email_templates_controller.rb +12 -12
- data/app/controllers/backend/emails_controller.rb +1 -1
- data/app/controllers/backend/navigation/items_controller.rb +9 -11
- data/app/controllers/backend/navigations_controller.rb +1 -1
- data/app/controllers/backend/pages_controller.rb +17 -39
- data/app/controllers/backend/redirects_controller.rb +1 -1
- data/app/controllers/backend/seo_controller.rb +1 -1
- data/app/controllers/backend/sessions_controller.rb +1 -1
- data/app/controllers/backend/snippets_controller.rb +14 -13
- data/app/controllers/backend/tagbox_controller.rb +1 -1
- data/app/controllers/catch_all_controller.rb +1 -1
- data/app/controllers/concerns/backend/content_type_controller.rb +3 -1
- data/app/controllers/redirects_controller.rb +1 -1
- data/app/decorators/page_decorator.rb +1 -4
- data/app/forms/backend/email_template_translation_form.rb +1 -23
- data/app/forms/backend/navigation_item_translation_form.rb +1 -23
- data/app/forms/backend/page_translation_form.rb +13 -18
- data/app/forms/backend/snippet_translation_form.rb +1 -23
- data/app/forms/backend/translation_form.rb +22 -0
- data/app/helpers/udongo_helper.rb +0 -4
- data/app/mailers/general_mailer.rb +14 -4
- data/app/models/admin.rb +2 -2
- data/app/models/comment.rb +1 -2
- data/app/models/concerns/addressable.rb +40 -0
- data/app/models/concerns/addressable/config.rb +33 -0
- data/app/models/concerns/cacheable.rb +1 -1
- data/app/models/email.rb +2 -2
- data/app/models/email_template.rb +2 -1
- data/app/views/backend/_general_form_error.html.erb +6 -0
- data/app/views/backend/admins/_form.html.erb +3 -0
- data/app/views/backend/content/rows/columns/_dimension_fields.html.erb +3 -0
- data/app/views/backend/content/rows/columns/edit.html.erb +3 -5
- data/app/views/backend/content/rows/columns/new.html.erb +3 -5
- data/app/views/backend/content/rows/images/edit.html.erb +2 -0
- data/app/views/backend/dashboard/show.html.erb +1 -1
- data/app/views/backend/email_templates/_form.html.erb +29 -7
- data/app/views/backend/email_templates/_tabs.html.erb +1 -1
- data/app/views/backend/email_templates/edit_translation.html.erb +1 -0
- data/app/views/backend/navigation/items/_form.html.erb +4 -2
- data/app/views/backend/navigation/items/_tabs.html.erb +1 -1
- data/app/views/backend/navigation/items/edit_translation.html.erb +1 -0
- data/app/views/backend/pages/_form.html.erb +4 -2
- data/app/views/backend/pages/_tabs.html.erb +1 -1
- data/app/views/backend/pages/edit_translation.html.erb +1 -0
- data/app/views/backend/redirects/_form.html.erb +2 -0
- data/app/views/backend/snippets/_form.html.erb +3 -1
- data/app/views/backend/snippets/_tabs.html.erb +1 -1
- data/app/views/backend/snippets/edit.html.erb +1 -1
- data/app/views/backend/snippets/edit_translation.html.erb +1 -0
- data/app/views/backend/snippets/new.html.erb +1 -1
- data/app/views/layouts/backend/_top_navigation.html.erb +1 -2
- data/changelog.md +38 -0
- data/config/initializers/simple_form_bootstrap.rb +13 -9
- data/config/locales/en_backend.yml +1 -4
- data/config/locales/en_forms.yml +3 -0
- data/config/locales/nl_backend.yml +3 -4
- data/config/locales/nl_forms.yml +3 -0
- data/config/routes.rb +5 -7
- data/db/migrate/20160815100903_remove_form_models.rb +9 -0
- data/db/migrate/20161014135637_add_category_to_admin.rb +5 -0
- data/db/migrate/20161029124558_add_locale_to_admin.rb +6 -0
- data/db/migrate/20161029130557_add_bcc_and_cc_to_email_templates.rb +6 -0
- data/db/migrate/20161029171056_add_ccc_and_bcc_to_email.rb +6 -0
- data/lib/udongo/configs/flexible_content.rb +7 -0
- data/lib/udongo/configs/i18n.rb +5 -3
- data/lib/udongo/configs/i18ns/app.rb +12 -0
- data/lib/udongo/configs/i18ns/cms.rb +12 -0
- data/lib/udongo/flexible_content/column_width_calculator.rb +4 -2
- data/lib/udongo/pages/tree.rb +15 -0
- data/lib/udongo/pages/tree_node.rb +43 -0
- data/lib/udongo/version.rb +1 -1
- data/readme.md +103 -43
- data/vendor/assets/javascripts/backend/select2.min.js +3 -0
- data/vendor/assets/stylesheets/backend/jstree/default/style.scss +3 -3
- data/vendor/assets/stylesheets/backend/select2.min.scss +1 -0
- metadata +22 -30
- data/app/controllers/backend/forms/base_controller.rb +0 -14
- data/app/controllers/backend/forms/submissions_controller.rb +0 -8
- data/app/controllers/backend/forms_controller.rb +0 -7
- data/app/controllers/backend/webserver_controller.rb +0 -6
- data/app/decorators/form_decorator.rb +0 -16
- data/app/decorators/form_submission_decorator.rb +0 -3
- data/app/forms/backend/email_template_form.rb +0 -38
- data/app/forms/backend/navigation_item_form.rb +0 -23
- data/app/forms/backend/page_form.rb +0 -26
- data/app/forms/backend/snippet_form.rb +0 -35
- data/app/models/form.rb +0 -10
- data/app/models/form_field.rb +0 -15
- data/app/models/form_field_validation.rb +0 -11
- data/app/models/form_submission.rb +0 -15
- data/app/models/form_submission_data.rb +0 -5
- data/app/views/backend/_form_errors.html.erb +0 -15
- data/app/views/backend/forms/index.html.erb +0 -27
- data/app/views/backend/forms/submissions/_filter.html.erb +0 -16
- data/app/views/backend/forms/submissions/index.html.erb +0 -34
- data/lib/generators/udongo/form/form_generator.rb +0 -62
- data/lib/generators/udongo/form/templates/form.rb +0 -18
- data/lib/udongo/configs/forms.rb +0 -18
- data/lib/udongo/configs/routes.rb +0 -13
- data/lib/udongo/email_vars/form_submission.rb +0 -18
- data/lib/udongo/forms/submission_datagrid.rb +0 -27
- data/lib/udongo/forms/submission_filter.rb +0 -31
@@ -8,7 +8,7 @@
|
|
8
8
|
<%= link_to t('b.general'), edit_backend_email_template_path(@model), class: klass %>
|
9
9
|
</li>
|
10
10
|
|
11
|
-
<% Udongo.config.i18n.locales.each do |locale| %>
|
11
|
+
<% Udongo.config.i18n.app.locales.each do |locale| %>
|
12
12
|
<li class="nav-item">
|
13
13
|
<% klass = %w(nav-link) %>
|
14
14
|
<% klass << 'active' if active == locale.to_sym %>
|
@@ -3,6 +3,7 @@
|
|
3
3
|
<%= render 'backend/breadcrumbs' %>
|
4
4
|
|
5
5
|
<%= render 'backend/email_templates/tabs', active: params[:translation_locale].to_sym %>
|
6
|
+
<%= render 'backend/general_form_error', object: @translation %>
|
6
7
|
|
7
8
|
<%= simple_form_for([:backend, @translation], url: edit_translation_backend_email_template_path) do |f| %>
|
8
9
|
|
@@ -1,4 +1,6 @@
|
|
1
|
-
<%=
|
1
|
+
<%= render 'backend/general_form_error', object: @model %>
|
2
|
+
|
3
|
+
<%= simple_form_for(@model, url: url) do |f| %>
|
2
4
|
<div class="card">
|
3
5
|
<div class="card-header">
|
4
6
|
<%= t 'b.general' %>
|
@@ -7,7 +9,7 @@
|
|
7
9
|
<div class="card-block">
|
8
10
|
<div class="row">
|
9
11
|
<div class="col-md-6">
|
10
|
-
<%= f.input :page_id, collection: @
|
12
|
+
<%= f.input :page_id, collection: @model.options_for_page, include_blank: true %>
|
11
13
|
</div>
|
12
14
|
|
13
15
|
<div class="col-md-6">
|
@@ -8,7 +8,7 @@
|
|
8
8
|
<%= link_to t('b.general'), edit_backend_navigation_item_path(@navigation, @model), class: klass %>
|
9
9
|
</li>
|
10
10
|
|
11
|
-
<% Udongo.config.i18n.locales.each do |locale| %>
|
11
|
+
<% Udongo.config.i18n.app.locales.each do |locale| %>
|
12
12
|
<li class="nav-item">
|
13
13
|
<% klass = %w(nav-link) %>
|
14
14
|
<% klass << 'active' if active == locale.to_sym %>
|
@@ -4,6 +4,7 @@
|
|
4
4
|
<%= render 'backend/breadcrumbs' %>
|
5
5
|
|
6
6
|
<%= render 'backend/navigation/items/tabs', active: params[:translation_locale].to_sym %>
|
7
|
+
<%= render 'backend/general_form_error', object: @translation %>
|
7
8
|
|
8
9
|
<%= simple_form_for(@translation, url: edit_translation_backend_navigation_item_path) do |f| %>
|
9
10
|
<div class="card">
|
@@ -1,4 +1,6 @@
|
|
1
|
-
<%=
|
1
|
+
<%= render 'backend/general_form_error', object: @model %>
|
2
|
+
|
3
|
+
<%= simple_form_for [:backend, @model] do |f| %>
|
2
4
|
<div class="row">
|
3
5
|
<div class="col-md-8">
|
4
6
|
<div class="card">
|
@@ -8,7 +10,7 @@
|
|
8
10
|
|
9
11
|
<div class="card-block">
|
10
12
|
<%= f.input :description %>
|
11
|
-
<%= f.input :parent_id, collection: @
|
13
|
+
<%= f.input :parent_id, collection: @model.options_for_parents, disabled: 1 %>
|
12
14
|
</div>
|
13
15
|
</div>
|
14
16
|
</div>
|
@@ -8,7 +8,7 @@
|
|
8
8
|
<%= link_to t('b.general'), edit_backend_page_path(@model), class: klass %>
|
9
9
|
</li>
|
10
10
|
|
11
|
-
<% Udongo.config.i18n.locales.each do |locale| %>
|
11
|
+
<% Udongo.config.i18n.app.locales.each do |locale| %>
|
12
12
|
<li class="nav-item">
|
13
13
|
<% klass = %w(nav-link) %>
|
14
14
|
<% klass << 'active' if active == locale.to_sym %>
|
@@ -3,6 +3,7 @@
|
|
3
3
|
<%= render 'backend/breadcrumbs' %>
|
4
4
|
|
5
5
|
<%= render 'backend/pages/tabs', active: params[:translation_locale].to_sym %>
|
6
|
+
<%= render 'backend/general_form_error', object: @translation %>
|
6
7
|
|
7
8
|
<%= simple_form_for([:backend, @translation], url: edit_translation_backend_page_path, html: { class: 'no-focus' }) do |f| %>
|
8
9
|
|
@@ -8,7 +8,7 @@
|
|
8
8
|
<%= link_to t('b.general'), edit_backend_snippet_path(@model), class: klass %>
|
9
9
|
</li>
|
10
10
|
|
11
|
-
<% Udongo.config.i18n.locales.each do |locale| %>
|
11
|
+
<% Udongo.config.i18n.app.locales.each do |locale| %>
|
12
12
|
<li class="nav-item">
|
13
13
|
<% klass = %w(nav-link) %>
|
14
14
|
<% klass << 'active' if active == locale.to_sym %>
|
@@ -3,6 +3,7 @@
|
|
3
3
|
<%= render 'backend/breadcrumbs' %>
|
4
4
|
|
5
5
|
<%= render 'backend/snippets/tabs', active: params[:translation_locale].to_sym %>
|
6
|
+
<%= render 'backend/general_form_error', object: @translation %>
|
6
7
|
|
7
8
|
<%= simple_form_for([:backend, @translation], url: edit_translation_backend_snippet_path) do |f| %>
|
8
9
|
|
@@ -3,7 +3,6 @@
|
|
3
3
|
<a class="nav-link dropdown-toggle" data-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false"><%= icon(:list, t('b.content')) %></a>
|
4
4
|
<div class="dropdown-menu">
|
5
5
|
<%= link_to t('b.pages'), backend_pages_path, class: 'dropdown-item' %>
|
6
|
-
<%= link_to t('b.forms'), backend_forms_path, class: 'dropdown-item' %>
|
7
6
|
<%= link_to t('b.snippets'), backend_snippets_path, class: 'dropdown-item' %>
|
8
7
|
</div>
|
9
8
|
</li>
|
@@ -14,7 +13,7 @@
|
|
14
13
|
<%= link_to t('b.navigation'), backend_navigations_path, class: 'dropdown-item' %>
|
15
14
|
<%= link_to t('b.admins'), backend_admins_path, class: 'dropdown-item' %>
|
16
15
|
<%= link_to t('b.redirects'), backend_redirects_path, class: 'dropdown-item' %>
|
17
|
-
<%= link_to t('b.
|
16
|
+
<%= link_to t('b.emails'), backend_emails_path, class: 'dropdown-item' %>
|
18
17
|
<%= link_to t('b.email_templates'), backend_email_templates_path, class: 'dropdown-item' %>
|
19
18
|
</div>
|
20
19
|
</li>
|
data/changelog.md
CHANGED
@@ -1,3 +1,41 @@
|
|
1
|
+
3.0.0 - 2017-01-13
|
2
|
+
--
|
3
|
+
* Because of the complex structure and no actual necessity, the form models and
|
4
|
+
their related code have been cut.
|
5
|
+
* You can now set the list of breakpoints you want to have visible for the
|
6
|
+
flexible content. In most cases the xs and xl don't need to clutter the
|
7
|
+
interface, so now you can hide them.
|
8
|
+
* Added specs for all routes.
|
9
|
+
* Add concern to easily use multiple addresses for a single model.
|
10
|
+
* The BackendController has been renamed and moved to Backend::BaseController.
|
11
|
+
* Update Bootstrap to v4.0.0-alpha.4
|
12
|
+
* Tweak the styles for the simple form initializer.
|
13
|
+
* Pages marked as invisible are now visibly distinguished from visible pages. Fixes #9
|
14
|
+
* Add spec/support and spec/factories to the gem.
|
15
|
+
* The i18n configuration has been split in 'app' and 'cms'. You can now
|
16
|
+
configure the cms interface locale(s) indepent of the app locale(s).
|
17
|
+
* An admin can now choose his interface locale.
|
18
|
+
* Add cc/bcc to the email templates and sent emails.
|
19
|
+
* The general mailer has been expanded so it's easier to override the headers.
|
20
|
+
* Added new contextmenu options for making pages (in)visible through the tree.
|
21
|
+
* Add (and load) the select2 js lib in the backend.
|
22
|
+
* After adding or editing content in a certain locale, redirect to the correct
|
23
|
+
locale.
|
24
|
+
* The dashboard template no longer contains dashboard#show.
|
25
|
+
* You can now add your custom css to app/assets/stylesheets/backend/custom.scss
|
26
|
+
* When a backend form has 1 or more errors, you will now see a general error.
|
27
|
+
* The `prefix_with_locale` setting has been removed because it's always true.
|
28
|
+
* The webserver restart button/action has been removed.
|
29
|
+
* The following form objects have been removed in favor of the model:
|
30
|
+
- EmailTemplateForm
|
31
|
+
- NavigationItemForm
|
32
|
+
- PageForm
|
33
|
+
- SnippetForm
|
34
|
+
* A `Backend::TranslationForm` has been added. This makes it a whole lot easier
|
35
|
+
to create translation forms for your models.
|
36
|
+
* Feature tests have been added for most of the basic functionality.
|
37
|
+
|
38
|
+
|
1
39
|
2.0.4 - 2016-08-15
|
2
40
|
--
|
3
41
|
* Fix issue with resizing pictures in the CKEditor picture uploader.
|
@@ -30,26 +30,30 @@ SimpleForm.setup do |config|
|
|
30
30
|
b.use :hint, wrap_with: { tag: 'p', class: 'help-block' }
|
31
31
|
end
|
32
32
|
|
33
|
-
config.wrappers :vertical_boolean, tag: 'div', class: '
|
33
|
+
config.wrappers :vertical_boolean, tag: 'div', class: 'form-check', error_class: 'has-danger' do |b|
|
34
34
|
b.use :html5
|
35
35
|
b.optional :readonly
|
36
36
|
|
37
|
-
b.wrapper tag: 'label' do |ba|
|
38
|
-
ba.use :input
|
37
|
+
b.wrapper tag: :label, class: 'form-check-label' do |ba|
|
38
|
+
ba.use :input, class: 'form-check-input'
|
39
39
|
ba.use :label_text
|
40
40
|
end
|
41
41
|
|
42
|
-
b.use :error, wrap_with: { tag: '
|
43
|
-
b.use :hint, wrap_with: { tag: '
|
42
|
+
b.use :error, wrap_with: { tag: 'div', class: 'form-control-feedback' }
|
43
|
+
b.use :hint, wrap_with: { tag: 'small', class: 'form-text text-muted' }
|
44
44
|
end
|
45
45
|
|
46
46
|
config.wrappers :vertical_radio_and_checkboxes, tag: 'div', class: 'form-group', error_class: 'has-danger' do |b|
|
47
47
|
b.use :html5
|
48
48
|
b.optional :readonly
|
49
|
-
|
50
|
-
b.
|
51
|
-
|
52
|
-
|
49
|
+
|
50
|
+
b.wrapper tag: :label, class: 'form-check-label' do |ba|
|
51
|
+
ba.use :input, class: 'form-check-input'
|
52
|
+
ba.use :label_text
|
53
|
+
end
|
54
|
+
|
55
|
+
b.use :error, wrap_with: { tag: 'div', class: 'form-control-feedback' }
|
56
|
+
b.use :hint, wrap_with: { tag: 'small', class: 'form-text text-muted' }
|
53
57
|
end
|
54
58
|
|
55
59
|
config.wrappers :horizontal_form, tag: 'div', class: 'form-group', error_class: 'has-danger' do |b|
|
@@ -24,7 +24,6 @@ en:
|
|
24
24
|
filter: Filter
|
25
25
|
first_name: First name
|
26
26
|
flexible_content: Flexible content
|
27
|
-
forms: Forms
|
28
27
|
from: From
|
29
28
|
general: General
|
30
29
|
house_number: House number
|
@@ -47,7 +46,6 @@ en:
|
|
47
46
|
recipient: Recipient
|
48
47
|
redirect: Redirect
|
49
48
|
redirects: Redirects
|
50
|
-
restart_webserver: Restart webserver
|
51
49
|
save: Save
|
52
50
|
search: Search
|
53
51
|
sender: Sender
|
@@ -90,6 +88,7 @@ en:
|
|
90
88
|
edit_text: Edit text
|
91
89
|
explanation: With this module you can create flexible responsive content. Click the button below to create the first row.
|
92
90
|
forgot_password: Forgot password?
|
91
|
+
general_form_error: Something went wrong. Please check the marked fields.
|
93
92
|
help_texts:
|
94
93
|
status_code: More info about the use of status codes.
|
95
94
|
incorrect_login: Incorret login credentials.
|
@@ -102,5 +101,3 @@ en:
|
|
102
101
|
'301': 301 (Moved Permanently)
|
103
102
|
'303': 303 (See Other)
|
104
103
|
'307': 307 (Temporary Redirect)
|
105
|
-
webserver:
|
106
|
-
restarted: The webserver was restarted.
|
data/config/locales/en_forms.yml
CHANGED
@@ -13,8 +13,10 @@ en:
|
|
13
13
|
|
14
14
|
labels:
|
15
15
|
defaults:
|
16
|
+
bcc: BCC
|
16
17
|
caption: Caption
|
17
18
|
category: Category
|
19
|
+
cc: CC
|
18
20
|
content: Content
|
19
21
|
description: Description
|
20
22
|
disabled: Disabled
|
@@ -25,6 +27,7 @@ en:
|
|
25
27
|
identifier: Internal name
|
26
28
|
label: Label
|
27
29
|
last_name: Last name
|
30
|
+
locale: Locale
|
28
31
|
message: Message
|
29
32
|
name: Name
|
30
33
|
password: Password
|
@@ -24,7 +24,6 @@ nl:
|
|
24
24
|
filter: Filter
|
25
25
|
first_name: Voornaam
|
26
26
|
flexible_content: Flexibele inhoud
|
27
|
-
forms: Formulieren
|
28
27
|
from: Van
|
29
28
|
general: Algemeen
|
30
29
|
house_number: Huisnummer
|
@@ -47,7 +46,6 @@ nl:
|
|
47
46
|
recipient: Bestemmeling
|
48
47
|
redirect: Redirect
|
49
48
|
redirects: Redirects
|
50
|
-
restart_webserver: Webserver herstarten
|
51
49
|
save: Opslaan
|
52
50
|
search: Zoeken
|
53
51
|
sender: Afzender
|
@@ -90,17 +88,18 @@ nl:
|
|
90
88
|
edit_text: Tekst bewerken
|
91
89
|
explanation: Met deze module kan je flexibele, responsive inhoud toevoegen. Klik op onderstaande knop om een eerste rij toe te voegen.
|
92
90
|
forgot_password: Wachtwoord vergeten?
|
91
|
+
general_form_error: Er trad een fout op. Controleer de gemarkeerde velden.
|
93
92
|
help_texts:
|
94
93
|
status_code: Meer info over het gebruik van status codes
|
95
94
|
incorrect_login: Ongeldige login gegevens.
|
96
95
|
navigation:
|
97
96
|
custom: Op maat
|
98
97
|
no_items: Er zijn geen items.
|
98
|
+
pages:
|
99
|
+
invisible: Deze pagina is niet zichtbaar op de website.
|
99
100
|
saved: '%{actor} werd bewaard.'
|
100
101
|
seo: SEO
|
101
102
|
status_codes:
|
102
103
|
'301': 301 (Moved Permanently)
|
103
104
|
'303': 303 (See Other)
|
104
105
|
'307': 307 (Temporary Redirect)
|
105
|
-
webserver:
|
106
|
-
restarted: De webserver werd opnieuw opgestart
|
data/config/locales/nl_forms.yml
CHANGED
@@ -13,8 +13,10 @@ nl:
|
|
13
13
|
|
14
14
|
labels:
|
15
15
|
defaults:
|
16
|
+
bcc: BCC
|
16
17
|
caption: Beschrijving
|
17
18
|
category: Categorie
|
19
|
+
cc: CC
|
18
20
|
content: Inhoud
|
19
21
|
description: Beschrijving
|
20
22
|
disabled: Uitgeschakeld
|
@@ -25,6 +27,7 @@ nl:
|
|
25
27
|
identifier: Interne naam
|
26
28
|
label: Label
|
27
29
|
last_name: Achternaam
|
30
|
+
locale: Taal
|
28
31
|
message: Bericht
|
29
32
|
name: Naam
|
30
33
|
password: Wachtwoord
|
data/config/routes.rb
CHANGED
@@ -14,18 +14,15 @@ Rails.application.routes.draw do
|
|
14
14
|
end
|
15
15
|
|
16
16
|
get '/' => 'dashboard#show'
|
17
|
-
post 'restart_webserver' => 'webserver#restart'
|
18
17
|
|
19
18
|
resources :sessions, only: [:new, :create, :destroy]
|
20
19
|
resources :admins
|
21
20
|
|
22
21
|
resources :pages, except: [:show] do
|
23
22
|
concerns :translatable
|
24
|
-
member
|
25
|
-
|
26
|
-
|
27
|
-
resources :forms do
|
28
|
-
resources :submissions, controller: 'forms/submissions'
|
23
|
+
member do
|
24
|
+
post :tree_drag_and_drop, :toggle_visibility
|
25
|
+
end
|
29
26
|
end
|
30
27
|
|
31
28
|
resources :navigations, only: [:index] do
|
@@ -57,6 +54,7 @@ Rails.application.routes.draw do
|
|
57
54
|
get 'html_content'
|
58
55
|
end
|
59
56
|
end
|
57
|
+
|
60
58
|
resources :redirects, except: :show
|
61
59
|
|
62
60
|
namespace :content do
|
@@ -64,7 +62,7 @@ Rails.application.routes.draw do
|
|
64
62
|
concerns :positionable
|
65
63
|
|
66
64
|
scope module: 'rows' do
|
67
|
-
resources :columns do
|
65
|
+
resources :columns, except: [:index, :show] do
|
68
66
|
concerns :positionable
|
69
67
|
end
|
70
68
|
end
|
@@ -3,7 +3,14 @@ module Udongo
|
|
3
3
|
class FlexibleContent
|
4
4
|
include Virtus.model
|
5
5
|
|
6
|
+
BREAKPOINTS = %w(xs sm md lg xl)
|
7
|
+
|
6
8
|
attribute :types, Array, default: %w(text image)
|
9
|
+
attribute :allowed_breakpoints, Array, default: BREAKPOINTS
|
10
|
+
|
11
|
+
def allowed_breakpoint?(value)
|
12
|
+
allowed_breakpoints.include?(value.to_s)
|
13
|
+
end
|
7
14
|
end
|
8
15
|
end
|
9
16
|
end
|