qbrick 2.6.9 → 2.6.10
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/qbrick/cms/application.js.coffee.erb +1 -1
- data/app/controllers/qbrick/cms/admins_controller.rb +4 -4
- data/app/helpers/cms_helper.rb +8 -5
- data/app/helpers/qbrick/cms/admin_helper.rb +1 -1
- data/app/models/qbrick/page.rb +1 -1
- data/app/views/qbrick/cms/backend/_brick_type_dropdown.html.haml +3 -3
- data/app/views/qbrick/cms/backend/_empty_state.html.haml +1 -1
- data/app/views/qbrick/cms/backend/_main_navigation.html.haml +5 -5
- data/app/views/qbrick/cms/bricks/_brick_header.html.haml +3 -3
- data/lib/qbrick.rb +1 -1
- data/lib/qbrick/engine.rb +3 -1
- data/lib/qbrick/version.rb +1 -1
- data/lib/templates/qbrick/assets/ck-config.js.coffee +1 -1
- data/spec/controllers/qbrick/api/pages_controller_spec.rb +1 -1
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 77ffccf0af58c0baf0f3396848f8ee28716f57ae
|
4
|
+
data.tar.gz: 5c79d9219c79af8f7f9b93a4182b03954b23e53b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f8a27fe09939893f8021db54f7087c9137475286afb9051eec17701e2457bf4cb7acf1c5144157ca054a7ba95b13ebd75d331c2f7e93898a0ff6d36c3f57de46
|
7
|
+
data.tar.gz: 14146aefb0457b86cfa09d357a85a068bda0f527f5a0b52897f0dca7e99913d9a872fa16783eba917685592ba39aa6918be5aecdea4294928ee17bc5e25cc293
|
@@ -6,7 +6,7 @@ module Qbrick
|
|
6
6
|
# GET /admins
|
7
7
|
# GET /admins.json
|
8
8
|
def index
|
9
|
-
@admins = Admin.all
|
9
|
+
@admins = Qbrick::Admin.all
|
10
10
|
end
|
11
11
|
|
12
12
|
# GET /admins/1
|
@@ -16,7 +16,7 @@ module Qbrick
|
|
16
16
|
|
17
17
|
# GET /admins/new
|
18
18
|
def new
|
19
|
-
@admin = Admin.new
|
19
|
+
@admin = Qbrick::Admin.new
|
20
20
|
end
|
21
21
|
|
22
22
|
# GET /admins/1/edit
|
@@ -26,7 +26,7 @@ module Qbrick
|
|
26
26
|
# POST /admins
|
27
27
|
# POST /admins.json
|
28
28
|
def create
|
29
|
-
@admin = Admin.new(admin_params)
|
29
|
+
@admin = Qbrick::Admin.new(admin_params)
|
30
30
|
|
31
31
|
respond_to do |format|
|
32
32
|
if @admin.save
|
@@ -67,7 +67,7 @@ module Qbrick
|
|
67
67
|
|
68
68
|
# Use callbacks to share common setup or constraints between actions.
|
69
69
|
def set_admin
|
70
|
-
@admin = Admin.find
|
70
|
+
@admin = Qbrick::Admin.find params[:id]
|
71
71
|
end
|
72
72
|
|
73
73
|
# Never trust parameters from the scary internet, only allow the white list through.
|
data/app/helpers/cms_helper.rb
CHANGED
@@ -14,14 +14,17 @@ module CmsHelper
|
|
14
14
|
end
|
15
15
|
|
16
16
|
def cms_brick_item(brick_list, type)
|
17
|
-
|
18
|
-
link_to type_name, qbrick.new_cms_brick_path(
|
17
|
+
path = qbrick.new_cms_brick_path(
|
19
18
|
brick: {
|
20
19
|
type: type.class_name,
|
21
20
|
brick_list_id: brick_list.id,
|
22
21
|
brick_list_type: brick_list.brick_list_type
|
23
|
-
})
|
24
|
-
|
25
|
-
|
22
|
+
})
|
23
|
+
type_name = type.class_name.constantize.model_name.human
|
24
|
+
|
25
|
+
link_to type_name, path, remote: true
|
26
|
+
rescue NameError => e
|
27
|
+
title = I18n.t(type.class_name.underscore, scope: %i(activerecord models)) + " (#{e.message})"
|
28
|
+
defined?(path) && path.present? ? link_to(title, path, remote: true) : title
|
26
29
|
end
|
27
30
|
end
|
data/app/models/qbrick/page.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
- unless brick_list.brick_types.empty?
|
1
|
+
- unless brick_list.brick_types.allowed.empty?
|
2
2
|
.btn-group
|
3
|
-
- if brick_list.brick_types.allowed.
|
3
|
+
- if brick_list.brick_types.allowed.many?
|
4
4
|
%a.btn.btn-small.btn-primary.dropdown-toggle{ 'data-toggle' => 'dropdown', 'href' => '#' }
|
5
5
|
= t('.add_element')
|
6
6
|
%span.caret
|
@@ -12,4 +12,4 @@
|
|
12
12
|
.divider
|
13
13
|
- else
|
14
14
|
- brick_list.brick_types.allowed.each do |type|
|
15
|
-
= link_to t('.add_specific_element', :
|
15
|
+
= link_to t('.add_specific_element', name: type.class_name.constantize.model_name.human), qbrick.new_cms_brick_path(brick: { type: type.class_name, brick_list_id: brick_list.id, brick_list_type: brick_list.brick_list_type }), remote: true, class: 'btn btn-small btn-primary'
|
@@ -1,9 +1,9 @@
|
|
1
|
-
= link_to 'Qbrick CMS', qbrick.cms_root_path, :
|
1
|
+
= link_to 'Qbrick CMS', qbrick.cms_root_path, class: 'brand'
|
2
2
|
|
3
3
|
%ul.nav.pull-right.language-navigation
|
4
4
|
- if render_language_switch?
|
5
5
|
- I18n.available_locales.each do |locale|
|
6
|
-
%li{ :
|
6
|
+
%li{ class: (:active if I18n.locale.to_s == locale.to_s) }
|
7
7
|
= link_to_content_locale(locale)
|
8
8
|
|
9
9
|
%li.dropdown
|
@@ -12,9 +12,9 @@
|
|
12
12
|
%b.caret
|
13
13
|
%ul.dropdown-menu
|
14
14
|
%li= link_to t('.change_password'), qbrick.edit_cms_account_path
|
15
|
-
%li= link_to t('.logout'), qbrick.destroy_admin_session_path, :
|
15
|
+
%li= link_to t('.logout'), qbrick.destroy_admin_session_path, method: :delete
|
16
16
|
|
17
17
|
%ul.nav
|
18
18
|
%li= link_to t('.settings'), qbrick.cms_settings_collections_path
|
19
|
-
%li= link_to Qbrick::Page.model_name.human(:
|
20
|
-
%li= link_to Qbrick::Admin.model_name.human(:
|
19
|
+
%li= link_to Qbrick::Page.model_name.human(count: 2), qbrick.cms_pages_path
|
20
|
+
%li= link_to Qbrick::Admin.model_name.human(count: 2), qbrick.cms_admins_path
|
@@ -12,9 +12,9 @@
|
|
12
12
|
- if brick.persisted?
|
13
13
|
|
14
14
|
- # addable child dropdown menu
|
15
|
-
- if brick.respond_to?
|
15
|
+
- if brick.respond_to? :brick_list
|
16
16
|
.btn-group
|
17
|
-
= render
|
17
|
+
= render 'brick_type_dropdown', brick_list: brick
|
18
18
|
|
19
19
|
- # grid selection
|
20
20
|
- if brick.class.include? Qbrick::Gridded
|
@@ -24,7 +24,7 @@
|
|
24
24
|
%span.caret
|
25
25
|
%ul.dropdown-menu.pull-right
|
26
26
|
%li
|
27
|
-
= form.input :col_count, collection: brick.class.available_grid_sizes, as: :radio_buttons, label_method: lambda { |col_count| t(
|
27
|
+
= form.input :col_count, collection: brick.class.available_grid_sizes, as: :radio_buttons, label_method: lambda { |col_count| t('qbrick.cms.bricks.columns', count: col_count) }
|
28
28
|
|
29
29
|
- # possible styles
|
30
30
|
- unless brick.available_display_styles.empty?
|
data/lib/qbrick.rb
CHANGED
data/lib/qbrick/engine.rb
CHANGED
@@ -29,9 +29,11 @@ module Qbrick
|
|
29
29
|
end
|
30
30
|
|
31
31
|
def hosts
|
32
|
-
[Socket.gethostname].tap do |result|
|
32
|
+
[Socket.gethostname, 'localhost'].tap do |result|
|
33
33
|
result.concat [app_config.hosts].flatten if app_config.respond_to? :hosts
|
34
34
|
result.concat [app_config.host].flatten if app_config.respond_to? :host
|
35
|
+
result.compact!
|
36
|
+
result.uniq!
|
35
37
|
end
|
36
38
|
end
|
37
39
|
|
data/lib/qbrick/version.rb
CHANGED
@@ -24,7 +24,7 @@ describe Qbrick::Api::PagesController, type: :controller do
|
|
24
24
|
|
25
25
|
it 'gets specific translated pages for each locale' do
|
26
26
|
I18n.with_locale :de do
|
27
|
-
@pages << @only_german = create(:page, published: true, title: 'foobar de',
|
27
|
+
@pages << @only_german = create(:page, published: true, title: 'foobar de 2', path_de: 'de/foobar-de-2')
|
28
28
|
get :index
|
29
29
|
expect(JSON.parse(response.body)).to eq([@page1, @page2, @only_german].as_json)
|
30
30
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: qbrick
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.6.
|
4
|
+
version: 2.6.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Immanuel Häussermann
|
@@ -12,7 +12,7 @@ authors:
|
|
12
12
|
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
|
-
date: 2015-
|
15
|
+
date: 2015-08-11 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: rspec-rails
|
@@ -337,19 +337,19 @@ dependencies:
|
|
337
337
|
- !ruby/object:Gem::Version
|
338
338
|
version: 2.3.2.2
|
339
339
|
- !ruby/object:Gem::Dependency
|
340
|
-
name:
|
340
|
+
name: ckeditor
|
341
341
|
requirement: !ruby/object:Gem::Requirement
|
342
342
|
requirements:
|
343
|
-
- -
|
343
|
+
- - ">="
|
344
344
|
- !ruby/object:Gem::Version
|
345
|
-
version: '
|
345
|
+
version: '0'
|
346
346
|
type: :runtime
|
347
347
|
prerelease: false
|
348
348
|
version_requirements: !ruby/object:Gem::Requirement
|
349
349
|
requirements:
|
350
|
-
- -
|
350
|
+
- - ">="
|
351
351
|
- !ruby/object:Gem::Version
|
352
|
-
version: '
|
352
|
+
version: '0'
|
353
353
|
- !ruby/object:Gem::Dependency
|
354
354
|
name: pg_search
|
355
355
|
requirement: !ruby/object:Gem::Requirement
|