cmor_cms_backend 0.0.41.pre → 0.0.42.pre

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d0d804c5d5b2782ab988181aa40b34d49fac286a48351fbf65f804d294beb238
4
- data.tar.gz: c6db9b1e1cf32e36688a963f6af3415c17ba1b6ca574e930fb72057b999359ca
3
+ metadata.gz: b878a2963b7cb8627269bea29362f3a8541e47cbdf362b17f30b1a479adb2f86
4
+ data.tar.gz: 076c6e3a91e35231c63d8abed2f200af10351b15310895e86f8a27921343af5e
5
5
  SHA512:
6
- metadata.gz: f5be396e310d4f068aed3cd9a2402c0101fb85f77ba40fafca4e5b8ea6b8a6c0033313d87bfd4fe8c483882a740a644a1489ed31d0e3ed76fb80fcd99e1dea0a
7
- data.tar.gz: 0c4ff8dd15545c9d7ad5bb261c98ff9605737393b547c492f231a3b792999ef9ed2ad9e48bd5c5dade91a4c6b760f0cc05daba080f79eae2462e3ee1206870aa
6
+ metadata.gz: 853daded412df73b3a81cee5414344a845aa8d7f2d8ba03366fcf3dc31efe700b3e551ff0c3dc97135146e54371e220f4314e414e7e1787ac7ae327a77d530f3
7
+ data.tar.gz: 26d4f3fb3b1089bc7db3e3b0b4b16e4156d94ee13549bb62150a9fed37a551822e13f293365dfb2a26c5981a7b485c994ea28db7cfdc4127d24c027c089fc253
@@ -1,18 +1,25 @@
1
- class Cmor::Cms::Backend::NavigationItemsController < Cmor::Core::Backend::ResourcesController::Base
2
- include Rao::ResourcesController::AwesomeNestedSetConcern
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
- def self.resource_class
5
- Cmor::Cms::NavigationItem
6
- end
8
+ def self.resource_class
9
+ Cmor::Cms::NavigationItem
10
+ end
7
11
 
8
- private
12
+ private
9
13
 
10
- def load_collection_scope
11
- super.joins(:navigation).includes(:page)
12
- end
14
+ def load_collection_scope
15
+ super.joins(:navigation).includes(:page)
16
+ end
13
17
 
14
- def permitted_params
15
- params.require(:navigation_item)
16
- .permit(:navigation_id, :page_id, :highlights_on, :key, :name, :parent_id, :options, :url, *Cmor::Cms::Configuration.navigation_item_properties)
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
- class Cmor::Cms::Backend::PagesController < Cmor::Core::Backend::ResourcesController::Base
2
- def self.resource_class
3
- Cmor::Cms::Page
4
- end
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
- private
11
+ private
7
12
 
8
- def permitted_params
9
- params.require(:page)
10
- .permit(:title, :meta_description, :body, :pathname, :basename, :locale, :format, :handler, :layout, navigation_item_ids: [])
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
- class Cmor::Cms::Backend::PartialsController < Cmor::Core::Backend::ResourcesController::Base
2
- def self.resource_class
3
- Cmor::Cms::Partial
4
- end
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
- private
11
+ private
7
12
 
8
- def permitted_params
9
- params.require(:partial)
10
- .permit(:body, :pathname, :basename, :locale, :format, :handler)
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
- class Cmor::Cms::Backend::TemplatesController < Cmor::Core::Backend::ResourcesController::Base
2
- def self.resource_class
3
- Cmor::Cms::Template
4
- end
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
- private
11
+ private
7
12
 
8
- def permitted_params
9
- params.require(:template)
10
- .permit(:body, :pathname, :basename, :locale, :format, :handler)
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
@@ -20,4 +20,7 @@
20
20
 
21
21
  .well
22
22
  - Cmor::Cms::Configuration.navigation_item_properties.each do |navigation_item_property|
23
- = form.input navigation_item_property
23
+ = form.input navigation_item_property
24
+
25
+ .well
26
+ = form.input :published, as: :boolean
@@ -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
@@ -5,4 +5,5 @@
5
5
  = table.row :highlights_on
6
6
  - Cmor::Cms::Configuration.navigation_item_properties.each do |navigation_item_property|
7
7
  = table.row navigation_item_property
8
+ = table.timestamp :published_at
8
9
  = table.timestamps
@@ -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
@@ -6,3 +6,4 @@
6
6
  = table.column(:navigation_items, sortable: false) do |page|
7
7
  - page.navigation_items.collect{ |navigation_item| link_to(navigation_item, navigation_item_path(navigation_item)) }.join('<br />').html_safe
8
8
  = table.timestamps(sort: true)
9
+ = table.acts_as_published_actions
@@ -6,4 +6,5 @@
6
6
  %pre= resource.body
7
7
  = table.boolean :home_page?
8
8
  = table.row :layout
9
+ = table.timestamp :published_at
9
10
  = table.timestamps
@@ -7,3 +7,6 @@
7
7
  = form.input :locale, collection: I18n.available_locales
8
8
  = form.input :format, collection: Mime::SET.symbols
9
9
  = form.input :handler, collection: ActionView::Template::Handlers.extensions
10
+
11
+ .well
12
+ = form.input :published, as: :boolean
@@ -1,3 +1,4 @@
1
1
  = table.column :pathname, sort: true, class: 'truncate-chars truncate-chars-30'
2
2
  = table.column :filename, sort: true, class: 'truncate-chars truncate-chars-30'
3
- = table.timestamps(sort: true)
3
+ = table.timestamps(sort: true)
4
+ = table.acts_as_published_actions
@@ -2,4 +2,5 @@
2
2
  = table.row :body do |resource|
3
3
  - capture_haml do
4
4
  %pre= resource.body
5
+ = table.timestamp :published_at
5
6
  = table.timestamps
@@ -7,3 +7,6 @@
7
7
  = form.input :locale, collection: I18n.available_locales
8
8
  = form.input :format, collection: Mime::SET.symbols
9
9
  = form.input :handler, collection: ActionView::Template::Handlers.extensions
10
+
11
+ .well
12
+ = form.input :published, as: :boolean
@@ -1,3 +1,4 @@
1
1
  = table.column :pathname, sort: true, class: 'truncate-chars truncate-chars-30'
2
2
  = table.column :filename, sort: true, class: 'truncate-chars truncate-chars-30'
3
3
  = table.timestamps(sort: true)
4
+ = table.acts_as_published_actions
@@ -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
- resources :pages
20
- resources :partials
21
- resources :templates
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.41.pre
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-19 00:00:00.000000000 Z
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.41.pre
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.41.pre
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.41.pre
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.41.pre
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.41.pre
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.41.pre
334
+ version: 0.0.42.pre
335
335
  description: Provides a Backend for CMOR CMS
336
336
  email:
337
337
  - roberto@vasquez-angel.de