udongo 6.3.2 → 6.4.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/general.js +6 -0
- data/app/assets/stylesheets/backend/application.scss +1 -0
- data/app/assets/stylesheets/backend/base/_general.scss +7 -0
- data/app/assets/stylesheets/backend/pages/_flexible_content.scss +0 -8
- data/app/assets/stylesheets/backend/udongo.scss +2 -0
- data/app/controllers/backend/content/rows/columns_controller.rb +1 -9
- data/app/controllers/backend/content/rows/slideshows_controller.rb +11 -0
- data/app/controllers/backend/content/rows_controller.rb +16 -0
- data/app/controllers/backend/forms/fields_controller.rb +3 -1
- data/app/controllers/backend/image_collections/base_controller.rb +11 -0
- data/app/controllers/backend/image_collections/images_controller.rb +15 -0
- data/app/controllers/backend/image_collections_controller.rb +50 -0
- data/app/controllers/concerns/backend/content_type_controller.rb +1 -10
- data/app/decorators/content_slideshow_decorator.rb +3 -0
- data/app/models/content_slideshow.rb +9 -0
- data/app/models/image_collection.rb +9 -0
- data/app/views/backend/content/_form.html.erb +1 -1
- data/app/views/backend/content/_rows.html.erb +11 -7
- data/app/views/backend/content/_slideshow.html.erb +6 -0
- data/app/views/backend/content/rows/columns/edit.html.erb +6 -14
- data/app/views/backend/content/rows/columns/new.html.erb +6 -14
- data/app/views/backend/content/rows/edit.html.erb +31 -0
- data/app/views/backend/content/rows/forms/edit.html.erb +4 -12
- data/app/views/backend/content/rows/images/edit.html.erb +12 -20
- data/app/views/backend/content/rows/pictures/edit.html.erb +7 -15
- data/app/views/backend/content/rows/pictures/link_or_upload.html.erb +12 -20
- data/app/views/backend/content/rows/slideshows/edit.html.erb +17 -0
- data/app/views/backend/content/rows/texts/edit.html.erb +2 -10
- data/app/views/backend/content/rows/videos/edit.html.erb +5 -6
- data/app/views/backend/forms/fields/_form.html.erb +1 -0
- data/app/views/backend/image_collections/_form.html.erb +19 -0
- data/app/views/backend/image_collections/_tabs.html.erb +18 -0
- data/app/views/backend/image_collections/edit.html.erb +6 -0
- data/app/views/backend/image_collections/images/index.html.erb +43 -0
- data/app/views/backend/image_collections/index.html.erb +30 -0
- data/app/views/backend/image_collections/new.html.erb +5 -0
- data/app/views/backend/lightbox_saved.html.erb +3 -0
- data/app/views/layouts/backend/_top_navigation.html.erb +1 -0
- data/app/views/layouts/backend/lightbox.html.erb +5 -3
- data/changelog.md +13 -0
- data/config/locales/en_backend.yml +5 -6
- data/config/locales/en_forms.yml +14 -0
- data/config/locales/nl_backend.yml +7 -6
- data/config/locales/nl_forms.yml +13 -0
- data/config/routes.rb +7 -1
- data/db/migrate/20170615113617_create_asset_collections.rb +12 -0
- data/db/migrate/20170615120716_rename_asset_collection_to_image_collection.rb +5 -0
- data/db/migrate/20170615131909_create_content_slideshows.rb +11 -0
- data/db/migrate/20170615184855_add_content_row_margin_padding_and_bg_color.rb +9 -0
- data/db/migrate/20170616114757_add_external_ref_to_form_field.rb +6 -0
- data/lib/udongo/bogus_model.rb +34 -0
- data/lib/udongo/configs/flexible_content.rb +1 -1
- data/lib/udongo/search/result_objects/base.rb +1 -1
- data/lib/udongo/version.rb +1 -1
- data/spec/factories/content_slideshows.rb +5 -0
- data/spec/factories/image_collections.rb +6 -0
- data/vendor/assets/javascripts/backend/lity.js +637 -0
- data/vendor/assets/stylesheets/backend/lity.scss +200 -0
- metadata +30 -2
@@ -1,17 +1,9 @@
|
|
1
1
|
<%= simple_form_for [:backend, @model] do |f| %>
|
2
|
-
<div class="
|
3
|
-
<div class="
|
4
|
-
<%=
|
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>
|
2
|
+
<div class="row">
|
3
|
+
<div class="col-6">
|
4
|
+
<%= f.input :form_id, collection: forms_collection %>
|
13
5
|
</div>
|
14
6
|
</div>
|
15
7
|
|
16
|
-
<%= render 'backend/form_actions', cancel_url:
|
8
|
+
<%= render 'backend/form_actions', cancel_url: '#lity-close' %>
|
17
9
|
<% end %>
|
@@ -1,24 +1,16 @@
|
|
1
1
|
<%= render 'backend/general_form_error', object: @model %>
|
2
2
|
|
3
|
-
|
4
|
-
<div class="
|
5
|
-
|
3
|
+
<% if @model.file.present? %>
|
4
|
+
<div class="row">
|
5
|
+
<div class="col-lg-8 col-lg-offset-2">
|
6
|
+
<%= image_tag(@model.file.url, alt: '', class: 'img-fluid') %>
|
7
|
+
</div>
|
6
8
|
</div>
|
9
|
+
<% end %>
|
7
10
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
</div>
|
15
|
-
<% end %>
|
16
|
-
|
17
|
-
<%= simple_form_for [:backend, @model] do |f| %>
|
18
|
-
<%= f.input :file, as: :file %>
|
19
|
-
<%= f.input :url, as: :string %>
|
20
|
-
<%= f.input :caption, as: :text %>
|
21
|
-
<%= render 'backend/form_actions', cancel_url: content_path %>
|
22
|
-
<% end %>
|
23
|
-
</div>
|
24
|
-
</div>
|
11
|
+
<%= simple_form_for [:backend, @model] do |f| %>
|
12
|
+
<%= f.input :file, as: :file %>
|
13
|
+
<%= f.input :url, as: :string %>
|
14
|
+
<%= f.input :caption, as: :text %>
|
15
|
+
<%= render 'backend/form_actions', cancel_url: '#lity-close' %>
|
16
|
+
<% end %>
|
@@ -1,20 +1,12 @@
|
|
1
1
|
<%= render 'backend/general_form_error', object: @model %>
|
2
2
|
|
3
|
-
|
4
|
-
<div class="card-header">
|
5
|
-
<%= t 'b.msg.flexible_content.edit_picture' %>
|
6
|
-
</div>
|
3
|
+
<%= image_tag @model.asset.image.url(900, 900, quality: 65), alt: '', class: 'img-fluid' %>
|
7
4
|
|
8
|
-
|
9
|
-
|
5
|
+
<%= simple_form_for [:backend, @model] do |f| %>
|
6
|
+
<%= f.input :url, as: :string %>
|
10
7
|
|
11
|
-
|
12
|
-
|
8
|
+
<% content_type = Udongo.config.flexible_content.picture_caption_editor? ? :ckeditor : :text %>
|
9
|
+
<%= f.input :caption, as: content_type %>
|
13
10
|
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
<%= render 'backend/form_actions', cancel_url: content_path %>
|
18
|
-
<% end %>
|
19
|
-
</div>
|
20
|
-
</div>
|
11
|
+
<%= render 'backend/form_actions', cancel_url: '#lity-close' %>
|
12
|
+
<% end %>
|
@@ -1,34 +1,26 @@
|
|
1
1
|
<%= simple_form_for @asset, url: upload_backend_content_picture_path(@model) do |f| %>
|
2
|
-
<div class="
|
3
|
-
<div class="
|
4
|
-
|
5
|
-
</div>
|
2
|
+
<div class="row mb-5">
|
3
|
+
<div class="col-12">
|
4
|
+
<h4><%= t 'b.upload_a_new_image' %></h4>
|
6
5
|
|
7
|
-
<div class="card-block">
|
8
6
|
<%= f.input :filename, as: :file, label: false, required: false %>
|
9
7
|
<%= f.input :description, as: :text, required: false %>
|
10
8
|
|
11
|
-
<%= render 'backend/form_actions', cancel_url:
|
9
|
+
<%= render 'backend/form_actions', cancel_url: '#lity-close' %>
|
12
10
|
</div>
|
13
11
|
</div>
|
14
12
|
<% end %>
|
15
13
|
|
16
|
-
<div class="card">
|
17
|
-
<div class="card-header">
|
18
|
-
<%= t 'b.choose_an_existing_image' %>
|
19
|
-
</div>
|
20
14
|
|
21
|
-
|
22
|
-
|
15
|
+
<h4><%= t 'b.choose_an_existing_image' %></h4>
|
16
|
+
<%= render 'filter' %>
|
23
17
|
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
<% end %>
|
30
|
-
</div>
|
18
|
+
<div class="row">
|
19
|
+
<% @assets.each do |a| %>
|
20
|
+
<div class="col-sm-6 col-md-4 col-lg-3 col-xl-2">
|
21
|
+
<%= link_to link_backend_content_picture_path(@model, asset_id: a.id), style: '' do %>
|
22
|
+
<%= image_tag a.image.url(550, 550, action: :resize_and_pad, background: :white), alt: '', class: 'img-fluid' %>
|
31
23
|
<% end %>
|
32
24
|
</div>
|
33
|
-
|
25
|
+
<% end %>
|
34
26
|
</div>
|
@@ -0,0 +1,17 @@
|
|
1
|
+
<%= simple_form_for [:backend, @model] do |f| %>
|
2
|
+
<div class="row">
|
3
|
+
<div class="col-md-4">
|
4
|
+
<%= f.input :image_collection_id, collection: image_collections %>
|
5
|
+
</div>
|
6
|
+
|
7
|
+
<div class="col-md-4">
|
8
|
+
<%= f.input :slide_interval, as: :integer %>
|
9
|
+
</div>
|
10
|
+
|
11
|
+
<div class="col-md-4">
|
12
|
+
<%= f.input :autoplay, as: :boolean %>
|
13
|
+
</div>
|
14
|
+
</div>
|
15
|
+
|
16
|
+
<%= render 'backend/form_actions', cancel_url: '#lity-close' %>
|
17
|
+
<% end %>
|
@@ -1,13 +1,5 @@
|
|
1
1
|
<%= simple_form_for [:backend, @model] do |f| %>
|
2
|
-
|
3
|
-
<div class="card-header">
|
4
|
-
<%= t 'b.msg.flexible_content.edit_text' %>
|
5
|
-
</div>
|
2
|
+
<%= f.input :content, as: :ckeditor, label: false %>
|
6
3
|
|
7
|
-
|
8
|
-
<%= f.input :content, as: :ckeditor, label: false %>
|
9
|
-
</div>
|
10
|
-
</div>
|
11
|
-
|
12
|
-
<%= render 'backend/form_actions', cancel_url: content_path %>
|
4
|
+
<%= render 'backend/form_actions', cancel_url: '#lity-close' %>
|
13
5
|
<% end %>
|
@@ -1,14 +1,13 @@
|
|
1
1
|
<%= simple_form_for [:backend, @model] do |f| %>
|
2
|
-
<div class="
|
3
|
-
<div class="
|
4
|
-
<%=
|
2
|
+
<div class="row">
|
3
|
+
<div class="col-md-8">
|
4
|
+
<%= f.input :url, as: :string %>
|
5
5
|
</div>
|
6
6
|
|
7
|
-
<div class="
|
8
|
-
<%= f.input :url, as: :string %>
|
7
|
+
<div class="col-md-4">
|
9
8
|
<%= f.input :aspect_ratio, collection: ContentVideo::ASPECT_RATIOS, include_blank: false %>
|
10
9
|
</div>
|
11
10
|
</div>
|
12
11
|
|
13
|
-
<%= render 'backend/form_actions', cancel_url:
|
12
|
+
<%= render 'backend/form_actions', cancel_url: '#lity-close' %>
|
14
13
|
<% end %>
|
@@ -0,0 +1,19 @@
|
|
1
|
+
<%= render 'backend/general_form_error', object: @model %>
|
2
|
+
|
3
|
+
<%= simple_form_for [:backend, @model] do |f| %>
|
4
|
+
<div class="row">
|
5
|
+
<div class="col-md-6">
|
6
|
+
<div class="card">
|
7
|
+
<div class="card-header">
|
8
|
+
<%= t 'b.general' %>
|
9
|
+
</div>
|
10
|
+
|
11
|
+
<div class="card-block">
|
12
|
+
<%= f.input :description, as: :string %>
|
13
|
+
</div>
|
14
|
+
</div>
|
15
|
+
</div>
|
16
|
+
</div>
|
17
|
+
|
18
|
+
<%= render 'backend/form_actions', cancel_url: backend_image_collections_path %>
|
19
|
+
<% end %>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<div class="row subnav">
|
2
|
+
<div class="col-md-12">
|
3
|
+
<ul class="nav nav-pills">
|
4
|
+
<li class="nav-item">
|
5
|
+
<% klass = %w(nav-link) %>
|
6
|
+
<% klass << 'active' if active == :general %>
|
7
|
+
|
8
|
+
<%= link_to t('b.general'), edit_backend_image_collection_path(model), class: klass %>
|
9
|
+
</li>
|
10
|
+
|
11
|
+
<li class="nav-item">
|
12
|
+
<% klass = %w(nav-link) %>
|
13
|
+
<% klass << 'active' if active == :images %>
|
14
|
+
<%= link_to icon(:image, t('b.images')), backend_image_collection_images_path(model), class: klass %>
|
15
|
+
</li>
|
16
|
+
</ul>
|
17
|
+
</div>
|
18
|
+
</div>
|
@@ -0,0 +1,43 @@
|
|
1
|
+
<% javascript 'backend/sortable' %>
|
2
|
+
<%= render 'backend/breadcrumbs' %>
|
3
|
+
<%= render 'backend/image_collections/tabs', model: @image_collection, active: :images %>
|
4
|
+
|
5
|
+
<p class="text-right">
|
6
|
+
<%= link_to icon(:plus, t('b.add')), backend_images_path(klass: @image_collection.class.name, id: @image_collection.id), class: 'btn btn-primary btn-sm' %>
|
7
|
+
</p>
|
8
|
+
|
9
|
+
<% if @images.any? %>
|
10
|
+
<table class="table table-striped table-hover">
|
11
|
+
<thead class="thead-inverse">
|
12
|
+
<tr>
|
13
|
+
<th><%= t 'b.file' %></th>
|
14
|
+
<th><%= t 'b.type' %></th>
|
15
|
+
<th><%= t 'b.size' %></th>
|
16
|
+
<th><%= t 'b.description' %></th>
|
17
|
+
<th><%= t 'b.last_changed_at' %></th>
|
18
|
+
<th> </th>
|
19
|
+
</tr>
|
20
|
+
</thead>
|
21
|
+
|
22
|
+
<tbody>
|
23
|
+
<% @images.each do |img| %>
|
24
|
+
<% a = img.asset %>
|
25
|
+
<tr data-update-position="<%= update_position_backend_image_collection_image_path(@image_collection, img) %>">
|
26
|
+
<td>
|
27
|
+
<%= image_tag a.image.url(150, 150), alt: '', class: 'img-fluid' %>
|
28
|
+
</td>
|
29
|
+
<td><%= a.actual_filename.split('.').last.upcase %></td>
|
30
|
+
<td><%= number_to_human_size a.filesize %></td>
|
31
|
+
<td><%= simple_format a.description %></td>
|
32
|
+
<td><%= l a.updated_at %></td>
|
33
|
+
<td class="text-right">
|
34
|
+
<%= link_to icon(:trash), unlink_backend_images_path(klass: @image_collection.class.name, id: @image_collection.id, asset_id: a.id), data: { confirm: t('b.msg.confirm') }, title: t('b.delete') %>
|
35
|
+
</td>
|
36
|
+
</tr>
|
37
|
+
<% end %>
|
38
|
+
</tbody>
|
39
|
+
</table>
|
40
|
+
|
41
|
+
<% else %>
|
42
|
+
<p><%= t 'b.msg.no_items' %></p>
|
43
|
+
<% end %>
|
@@ -0,0 +1,30 @@
|
|
1
|
+
<%= render 'backend/breadcrumbs' %>
|
2
|
+
|
3
|
+
<p class="text-right">
|
4
|
+
<%= link_to icon(:plus, t('b.add')), new_backend_image_collection_path, class: 'btn btn-primary btn-sm' %>
|
5
|
+
</p>
|
6
|
+
|
7
|
+
<% if @image_collections.any? %>
|
8
|
+
<table class="table table-striped table-hover">
|
9
|
+
<thead class="thead-inverse">
|
10
|
+
<tr>
|
11
|
+
<th><%= t 'b.description' %></th>
|
12
|
+
<th> </th>
|
13
|
+
</tr>
|
14
|
+
</thead>
|
15
|
+
|
16
|
+
<tbody>
|
17
|
+
<% @image_collections.each do |c| %>
|
18
|
+
<tr>
|
19
|
+
<td><%= c.description %></td>
|
20
|
+
<td class="text-right">
|
21
|
+
<%= link_to_edit [:backend, c] %>
|
22
|
+
<%= link_to_delete [:backend, c] %>
|
23
|
+
</td>
|
24
|
+
</tr>
|
25
|
+
<% end %>
|
26
|
+
</tbody>
|
27
|
+
</table>
|
28
|
+
<% else %>
|
29
|
+
<p><%= t 'b.msg.no_items' %></p>
|
30
|
+
<% end %>
|
@@ -7,6 +7,7 @@
|
|
7
7
|
<%= link_to t('b.articles'), backend_articles_path, class: 'dropdown-item' %>
|
8
8
|
<%= link_to t('b.snippets'), backend_snippets_path, class: 'dropdown-item' %>
|
9
9
|
<%= link_to t('b.files'), backend_assets_path, class: 'dropdown-item' %>
|
10
|
+
<%= link_to t('b.image_collections'), backend_image_collections_path, class: 'dropdown-item' %>
|
10
11
|
<%= link_to t('b.forms'), backend_forms_path, class: 'dropdown-item' %>
|
11
12
|
<%= link_to t('b.tags'), backend_tags_path, class: 'dropdown-item' %>
|
12
13
|
</div>
|
@@ -12,9 +12,11 @@
|
|
12
12
|
</head>
|
13
13
|
|
14
14
|
<body class="lightbox">
|
15
|
-
<div class="
|
16
|
-
<div class="
|
17
|
-
|
15
|
+
<div class="container-fluid">
|
16
|
+
<div class="row">
|
17
|
+
<div class="col-12">
|
18
|
+
<%= yield %>
|
19
|
+
</div>
|
18
20
|
</div>
|
19
21
|
</div>
|
20
22
|
|
data/changelog.md
CHANGED
@@ -1,3 +1,16 @@
|
|
1
|
+
6.4.0 - 2017-06-16
|
2
|
+
--
|
3
|
+
* Add the AssetCollection model with a module. This allows you to put certai
|
4
|
+
assets in one or more collections. These can then be used in the future to
|
5
|
+
create slideshows, photo albums and even file lists.
|
6
|
+
* Bugfix: reworked to Udongo::Search::Frontend visible/publishable check tests
|
7
|
+
to help fix a test that failed Sometimes™.
|
8
|
+
* Flexible content rows can now have a background color and padding/margin for
|
9
|
+
the bottom/top.
|
10
|
+
* All flexible content actions are now shown in popups.
|
11
|
+
* Add field 'external_reference' to form fields.
|
12
|
+
|
13
|
+
|
1
14
|
6.3.2 - 2017-06-07
|
2
15
|
--
|
3
16
|
* Bugfix: there was an issue with the has_many :addresses relation in the
|
@@ -81,6 +81,7 @@ en:
|
|
81
81
|
sent_at: Sent at
|
82
82
|
settings: Settings
|
83
83
|
size: Size
|
84
|
+
slideshow: Slideshow
|
84
85
|
snippet: Snippet
|
85
86
|
snippets: Snippets
|
86
87
|
source: Source
|
@@ -118,6 +119,7 @@ en:
|
|
118
119
|
form: Form
|
119
120
|
image: Image (deprecated!)
|
120
121
|
picture: Picture
|
122
|
+
slideshow: Slideshow
|
121
123
|
text: Text
|
122
124
|
video: Video
|
123
125
|
deleted: '%{actor} was deleted.'
|
@@ -133,17 +135,14 @@ en:
|
|
133
135
|
align_vertical_bottom: Align vertical bottom
|
134
136
|
align_vertical_center: Align vertically
|
135
137
|
align_vertical_top: Align vertical top
|
136
|
-
edit_column: Edit column
|
137
|
-
edit_form: Edit form
|
138
|
-
edit_image: Edit image
|
139
|
-
edit_picture: Edit picture
|
140
|
-
edit_text: Edit text
|
141
|
-
edit_video: Edit video
|
142
138
|
explanation: With this module you can create flexible responsive content. Click the button below to create the first row.
|
143
139
|
full_width: Full width
|
140
|
+
margin_explanation: Margin is the whitespace above and below this row.
|
144
141
|
no_form_present: No form has been linked yet.
|
145
142
|
no_picture_present: No picture has been uploaded/linked yet.
|
143
|
+
no_slideshow_present: No slideshow has been configured yet.
|
146
144
|
no_video_present: No valid video URL was given.
|
145
|
+
padding_explanation: Padding is the top and bottom whitespace within this row.
|
147
146
|
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.
|
148
147
|
forgot_password: Forgot password?
|
149
148
|
form_fields:
|
data/config/locales/en_forms.yml
CHANGED
@@ -15,6 +15,7 @@ en:
|
|
15
15
|
defaults:
|
16
16
|
active: Active
|
17
17
|
author: Author
|
18
|
+
autoplay: Autoplay
|
18
19
|
bcc: BCC
|
19
20
|
caption: Caption
|
20
21
|
category: Category
|
@@ -24,6 +25,7 @@ en:
|
|
24
25
|
description: Description
|
25
26
|
disabled: Disabled
|
26
27
|
email: E-mail
|
28
|
+
external_reference: External reference
|
27
29
|
extra: Extra
|
28
30
|
field_type: Field type
|
29
31
|
first_name: First name
|
@@ -66,6 +68,18 @@ en:
|
|
66
68
|
width_lg: Width (large)
|
67
69
|
width_xl: Width (extra large)
|
68
70
|
|
71
|
+
content_row:
|
72
|
+
background_color: Background color
|
73
|
+
margin_bottom: Bottom margin
|
74
|
+
margin_top: Top margin
|
75
|
+
padding_bottom: Bottom padding
|
76
|
+
padding_top: Top padding
|
77
|
+
|
78
|
+
content_slideshow:
|
79
|
+
autoplay: Autoplay
|
80
|
+
image_collection_id: Image collection
|
81
|
+
slide_interval: Interval between slides
|
82
|
+
|
69
83
|
email_template:
|
70
84
|
from_email: Sender e-mail address
|
71
85
|
from_name: Sender name
|