udongo 6.0.0 → 6.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/assets/stylesheets/backend/components/_abbreviated_tooltip.scss +3 -0
- data/app/assets/stylesheets/backend/udongo.scss +1 -0
- data/app/controllers/backend/content/rows/pictures_controller.rb +1 -1
- data/app/controllers/backend/images_controller.rb +1 -1
- data/app/controllers/backend/pages_controller.rb +1 -1
- data/app/models/concerns/addressable.rb +1 -1
- data/app/models/concerns/person.rb +6 -0
- data/app/views/backend/articles/index.html.erb +7 -7
- data/app/views/backend/assets/index.html.erb +1 -1
- data/app/views/backend/content/_picture.html.erb +6 -2
- data/app/views/backend/content/rows/columns/_column_width_explanation.html.erb +1 -1
- data/app/views/backend/content/rows/pictures/_filter.html.erb +1 -1
- data/app/views/backend/content/rows/pictures/edit.html.erb +4 -1
- data/app/views/backend/images/_filter.html.erb +1 -1
- data/app/views/backend/pages/_form.html.erb +1 -0
- data/app/views/layouts/backend/_top_navigation.html.erb +1 -2
- data/changelog.md +14 -0
- data/config/locales/en.yml +1 -1
- data/config/locales/en_backend.yml +3 -0
- data/config/locales/fr.yml +1 -1
- data/config/locales/nl.yml +1 -1
- data/config/locales/nl_backend.yml +3 -0
- data/config/locales/nl_forms.yml +1 -0
- data/db/migrate/20170516092845_add_sitemap_to_page.rb +6 -0
- data/lib/udongo/configs/flexible_content.rb +5 -0
- data/lib/udongo/version.rb +1 -1
- data/readme.md +5 -0
- data/spec/support/concerns/person.rb +28 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9058d4a4ae9f7e8f0d6c0f5ed60ae902559997cd
|
4
|
+
data.tar.gz: 4267002ee525804b74f0c38a0770d16a45d85ef1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7366fc2a16e78da7725965fdab5542763945380da67c3d1e73f23fd4d1d6e6db4c19560a2c5c297aa9aabd7b85e4053116426eed2fdd354b2da8efb0838ce39f
|
7
|
+
data.tar.gz: e96c73705f470b513397a3f5e1cb650235ea9d457130d057d1f5b6b98aada21de3f0cff88a63f82732476f98f9f3c0d90253d20c5e7ebad93d298ebe77df3a59
|
@@ -46,6 +46,6 @@ class Backend::Content::Rows::PicturesController < Backend::BaseController
|
|
46
46
|
def prepare_upload
|
47
47
|
@asset = Asset.new
|
48
48
|
@search = Asset.ransack params[:q]
|
49
|
-
@assets = @search.result(distinct: true).image.where.not(id: @model.asset_id).order('id DESC')
|
49
|
+
@assets = @search.result(distinct: true).image.where.not(id: @model.asset_id).order('id DESC').limit(30)
|
50
50
|
end
|
51
51
|
end
|
@@ -5,7 +5,7 @@ class Backend::ImagesController < Backend::BaseController
|
|
5
5
|
|
6
6
|
def index
|
7
7
|
@search = Asset.ransack params[:q]
|
8
|
-
@assets = @search.result(distinct: true).image.where.not(id: @model.images.pluck(:asset_id)).order('id DESC')
|
8
|
+
@assets = @search.result(distinct: true).image.where.not(id: @model.images.pluck(:asset_id)).order('id DESC').limit(30)
|
9
9
|
end
|
10
10
|
|
11
11
|
def create
|
@@ -3,5 +3,11 @@ module Concerns
|
|
3
3
|
def full_name
|
4
4
|
"#{first_name} #{last_name}"
|
5
5
|
end
|
6
|
+
|
7
|
+
def short_name
|
8
|
+
short = "#{first_name}"
|
9
|
+
short << ' ' if first_name.present? && last_name.present?
|
10
|
+
short << last_name.to_s.split(' ').map { |n| "#{n[0,1]}." }.join
|
11
|
+
end
|
6
12
|
end
|
7
13
|
end
|
@@ -10,10 +10,10 @@
|
|
10
10
|
<tr>
|
11
11
|
<th><%= t 'b.title' %></th>
|
12
12
|
<th><%= t 'b.author' %></th>
|
13
|
-
<th><%= t 'b.published_at' %></th>
|
14
|
-
<th
|
15
|
-
<th
|
16
|
-
<th> </th>
|
13
|
+
<th width="200"><%= t 'b.published_at' %></th>
|
14
|
+
<th><span data-toggle="tooltip" title="<%= t 'b.visible' %>" class="abbreviated-tooltip"><%= t 'b.msg.articles.visible_abbreviated' %></span></th>
|
15
|
+
<th><span data-toggle="tooltip" title="<%= t 'b.press_release' %>" class="abbreviated-tooltip"><%= t 'b.msg.articles.press_release_abbreviated' %></span></th>
|
16
|
+
<th width="60"> </th>
|
17
17
|
</tr>
|
18
18
|
</thead>
|
19
19
|
|
@@ -27,17 +27,17 @@
|
|
27
27
|
<%= t('b.msg.no_title_set') %>
|
28
28
|
<% end %>
|
29
29
|
<% else %>
|
30
|
-
<%= truncate a.title, length:
|
30
|
+
<%= truncate a.title, length: 70 %>
|
31
31
|
<% end %>
|
32
32
|
</td>
|
33
33
|
<td>
|
34
34
|
<% if a.user.present? %>
|
35
|
-
<%= link_to icon(:user, a.user.
|
35
|
+
<%= link_to icon(:user, a.user.short_name), edit_backend_user_path(a.user) %>
|
36
36
|
<% else %>
|
37
37
|
<%= t 'b.not_set' %>
|
38
38
|
<% end %>
|
39
39
|
</td>
|
40
|
-
<td><%= l
|
40
|
+
<td class="text-right"><%= l(a.published_at, format: :short) if a.published_at %></td>
|
41
41
|
<td><%= t a.visible?.to_s %></td>
|
42
42
|
<td><%= t a.press_release?.to_s %></td>
|
43
43
|
<td class="text-right">
|
@@ -31,7 +31,7 @@
|
|
31
31
|
<td><%= a.actual_filename.split('.').last.upcase %></td>
|
32
32
|
<td><%= number_to_human_size a.filesize %></td>
|
33
33
|
<td><%= simple_format a.description %></td>
|
34
|
-
<td><%= l a.updated_at %></td>
|
34
|
+
<td><%= l a.updated_at, format: :short %></td>
|
35
35
|
<td class="text-right">
|
36
36
|
<%= link_to_edit [:backend, a] %>
|
37
37
|
<%= link_to_delete [:backend, a] if a.deletable? %>
|
@@ -3,9 +3,13 @@
|
|
3
3
|
<%= image_tag object.asset.image.url(1100, 1100, quality: 65), alt: '', class: 'img-fluid' %>
|
4
4
|
|
5
5
|
<% if object.caption.present? %>
|
6
|
-
|
6
|
+
<% if Udongo.config.flexible_content.picture_caption_editor? %>
|
7
7
|
<%= object.caption.html_safe %>
|
8
|
-
|
8
|
+
<% else %>
|
9
|
+
<div class="text-center">
|
10
|
+
<%= object.caption%>
|
11
|
+
</div>
|
12
|
+
<% end %>
|
9
13
|
<% end %>
|
10
14
|
|
11
15
|
<% else %>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<%= search_form_for @search, url: link_or_upload_backend_content_picture_path(@model) do |f| %>
|
2
|
-
<div class="row
|
2
|
+
<div class="row mb-4">
|
3
3
|
<div class="col-md-6">
|
4
4
|
<%= f.search_field :description_cont, placeholder: t('b.description'), class: 'form-control' %>
|
5
5
|
</div>
|
@@ -10,7 +10,10 @@
|
|
10
10
|
|
11
11
|
<%= simple_form_for [:backend, @model] do |f| %>
|
12
12
|
<%= f.input :url, as: :string %>
|
13
|
-
|
13
|
+
|
14
|
+
<% content_type = Udongo.config.flexible_content.picture_caption_editor? ? :ckeditor : :text %>
|
15
|
+
<%= f.input :caption, as: content_type %>
|
16
|
+
|
14
17
|
<%= render 'backend/form_actions', cancel_url: content_path %>
|
15
18
|
<% end %>
|
16
19
|
</div>
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<%= search_form_for @search, url: backend_images_path do |f| %>
|
2
2
|
<%= hidden_field_tag :klass, @model.class.name %>
|
3
3
|
<%= hidden_field_tag :id, @model.id %>
|
4
|
-
<div class="row
|
4
|
+
<div class="row mb-4">
|
5
5
|
<div class="col-md-6">
|
6
6
|
<%= f.search_field :description_cont, placeholder: t('b.description'), class: 'form-control' %>
|
7
7
|
</div>
|
@@ -1,4 +1,3 @@
|
|
1
|
-
<!-- TODO move this div to the top navigation partial -->
|
2
1
|
<div class="collapse navbar-collapse" id="udongo-navbar">
|
3
2
|
<ul class="navbar-nav mr-auto">
|
4
3
|
<li class="nav-item dropdown">
|
@@ -34,7 +33,7 @@
|
|
34
33
|
</ul>
|
35
34
|
|
36
35
|
<ul class="navbar-nav">
|
37
|
-
<li class="nav-item
|
36
|
+
<li class="nav-item">
|
38
37
|
<%= form_tag backend_search_path, method: :get, id: 'search', class: 'form-inline my-2 my-lg-0' do %>
|
39
38
|
<%= text_field_tag :term, params[:term], class: 'form-control mr-sm-2 no-focus', placeholder: t('b.search') %>
|
40
39
|
<% end %>
|
data/changelog.md
CHANGED
@@ -1,3 +1,17 @@
|
|
1
|
+
6.1.0 - 2017-05-16
|
2
|
+
--
|
3
|
+
* The obsolete top navigation markup has been cleaned up.
|
4
|
+
* Add setting 'sitemap' to pages. These can be used to easily see which pages
|
5
|
+
are to be included in the sitemap.
|
6
|
+
* Rename Concerns::Addressable#configure_adress to configure_address
|
7
|
+
* Add method Person#short_name which uses the first name and first letter of the
|
8
|
+
last name.
|
9
|
+
* A new setting ```Udongo.config.flexible_content.picture_caption_editor``` was
|
10
|
+
added. This allows you to use an editor for picture captions.
|
11
|
+
* Tweaked some bottom margins related to the media module.
|
12
|
+
* Linking an image via de media module now only suggests 30 pictures.
|
13
|
+
|
14
|
+
|
1
15
|
6.0.0 - 2017-05-08
|
2
16
|
--
|
3
17
|
* When adding/editing flexible content columns, you now only see the medium
|
data/config/locales/en.yml
CHANGED
@@ -104,6 +104,9 @@ en:
|
|
104
104
|
admins:
|
105
105
|
account_details: Account details
|
106
106
|
personal_details: Personal details
|
107
|
+
articles:
|
108
|
+
press_release_abbreviated: Press.
|
109
|
+
visible_abbreviated: Visi.
|
107
110
|
changes_saved: The changes have been saved.
|
108
111
|
confirm: Are you sure?
|
109
112
|
content_types:
|
data/config/locales/fr.yml
CHANGED
data/config/locales/nl.yml
CHANGED
@@ -104,6 +104,9 @@ nl:
|
|
104
104
|
admins:
|
105
105
|
account_details: Accountgegevens
|
106
106
|
personal_details: Persoonlijke gegevens
|
107
|
+
articles:
|
108
|
+
press_release_abbreviated: Pers.
|
109
|
+
visible_abbreviated: Zicht.
|
107
110
|
changes_saved: De wijzigingen werden opgeslagen.
|
108
111
|
confirm: Ben je zeker?
|
109
112
|
content_types:
|
data/config/locales/nl_forms.yml
CHANGED
@@ -7,6 +7,11 @@ module Udongo
|
|
7
7
|
DEFAULT_BREAKPOINT = 'md'
|
8
8
|
|
9
9
|
attribute :types, Array, default: %w(text picture video image)
|
10
|
+
attribute :picture_caption_editor, Axiom::Types::Boolean, default: false
|
11
|
+
|
12
|
+
def picture_caption_editor?
|
13
|
+
picture_caption_editor
|
14
|
+
end
|
10
15
|
end
|
11
16
|
end
|
12
17
|
end
|
data/lib/udongo/version.rb
CHANGED
data/readme.md
CHANGED
@@ -119,6 +119,11 @@ You can also override the default message with your own:
|
|
119
119
|
Udongo.config.flexible_content.types = %w(text picture video)
|
120
120
|
```
|
121
121
|
|
122
|
+
### picture_caption_editor
|
123
|
+
```ruby
|
124
|
+
Udongo.config.flexible_content.picture_caption_editor = false
|
125
|
+
```
|
126
|
+
|
122
127
|
## Assets
|
123
128
|
### image_white_list
|
124
129
|
```ruby
|
@@ -9,7 +9,34 @@ shared_examples_for :person do
|
|
9
9
|
expect(person.full_name).to eq 'Foo Bar'
|
10
10
|
end
|
11
11
|
|
12
|
+
describe '#short_name' do
|
13
|
+
it 'no first name' do
|
14
|
+
person = build(klass, first_name: nil, last_name: 'Bar')
|
15
|
+
expect(person.short_name).to eq 'B.'
|
16
|
+
end
|
17
|
+
|
18
|
+
it 'no last name' do
|
19
|
+
person = build(klass, first_name: 'Foo', last_name: nil)
|
20
|
+
expect(person.short_name).to eq 'Foo'
|
21
|
+
end
|
22
|
+
|
23
|
+
it 'last name with 1 word' do
|
24
|
+
person = build(klass, first_name: 'Foo', last_name: 'Bar')
|
25
|
+
expect(person.short_name).to eq 'Foo B.'
|
26
|
+
end
|
27
|
+
|
28
|
+
it 'last name with 2 words' do
|
29
|
+
person = build(klass, first_name: 'Foo', last_name: 'Bar Baz')
|
30
|
+
expect(person.short_name).to eq 'Foo B.B.'
|
31
|
+
end
|
32
|
+
|
33
|
+
it 'last name with 3 words' do
|
34
|
+
person = build(klass, first_name: 'Foo', last_name: 'Bar Baz Boz')
|
35
|
+
expect(person.short_name).to eq 'Foo B.B.B.'
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
12
39
|
it '#respond_to?' do
|
13
|
-
expect(model.new).to respond_to(:full_name)
|
40
|
+
expect(model.new).to respond_to(:full_name, :short_name)
|
14
41
|
end
|
15
42
|
end
|
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.1.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-05-
|
12
|
+
date: 2017-05-16 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -440,6 +440,7 @@ files:
|
|
440
440
|
- app/assets/javascripts/backend/tree.js
|
441
441
|
- app/assets/stylesheets/backend/application.scss
|
442
442
|
- app/assets/stylesheets/backend/bootstrap.scss
|
443
|
+
- app/assets/stylesheets/backend/components/_abbreviated_tooltip.scss
|
443
444
|
- app/assets/stylesheets/backend/components/_breadcrumb.scss
|
444
445
|
- app/assets/stylesheets/backend/components/_card.scss
|
445
446
|
- app/assets/stylesheets/backend/components/_form.scss
|
@@ -807,6 +808,7 @@ files:
|
|
807
808
|
- db/migrate/20170412074304_create_content_pictures.rb
|
808
809
|
- db/migrate/20170507092541_add_alignment_options_to_content_rows.rb
|
809
810
|
- db/migrate/20170507163532_create_content_videos.rb
|
811
|
+
- db/migrate/20170516092845_add_sitemap_to_page.rb
|
810
812
|
- lib/tasks/task_extras.rb
|
811
813
|
- lib/tasks/udongo_tasks.rake
|
812
814
|
- lib/udongo.rb
|