liquid_cms 0.2.0.8 → 0.2.0.9
Sign up to get free protection for your applications and to get access to all the features.
- data/app/views/cms/components/edit.html.erb +10 -12
- data/generators/liquid_cms/templates/public/cms/stylesheets/simple_form.css +46 -11
- data/generators/liquid_cms/templates/public/cms/stylesheets/styles.css +10 -0
- data/generators/liquid_cms/templates/public/cms/stylesheets/themes/dark.css +9 -0
- data/lib/liquid_cms/configuration.rb +3 -0
- data/lib/liquid_cms/context.rb +1 -1
- data/lib/liquid_cms/version.rb +1 -1
- data/liquid_cms.gemspec +4 -1
- data/test/factories/company.rb +1 -1
- metadata +4 -16
@@ -2,19 +2,17 @@
|
|
2
2
|
|
3
3
|
<p>No liquid support currently for editing components.</p>
|
4
4
|
|
5
|
-
<% form_tag({:controller => 'cms/components', :action => 'update', :url => CGI::escape(@component.path)}, :class => '
|
6
|
-
<
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
</
|
5
|
+
<% form_tag({:controller => 'cms/components', :action => 'update', :url => CGI::escape(@component.path)}, :class => 'simple_form') do %>
|
6
|
+
<div class="string required">
|
7
|
+
<%= label_tag :name, nil, :class => 'string required' %> <%= text_field_tag :name, @component.path, :readonly => true, :class => 'string required' %>
|
8
|
+
</div>
|
9
|
+
<div class="text required">
|
10
|
+
<%= label_tag :contents, nil, :class => 'text required' %> <%= text_area_tag :contents, @component.read, :rows => 40, :class => 'text required' %>
|
11
|
+
</div>
|
12
12
|
|
13
|
-
<
|
14
|
-
|
15
|
-
|
16
|
-
</ol>
|
17
|
-
</fieldset>
|
13
|
+
<div class="buttons">
|
14
|
+
<%= submit_tag 'Update', :class => 'update' %> or <%= link_to 'Cancel', :back, :class => 'cancel' %>
|
15
|
+
</div>
|
18
16
|
<% end %>
|
19
17
|
|
20
18
|
<%= codemirror_edit Cms::Editable::content_type(@component.path), 'form.simple_form', 'contents' %>
|
@@ -9,10 +9,40 @@ form.simple_form, .shadow {
|
|
9
9
|
-webkit-box-shadow: 0.3em 0.3em 9px rgba(0, 0, 0, 0.1);
|
10
10
|
box-shadow: 0.3em 0.3em 9px rgba(0, 0, 0, 0.1);
|
11
11
|
}
|
12
|
+
|
13
|
+
form.simple_form .buttons input,
|
12
14
|
form.simple_form a.cancel {
|
13
|
-
|
15
|
+
font-family: Arial;
|
16
|
+
font-weight: bold;
|
14
17
|
line-height: 2em;
|
18
|
+
padding: 0.5em 1em;
|
15
19
|
}
|
20
|
+
form.simple_form .buttons input {
|
21
|
+
color: #444;
|
22
|
+
margin-right: 0.3em;
|
23
|
+
text-shadow: 0 1px #FFF;
|
24
|
+
}
|
25
|
+
form.simple_form .buttons input:hover {
|
26
|
+
cursor: pointer;
|
27
|
+
}
|
28
|
+
form.simple_form a.cancel {
|
29
|
+
-moz-border-radius: 0.5em;
|
30
|
+
-webkit-border-radius: 0.5em;
|
31
|
+
border-radius: 0.5em;
|
32
|
+
background: #D00;
|
33
|
+
background: -moz-linear-gradient(90deg, #BB0000 0%, #EE4444 100%) repeat scroll 0 0 transparent;
|
34
|
+
background: -webkit-gradient(linear, left top, left bottom, color-stop(0,#E44), color-stop(1.0,#B00));
|
35
|
+
color: white;
|
36
|
+
margin-left: 0.3em;
|
37
|
+
text-decoration: none;
|
38
|
+
text-shadow: 0 1px #555;
|
39
|
+
}
|
40
|
+
form.simple_form a.cancel:hover {
|
41
|
+
background: #E00;
|
42
|
+
background: -moz-linear-gradient(90deg, #C11 0%, #F55 100%) repeat scroll 0 0 transparent;
|
43
|
+
background: -webkit-gradient(linear, left top, left bottom, color-stop(0,#F55), color-stop(1.0,#C11));
|
44
|
+
}
|
45
|
+
|
16
46
|
form.simple_form div.string, form.simple_form div.text, form.simple_form div.boolean, div.select {
|
17
47
|
margin-bottom: 1.3em;
|
18
48
|
}
|
@@ -20,25 +50,30 @@ form.simple_form label {
|
|
20
50
|
color: #333;
|
21
51
|
float: left;
|
22
52
|
font-size: 10pt;
|
53
|
+
font-family: Verdana;
|
23
54
|
font-weight: bold;
|
24
|
-
|
55
|
+
line-height: 1.8em;
|
56
|
+
width: 9%;
|
25
57
|
}
|
26
58
|
form.simple_form input.string {
|
59
|
+
display: block;
|
60
|
+
padding: 0.3em;
|
61
|
+
margin-left: 9%;
|
27
62
|
width: 89%;
|
28
63
|
}
|
29
64
|
|
30
|
-
form.simple_form .buttons { margin-left:
|
31
|
-
form.simple_form span.hint { color: #666; display: block; font-size: 8pt; font-style: italic; margin: 0.5em 0 0
|
65
|
+
form.simple_form .buttons { margin-left: 9%; margin-top: 1.5em; }
|
66
|
+
form.simple_form span.hint { color: #666; display: block; font-size: 8pt; font-style: italic; margin: 0.5em 0 0 9%;}
|
32
67
|
form.simple_form span.hint em { color: #333; font-weight: bold; }
|
33
68
|
|
34
69
|
form.simple_form div.fieldWithErrors { background-color: #FBE3E4; padding: 0.5em 0; }
|
35
70
|
form.simple_form span.error {
|
36
71
|
background: white;
|
37
|
-
border:1px solid red;
|
38
|
-
color:red;
|
39
|
-
display:block;
|
40
|
-
font-weight:bold;
|
41
|
-
margin-left:
|
42
|
-
margin-top:0.5em;
|
43
|
-
padding:0.5em;
|
72
|
+
border: 1px solid red;
|
73
|
+
color: red;
|
74
|
+
display: block;
|
75
|
+
font-weight: bold;
|
76
|
+
margin-left: 9%;
|
77
|
+
margin-top: 0.5em;
|
78
|
+
padding: 0.5em;
|
44
79
|
}
|
@@ -79,6 +79,9 @@ a img {
|
|
79
79
|
text-align: center;
|
80
80
|
text-shadow: 1px 1px 4px #FFFFFF;
|
81
81
|
}
|
82
|
+
.cms_components #content p {
|
83
|
+
font-style: italic;
|
84
|
+
}
|
82
85
|
|
83
86
|
#sidebar {
|
84
87
|
background-color: #CFCFCF;
|
@@ -178,3 +181,10 @@ h2 p.message {
|
|
178
181
|
background-color: white;
|
179
182
|
border: 1px solid #BBBBBB !important;
|
180
183
|
}
|
184
|
+
|
185
|
+
.cms_pages #content h2 {
|
186
|
+
background: url("/cms/images/icons/page.png") no-repeat scroll right 50% transparent;
|
187
|
+
}
|
188
|
+
.cms_assets #content h2 {
|
189
|
+
background: url("/cms/images/icons/photo.png") no-repeat scroll right 50% transparent;
|
190
|
+
}
|
@@ -15,9 +15,18 @@ body {
|
|
15
15
|
.cms_documentation #content a {
|
16
16
|
color: #FFE900;
|
17
17
|
}
|
18
|
+
.cms_components #content p {
|
19
|
+
color: white;
|
20
|
+
}
|
18
21
|
.cms_documentation span.function {
|
19
22
|
color: #49FF3F;
|
20
23
|
}
|
21
24
|
.cms_documentation .cms_info {
|
22
25
|
color: #333;
|
23
26
|
}
|
27
|
+
|
28
|
+
form.simple_form, .shadow {
|
29
|
+
-moz-box-shadow: 0.3em 0.3em 9px 1px rgba(0, 0, 0, 0.5);
|
30
|
+
-webkit-box-shadow: 0.3em 0.3em 9px rgba(0, 0, 0, 0.5);
|
31
|
+
box-shadow: 0.3em 0.3em 9px rgba(0, 0, 0, 0.5);
|
32
|
+
}
|
@@ -9,6 +9,8 @@ module Cms
|
|
9
9
|
mattr_reader :context_class
|
10
10
|
def self.context_class=(klass)
|
11
11
|
@@context_class = klass
|
12
|
+
return if klass.nil?
|
13
|
+
|
12
14
|
Dispatcher.to_prepare {
|
13
15
|
eval(klass.to_s).extend Cms::ContextAssociation
|
14
16
|
|
@@ -19,6 +21,7 @@ module Cms
|
|
19
21
|
@@context_class = nil
|
20
22
|
|
21
23
|
def self.set_context(context, bind_to)
|
24
|
+
return if @@context_class.nil?
|
22
25
|
bind_to.instance_variable_set :@cms_context, context
|
23
26
|
end
|
24
27
|
|
data/lib/liquid_cms/context.rb
CHANGED
data/lib/liquid_cms/version.rb
CHANGED
data/liquid_cms.gemspec
CHANGED
@@ -9,7 +9,10 @@ Gem::Specification.new do |s|
|
|
9
9
|
s.email = ['andrew@redlinesoftware.com']
|
10
10
|
s.homepage = "http://rubygems.org/gems/liquid_cms"
|
11
11
|
s.summary = "A context aware Rails CMS engine using the Liquid template library."
|
12
|
-
s.description =
|
12
|
+
s.description = <<-TXT
|
13
|
+
A context aware Rails CMS engine using the Liquid template library.
|
14
|
+
Use the 0.3.x series for Rails 3 compatibility and the 0.2.x version for Rails 2 compatibility.
|
15
|
+
TXT
|
13
16
|
|
14
17
|
s.required_rubygems_version = ">= 1.3.6"
|
15
18
|
s.rubyforge_project = "liquid_cms"
|
data/test/factories/company.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: liquid_cms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash: 79
|
5
4
|
prerelease: false
|
6
5
|
segments:
|
7
6
|
- 0
|
8
7
|
- 2
|
9
8
|
- 0
|
10
|
-
-
|
11
|
-
version: 0.2.0.
|
9
|
+
- 9
|
10
|
+
version: 0.2.0.9
|
12
11
|
platform: ruby
|
13
12
|
authors:
|
14
13
|
- Andrew Kaspick
|
@@ -17,7 +16,7 @@ autorequire:
|
|
17
16
|
bindir: bin
|
18
17
|
cert_chain: []
|
19
18
|
|
20
|
-
date: 2011-02-
|
19
|
+
date: 2011-02-20 00:00:00 -06:00
|
21
20
|
default_executable:
|
22
21
|
dependencies:
|
23
22
|
- !ruby/object:Gem::Dependency
|
@@ -28,7 +27,6 @@ dependencies:
|
|
28
27
|
requirements:
|
29
28
|
- - ~>
|
30
29
|
- !ruby/object:Gem::Version
|
31
|
-
hash: 9
|
32
30
|
segments:
|
33
31
|
- 2
|
34
32
|
- 3
|
@@ -44,7 +42,6 @@ dependencies:
|
|
44
42
|
requirements:
|
45
43
|
- - ~>
|
46
44
|
- !ruby/object:Gem::Version
|
47
|
-
hash: 1
|
48
45
|
segments:
|
49
46
|
- 2
|
50
47
|
- 3
|
@@ -60,7 +57,6 @@ dependencies:
|
|
60
57
|
requirements:
|
61
58
|
- - ~>
|
62
59
|
- !ruby/object:Gem::Version
|
63
|
-
hash: 21
|
64
60
|
segments:
|
65
61
|
- 1
|
66
62
|
- 0
|
@@ -76,7 +72,6 @@ dependencies:
|
|
76
72
|
requirements:
|
77
73
|
- - "="
|
78
74
|
- !ruby/object:Gem::Version
|
79
|
-
hash: 31
|
80
75
|
segments:
|
81
76
|
- 1
|
82
77
|
- 0
|
@@ -92,7 +87,6 @@ dependencies:
|
|
92
87
|
requirements:
|
93
88
|
- - ~>
|
94
89
|
- !ruby/object:Gem::Version
|
95
|
-
hash: 57
|
96
90
|
segments:
|
97
91
|
- 0
|
98
92
|
- 9
|
@@ -108,7 +102,6 @@ dependencies:
|
|
108
102
|
requirements:
|
109
103
|
- - ~>
|
110
104
|
- !ruby/object:Gem::Version
|
111
|
-
hash: 27
|
112
105
|
segments:
|
113
106
|
- 2
|
114
107
|
- 3
|
@@ -124,7 +117,6 @@ dependencies:
|
|
124
117
|
requirements:
|
125
118
|
- - ">="
|
126
119
|
- !ruby/object:Gem::Version
|
127
|
-
hash: 3
|
128
120
|
segments:
|
129
121
|
- 0
|
130
122
|
version: "0"
|
@@ -138,7 +130,6 @@ dependencies:
|
|
138
130
|
requirements:
|
139
131
|
- - ~>
|
140
132
|
- !ruby/object:Gem::Version
|
141
|
-
hash: 25
|
142
133
|
segments:
|
143
134
|
- 1
|
144
135
|
- 2
|
@@ -154,7 +145,6 @@ dependencies:
|
|
154
145
|
requirements:
|
155
146
|
- - ~>
|
156
147
|
- !ruby/object:Gem::Version
|
157
|
-
hash: 33
|
158
148
|
segments:
|
159
149
|
- 2
|
160
150
|
- 10
|
@@ -162,7 +152,7 @@ dependencies:
|
|
162
152
|
version: 2.10.3
|
163
153
|
type: :development
|
164
154
|
version_requirements: *id009
|
165
|
-
description: A context aware Rails CMS engine using the Liquid template library.
|
155
|
+
description: " A context aware Rails CMS engine using the Liquid template library.\n Use the 0.3.x series for Rails 3 compatibility and the 0.2.x version for Rails 2 compatibility.\n"
|
166
156
|
email:
|
167
157
|
- andrew@redlinesoftware.com
|
168
158
|
executables: []
|
@@ -1496,7 +1486,6 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
1496
1486
|
requirements:
|
1497
1487
|
- - ">="
|
1498
1488
|
- !ruby/object:Gem::Version
|
1499
|
-
hash: 3
|
1500
1489
|
segments:
|
1501
1490
|
- 0
|
1502
1491
|
version: "0"
|
@@ -1505,7 +1494,6 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
1505
1494
|
requirements:
|
1506
1495
|
- - ">="
|
1507
1496
|
- !ruby/object:Gem::Version
|
1508
|
-
hash: 23
|
1509
1497
|
segments:
|
1510
1498
|
- 1
|
1511
1499
|
- 3
|