cmor_cms_backend 0.0.41.pre → 0.0.42.pre
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/controllers/cmor/cms/backend/navigation_items_controller.rb +19 -12
- data/app/controllers/cmor/cms/backend/pages_controller.rb +16 -8
- data/app/controllers/cmor/cms/backend/partials_controller.rb +16 -8
- data/app/controllers/cmor/cms/backend/templates_controller.rb +16 -8
- data/app/views/cmor/cms/backend/navigation_items/_form.html.haml +4 -1
- data/app/views/cmor/cms/backend/navigation_items/_index_table.html.haml +2 -1
- data/app/views/cmor/cms/backend/navigation_items/_show_table.html.haml +1 -0
- data/app/views/cmor/cms/backend/pages/_form.html.haml +2 -1
- data/app/views/cmor/cms/backend/pages/_index_table.html.haml +1 -0
- data/app/views/cmor/cms/backend/pages/_show_table.html.haml +1 -0
- data/app/views/cmor/cms/backend/partials/_form.html.haml +3 -0
- data/app/views/cmor/cms/backend/partials/_index_table.html.haml +2 -1
- data/app/views/cmor/cms/backend/partials/_show_table.html.haml +1 -0
- data/app/views/cmor/cms/backend/templates/_form.html.haml +3 -0
- data/app/views/cmor/cms/backend/templates/_index_table.html.haml +1 -0
- data/config/routes.rb +14 -12
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b878a2963b7cb8627269bea29362f3a8541e47cbdf362b17f30b1a479adb2f86
|
4
|
+
data.tar.gz: 076c6e3a91e35231c63d8abed2f200af10351b15310895e86f8a27921343af5e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 853daded412df73b3a81cee5414344a845aa8d7f2d8ba03366fcf3dc31efe700b3e551ff0c3dc97135146e54371e220f4314e414e7e1787ac7ae327a77d530f3
|
7
|
+
data.tar.gz: 26d4f3fb3b1089bc7db3e3b0b4b16e4156d94ee13549bb62150a9fed37a551822e13f293365dfb2a26c5981a7b485c994ea28db7cfdc4127d24c027c089fc253
|
@@ -1,18 +1,25 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
module Cmor
|
2
|
+
module Cms
|
3
|
+
module Backend
|
4
|
+
class NavigationItemsController < Cmor::Core::Backend::ResourcesController::Base
|
5
|
+
include Rao::ResourcesController::AwesomeNestedSetConcern
|
6
|
+
include Rao::ResourcesController::ActsAsPublishedConcern
|
3
7
|
|
4
|
-
|
5
|
-
|
6
|
-
|
8
|
+
def self.resource_class
|
9
|
+
Cmor::Cms::NavigationItem
|
10
|
+
end
|
7
11
|
|
8
|
-
|
12
|
+
private
|
9
13
|
|
10
|
-
|
11
|
-
|
12
|
-
|
14
|
+
def load_collection_scope
|
15
|
+
super.joins(:navigation).includes(:page)
|
16
|
+
end
|
13
17
|
|
14
|
-
|
15
|
-
|
16
|
-
|
18
|
+
def permitted_params
|
19
|
+
params.require(:navigation_item)
|
20
|
+
.permit(:navigation_id, :page_id, :highlights_on, :key, :name, :parent_id, :options, :url, :published, *Cmor::Cms::Configuration.navigation_item_properties)
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
17
24
|
end
|
18
25
|
end
|
@@ -1,12 +1,20 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
1
|
+
module Cmor
|
2
|
+
module Cms
|
3
|
+
module Backend
|
4
|
+
class PagesController < Cmor::Core::Backend::ResourcesController::Base
|
5
|
+
include Rao::ResourcesController::ActsAsPublishedConcern
|
6
|
+
|
7
|
+
def self.resource_class
|
8
|
+
Cmor::Cms::Page
|
9
|
+
end
|
5
10
|
|
6
|
-
|
11
|
+
private
|
7
12
|
|
8
|
-
|
9
|
-
|
10
|
-
|
13
|
+
def permitted_params
|
14
|
+
params.require(:page)
|
15
|
+
.permit(:title, :meta_description, :body, :pathname, :basename, :locale, :format, :handler, :layout, :published, navigation_item_ids: [])
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
11
19
|
end
|
12
20
|
end
|
@@ -1,12 +1,20 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
1
|
+
module Cmor
|
2
|
+
module Cms
|
3
|
+
module Backend
|
4
|
+
class PartialsController < Cmor::Core::Backend::ResourcesController::Base
|
5
|
+
include Rao::ResourcesController::ActsAsPublishedConcern
|
6
|
+
|
7
|
+
def self.resource_class
|
8
|
+
Cmor::Cms::Partial
|
9
|
+
end
|
5
10
|
|
6
|
-
|
11
|
+
private
|
7
12
|
|
8
|
-
|
9
|
-
|
10
|
-
|
13
|
+
def permitted_params
|
14
|
+
params.require(:partial)
|
15
|
+
.permit(:body, :pathname, :basename, :locale, :format, :handler, :published)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
11
19
|
end
|
12
20
|
end
|
@@ -1,12 +1,20 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
1
|
+
module Cmor
|
2
|
+
module Cms
|
3
|
+
module Backend
|
4
|
+
class TemplatesController < Cmor::Core::Backend::ResourcesController::Base
|
5
|
+
include Rao::ResourcesController::ActsAsPublishedConcern
|
6
|
+
|
7
|
+
def self.resource_class
|
8
|
+
Cmor::Cms::Template
|
9
|
+
end
|
5
10
|
|
6
|
-
|
11
|
+
private
|
7
12
|
|
8
|
-
|
9
|
-
|
10
|
-
|
13
|
+
def permitted_params
|
14
|
+
params.require(:template)
|
15
|
+
.permit(:body, :pathname, :basename, :locale, :format, :handler, :published)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
11
19
|
end
|
12
20
|
end
|
@@ -6,4 +6,5 @@
|
|
6
6
|
= table.column :url, sort: true
|
7
7
|
= table.column(:page, sort: { column_name: 'cmor_cms_pages.title' }) do |navigation_item|
|
8
8
|
- link_to navigation_item.page.title, page_path(navigation_item.page) if navigation_item.page.present?
|
9
|
-
= table.timestamps(sort: true)
|
9
|
+
= table.timestamps(sort: true)
|
10
|
+
= table.acts_as_published_actions
|
@@ -8,4 +8,5 @@
|
|
8
8
|
= form.input :handler, collection: ActionView::Template::Handlers.extensions
|
9
9
|
= form.input :layout
|
10
10
|
- Cmor::Cms::Navigation.where(locale: I18n.locale).all.each do |navigation|
|
11
|
-
= form.association :navigation_items, as: :check_boxes, collection: navigation.navigation_items.joins(:navigation).where(cmor_cms_navigations: { locale: locale }), label_method: :key
|
11
|
+
= form.association :navigation_items, as: :check_boxes, collection: navigation.navigation_items.joins(:navigation).where(cmor_cms_navigations: { locale: locale }), label_method: :key
|
12
|
+
= form.input :published, as: :boolean
|
data/config/routes.rb
CHANGED
@@ -2,23 +2,25 @@ Cmor::Cms::Backend::Engine.routes.draw do
|
|
2
2
|
resources :add_homepages_service, only: [:create, :new]
|
3
3
|
resources :import_partials_service, only: [:create, :new]
|
4
4
|
|
5
|
-
# backend_resources :content_boxes
|
6
|
-
# backend_resources :navigations
|
7
|
-
# backend_resources :navigation_items do
|
8
|
-
# post :reposition, on: :member
|
9
|
-
# end
|
10
|
-
# backend_resources :pages
|
11
|
-
# backend_resources :partials
|
12
|
-
# backend_resources :templates
|
13
|
-
|
14
5
|
resources :content_boxes
|
15
6
|
resources :navigations
|
7
|
+
|
16
8
|
resources :navigation_items do
|
9
|
+
post :toggle_published, on: :member
|
17
10
|
post :reposition, on: :member
|
18
11
|
end
|
19
|
-
|
20
|
-
resources :
|
21
|
-
|
12
|
+
|
13
|
+
resources :pages do
|
14
|
+
post :toggle_published, on: :member
|
15
|
+
end
|
16
|
+
|
17
|
+
resources :partials do
|
18
|
+
post :toggle_published, on: :member
|
19
|
+
end
|
20
|
+
|
21
|
+
resources :templates do
|
22
|
+
post :toggle_published, on: :member
|
23
|
+
end
|
22
24
|
|
23
25
|
root to: 'home#index'
|
24
26
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cmor_cms_backend
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.42.pre
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Roberto Vasquez Angel
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-01-
|
11
|
+
date: 2020-01-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -30,28 +30,28 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - '='
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.0.
|
33
|
+
version: 0.0.42.pre
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - '='
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 0.0.
|
40
|
+
version: 0.0.42.pre
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: cmor_core_backend
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - '='
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 0.0.
|
47
|
+
version: 0.0.42.pre
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - '='
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 0.0.
|
54
|
+
version: 0.0.42.pre
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: sqlite3
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -324,14 +324,14 @@ dependencies:
|
|
324
324
|
requirements:
|
325
325
|
- - '='
|
326
326
|
- !ruby/object:Gem::Version
|
327
|
-
version: 0.0.
|
327
|
+
version: 0.0.42.pre
|
328
328
|
type: :runtime
|
329
329
|
prerelease: false
|
330
330
|
version_requirements: !ruby/object:Gem::Requirement
|
331
331
|
requirements:
|
332
332
|
- - '='
|
333
333
|
- !ruby/object:Gem::Version
|
334
|
-
version: 0.0.
|
334
|
+
version: 0.0.42.pre
|
335
335
|
description: Provides a Backend for CMOR CMS
|
336
336
|
email:
|
337
337
|
- roberto@vasquez-angel.de
|