ecm_cms 0.0.11.pre → 0.0.13.pre
Sign up to get free protection for your applications and to get access to all the features.
data/MIT-LICENSE
CHANGED
@@ -8,7 +8,8 @@ class Ecm::Cms::PageController < ApplicationController
|
|
8
8
|
# avoid error 500 on missing template
|
9
9
|
rescue_from ActionView::MissingTemplate do
|
10
10
|
respond_to do |format|
|
11
|
-
format.html { render(:file => "#{Rails.root}/public/404.html", :layout => false, :status => 404) }
|
11
|
+
# format.html { render(:file => "#{Rails.root}/public/404.html", :layout => false, :status => 404) }
|
12
|
+
format.html { render(:file => "#{Rails.root}/public/404", :formats => [:html], :status => 404, :layout => false) }
|
12
13
|
format.xml { head :not_found }
|
13
14
|
format.any { head :not_found }
|
14
15
|
end
|
@@ -10,7 +10,7 @@ de:
|
|
10
10
|
resources:
|
11
11
|
ecm_cms_folders: ordner
|
12
12
|
ecm_cms_navigations: navigationen
|
13
|
-
ecm_cms_navigation_items:
|
13
|
+
ecm_cms_navigation_items: navigationseintraege
|
14
14
|
ecm_cms_pages: seiten
|
15
15
|
ecm_cms_partials: fragmente
|
16
16
|
ecm_cms_templates: vorlagen
|
@@ -35,8 +35,6 @@ ActiveAdmin.register Ecm::Cms::Partial do
|
|
35
35
|
|
36
36
|
sidebar Ecm::Cms::Partial.human_attribute_name(:details), :only => :show do
|
37
37
|
attributes_table_for ecm_cms_partial do
|
38
|
-
p ecm_cms_partial.inspect
|
39
|
-
# row :folder
|
40
38
|
row :pathname
|
41
39
|
row :filename
|
42
40
|
row :created_at
|
@@ -7,18 +7,32 @@ module Ecm
|
|
7
7
|
@yaml = YAML.load(yaml)
|
8
8
|
end
|
9
9
|
|
10
|
+
def navigation_items
|
11
|
+
@navigation_items ||= create_navigation_items
|
12
|
+
end
|
13
|
+
|
14
|
+
private
|
15
|
+
|
10
16
|
def create_navigation_items
|
11
17
|
built_navigation_items = []
|
12
18
|
@yaml.each do |navigation_locale, navigation|
|
13
|
-
|
19
|
+
p navigation_locale
|
20
|
+
p navigation
|
21
|
+
navigation.each do |navigation_name, navigation_items_attributes|
|
14
22
|
n = find_or_create_navigation(navigation_locale, navigation_name)
|
15
|
-
|
16
|
-
ni = create_navigation_item(navigation_item_attributes, n)
|
17
|
-
built_navigation_items << ni
|
18
|
-
end
|
23
|
+
built_navigation_items << create_navigation_items_for_navigation(n, navigation_items_attributes)
|
19
24
|
end if navigation_locale.respond_to?(:each)
|
20
25
|
end if @yaml.respond_to?(:each)
|
21
|
-
built_navigation_items
|
26
|
+
built_navigation_items.flatten
|
27
|
+
end
|
28
|
+
|
29
|
+
def create_navigation_items_for_navigation(navigation, navigation_items_attributes)
|
30
|
+
built_navigation_items = []
|
31
|
+
navigation_items_attributes.each do |navigation_item_attributes|
|
32
|
+
ni = create_navigation_item(navigation_item_attributes, navigation)
|
33
|
+
built_navigation_items << ni
|
34
|
+
end
|
35
|
+
return built_navigation_items
|
22
36
|
end
|
23
37
|
|
24
38
|
def create_navigation_item(navigation_item_attributes, navigation)
|
@@ -42,10 +56,6 @@ module Ecm
|
|
42
56
|
navigation
|
43
57
|
end
|
44
58
|
|
45
|
-
def navigation_items
|
46
|
-
@navigation_items ||= create_navigation_items
|
47
|
-
end
|
48
|
-
|
49
59
|
def yaml
|
50
60
|
@yaml
|
51
61
|
end
|
data/lib/ecm/cms/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ecm_cms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 961916016
|
5
5
|
prerelease: 7
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
9
|
+
- 13
|
10
10
|
- pre
|
11
|
-
version: 0.0.
|
11
|
+
version: 0.0.13.pre
|
12
12
|
platform: ruby
|
13
13
|
authors:
|
14
14
|
- Roberto Vasquez Angel
|
@@ -16,7 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2013-
|
19
|
+
date: 2013-02-07 00:00:00 Z
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
22
22
|
name: rails
|
@@ -316,21 +316,23 @@ dependencies:
|
|
316
316
|
type: :development
|
317
317
|
version_requirements: *id021
|
318
318
|
- !ruby/object:Gem::Dependency
|
319
|
-
name:
|
319
|
+
name: rb-inotify
|
320
320
|
prerelease: false
|
321
321
|
requirement: &id022 !ruby/object:Gem::Requirement
|
322
322
|
none: false
|
323
323
|
requirements:
|
324
|
-
- -
|
324
|
+
- - ~>
|
325
325
|
- !ruby/object:Gem::Version
|
326
|
-
hash:
|
326
|
+
hash: 47
|
327
327
|
segments:
|
328
328
|
- 0
|
329
|
-
|
329
|
+
- 8
|
330
|
+
- 8
|
331
|
+
version: 0.8.8
|
330
332
|
type: :development
|
331
333
|
version_requirements: *id022
|
332
334
|
- !ruby/object:Gem::Dependency
|
333
|
-
name:
|
335
|
+
name: guard-rspec
|
334
336
|
prerelease: false
|
335
337
|
requirement: &id023 !ruby/object:Gem::Requirement
|
336
338
|
none: false
|
@@ -343,40 +345,10 @@ dependencies:
|
|
343
345
|
version: "0"
|
344
346
|
type: :development
|
345
347
|
version_requirements: *id023
|
346
|
-
- !ruby/object:Gem::Dependency
|
347
|
-
name: rb-inotify
|
348
|
-
prerelease: false
|
349
|
-
requirement: &id024 !ruby/object:Gem::Requirement
|
350
|
-
none: false
|
351
|
-
requirements:
|
352
|
-
- - ~>
|
353
|
-
- !ruby/object:Gem::Version
|
354
|
-
hash: 59
|
355
|
-
segments:
|
356
|
-
- 0
|
357
|
-
- 9
|
358
|
-
- 0
|
359
|
-
version: 0.9.0
|
360
|
-
type: :development
|
361
|
-
version_requirements: *id024
|
362
|
-
- !ruby/object:Gem::Dependency
|
363
|
-
name: guard-rspec
|
364
|
-
prerelease: false
|
365
|
-
requirement: &id025 !ruby/object:Gem::Requirement
|
366
|
-
none: false
|
367
|
-
requirements:
|
368
|
-
- - ">="
|
369
|
-
- !ruby/object:Gem::Version
|
370
|
-
hash: 3
|
371
|
-
segments:
|
372
|
-
- 0
|
373
|
-
version: "0"
|
374
|
-
type: :development
|
375
|
-
version_requirements: *id025
|
376
348
|
- !ruby/object:Gem::Dependency
|
377
349
|
name: guard-bundler
|
378
350
|
prerelease: false
|
379
|
-
requirement: &
|
351
|
+
requirement: &id024 !ruby/object:Gem::Requirement
|
380
352
|
none: false
|
381
353
|
requirements:
|
382
354
|
- - ">="
|
@@ -386,7 +358,7 @@ dependencies:
|
|
386
358
|
- 0
|
387
359
|
version: "0"
|
388
360
|
type: :development
|
389
|
-
version_requirements: *
|
361
|
+
version_requirements: *id024
|
390
362
|
description: CMS Module for active admin.
|
391
363
|
email:
|
392
364
|
- roberto@vasquez-angel.de
|