kuhsaft 0.2.4 → 0.2.5
Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.md
CHANGED
data/app/helpers/cms_helper.rb
CHANGED
@@ -2,4 +2,14 @@ module CmsHelper
|
|
2
2
|
def admin_tab title, path
|
3
3
|
content_tag :li, link_to(title, path), :class => (:current if request.path.include?(path))
|
4
4
|
end
|
5
|
+
|
6
|
+
def available_parent_pages
|
7
|
+
pages = []
|
8
|
+
pages << { :title => t('kuhsaft.cms.pages.new.pages'), :link => cms_pages_path(:locale => :en) }
|
9
|
+
if params[:parent_id].present?
|
10
|
+
parent_page = Kuhsaft::Page.find(params[:parent_id])
|
11
|
+
pages += parent_page.parent_pages
|
12
|
+
end
|
13
|
+
pages << { :title => t('kuhsaft.cms.pages.new.new_page'), :link => '#' }
|
14
|
+
end
|
5
15
|
end
|
data/kuhsaft.gemspec
CHANGED
@@ -20,7 +20,7 @@ Gem::Specification.new do |s|
|
|
20
20
|
s.require_paths = ["lib"]
|
21
21
|
|
22
22
|
s.add_development_dependency 'rspec-rails', '>= 2.6'
|
23
|
-
s.add_development_dependency 'factory_girl_rails'
|
23
|
+
s.add_development_dependency 'factory_girl_rails'
|
24
24
|
s.add_development_dependency 'capybara', '>= 0.4.0'
|
25
25
|
s.add_development_dependency 'ruby-debug'
|
26
26
|
s.add_development_dependency 'sqlite3-ruby', '1.2.5'
|
data/lib/kuhsaft/version.rb
CHANGED
@@ -1,11 +1,2 @@
|
|
1
1
|
module ApplicationHelper
|
2
|
-
def available_parent_pages
|
3
|
-
pages = []
|
4
|
-
pages << { :title => t('kuhsaft.cms.pages.new.pages'), :link => cms_pages_path(:locale => :en) }
|
5
|
-
if params[:parent_id].present?
|
6
|
-
parent_page = Kuhsaft::Page.find(params[:parent_id])
|
7
|
-
pages += parent_page.parent_pages
|
8
|
-
end
|
9
|
-
pages << { :title => t('kuhsaft.cms.pages.new.new_page'), :link => '#' }
|
10
|
-
end
|
11
2
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kuhsaft
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 29
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 0.2.
|
9
|
+
- 5
|
10
|
+
version: 0.2.5
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- "Immanuel H\xC3\xA4ussermann"
|
@@ -44,9 +44,8 @@ dependencies:
|
|
44
44
|
- !ruby/object:Gem::Version
|
45
45
|
hash: 3
|
46
46
|
segments:
|
47
|
-
- 2
|
48
47
|
- 0
|
49
|
-
version: "
|
48
|
+
version: "0"
|
50
49
|
type: :development
|
51
50
|
version_requirements: *id002
|
52
51
|
- !ruby/object:Gem::Dependency
|
@@ -412,7 +411,7 @@ files:
|
|
412
411
|
- spec/dummy/public/stylesheets/.gitkeep
|
413
412
|
- spec/dummy/script/rails
|
414
413
|
- spec/factories.rb
|
415
|
-
- spec/helpers/
|
414
|
+
- spec/helpers/cms_helper_spec.rb
|
416
415
|
- spec/helpers/pages_helper_spec.rb
|
417
416
|
- spec/integration/navigation_spec.rb
|
418
417
|
- spec/kuhsaft_spec.rb
|
@@ -494,7 +493,7 @@ test_files:
|
|
494
493
|
- spec/dummy/public/stylesheets/.gitkeep
|
495
494
|
- spec/dummy/script/rails
|
496
495
|
- spec/factories.rb
|
497
|
-
- spec/helpers/
|
496
|
+
- spec/helpers/cms_helper_spec.rb
|
498
497
|
- spec/helpers/pages_helper_spec.rb
|
499
498
|
- spec/integration/navigation_spec.rb
|
500
499
|
- spec/kuhsaft_spec.rb
|