udongo 5.9.0 → 6.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/bootstrap.js +4 -4
- data/app/assets/javascripts/backend/flexible_content.js +1 -1
- data/app/assets/javascripts/backend/flexible_content_breakpoints.js +32 -0
- data/app/assets/stylesheets/backend/bootstrap.scss +4877 -1925
- data/app/assets/stylesheets/backend/components/_card.scss +3 -0
- data/app/assets/stylesheets/backend/components/_form.scss +1 -1
- data/app/assets/stylesheets/backend/components/{_tabs.scss → _tab.scss} +0 -0
- data/app/assets/stylesheets/backend/udongo.scss +2 -1
- data/app/controllers/backend/content/rows/videos_controller.rb +6 -0
- data/app/controllers/backend/content/rows_controller.rb +22 -1
- data/app/decorators/content_row_decorator.rb +20 -0
- data/app/decorators/content_video_decorator.rb +23 -0
- data/app/helpers/backend/dropdown_helper.rb +1 -1
- data/app/models/content_video.rb +11 -0
- data/app/models/email_template.rb +1 -1
- data/app/views/backend/_breadcrumbs.html.erb +3 -2
- data/app/views/backend/_navigation.html.erb +5 -2
- data/app/views/backend/admins/index.html.erb +2 -2
- data/app/views/backend/articles/images/index.html.erb +2 -2
- data/app/views/backend/articles/index.html.erb +2 -2
- data/app/views/backend/assets/index.html.erb +2 -2
- data/app/views/backend/content/_rows.html.erb +36 -2
- data/app/views/backend/content/_video.html.erb +8 -0
- data/app/views/backend/content/rows/columns/_column_width_explanation.html.erb +5 -0
- data/app/views/backend/content/rows/columns/_dimension_fields.html.erb +28 -10
- data/app/views/backend/content/rows/columns/edit.html.erb +2 -0
- data/app/views/backend/content/rows/columns/new.html.erb +2 -0
- data/app/views/backend/content/rows/videos/edit.html.erb +14 -0
- data/app/views/backend/email_templates/index.html.erb +1 -1
- data/app/views/backend/emails/index.html.erb +1 -1
- data/app/views/backend/forms/fields/index.html.erb +10 -17
- data/app/views/backend/forms/index.html.erb +7 -9
- data/app/views/backend/forms/submissions/index.html.erb +4 -9
- data/app/views/backend/images/index.html.erb +1 -3
- data/app/views/backend/images/new.html.erb +0 -1
- data/app/views/backend/navigations/index.html.erb +2 -2
- data/app/views/backend/pages/index.html.erb +1 -1
- data/app/views/backend/redirects/index.html.erb +3 -4
- data/app/views/backend/search_synonyms/_form.html.erb +15 -7
- data/app/views/backend/search_synonyms/index.html.erb +2 -2
- data/app/views/backend/snippets/index.html.erb +1 -1
- data/app/views/backend/users/index.html.erb +2 -2
- data/app/views/layouts/backend/_top_navigation.html.erb +46 -41
- data/app/views/layouts/backend/lightbox.html.erb +5 -1
- data/changelog.md +12 -0
- data/config/locales/en_backend.yml +11 -2
- data/config/locales/nl_backend.yml +11 -2
- data/config/routes.rb +4 -0
- data/db/migrate/20170507092541_add_alignment_options_to_content_rows.rb +7 -0
- data/db/migrate/20170507163532_create_content_videos.rb +10 -0
- data/lib/udongo/configs/flexible_content.rb +2 -6
- data/lib/udongo/version.rb +1 -1
- data/readme.md +1 -6
- data/spec/factories/content_videos.rb +4 -0
- metadata +14 -3
@@ -1,6 +1,10 @@
|
|
1
1
|
<%= render 'backend/breadcrumbs' %>
|
2
2
|
|
3
3
|
<% if @forms.any? %>
|
4
|
+
<p class="text-right">
|
5
|
+
<%= link_to icon(:plus, t('b.add')), new_backend_form_path, class: 'btn btn-primary btn-sm' %>
|
6
|
+
</p>
|
7
|
+
|
4
8
|
<table class="table table-striped table-hover">
|
5
9
|
<thead class="thead-inverse">
|
6
10
|
<tr>
|
@@ -14,15 +18,9 @@
|
|
14
18
|
<tbody>
|
15
19
|
<% @forms.each do |f| %>
|
16
20
|
<tr>
|
21
|
+
<td><%= f.description %></td>
|
17
22
|
<td>
|
18
|
-
<%= f.
|
19
|
-
</td>
|
20
|
-
<td>
|
21
|
-
<% if f.fields.none? %>
|
22
|
-
0
|
23
|
-
<% else %>
|
24
|
-
<%= f.fields.size %> (<%= link_to t('b.overview').downcase, backend_form_fields_path(f) %>)
|
25
|
-
<% end %>
|
23
|
+
<%= f.fields.size %> (<%= link_to t('b.overview').downcase, backend_form_fields_path(f) %>)
|
26
24
|
</td>
|
27
25
|
<td>
|
28
26
|
<% if f.submissions.none? %>
|
@@ -31,7 +29,7 @@
|
|
31
29
|
<%= f.submissions.size %> (<%= link_to t('b.overview').downcase, backend_form_submissions_path(f) %>)
|
32
30
|
<% end %>
|
33
31
|
</td>
|
34
|
-
<td class="text-
|
32
|
+
<td class="text-right">
|
35
33
|
<%= link_to_edit [:backend, f] %>
|
36
34
|
|
37
35
|
<% if f.submissions.any? %>
|
@@ -13,21 +13,13 @@
|
|
13
13
|
</tr>
|
14
14
|
</thead>
|
15
15
|
|
16
|
-
<tfoot>
|
17
|
-
<tr>
|
18
|
-
<td colspan="2" class="text-xs-center">
|
19
|
-
<%= udongo_paginate @submissions %><br>
|
20
|
-
</td>
|
21
|
-
</tr>
|
22
|
-
</tfoot>
|
23
|
-
|
24
16
|
<tbody>
|
25
17
|
<% @submissions.each do |s| %>
|
26
18
|
<tr>
|
27
19
|
<% if @form.email_present? %>
|
28
20
|
<td><%= mail_to s.data_object.email %></td>
|
29
21
|
<% end %>
|
30
|
-
<td class="text-
|
22
|
+
<td class="text-right">
|
31
23
|
<%= link_to_show backend_form_submission_path(@form, s) %>
|
32
24
|
<%= link_to_delete backend_form_submission_path(@form, s) %>
|
33
25
|
</td>
|
@@ -35,6 +27,9 @@
|
|
35
27
|
<% end %>
|
36
28
|
</tbody>
|
37
29
|
</table>
|
30
|
+
|
31
|
+
<%= udongo_paginate @submissions %>
|
32
|
+
|
38
33
|
<% else %>
|
39
34
|
<p><%= t 'b.msg.form_submissions.explanation' %></p>
|
40
35
|
<% end %>
|
@@ -10,9 +10,7 @@
|
|
10
10
|
<%= fa.input :description, as: :text, required: false %>
|
11
11
|
<% end %>
|
12
12
|
|
13
|
-
<
|
14
|
-
<button type="submit" class="btn btn-primary"><%= t 'b.save' %></button>
|
15
|
-
</div>
|
13
|
+
<button type="submit" class="btn btn-primary"><%= t 'b.save' %></button>
|
16
14
|
</div>
|
17
15
|
</div>
|
18
16
|
<% end %>
|
@@ -6,7 +6,7 @@
|
|
6
6
|
<div class="col-md-6">
|
7
7
|
<h2><%= n.description %></h2>
|
8
8
|
</div>
|
9
|
-
<div class="col-md-6 text-
|
9
|
+
<div class="col-md-6 text-right">
|
10
10
|
<%= link_to t('b.add'), new_backend_navigation_item_path(n), class: 'btn btn-primary btn-sm' %>
|
11
11
|
</div>
|
12
12
|
</div>
|
@@ -32,7 +32,7 @@
|
|
32
32
|
<td><%= i.translation.label %></td>
|
33
33
|
<td><%= i.translation.path %></td>
|
34
34
|
<td><%= i.extra %></td>
|
35
|
-
<td class="text-
|
35
|
+
<td class="text-right">
|
36
36
|
<%= link_to_edit edit_translation_backend_navigation_item_path(n, i, default_app_locale) %>
|
37
37
|
<%= link_to_delete backend_navigation_item_path(n, i) %>
|
38
38
|
</td>
|
@@ -1,8 +1,7 @@
|
|
1
1
|
<%= render 'backend/breadcrumbs' %>
|
2
|
+
<%= render 'filter' %>
|
2
3
|
|
3
|
-
|
4
|
-
|
5
|
-
<p class="text-xs-right">
|
4
|
+
<p class="text-right">
|
6
5
|
<%= link_to icon(:plus, t('b.add')), new_backend_redirect_path, class: 'btn btn-primary btn-sm' %>
|
7
6
|
</p>
|
8
7
|
|
@@ -27,7 +26,7 @@
|
|
27
26
|
<td><%= r.status_code %></td>
|
28
27
|
<td><%= t r.enabled?.to_s %></td>
|
29
28
|
<td><%= r.times_used.to_i %></td>
|
30
|
-
<td class="text-
|
29
|
+
<td class="text-right">
|
31
30
|
<%= link_to_edit [:backend, r] %>
|
32
31
|
<%= link_to_delete [:backend, r] %>
|
33
32
|
</td>
|
@@ -1,16 +1,24 @@
|
|
1
1
|
<%= render 'backend/general_form_error', object: model %>
|
2
2
|
|
3
3
|
<%= simple_form_for [:backend, model] do |f| %>
|
4
|
-
<div class="
|
5
|
-
<div class="
|
6
|
-
|
7
|
-
|
8
|
-
<%= t 'b.general' %>
|
9
|
-
</div>
|
4
|
+
<div class="card">
|
5
|
+
<div class="card-header">
|
6
|
+
<%= t 'b.general' %>
|
7
|
+
</div>
|
10
8
|
|
11
|
-
|
9
|
+
<div class="card-block">
|
10
|
+
<div class="row">
|
11
|
+
<div class="col-md-6">
|
12
12
|
<%= f.input :locale, collection: Udongo.config.i18n.cms.interface_locales, include_blank: false %>
|
13
|
+
</div>
|
14
|
+
</div>
|
15
|
+
|
16
|
+
<div class="row">
|
17
|
+
<div class="col-md-6">
|
13
18
|
<%= f.input :term %>
|
19
|
+
</div>
|
20
|
+
|
21
|
+
<div class="col-md-6">
|
14
22
|
<%= f.input :synonyms, as: :string %>
|
15
23
|
</div>
|
16
24
|
</div>
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<%= render 'backend/breadcrumbs' %>
|
2
2
|
|
3
|
-
<p class="text-
|
3
|
+
<p class="text-right">
|
4
4
|
<%= link_to icon(:plus, t('b.add')), new_backend_search_synonym_path, class: 'btn btn-primary btn-sm' %>
|
5
5
|
</p>
|
6
6
|
|
@@ -21,7 +21,7 @@
|
|
21
21
|
<td><%= s.locale %></td>
|
22
22
|
<td><%= s.term %></td>
|
23
23
|
<td><%= s.synonyms %></td>
|
24
|
-
<td class="text-
|
24
|
+
<td class="text-right">
|
25
25
|
<%= link_to_edit [:backend, s] %>
|
26
26
|
<%= link_to_delete [:backend, s] %>
|
27
27
|
</td>
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<%= render 'backend/breadcrumbs' %>
|
2
2
|
<%= render 'filter' %>
|
3
3
|
|
4
|
-
<p class="text-
|
4
|
+
<p class="text-right">
|
5
5
|
<%= link_to icon(:plus, t('b.add')), new_backend_user_path, class: 'btn btn-primary btn-sm' %>
|
6
6
|
</p>
|
7
7
|
|
@@ -22,7 +22,7 @@
|
|
22
22
|
<td><%= u.full_name %></td>
|
23
23
|
<td><%= mail_to u.email %></td>
|
24
24
|
<td><%= t u.active?.to_s %></td>
|
25
|
-
<td class="text-
|
25
|
+
<td class="text-right">
|
26
26
|
<%= link_to_edit [:backend, u] %>
|
27
27
|
<%= link_to_delete [:backend, u] %>
|
28
28
|
</td>
|
@@ -1,45 +1,50 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
<
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
1
|
+
<!-- TODO move this div to the top navigation partial -->
|
2
|
+
<div class="collapse navbar-collapse" id="udongo-navbar">
|
3
|
+
<ul class="navbar-nav mr-auto">
|
4
|
+
<li class="nav-item dropdown">
|
5
|
+
<a class="nav-link dropdown-toggle" data-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false"><%= icon(:list, t('b.content')) %></a>
|
6
|
+
<div class="dropdown-menu">
|
7
|
+
<%= link_to t('b.pages'), backend_pages_path, class: 'dropdown-item' %>
|
8
|
+
<%= link_to t('b.articles'), backend_articles_path, class: 'dropdown-item' %>
|
9
|
+
<%= link_to t('b.snippets'), backend_snippets_path, class: 'dropdown-item' %>
|
10
|
+
<%= link_to t('b.files'), backend_assets_path, class: 'dropdown-item' %>
|
11
|
+
<%= link_to t('b.forms'), backend_forms_path, class: 'dropdown-item' %>
|
12
|
+
</div>
|
13
|
+
</li>
|
12
14
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
15
|
+
<li class="nav-item dropdown">
|
16
|
+
<a class="nav-link dropdown-toggle" data-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false"><%= icon(:cog, t('b.settings')) %></a>
|
17
|
+
<div class="dropdown-menu">
|
18
|
+
<%= link_to t('b.navigation'), backend_navigations_path, class: 'dropdown-item' %>
|
19
|
+
<%= link_to t('b.admins'), backend_admins_path, class: 'dropdown-item' %>
|
20
|
+
<%= link_to t('b.users'), backend_users_path, class: 'dropdown-item' %>
|
21
|
+
<%= link_to t('b.redirects'), backend_redirects_path, class: 'dropdown-item' %>
|
22
|
+
<div class="dropdown-divider"></div>
|
23
|
+
<%= link_to t('b.emails'), backend_emails_path, class: 'dropdown-item' %>
|
24
|
+
<%= link_to t('b.email_templates'), backend_email_templates_path, class: 'dropdown-item' %>
|
25
|
+
</div>
|
26
|
+
</li>
|
25
27
|
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
28
|
+
<li class="nav-item dropdown">
|
29
|
+
<a class="nav-link dropdown-toggle" data-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false"><%= icon(:search, t('b.search')) %></a>
|
30
|
+
<div class="dropdown-menu">
|
31
|
+
<%= link_to t('b.synonyms'), backend_search_synonyms_path, class: 'dropdown-item' %>
|
32
|
+
</div>
|
33
|
+
</li>
|
34
|
+
</ul>
|
32
35
|
|
33
|
-
<
|
34
|
-
<
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
36
|
+
<ul class="navbar-nav">
|
37
|
+
<li class="nav-item pull-xs-right">
|
38
|
+
<%= form_tag backend_search_path, method: :get, id: 'search', class: 'form-inline my-2 my-lg-0' do %>
|
39
|
+
<%= text_field_tag :term, params[:term], class: 'form-control mr-sm-2 no-focus', placeholder: t('b.search') %>
|
40
|
+
<% end %>
|
41
|
+
</li>
|
39
42
|
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
</
|
43
|
+
<li class="nav-item dropdown">
|
44
|
+
<a class="nav-link dropdown-toggle" data-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false"><%= icon(:user, current_admin.full_name) %></a>
|
45
|
+
<div class="dropdown-menu">
|
46
|
+
<%= link_to icon(:sign_out, t('b.logout')), backend_session_path(id: 42), method: :delete, data: { confirm: t('b.msg.confirm') }, class: 'dropdown-item' %>
|
47
|
+
</div>
|
48
|
+
</li>
|
49
|
+
</ul>
|
50
|
+
</div>
|
@@ -6,8 +6,8 @@
|
|
6
6
|
<title>Udongo</title>
|
7
7
|
|
8
8
|
<%= stylesheet_link_tag 'backend/application', media: 'all' %>
|
9
|
+
<%= yield(:stylesheets) %>
|
9
10
|
<%= javascript_include_tag 'modernizr' %>
|
10
|
-
<%= javascript_include_tag 'backend/application' %>
|
11
11
|
<%= csrf_meta_tags %>
|
12
12
|
</head>
|
13
13
|
|
@@ -17,5 +17,9 @@
|
|
17
17
|
<%= yield %>
|
18
18
|
</div>
|
19
19
|
</div>
|
20
|
+
|
21
|
+
<%= yield(:javascripts_early) %>
|
22
|
+
<%= javascript_include_tag 'backend/application' %>
|
23
|
+
<%= yield(:javascripts) %>
|
20
24
|
</body>
|
21
25
|
</html>
|
data/changelog.md
CHANGED
@@ -1,3 +1,15 @@
|
|
1
|
+
6.0.0 - 2017-05-08
|
2
|
+
--
|
3
|
+
* When adding/editing flexible content columns, you now only see the medium
|
4
|
+
breakpoint by default.
|
5
|
+
* Upgrade bootstrap v4 from alpha 4 to alpha 6.
|
6
|
+
* The last item in the list of breadcrumbs will never be a link.
|
7
|
+
* Flexible content now allows you to align columns within a row vertically or
|
8
|
+
horizontally. You can also define a row to be full width instead of the
|
9
|
+
default container.
|
10
|
+
* A new widget has been added to easily insert youtube/vimeo video's.
|
11
|
+
|
12
|
+
|
1
13
|
5.9.0 - 2017-05-04
|
2
14
|
--
|
3
15
|
* Fixes issue in pages module that prevented you from clicking the context
|
@@ -110,6 +110,7 @@ en:
|
|
110
110
|
image: Image (deprecated!)
|
111
111
|
picture: Picture
|
112
112
|
text: Text
|
113
|
+
video: Video
|
113
114
|
deleted: '%{actor} was deleted.'
|
114
115
|
dirty_inputs_warning: "You are about to leave the page but your changes aren't saved yet.\nDo you still want to leave the page?"
|
115
116
|
edited: '%{actor} was edited.'
|
@@ -117,16 +118,24 @@ en:
|
|
117
118
|
add_column: Add column
|
118
119
|
add_row: Add row
|
119
120
|
add_text: Add text
|
120
|
-
|
121
|
+
align_center: Center
|
122
|
+
align_left: Align left
|
123
|
+
align_right: Align right
|
124
|
+
align_vertical_bottom: Align vertical bottom
|
125
|
+
align_vertical_center: Align vertically
|
126
|
+
align_vertical_top: Align vertical top
|
121
127
|
edit_column: Edit column
|
122
128
|
edit_image: Edit image
|
123
129
|
edit_picture: Edit picture
|
124
130
|
edit_text: Edit text
|
131
|
+
edit_video: Edit video
|
125
132
|
explanation: With this module you can create flexible responsive content. Click the button below to create the first row.
|
133
|
+
full_width: Full width
|
126
134
|
no_picture_present: No picture has been uploaded/linked yet.
|
135
|
+
no_video_present: No valid video URL was given.
|
136
|
+
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.
|
127
137
|
forgot_password: Forgot password?
|
128
138
|
form_fields:
|
129
|
-
add: Add input field
|
130
139
|
add_first: Create the first input field.
|
131
140
|
edit: Edit input field
|
132
141
|
explanation: No input fields have been added yet.
|
@@ -110,6 +110,7 @@ nl:
|
|
110
110
|
image: Afbeelding (niet meer gebruiken!)
|
111
111
|
picture: Foto
|
112
112
|
text: Tekst
|
113
|
+
video: Video
|
113
114
|
deleted: '%{actor} werd verwijderd.'
|
114
115
|
dirty_inputs_warning: "Je gaat de pagina verlaten maar je aanpassingen zijn nog niet bewaard.\nWil je nog steeds de pagina verlaten?"
|
115
116
|
edited: '%{actor} werd gewijzigd.'
|
@@ -117,16 +118,24 @@ nl:
|
|
117
118
|
add_column: Kolom toevoegen
|
118
119
|
add_row: Rij toevoegen
|
119
120
|
add_text: Tekst toevoegen
|
120
|
-
|
121
|
+
align_center: Centreren
|
122
|
+
align_left: Links uitlijnen
|
123
|
+
align_right: Rechts uitlijnen
|
124
|
+
align_vertical_bottom: Vertikaal onderaan uitlijnen
|
125
|
+
align_vertical_center: Vertikaal centreren
|
126
|
+
align_vertical_top: Vertikaal bovenaan uitlijnen
|
121
127
|
edit_column: Kolom bewerken
|
122
128
|
edit_image: Afbeelding bewerken
|
123
129
|
edit_picture: Foto bewerken
|
124
130
|
edit_text: Tekst bewerken
|
131
|
+
edit_video: Video bewerken
|
125
132
|
explanation: Met deze module kan je flexibele, responsive inhoud toevoegen. Klik op onderstaande knop om een eerste rij toe te voegen.
|
133
|
+
full_width: Volledige breedte
|
126
134
|
no_picture_present: Er werd nog geen foto geüpload of gelinkt.
|
135
|
+
no_video_present: Er werd nog geen geldige URL voor een video opgegeven.
|
136
|
+
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.
|
127
137
|
forgot_password: Wachtwoord vergeten?
|
128
138
|
form_fields:
|
129
|
-
add: Invulveld toevoegen
|
130
139
|
add_first: Maak het eerste invulveld aan
|
131
140
|
edit: Bewerk invulveld
|
132
141
|
explanation: Er zijn nog geen invulvelden gedefiniëerd voor dit formulier.
|
data/config/routes.rb
CHANGED
@@ -81,6 +81,10 @@ Rails.application.routes.draw do
|
|
81
81
|
|
82
82
|
namespace :content do
|
83
83
|
resources :rows, only: [:index, :new, :destroy] do
|
84
|
+
member do
|
85
|
+
get :horizontal_alignment, :vertical_alignment, :toggle_full_width
|
86
|
+
end
|
87
|
+
|
84
88
|
concerns :positionable
|
85
89
|
|
86
90
|
scope module: 'rows' do
|
@@ -0,0 +1,7 @@
|
|
1
|
+
class AddAlignmentOptionsToContentRows < ActiveRecord::Migration[5.0]
|
2
|
+
def change
|
3
|
+
add_column :content_rows, :full_width, :boolean, after: 'rowable_id'
|
4
|
+
add_column :content_rows, :horizontal_alignment, :string, after: 'full_width'
|
5
|
+
add_column :content_rows, :vertical_alignment, :string, after: 'horizontal_alignment'
|
6
|
+
end
|
7
|
+
end
|