dead_simple_cms 0.9.1 → 0.9.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.
@@ -21,16 +21,17 @@ module DeadSimpleCMS
|
|
21
21
|
|
22
22
|
# Public: Render the dead simple cms with tabs
|
23
23
|
# This is *coupled* with twitter bootstrap. If you are running it, this will work great, otherwise this will be sad.
|
24
|
+
# If you don't have the tabs functionality included, you will have to specify the JS file with :bootstrap_tab_js.
|
24
25
|
# http://twitter.github.com/bootstrap/javascript.html#tabs
|
25
26
|
def with_bootstrap_tabs(options={})
|
26
|
-
js =
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
})
|
27
|
+
js = javascript_tag(<<-JAVASCRIPT)
|
28
|
+
$(document).ready(function() {
|
29
|
+
var $tabs = $('#section-tabs a') ;
|
30
|
+
$tabs.click(function (e) { e.preventDefault(); $(this).tab('show'); });
|
31
|
+
$("#" + (window.location.hash.replace("#", "") || "#{DeadSimpleCMS.sections.identifiers[0]}") + "-tab").tab('show');
|
32
|
+
})
|
33
33
|
JAVASCRIPT
|
34
|
+
js << javascript_include_tag(options.delete(:bootstrap_tab_js)) if options[:bootstrap_tab_js]
|
34
35
|
lis = DeadSimpleCMS.sections.values.map do |section|
|
35
36
|
content_tag(:li, link_to(section.label, "##{section.identifier.to_s.csserize}", :id => "#{section.identifier.to_s.csserize}-tab"))
|
36
37
|
end.join.html_safe
|
@@ -40,6 +41,7 @@ module DeadSimpleCMS
|
|
40
41
|
content_tag(:div, section(section), :class => "tab-pane", :id => "#{section.identifier.to_s.csserize}")
|
41
42
|
end.join.html_safe
|
42
43
|
end
|
44
|
+
|
43
45
|
js + tabs + sections
|
44
46
|
end
|
45
47
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dead_simple_cms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,12 +9,12 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-06-
|
12
|
+
date: 2012-06-25 00:00:00.000000000 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: activesupport
|
17
|
-
requirement: &
|
17
|
+
requirement: &2161734560 !ruby/object:Gem::Requirement
|
18
18
|
none: false
|
19
19
|
requirements:
|
20
20
|
- - ! '>='
|
@@ -22,10 +22,10 @@ dependencies:
|
|
22
22
|
version: '3.0'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
|
-
version_requirements: *
|
25
|
+
version_requirements: *2161734560
|
26
26
|
- !ruby/object:Gem::Dependency
|
27
27
|
name: activemodel
|
28
|
-
requirement: &
|
28
|
+
requirement: &2161734040 !ruby/object:Gem::Requirement
|
29
29
|
none: false
|
30
30
|
requirements:
|
31
31
|
- - ! '>='
|
@@ -33,10 +33,10 @@ dependencies:
|
|
33
33
|
version: '3.0'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
|
-
version_requirements: *
|
36
|
+
version_requirements: *2161734040
|
37
37
|
- !ruby/object:Gem::Dependency
|
38
38
|
name: simple_form
|
39
|
-
requirement: &
|
39
|
+
requirement: &2161733660 !ruby/object:Gem::Requirement
|
40
40
|
none: false
|
41
41
|
requirements:
|
42
42
|
- - ! '>='
|
@@ -44,10 +44,10 @@ dependencies:
|
|
44
44
|
version: '0'
|
45
45
|
type: :development
|
46
46
|
prerelease: false
|
47
|
-
version_requirements: *
|
47
|
+
version_requirements: *2161733660
|
48
48
|
- !ruby/object:Gem::Dependency
|
49
49
|
name: rails
|
50
|
-
requirement: &
|
50
|
+
requirement: &2161733120 !ruby/object:Gem::Requirement
|
51
51
|
none: false
|
52
52
|
requirements:
|
53
53
|
- - ! '>='
|
@@ -55,10 +55,10 @@ dependencies:
|
|
55
55
|
version: '3.0'
|
56
56
|
type: :development
|
57
57
|
prerelease: false
|
58
|
-
version_requirements: *
|
58
|
+
version_requirements: *2161733120
|
59
59
|
- !ruby/object:Gem::Dependency
|
60
60
|
name: rspec
|
61
|
-
requirement: &
|
61
|
+
requirement: &2161732700 !ruby/object:Gem::Requirement
|
62
62
|
none: false
|
63
63
|
requirements:
|
64
64
|
- - ! '>='
|
@@ -66,10 +66,10 @@ dependencies:
|
|
66
66
|
version: '0'
|
67
67
|
type: :development
|
68
68
|
prerelease: false
|
69
|
-
version_requirements: *
|
69
|
+
version_requirements: *2161732700
|
70
70
|
- !ruby/object:Gem::Dependency
|
71
71
|
name: sqlite3
|
72
|
-
requirement: &
|
72
|
+
requirement: &2161732240 !ruby/object:Gem::Requirement
|
73
73
|
none: false
|
74
74
|
requirements:
|
75
75
|
- - ! '>='
|
@@ -77,7 +77,7 @@ dependencies:
|
|
77
77
|
version: '0'
|
78
78
|
type: :development
|
79
79
|
prerelease: false
|
80
|
-
version_requirements: *
|
80
|
+
version_requirements: *2161732240
|
81
81
|
description: ! "Dead Simple CMS is a library for modifying different parts of your
|
82
82
|
website without the overhead of having a\nfullblown CMS. The idea with this library
|
83
83
|
is simple: provide an easy way to hook into different parts of your\napplication
|