ecm_cms2 1.1.1 → 2.0.2
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/README.rdoc +19 -1
- data/{lib/ecm/cms/active_admin → app/admin}/ecm_cms_content_box.rb +5 -5
- data/{lib/ecm/cms/active_admin → app/admin}/ecm_cms_navigation_items.rb +6 -6
- data/{lib/ecm/cms/active_admin → app/admin}/ecm_cms_navigations.rb +11 -12
- data/{lib/ecm/cms/active_admin → app/admin}/ecm_cms_pages.rb +20 -22
- data/{lib/ecm/cms/active_admin → app/admin}/ecm_cms_partials.rb +6 -7
- data/{lib/ecm/cms/active_admin → app/admin}/ecm_cms_templates.rb +7 -8
- data/app/controllers/ecm/cms/page_controller.rb +13 -8
- data/app/helpers/ecm/cms_helper.rb +8 -4
- data/app/models/concerns/model/ecm/cms/navigation_item/properties_concern.rb +25 -0
- data/app/models/ecm/cms/content_box.rb +5 -8
- data/app/models/ecm/cms/folder.rb +11 -12
- data/app/models/ecm/cms/navigation.rb +10 -9
- data/app/models/ecm/cms/navigation_item.rb +21 -20
- data/app/models/ecm/cms/page/content_block.rb +7 -8
- data/app/models/ecm/cms/page.rb +11 -11
- data/app/models/ecm/cms/partial.rb +2 -3
- data/app/models/ecm/cms/template.rb +4 -5
- data/app/services/ecm/cms/add_homepages_service.rb +61 -0
- data/app/services/ecm/cms/import_partials_service.rb +37 -32
- data/config/locales/ecm.cms.de.yml +3 -0
- data/config/locales/ecm.cms.navigation.de.yml +1 -0
- data/config/locales/ecm.cms.navigation.en.yml +1 -0
- data/config/locales/ecm.cms.page.de.yml +1 -0
- data/config/locales/ecm.cms.page.en.yml +1 -0
- data/db/migrate/001_create_ecm_cms_folders.rb +2 -2
- data/db/migrate/004_create_ecm_cms_partials.rb +1 -1
- data/db/migrate/006_create_ecm_cms_navigation_items.rb +1 -1
- data/lib/ecm/cms/action_view/template/handlers/textile.rb +0 -3
- data/lib/ecm/cms/action_view/template_patch.rb +2 -3
- data/lib/ecm/cms/action_view/template_renderer_patch.rb +4 -6
- data/lib/ecm/cms/configuration.rb +1 -1
- data/lib/ecm/cms/controller_extensions/page_resolver.rb +0 -1
- data/lib/ecm/cms/controller_extensions/partial_resolver.rb +0 -1
- data/lib/ecm/cms/controller_extensions/template_resolver.rb +0 -1
- data/lib/ecm/cms/database_resolver.rb +21 -22
- data/lib/ecm/cms/database_template.rb +17 -18
- data/lib/ecm/cms/engine.rb +5 -7
- data/lib/ecm/cms/importers/navigation.rb +2 -5
- data/lib/ecm/cms/importers/navigation_item.rb +6 -9
- data/lib/ecm/cms/importers/page.rb +4 -7
- data/lib/ecm/cms/resolvers/ecm/cms/page_resolver.rb +3 -6
- data/lib/ecm/cms/resolvers/ecm/cms/partial_resolver.rb +0 -1
- data/lib/ecm/cms/resolvers/ecm/cms/template_resolver.rb +0 -1
- data/lib/ecm/cms/routing.rb +2 -3
- data/lib/ecm/cms/version.rb +1 -1
- data/lib/ecm_cms2.rb +1 -2
- data/lib/generators/ecm/cms/install/install_generator.rb +6 -6
- data/lib/generators/ecm/cms/install/templates/ecm_cms.rb +6 -6
- data/lib/generators/ecm/cms/locales/locales_generator.rb +19 -18
- data/lib/tasks/ecm_cms_tasks.rake +2 -3
- metadata +33 -25
- data/app/models/concerns/ecm/cms/navigation_item/properties.rb +0 -29
@@ -2,7 +2,7 @@ module Ecm
|
|
2
2
|
module Cms
|
3
3
|
module Importers
|
4
4
|
class Navigation
|
5
|
-
def initialize(yaml,
|
5
|
+
def initialize(yaml, _option = {})
|
6
6
|
@navigations = nil
|
7
7
|
@yaml = YAML.load(yaml)
|
8
8
|
end
|
@@ -20,11 +20,8 @@ module Ecm
|
|
20
20
|
@navigations ||= build_navigations
|
21
21
|
end
|
22
22
|
|
23
|
-
|
24
|
-
@yaml
|
25
|
-
end
|
23
|
+
attr_reader :yaml
|
26
24
|
end
|
27
25
|
end
|
28
26
|
end
|
29
27
|
end
|
30
|
-
|
@@ -2,7 +2,7 @@ module Ecm
|
|
2
2
|
module Cms
|
3
3
|
module Importers
|
4
4
|
class NavigationItem
|
5
|
-
def initialize(yaml,
|
5
|
+
def initialize(yaml, _option = {})
|
6
6
|
@navigation_items = nil
|
7
7
|
@yaml = YAML.load(yaml)
|
8
8
|
end
|
@@ -15,7 +15,7 @@ module Ecm
|
|
15
15
|
|
16
16
|
def create_navigation_items
|
17
17
|
built_navigation_items = []
|
18
|
-
@yaml.each do |navigation_locale, navigation|
|
18
|
+
@yaml.each do |navigation_locale, navigation|
|
19
19
|
navigation.each do |navigation_name, navigation_items_attributes|
|
20
20
|
n = find_or_create_navigation(navigation_locale, navigation_name)
|
21
21
|
built_navigation_items << create_navigation_items_for_navigation(n, navigation_items_attributes)
|
@@ -30,7 +30,7 @@ module Ecm
|
|
30
30
|
ni = create_navigation_item(navigation_item_attributes, navigation)
|
31
31
|
built_navigation_items << ni
|
32
32
|
end
|
33
|
-
|
33
|
+
built_navigation_items
|
34
34
|
end
|
35
35
|
|
36
36
|
def create_navigation_item(navigation_item_attributes, navigation)
|
@@ -49,16 +49,13 @@ module Ecm
|
|
49
49
|
end
|
50
50
|
|
51
51
|
def find_or_create_navigation(navigation_locale, navigation_name)
|
52
|
-
navigation = Ecm::Cms::Navigation.where(:
|
53
|
-
navigation = Ecm::Cms::Navigation.create!(:
|
52
|
+
navigation = Ecm::Cms::Navigation.where(locale: navigation_locale, name: navigation_name).first
|
53
|
+
navigation = Ecm::Cms::Navigation.create!(locale: navigation_locale, name: navigation_name) if navigation.nil?
|
54
54
|
navigation
|
55
55
|
end
|
56
56
|
|
57
|
-
|
58
|
-
@yaml
|
59
|
-
end
|
57
|
+
attr_reader :yaml
|
60
58
|
end
|
61
59
|
end
|
62
60
|
end
|
63
61
|
end
|
64
|
-
|
@@ -2,7 +2,7 @@ module Ecm
|
|
2
2
|
module Cms
|
3
3
|
module Importers
|
4
4
|
class Page
|
5
|
-
def initialize(yaml,
|
5
|
+
def initialize(yaml, _option = {})
|
6
6
|
@pages = nil
|
7
7
|
@yaml = YAML.load(yaml)
|
8
8
|
end
|
@@ -21,8 +21,8 @@ module Ecm
|
|
21
21
|
def extract_navigation_items(navigation_item_data)
|
22
22
|
navigation_items = []
|
23
23
|
navigation_item_data.each do |nid|
|
24
|
-
navigation = Ecm::Cms::Navigation.where(:
|
25
|
-
navigation_items << navigation.ecm_cms_navigation_items.where(:
|
24
|
+
navigation = Ecm::Cms::Navigation.where(locale: nid['navigation_locale'], name: nid['navigation_name']).first
|
25
|
+
navigation_items << navigation.ecm_cms_navigation_items.where(name: nid['name']).first if navigation.respond_to?(:ecm_cms_navigation_items)
|
26
26
|
end
|
27
27
|
navigation_items
|
28
28
|
end
|
@@ -31,11 +31,8 @@ module Ecm
|
|
31
31
|
@pages ||= build_pages
|
32
32
|
end
|
33
33
|
|
34
|
-
|
35
|
-
@yaml
|
36
|
-
end
|
34
|
+
attr_reader :yaml
|
37
35
|
end
|
38
36
|
end
|
39
37
|
end
|
40
38
|
end
|
41
|
-
|
@@ -20,12 +20,10 @@ module Ecm
|
|
20
20
|
content_for_title = "<% content_for :title do %>#{record.title}<% end %>"
|
21
21
|
content_for_meta_description = "<% content_for :meta_description do %>#{record.meta_description}<% end %>"
|
22
22
|
output << content_for_title << content_for_meta_description
|
23
|
-
|
24
|
-
unless record.body.nil?
|
25
|
-
output << record.body
|
26
|
-
end
|
27
23
|
|
28
|
-
|
24
|
+
output << record.body unless record.body.nil?
|
25
|
+
|
26
|
+
output
|
29
27
|
end
|
30
28
|
|
31
29
|
def normalize_basename(basename)
|
@@ -42,4 +40,3 @@ module Ecm
|
|
42
40
|
end
|
43
41
|
end
|
44
42
|
end
|
45
|
-
|
data/lib/ecm/cms/routing.rb
CHANGED
@@ -4,10 +4,9 @@ module Ecm
|
|
4
4
|
def self.routes(router, options = {})
|
5
5
|
options.reverse_merge!({})
|
6
6
|
|
7
|
-
router.get
|
8
|
-
router.get '/' =>
|
7
|
+
router.get '/*page', to: 'ecm/cms/page#respond', as: :page
|
8
|
+
router.get '/' => 'ecm/cms/page#respond', :page => 'home' # , :as => :root
|
9
9
|
end
|
10
10
|
end
|
11
11
|
end
|
12
12
|
end
|
13
|
-
|
data/lib/ecm/cms/version.rb
CHANGED
data/lib/ecm_cms2.rb
CHANGED
@@ -3,10 +3,10 @@ require 'ecm/cms/action_view/template_patch'
|
|
3
3
|
require 'ecm/cms/action_view/template_renderer_patch'
|
4
4
|
|
5
5
|
require 'awesome_nested_set'
|
6
|
+
require 'itsf_services'
|
6
7
|
require 'redcloth'
|
7
8
|
require 'simple-navigation'
|
8
9
|
require 'simple-navigation-bootstrap'
|
9
|
-
require 'active_admin-awesome_nested_set'
|
10
10
|
|
11
11
|
require 'ecm/cms/engine'
|
12
12
|
require 'ecm/cms/configuration'
|
@@ -33,4 +33,3 @@ module Ecm
|
|
33
33
|
end
|
34
34
|
end
|
35
35
|
end
|
36
|
-
|
@@ -2,14 +2,14 @@ module Ecm
|
|
2
2
|
module Cms
|
3
3
|
module Generators
|
4
4
|
class InstallGenerator < Rails::Generators::Base
|
5
|
-
desc
|
5
|
+
desc 'Generates the intializer'
|
6
|
+
|
7
|
+
source_root File.expand_path('../templates', __FILE__)
|
6
8
|
|
7
|
-
source_root File.expand_path('../templates', __FILE__)
|
8
|
-
|
9
9
|
def generate_intializer
|
10
|
-
copy_file
|
11
|
-
end
|
10
|
+
copy_file 'ecm_cms.rb', 'config/initializers/ecm_cms.rb'
|
11
|
+
end
|
12
12
|
end
|
13
13
|
end
|
14
14
|
end
|
15
|
-
end
|
15
|
+
end
|
@@ -2,15 +2,15 @@ Ecm::Cms.configure do |config|
|
|
2
2
|
# Set the default handler for pages, partials and templates
|
3
3
|
#
|
4
4
|
# Default: config.default_handlers = {
|
5
|
-
# page: :
|
6
|
-
# partial: :
|
7
|
-
# template: :
|
5
|
+
# page: :textile,
|
6
|
+
# partial: :textile,
|
7
|
+
# template: :textile
|
8
8
|
# }
|
9
9
|
#
|
10
10
|
config.default_handlers = {
|
11
|
-
page: :
|
12
|
-
partial: :
|
13
|
-
template: :
|
11
|
+
page: :textile,
|
12
|
+
partial: :textile,
|
13
|
+
template: :textile
|
14
14
|
}
|
15
15
|
|
16
16
|
# Set the base controller for the page controller
|
@@ -1,38 +1,39 @@
|
|
1
|
+
require 'rails/generators'
|
2
|
+
|
1
3
|
module Ecm
|
2
4
|
module Cms
|
3
5
|
module Generators
|
4
6
|
class LocalesGenerator < Rails::Generators::Base
|
5
|
-
desc
|
7
|
+
desc 'Copies the locale files to your application'
|
6
8
|
|
7
9
|
source_root File.expand_path('../../../../../../config/locales', __FILE__)
|
8
10
|
|
9
11
|
def generate_locales
|
10
|
-
copy_file
|
11
|
-
copy_file
|
12
|
+
copy_file 'ecm.cms.en.yml', 'config/locales/ecm.cms.en.yml'
|
13
|
+
copy_file 'ecm.cms.de.yml', 'config/locales/ecm.cms.de.yml'
|
12
14
|
|
13
|
-
copy_file
|
14
|
-
copy_file
|
15
|
+
copy_file 'ecm.cms.content_box.en.yml', 'config/locales/ecm.cms.content_box.en.yml'
|
16
|
+
copy_file 'ecm.cms.content_box.de.yml', 'config/locales/ecm.cms.content_box.de.yml'
|
15
17
|
|
16
|
-
copy_file
|
17
|
-
copy_file
|
18
|
+
copy_file 'ecm.cms.navigation.en.yml', 'config/locales/ecm.cms.navigation.en.yml'
|
19
|
+
copy_file 'ecm.cms.navigation.de.yml', 'config/locales/ecm.cms.navigation.de.yml'
|
18
20
|
|
19
|
-
copy_file
|
20
|
-
copy_file
|
21
|
+
copy_file 'ecm.cms.navigation_item.en.yml', 'config/locales/ecm.cms.navigation_item.en.yml'
|
22
|
+
copy_file 'ecm.cms.navigation_item.de.yml', 'config/locales/ecm.cms.navigation_item.de.yml'
|
21
23
|
|
22
|
-
copy_file
|
23
|
-
copy_file
|
24
|
+
copy_file 'ecm.cms.page.en.yml', 'config/locales/ecm.cms.page.en.yml'
|
25
|
+
copy_file 'ecm.cms.page.de.yml', 'config/locales/ecm.cms.page.de.yml'
|
24
26
|
|
25
|
-
copy_file
|
26
|
-
copy_file
|
27
|
+
copy_file 'ecm.cms.page.content_block.en.yml', 'config/locales/ecm.cms.page.content_block.en.yml'
|
28
|
+
copy_file 'ecm.cms.page.content_block.de.yml', 'config/locales/ecm.cms.page.content_block.de.yml'
|
27
29
|
|
28
|
-
copy_file
|
29
|
-
copy_file
|
30
|
+
copy_file 'ecm.cms.partial.en.yml', 'config/locales/ecm.cms.partial.en.yml'
|
31
|
+
copy_file 'ecm.cms.partial.de.yml', 'config/locales/ecm.cms.partial.de.yml'
|
30
32
|
|
31
|
-
copy_file
|
32
|
-
copy_file
|
33
|
+
copy_file 'ecm.cms.template.en.yml', 'config/locales/ecm.cms.template.en.yml'
|
34
|
+
copy_file 'ecm.cms.template.de.yml', 'config/locales/ecm.cms.template.de.yml'
|
33
35
|
end
|
34
36
|
end
|
35
37
|
end
|
36
38
|
end
|
37
39
|
end
|
38
|
-
|
@@ -1,10 +1,9 @@
|
|
1
1
|
namespace :ecm do
|
2
2
|
namespace :cms do
|
3
3
|
desc 'Imports partials from app/views into the database'
|
4
|
-
task :import_partials, [:view_path] => [:environment] do |
|
5
|
-
args.with_defaults(:
|
4
|
+
task :import_partials, [:view_path, :force] => [:environment] do |_t, args|
|
5
|
+
args.with_defaults(view_path: Rails.root.join(*%(app views)), force: false)
|
6
6
|
Ecm::Cms::ImportPartialsService.call(args)
|
7
7
|
end
|
8
8
|
end
|
9
9
|
end
|
10
|
-
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ecm_cms2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.2
|
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:
|
11
|
+
date: 2016-01-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -17,9 +17,6 @@ dependencies:
|
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '4.0'
|
20
|
-
- - "<"
|
21
|
-
- !ruby/object:Gem::Version
|
22
|
-
version: '5.0'
|
23
20
|
type: :runtime
|
24
21
|
prerelease: false
|
25
22
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -27,11 +24,8 @@ dependencies:
|
|
27
24
|
- - ">="
|
28
25
|
- !ruby/object:Gem::Version
|
29
26
|
version: '4.0'
|
30
|
-
- - "<"
|
31
|
-
- !ruby/object:Gem::Version
|
32
|
-
version: '5.0'
|
33
27
|
- !ruby/object:Gem::Dependency
|
34
|
-
name:
|
28
|
+
name: awesome_nested_set
|
35
29
|
requirement: !ruby/object:Gem::Requirement
|
36
30
|
requirements:
|
37
31
|
- - ">="
|
@@ -45,7 +39,7 @@ dependencies:
|
|
45
39
|
- !ruby/object:Gem::Version
|
46
40
|
version: '0'
|
47
41
|
- !ruby/object:Gem::Dependency
|
48
|
-
name:
|
42
|
+
name: draper
|
49
43
|
requirement: !ruby/object:Gem::Requirement
|
50
44
|
requirements:
|
51
45
|
- - ">="
|
@@ -59,7 +53,7 @@ dependencies:
|
|
59
53
|
- !ruby/object:Gem::Version
|
60
54
|
version: '0'
|
61
55
|
- !ruby/object:Gem::Dependency
|
62
|
-
name:
|
56
|
+
name: itsf_services
|
63
57
|
requirement: !ruby/object:Gem::Requirement
|
64
58
|
requirements:
|
65
59
|
- - ">="
|
@@ -282,6 +276,20 @@ dependencies:
|
|
282
276
|
- - ">="
|
283
277
|
- !ruby/object:Gem::Version
|
284
278
|
version: '0'
|
279
|
+
- !ruby/object:Gem::Dependency
|
280
|
+
name: active_admin-awesome_nested_set
|
281
|
+
requirement: !ruby/object:Gem::Requirement
|
282
|
+
requirements:
|
283
|
+
- - ">="
|
284
|
+
- !ruby/object:Gem::Version
|
285
|
+
version: '0'
|
286
|
+
type: :development
|
287
|
+
prerelease: false
|
288
|
+
version_requirements: !ruby/object:Gem::Requirement
|
289
|
+
requirements:
|
290
|
+
- - ">="
|
291
|
+
- !ruby/object:Gem::Version
|
292
|
+
version: '0'
|
285
293
|
- !ruby/object:Gem::Dependency
|
286
294
|
name: capybara
|
287
295
|
requirement: !ruby/object:Gem::Requirement
|
@@ -314,16 +322,16 @@ dependencies:
|
|
314
322
|
name: shoulda-matchers
|
315
323
|
requirement: !ruby/object:Gem::Requirement
|
316
324
|
requirements:
|
317
|
-
- - "
|
325
|
+
- - ">="
|
318
326
|
- !ruby/object:Gem::Version
|
319
|
-
version:
|
327
|
+
version: '0'
|
320
328
|
type: :development
|
321
329
|
prerelease: false
|
322
330
|
version_requirements: !ruby/object:Gem::Requirement
|
323
331
|
requirements:
|
324
|
-
- - "
|
332
|
+
- - ">="
|
325
333
|
- !ruby/object:Gem::Version
|
326
|
-
version:
|
334
|
+
version: '0'
|
327
335
|
- !ruby/object:Gem::Dependency
|
328
336
|
name: factory_girl_rails
|
329
337
|
requirement: !ruby/object:Gem::Requirement
|
@@ -394,7 +402,7 @@ dependencies:
|
|
394
402
|
- - ">="
|
395
403
|
- !ruby/object:Gem::Version
|
396
404
|
version: '0'
|
397
|
-
description: CMS
|
405
|
+
description: CMS base module for ruby on rails.
|
398
406
|
email:
|
399
407
|
- roberto@vasquez-angel.de
|
400
408
|
executables: []
|
@@ -404,11 +412,17 @@ files:
|
|
404
412
|
- MIT-LICENSE
|
405
413
|
- README.rdoc
|
406
414
|
- Rakefile
|
415
|
+
- app/admin/ecm_cms_content_box.rb
|
416
|
+
- app/admin/ecm_cms_navigation_items.rb
|
417
|
+
- app/admin/ecm_cms_navigations.rb
|
418
|
+
- app/admin/ecm_cms_pages.rb
|
419
|
+
- app/admin/ecm_cms_partials.rb
|
420
|
+
- app/admin/ecm_cms_templates.rb
|
407
421
|
- app/assets/javascripts/ecm_cms.js.coffee
|
408
422
|
- app/assets/stylesheets/ecm_cms.css.less
|
409
423
|
- app/controllers/ecm/cms/page_controller.rb
|
410
424
|
- app/helpers/ecm/cms_helper.rb
|
411
|
-
- app/models/concerns/ecm/cms/navigation_item/
|
425
|
+
- app/models/concerns/model/ecm/cms/navigation_item/properties_concern.rb
|
412
426
|
- app/models/ecm/cms/content_box.rb
|
413
427
|
- app/models/ecm/cms/folder.rb
|
414
428
|
- app/models/ecm/cms/navigation.rb
|
@@ -417,6 +431,7 @@ files:
|
|
417
431
|
- app/models/ecm/cms/page/content_block.rb
|
418
432
|
- app/models/ecm/cms/partial.rb
|
419
433
|
- app/models/ecm/cms/template.rb
|
434
|
+
- app/services/ecm/cms/add_homepages_service.rb
|
420
435
|
- app/services/ecm/cms/import_partials_service.rb
|
421
436
|
- app/views/ecm/cms/_link_to_top.html.erb
|
422
437
|
- config/locales/ecm.cms.content_box.de.yml
|
@@ -447,12 +462,6 @@ files:
|
|
447
462
|
- lib/ecm/cms/action_view/template/handlers/textile.rb
|
448
463
|
- lib/ecm/cms/action_view/template_patch.rb
|
449
464
|
- lib/ecm/cms/action_view/template_renderer_patch.rb
|
450
|
-
- lib/ecm/cms/active_admin/ecm_cms_content_box.rb
|
451
|
-
- lib/ecm/cms/active_admin/ecm_cms_navigation_items.rb
|
452
|
-
- lib/ecm/cms/active_admin/ecm_cms_navigations.rb
|
453
|
-
- lib/ecm/cms/active_admin/ecm_cms_pages.rb
|
454
|
-
- lib/ecm/cms/active_admin/ecm_cms_partials.rb
|
455
|
-
- lib/ecm/cms/active_admin/ecm_cms_templates.rb
|
456
465
|
- lib/ecm/cms/configuration.rb
|
457
466
|
- lib/ecm/cms/controller_extensions/page_resolver.rb
|
458
467
|
- lib/ecm/cms/controller_extensions/partial_resolver.rb
|
@@ -495,6 +504,5 @@ rubyforge_project:
|
|
495
504
|
rubygems_version: 2.4.8
|
496
505
|
signing_key:
|
497
506
|
specification_version: 4
|
498
|
-
summary: CMS
|
507
|
+
summary: CMS base module for ruby on rails.
|
499
508
|
test_files: []
|
500
|
-
has_rdoc:
|
@@ -1,29 +0,0 @@
|
|
1
|
-
require 'active_support/concern'
|
2
|
-
|
3
|
-
module Ecm::Cms
|
4
|
-
module NavigationItem::Properties
|
5
|
-
extend ActiveSupport::Concern
|
6
|
-
|
7
|
-
included do
|
8
|
-
serialize :properties, OpenStruct
|
9
|
-
delegate *Configuration.navigation_item_properties, to: :li_attributes
|
10
|
-
delegate *Configuration.navigation_item_properties.collect { |a| "#{a}=".to_sym }, to: :li_attributes
|
11
|
-
end
|
12
|
-
|
13
|
-
def highlights_on
|
14
|
-
self.properties.highlights_on ||= nil
|
15
|
-
end
|
16
|
-
|
17
|
-
def highlights_on=(highlights_on)
|
18
|
-
properties.highlights_on = highlights_on
|
19
|
-
end
|
20
|
-
|
21
|
-
def li_attributes
|
22
|
-
self.properties.li_attributes ||= OpenStruct.new
|
23
|
-
end
|
24
|
-
|
25
|
-
def li_attributes=(li_attributes)
|
26
|
-
properties.li_attributes = li_attributes
|
27
|
-
end
|
28
|
-
end
|
29
|
-
end
|