udongo 6.1.0 → 6.2.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 +2 -2
- data/app/assets/stylesheets/backend/bootstrap.scss +0 -1
- data/app/controllers/backend/content/rows/forms_controller.rb +11 -0
- data/app/controllers/backend/forms_controller.rb +1 -1
- data/app/decorators/content_form_decorator.rb +3 -0
- data/app/helpers/collection_helper.rb +7 -0
- data/app/models/content_form.rb +9 -0
- data/app/models/form.rb +5 -0
- data/app/models/form_field.rb +2 -0
- data/app/views/backend/content/_form.html.erb +5 -0
- data/app/views/backend/content/rows/forms/edit.html.erb +17 -0
- data/app/views/backend/forms/fields/_form.html.erb +1 -2
- data/app/views/backend/forms/index.html.erb +1 -1
- data/changelog.md +11 -0
- data/config/locales/en_backend.yml +3 -0
- data/config/locales/nl_backend.yml +3 -0
- data/config/locales/nl_general.yml +7 -0
- data/db/migrate/20170602114411_create_content_forms.rb +9 -0
- data/lib/udongo/configs/flexible_content.rb +1 -1
- data/lib/udongo/version.rb +1 -1
- data/spec/factories/content_forms.rb +5 -0
- data/vendor/assets/stylesheets/backend/tagit/_base.scss +33 -29
- metadata +14 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e45537b4c9cf7da08281cc79305ebc6dea5a94b5
|
4
|
+
data.tar.gz: 8c70624b93fa57b91de7803df1886a2b922c36c0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d39657ebe57454cbb324c764d0800416156bddeaf4902d5cd7653c2bf08c51847ac4a9588c576d235200880071c4f95ed8e87d73b684b2dd3c7899068479c5b6
|
7
|
+
data.tar.gz: 96ac9430540f0abe52e3c1643205686029678e760efd07655be0915eec2ac20161d83461eff94aaada2d4b516f6a265b1d949a161c44938ca2170506449cbf83
|
@@ -12,9 +12,9 @@
|
|
12
12
|
//
|
13
13
|
//= require jquery3
|
14
14
|
//= require jquery_ujs
|
15
|
-
//= require jquery-ui/
|
15
|
+
//= require jquery-ui/widgets/sortable
|
16
|
+
//= require jquery-ui/widgets/autocomplete
|
16
17
|
//= require jquery-ui.autocomplete.html.js
|
17
|
-
//= require jquery-ui/sortable
|
18
18
|
//= require backend/tether.min
|
19
19
|
//= require backend/bootstrap
|
20
20
|
//= require backend/jquery.throttle-debounce.min.js
|
@@ -0,0 +1,11 @@
|
|
1
|
+
class Backend::Content::Rows::FormsController < Backend::BaseController
|
2
|
+
include Concerns::Backend::ContentTypeController
|
3
|
+
|
4
|
+
model ContentForm
|
5
|
+
allowed_params :form_id
|
6
|
+
|
7
|
+
def forms_collection
|
8
|
+
Form.order(:description).map { |f| [f.description, f.id] }
|
9
|
+
end
|
10
|
+
helper_method :forms_collection
|
11
|
+
end
|
data/app/models/form.rb
CHANGED
@@ -5,6 +5,11 @@ class Form < ApplicationRecord
|
|
5
5
|
has_many :fields, class_name: 'FormField', dependent: :destroy
|
6
6
|
has_many :submissions, class_name: 'FormSubmission', dependent: :destroy
|
7
7
|
has_many :data, through: :submissions
|
8
|
+
has_many :content_forms, dependent: :destroy
|
8
9
|
|
9
10
|
validates :description, presence: true
|
11
|
+
|
12
|
+
def deletable?
|
13
|
+
content_forms.empty?
|
14
|
+
end
|
10
15
|
end
|
data/app/models/form_field.rb
CHANGED
@@ -0,0 +1,17 @@
|
|
1
|
+
<%= simple_form_for [:backend, @model] do |f| %>
|
2
|
+
<div class="card">
|
3
|
+
<div class="card-header">
|
4
|
+
<%= t 'b.msg.flexible_content.edit_form' %>
|
5
|
+
</div>
|
6
|
+
|
7
|
+
<div class="card-block">
|
8
|
+
<div class="row">
|
9
|
+
<div class="col-6">
|
10
|
+
<%= f.input :form_id, collection: forms_collection %>
|
11
|
+
</div>
|
12
|
+
</div>
|
13
|
+
</div>
|
14
|
+
</div>
|
15
|
+
|
16
|
+
<%= render 'backend/form_actions', cancel_url: content_path %>
|
17
|
+
<% end %>
|
@@ -10,8 +10,7 @@
|
|
10
10
|
|
11
11
|
<div class="card-block">
|
12
12
|
<%= f.input :identifier %>
|
13
|
-
|
14
|
-
<%= f.input :field_type %>
|
13
|
+
<%= f.input :field_type, collection: options_for_collection(:form_field_type, FormField::FIELD_TYPES) %>
|
15
14
|
</div>
|
16
15
|
</div>
|
17
16
|
</div>
|
@@ -35,7 +35,7 @@
|
|
35
35
|
<% if f.submissions.any? %>
|
36
36
|
<%= link_to icon(:trash), '#', data: { toggle: 'tooltip' }, title: t('b.msg.forms.removal_warning', submissions: f.submissions.size) %>
|
37
37
|
<% else %>
|
38
|
-
<%= link_to_delete [:backend, f] %>
|
38
|
+
<%= link_to_delete [:backend, f] if f.deletable? %>
|
39
39
|
<% end %>
|
40
40
|
</td>
|
41
41
|
</tr>
|
data/changelog.md
CHANGED
@@ -1,3 +1,14 @@
|
|
1
|
+
6.2.0 - 2017-06-02
|
2
|
+
--
|
3
|
+
* Removed the bootstrap source mapping reference in backend/bootstrap.scss.
|
4
|
+
* Upgraded jquery-ui-rails to 6.0.1 to fix autocomplete issues with jquery3.
|
5
|
+
* Add the ```CollectionHelper``` which allows you to use ```options_for_collection```
|
6
|
+
to easily create collections for simple form.
|
7
|
+
* The form field types are now a dropdown instead of a text field.
|
8
|
+
* A form widget has been added. This makes it possible to include a form on a
|
9
|
+
specific location in the flexible content.
|
10
|
+
|
11
|
+
|
1
12
|
6.1.0 - 2017-05-16
|
2
13
|
--
|
3
14
|
* The obsolete top navigation markup has been cleaned up.
|
@@ -110,6 +110,7 @@ en:
|
|
110
110
|
changes_saved: The changes have been saved.
|
111
111
|
confirm: Are you sure?
|
112
112
|
content_types:
|
113
|
+
form: Form
|
113
114
|
image: Image (deprecated!)
|
114
115
|
picture: Picture
|
115
116
|
text: Text
|
@@ -128,12 +129,14 @@ en:
|
|
128
129
|
align_vertical_center: Align vertically
|
129
130
|
align_vertical_top: Align vertical top
|
130
131
|
edit_column: Edit column
|
132
|
+
edit_form: Edit form
|
131
133
|
edit_image: Edit image
|
132
134
|
edit_picture: Edit picture
|
133
135
|
edit_text: Edit text
|
134
136
|
edit_video: Edit video
|
135
137
|
explanation: With this module you can create flexible responsive content. Click the button below to create the first row.
|
136
138
|
full_width: Full width
|
139
|
+
no_form_present: No form has been linked yet.
|
137
140
|
no_picture_present: No picture has been uploaded/linked yet.
|
138
141
|
no_video_present: No valid video URL was given.
|
139
142
|
width_explanation: For the flexible content we use a grid layout. This works with rows and columns. Every row can contain at most 12 columns. That's why the column width is expressed as a fracture.
|
@@ -110,6 +110,7 @@ nl:
|
|
110
110
|
changes_saved: De wijzigingen werden opgeslagen.
|
111
111
|
confirm: Ben je zeker?
|
112
112
|
content_types:
|
113
|
+
form: Formulier
|
113
114
|
image: Afbeelding (niet meer gebruiken!)
|
114
115
|
picture: Foto
|
115
116
|
text: Tekst
|
@@ -128,12 +129,14 @@ nl:
|
|
128
129
|
align_vertical_center: Vertikaal centreren
|
129
130
|
align_vertical_top: Vertikaal bovenaan uitlijnen
|
130
131
|
edit_column: Kolom bewerken
|
132
|
+
edit_form: Formulier bewerken
|
131
133
|
edit_image: Afbeelding bewerken
|
132
134
|
edit_picture: Foto bewerken
|
133
135
|
edit_text: Tekst bewerken
|
134
136
|
edit_video: Video bewerken
|
135
137
|
explanation: Met deze module kan je flexibele, responsive inhoud toevoegen. Klik op onderstaande knop om een eerste rij toe te voegen.
|
136
138
|
full_width: Volledige breedte
|
139
|
+
no_form_present: Er werd nog geen formulier gelinkt.
|
137
140
|
no_picture_present: Er werd nog geen foto geüpload of gelinkt.
|
138
141
|
no_video_present: Er werd nog geen geldige URL voor een video opgegeven.
|
139
142
|
width_explanation: Voor de flexibele inhoud wordt er gebruikt gemaakt van een grid layout. Deze werkt met rijen en kolommen. Iedere rij kan maximaal 12 kolommen bevatten. Daarom dat de breedte uitgedrukt is in een breuk op 12.
|
@@ -6,7 +6,7 @@ module Udongo
|
|
6
6
|
BREAKPOINTS = %w(xs sm md lg xl)
|
7
7
|
DEFAULT_BREAKPOINT = 'md'
|
8
8
|
|
9
|
-
attribute :types, Array, default: %w(text picture video image)
|
9
|
+
attribute :types, Array, default: %w(text picture video form image)
|
10
10
|
attribute :picture_caption_editor, Axiom::Types::Boolean, default: false
|
11
11
|
|
12
12
|
def picture_caption_editor?
|
data/lib/udongo/version.rb
CHANGED
@@ -28,46 +28,50 @@ ul.tagit li.tagit-new {
|
|
28
28
|
padding: .25em 4px .25em 0;
|
29
29
|
}
|
30
30
|
|
31
|
-
ul.tagit li.tagit-choice
|
31
|
+
ul.tagit li.tagit-choice {
|
32
|
+
a.tagit-label {
|
32
33
|
cursor: pointer;
|
33
34
|
text-decoration: none;
|
34
|
-
}
|
35
|
-
|
35
|
+
}
|
36
|
+
|
37
|
+
input {
|
38
|
+
display: block;
|
39
|
+
float: left;
|
40
|
+
margin: 2px 5px 2px 0;
|
41
|
+
}
|
42
|
+
|
43
|
+
.tagit-close {
|
36
44
|
cursor: pointer;
|
37
45
|
position: absolute;
|
38
|
-
right: .
|
39
|
-
top:
|
46
|
+
right: .3rem;
|
47
|
+
top: 1rem;
|
40
48
|
margin-top: -8px;
|
41
49
|
line-height: 17px;
|
42
|
-
}
|
43
50
|
|
44
|
-
/* used for some custom themes that don't need image icons */
|
45
|
-
|
46
|
-
|
47
|
-
}
|
51
|
+
/* used for some custom themes that don't need image icons */
|
52
|
+
.text-icon {
|
53
|
+
display: inline;
|
54
|
+
}
|
48
55
|
|
49
|
-
|
50
|
-
|
56
|
+
.ui-icon-close {
|
57
|
+
display: none;
|
58
|
+
}
|
59
|
+
}
|
51
60
|
}
|
52
61
|
|
53
|
-
ul.tagit li.tagit-choice input {
|
54
|
-
display: block;
|
55
|
-
float: left;
|
56
|
-
margin: 2px 5px 2px 0;
|
57
|
-
}
|
58
62
|
ul.tagit input[type="text"] {
|
59
|
-
|
60
|
-
|
61
|
-
|
63
|
+
-moz-box-sizing: border-box;
|
64
|
+
-webkit-box-sizing: border-box;
|
65
|
+
box-sizing: border-box;
|
62
66
|
|
63
|
-
|
64
|
-
|
65
|
-
|
67
|
+
-moz-box-shadow: none;
|
68
|
+
-webkit-box-shadow: none;
|
69
|
+
box-shadow: none;
|
66
70
|
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
71
|
+
border: none;
|
72
|
+
margin: 0;
|
73
|
+
padding: 0;
|
74
|
+
width: inherit;
|
75
|
+
background-color: inherit;
|
76
|
+
outline: none;
|
73
77
|
}
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: udongo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.
|
4
|
+
version: 6.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Davy Hellemans
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2017-
|
12
|
+
date: 2017-06-02 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -51,20 +51,20 @@ dependencies:
|
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
54
|
+
version: '6.0'
|
55
55
|
- - ">="
|
56
56
|
- !ruby/object:Gem::Version
|
57
|
-
version:
|
57
|
+
version: 6.0.1
|
58
58
|
type: :runtime
|
59
59
|
prerelease: false
|
60
60
|
version_requirements: !ruby/object:Gem::Requirement
|
61
61
|
requirements:
|
62
62
|
- - "~>"
|
63
63
|
- !ruby/object:Gem::Version
|
64
|
-
version: '
|
64
|
+
version: '6.0'
|
65
65
|
- - ">="
|
66
66
|
- !ruby/object:Gem::Version
|
67
|
-
version:
|
67
|
+
version: 6.0.1
|
68
68
|
- !ruby/object:Gem::Dependency
|
69
69
|
name: sass-rails
|
70
70
|
requirement: !ruby/object:Gem::Requirement
|
@@ -462,6 +462,7 @@ files:
|
|
462
462
|
- app/controllers/backend/assets_controller.rb
|
463
463
|
- app/controllers/backend/base_controller.rb
|
464
464
|
- app/controllers/backend/content/rows/columns_controller.rb
|
465
|
+
- app/controllers/backend/content/rows/forms_controller.rb
|
465
466
|
- app/controllers/backend/content/rows/images_controller.rb
|
466
467
|
- app/controllers/backend/content/rows/pictures_controller.rb
|
467
468
|
- app/controllers/backend/content/rows/texts_controller.rb
|
@@ -494,6 +495,7 @@ files:
|
|
494
495
|
- app/controllers/concerns/pagination_controller.rb
|
495
496
|
- app/controllers/redirects_controller.rb
|
496
497
|
- app/decorators/application_decorator.rb
|
498
|
+
- app/decorators/content_form_decorator.rb
|
497
499
|
- app/decorators/content_image_decorator.rb
|
498
500
|
- app/decorators/content_picture_decorator.rb
|
499
501
|
- app/decorators/content_row_decorator.rb
|
@@ -518,6 +520,7 @@ files:
|
|
518
520
|
- app/helpers/backend/dropdown_helper.rb
|
519
521
|
- app/helpers/backend/form_helper.rb
|
520
522
|
- app/helpers/backend/pagination_helper.rb
|
523
|
+
- app/helpers/collection_helper.rb
|
521
524
|
- app/helpers/icon_helper.rb
|
522
525
|
- app/helpers/link_helper.rb
|
523
526
|
- app/helpers/navigation_helper.rb
|
@@ -563,6 +566,7 @@ files:
|
|
563
566
|
- app/models/concerns/translatable.rb
|
564
567
|
- app/models/concerns/visible.rb
|
565
568
|
- app/models/content_column.rb
|
569
|
+
- app/models/content_form.rb
|
566
570
|
- app/models/content_image.rb
|
567
571
|
- app/models/content_picture.rb
|
568
572
|
- app/models/content_row.rb
|
@@ -622,6 +626,7 @@ files:
|
|
622
626
|
- app/views/backend/assets/edit.html.erb
|
623
627
|
- app/views/backend/assets/index.html.erb
|
624
628
|
- app/views/backend/assets/new.html.erb
|
629
|
+
- app/views/backend/content/_form.html.erb
|
625
630
|
- app/views/backend/content/_image.html.erb
|
626
631
|
- app/views/backend/content/_picture.html.erb
|
627
632
|
- app/views/backend/content/_rows.html.erb
|
@@ -631,6 +636,7 @@ files:
|
|
631
636
|
- app/views/backend/content/rows/columns/_dimension_fields.html.erb
|
632
637
|
- app/views/backend/content/rows/columns/edit.html.erb
|
633
638
|
- app/views/backend/content/rows/columns/new.html.erb
|
639
|
+
- app/views/backend/content/rows/forms/edit.html.erb
|
634
640
|
- app/views/backend/content/rows/images/edit.html.erb
|
635
641
|
- app/views/backend/content/rows/pictures/_filter.html.erb
|
636
642
|
- app/views/backend/content/rows/pictures/edit.html.erb
|
@@ -809,6 +815,7 @@ files:
|
|
809
815
|
- db/migrate/20170507092541_add_alignment_options_to_content_rows.rb
|
810
816
|
- db/migrate/20170507163532_create_content_videos.rb
|
811
817
|
- db/migrate/20170516092845_add_sitemap_to_page.rb
|
818
|
+
- db/migrate/20170602114411_create_content_forms.rb
|
812
819
|
- lib/tasks/task_extras.rb
|
813
820
|
- lib/tasks/udongo_tasks.rake
|
814
821
|
- lib/udongo.rb
|
@@ -861,6 +868,7 @@ files:
|
|
861
868
|
- spec/factories/assets.rb
|
862
869
|
- spec/factories/comments.rb
|
863
870
|
- spec/factories/content_columns.rb
|
871
|
+
- spec/factories/content_forms.rb
|
864
872
|
- spec/factories/content_images.rb
|
865
873
|
- spec/factories/content_pictures.rb
|
866
874
|
- spec/factories/content_rows.rb
|