liquid_cms 0.3.0.3 → 0.3.0.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -5,11 +5,9 @@
5
5
 
6
6
  <p>Each size field has additional <strong>url</strong>, <strong>width</strong> and <strong>height</strong> attribute as well:</p>
7
7
 
8
- <code>
9
8
  <pre>
10
9
  {{ image.original.url }}
11
10
  {{ image.large.url }}
12
11
  {{ image.large.width }}
13
12
  {{ image.large.height }}
14
13
  </pre>
15
- </code>
@@ -3,76 +3,60 @@
3
3
  <li><span class="param">precision</span> - Precision of dollar value. Defaults to 0.</li>
4
4
  </ol>
5
5
 
6
- <code>
7
6
  <pre>
8
7
  {{ 75 | money }} = $75
9
8
  {{ 75 | money: 2 }} = $75.00
10
9
  </pre>
11
- </code>
12
10
 
13
11
  <h3><span class="function">json</span> - converts data to json format</h3>
14
12
 
15
- <code>
16
13
  <pre>
17
14
  {{ some_value | json }}
18
15
  </pre>
19
- </code>
20
16
 
21
17
  <h3><span class="function">textilize</span> - formats text to html using textile markup</h3>
22
18
  <ol>
23
19
  <li><span class="param">wrap</span> - Wrap text with paragraphs. true/false. Defaults to true.</li>
24
20
  </ol>
25
21
 
26
- <code>
27
22
  <pre>
28
23
  {{ "test *string*" | textilize }} = &lt;p&gt;test &lt;strong&gt;string&lt;/strong&gt;&lt;/p&gt;
29
24
  {{ "test *string*" | textilize: false }} = test &lt;strong&gt;string&lt;/strong&gt;
30
25
  </pre>
31
- </code>
32
26
 
33
27
  <h3><span class="function">url_encode</span> - encodes a value for a url</h3>
34
28
 
35
- <code>
36
29
  <pre>
37
30
  {{ "test space" | url_encode }} = test+space
38
31
  </pre>
39
- </code>
40
32
 
41
33
  <h3><span class="function">url_decode</span> - decodes a value from a url</h3>
42
34
 
43
- <code>
44
35
  <pre>
45
36
  {{ "test+space" | url_decode }} = test space
46
37
  </pre>
47
- </code>
48
38
 
49
39
  <h3><span class="function">script_tag</span> - converts text to a javascript include tag (works the same as rails javascript_include_tag)</h3>
50
40
 
51
- <code>
52
41
  <pre>
53
42
  {{ "test.js" | script_tag }}
54
43
  </pre>
55
- </code>
56
44
 
57
45
  <h3><span class="function">stylesheet_tag</span> - converts text to a stylesheet link tag (works the same as rails stylesheet_link_tag)</h3>
58
46
 
59
- <code>
60
47
  <pre>
61
48
  {{ "test.css" | stylesheet_tag }}
62
49
  </pre>
63
- </code>
64
50
 
65
51
  <h3><span class="function">link_to</span> - converts a url to an anchor tag.</h3>
66
52
  <ol>
67
53
  <li><span class="param">text</span> - Link text. Defaults to the link url.</li>
68
54
  </ol>
69
55
 
70
- <code>
71
56
  <pre>
72
57
  {{ "www.google.com" | link_to }} = &lt;a href="www.google.com"&gt;www.google.com&lt;/a&gt;
73
58
  {{ "www.google.com" | link_to: Google }} = &lt;a href="www.google.com"&gt;Google&lt;/a&gt;
74
59
  </pre>
75
- </code>
76
60
 
77
61
  <h3><span class="function">image_tag</span> - converts a url to an img tag.</h3>
78
62
  <ol>
@@ -80,14 +64,12 @@
80
64
  <li><span class="param">size</span> - Size as a "50x60" (width x height) formatted string.</li>
81
65
  </ol>
82
66
 
83
- <code>
84
67
  <pre>
85
68
  {{ "img.jpg" | image_tag }} = &lt;img src="img.jpg" /&gt;
86
69
  {{ "img.jpg" | image_tag: "An Image" }} = &lt;img src="img.jpg" title="An Image" /&gt;
87
70
  {{ "img.jpg" | image_tag: "An Image", "50x60" }} = &lt;img src="img.jpg" title="An Image" width="50" height="60" /&gt;
88
71
  {{ "img.jpg" | image_tag: nil, "50x60" }} = &lt;img src="img.jpg" width="50" height="60" /&gt;
89
72
  </pre>
90
- </code>
91
73
 
92
74
  <h3><span class="function">assign_to</span> - assigns the filter results to a variable.</h3>
93
75
  <ul>
@@ -95,14 +77,12 @@
95
77
  </ul>
96
78
 
97
79
  <p class="example">Assigns the paginated collection to the variable <strong>data</strong>.</p>
98
- <code>
99
80
  <pre>
100
81
  {{ collection | paginate_collection: 10, 1 | assign_to: 'data' }}
101
82
  {% for item in data %}
102
83
  ...
103
84
  {% endfor %}
104
85
  </pre>
105
- </code>
106
86
 
107
87
  <h3><span class="function">paginate_links</span> - use to paginate new and used vehicles</h3>
108
88
  <p>Uses a page parameter from the url (if set) to determine what page of the pagination to display. Ie. /vehicles?page=3</p>
@@ -112,12 +92,10 @@
112
92
  <li><span class="param">next_label</span> - label for the next page button</li>
113
93
  </ol>
114
94
 
115
- <code>
116
95
  <pre>
117
96
  {{ vehicles | paginate }}
118
97
  {{ vehicles | paginate : "anchor", "Previous vehicles", "Next Vehicles" }}
119
98
  </pre>
120
- </code>
121
99
 
122
100
  <h3><span class="function">paginate_collection</span> - use to paginate any collection of data</h3>
123
101
  <ol>
@@ -126,12 +104,10 @@
126
104
  </ol>
127
105
 
128
106
  <p class="example">Retrieves 10 items from the collection at a time. The 1st to 10th items for the 1st call and the 11th to 20th items for the 2nd call.</p>
129
- <code>
130
107
  <pre>
131
108
  {{ collection | paginate_collection: 10, 1 }}
132
109
  {{ collection | paginate_collection: 10, 2 }}
133
110
  </pre>
134
- </code>
135
111
 
136
112
  <p>An additional variable called <strong>paginate</strong> is automatically assigned when calling this method. It contains the following pagination details:</p>
137
113
  <ul>
@@ -140,36 +116,27 @@
140
116
  <li><span class="param">previous_page</span> - the previous page</li>
141
117
  <li><span class="param">next_page</span> - the next page</li>
142
118
  </ul>
143
- <code>
144
119
  <pre>
145
120
  {{ paginate.total_pages }}
146
121
  {{ paginate.next_page }}
147
122
  </pre>
148
- </code>
149
123
 
150
124
  <h3><span class="function">page_url</span> - converts a text value representing a CMS page name to its corresponding url.</h3>
151
125
 
152
126
  <p class="example">If a page has been created called "test", its associated url is output.</p>
153
- <code>
154
127
  <pre>
155
128
  {{ "test" | page_url }} = /path/to/page
156
129
  </pre>
157
- </code>
158
130
 
159
131
  <h3><span class="function">asset_url</span> - converts a text value representing a CMS asset name to its corresponding url.</h3>
160
132
 
161
133
  <p class="example">If an asset has been created called "test", its associated path is output.</p>
162
- <code>
163
134
  <pre>
164
135
  {{ "test" | asset_url }} = /public/assets/5/original/test.jpg
165
136
  </pre>
166
- </code>
167
137
 
168
138
  <h3><span class="function">component_url</span> - converts a text value representing a component path to its corresponding url.</h3>
169
139
 
170
- <code>
171
140
  <pre>
172
141
  {{ "jquery.plugin-1.0/javascript/jquery.plugin-1.0.js" | component_url }} = /components/1/jquery.plugin-1.0/javascript/jquery.plugin-1.0.js
173
142
  </pre>
174
- </code>
175
-
@@ -2,10 +2,8 @@
2
2
 
3
3
  <p class="example">The page named "test" will be inserted here along with any variables that have already been defined in the scope of the surrounding page.</p>
4
4
 
5
- <code>
6
5
  <pre>
7
6
  &lt;div&gt;
8
7
  {% include 'test' %}
9
8
  &lt;/div&gt;
10
9
  </pre>
11
- </code>
@@ -7,9 +7,7 @@
7
7
  <div class="cms_info">
8
8
  <h3>* Filters can be chained (see github link above)...</h3>
9
9
 
10
- <code>
11
10
  <pre>
12
11
  {{ "test" | asset_url | image_tag }} = &lt;img src="/public/assets/5/original/test.jpg" /&gt;
13
12
  </pre>
14
- </code>
15
13
  </div>
@@ -12,14 +12,11 @@ Variable parameter: <code>{% tag name:var_value %}</code>
12
12
  <p>Variables assigned to in templates can be used in the layouts template as well.</p>
13
13
 
14
14
  <p>In the child template:</p>
15
- <code>
16
15
  <pre>
17
16
  {% assign title = 'Page Title' %}
18
17
  </pre>
19
- </code>
20
18
 
21
19
  <p>In the layout template:</p>
22
- <code>
23
20
  <pre>
24
21
  &lt;html&gt;
25
22
  &lt;head&gt;
@@ -30,4 +27,3 @@ Variable parameter: <code>{% tag name:var_value %}</code>
30
27
  &lt;/body&gt;
31
28
  &lt;/html&gt;
32
29
  </pre>
33
- </code>
@@ -2,38 +2,30 @@
2
2
 
3
3
  <h3><span class="function">site_url</span> - The base url for the website including protocol and port based on the current request.</h3>
4
4
 
5
- <code>
6
5
  <pre>
7
6
  {{ site_url }} = http://testsite.com
8
7
  </pre>
9
- </code>
10
8
 
11
9
  <h3><span class="function">content_for_layout</span> - Inserts the contents of a page that defines it as its layout page.</h3>
12
10
 
13
- If there's a page called "layout" that contains the following:
14
- <code>
11
+ <p>If there's a page called "layout" that contains the following:</p>
15
12
  <pre>
16
13
  &lt;html&gt;
17
14
  {{ content_for_layout }}
18
15
  &lt;/html&gt;
19
16
  </pre>
20
- </code>
21
17
 
22
- And a page called "content" that specifies "layout" as its layout page (done via the CMS UI):
23
- <code>
18
+ <p>And a page called "content" that specifies "layout" as its layout page (done via the CMS UI):</p>
24
19
  <pre>
25
20
  &lt;div&gt;Content&lt;/div&gt;
26
21
  </pre>
27
- </code>
28
22
 
29
- This results in:
30
- <code>
23
+ <p>This results in:</p>
31
24
  <pre>
32
25
  &lt;html&gt;
33
26
  &lt;div&gt;Content&lt;/div&gt;
34
27
  &lt;/html&gt;
35
28
  </pre>
36
- </code>
37
29
 
38
30
  <p>{{ content_for_layout }} can be nested in any number of pages to allow for layouts within layouts.</p>
39
31
 
@@ -41,7 +33,6 @@ This results in:
41
33
 
42
34
  <p class="example">For a page request of /path/page?test=1</p>
43
35
 
44
- <code>
45
36
  <pre>
46
37
  {{ params.test }} = 1
47
38
  {{ params.url }} = pathpage
@@ -49,5 +40,3 @@ This results in:
49
40
  {{ params.url[1] }} = page
50
41
  {{ params.url[2] }} = ''
51
42
  </pre>
52
- </code>
53
-
@@ -1 +1,3 @@
1
- <p>Add a new page or upload a new asset.</p>
1
+ <div class="message shadow curved">
2
+ <p>Add a new page or upload a new asset.</p>
3
+ </div>
@@ -9,19 +9,20 @@
9
9
  <%= javascript_include_tag '/cms/codemirror/js/codemirror' %>
10
10
  <%= stylesheet_link_tag '/cms/stylesheets/simple_form' %>
11
11
  <%= stylesheet_link_tag '/cms/stylesheets/clearfix', '/cms/stylesheets/humanmsg', '/cms/stylesheets/styles' %>
12
+ <%= stylesheet_link_tag '/cms/stylesheets/themes/dark' %>
12
13
  <%= yield :cms_styles %>
13
14
  <!--[if lte IE 8]>
14
15
  <%= stylesheet_link_tag '/cms/stylesheets/ie' %>
15
16
  <![endif]-->
16
17
  <%= csrf_meta_tag %>
17
18
  </head>
18
- <body id="cms">
19
+ <body id="cms" class="cms_<%= params[:controller].camelize.demodulize.downcase %>">
19
20
  <div id="header">
20
21
  <h1><%= link_to 'Liquid CMS', cms_root_path %></h1>
21
22
  </div>
22
23
 
23
- <div class="clearfix">
24
- <div id="sidebar">
24
+ <div id="outer-container" class="clearfix">
25
+ <div id="sidebar" class="shadow curved">
25
26
  <%= render 'cms/shared/sidebar' %>
26
27
  </div>
27
28
 
@@ -10,7 +10,7 @@ module LiquidCms
10
10
  def copy_migration_file
11
11
  name = 'create_liquid_cms_setup'
12
12
  if self.class.migration_exists?(File.join('db', 'migrate'), name).blank?
13
- migration_template 'migration.rb', File.join('db', 'migrate', name) if self.class.migration_exists?(File.join('db', 'migrate'), name).blank?
13
+ migration_template 'migration.rb', File.join('db', 'migrate', name)
14
14
  else
15
15
  puts "Migration '#{name}' already exists... skipping"
16
16
  end
@@ -1,12 +1,18 @@
1
- #content {
2
- border-left: 1px solid #DDD;
3
- margin-left: 23em;
4
- margin-right: 1em;
5
- padding-left: 1em;
6
- }
7
1
  h4 {
8
2
  font-size: 10pt;
9
3
  }
4
+ .cms_documentation #content h2 {
5
+ margin-top: 1em;
6
+ }
7
+ .cms_documentation #content a {
8
+ text-decoration: none;
9
+ }
10
+ .cms_documentation #content a:hover {
11
+ text-decoration: underline;
12
+ }
13
+ #content pre {
14
+ margin: 0;
15
+ }
10
16
  .subsection {
11
17
  margin-left: 1em;
12
18
  }
@@ -27,5 +33,5 @@ span.function {
27
33
  background-color: #F5F5F5;
28
34
  border: 1px solid #333;
29
35
  padding: 0 0.5em;
30
- margin-bottom: 1em;
36
+ margin: 1em 0;
31
37
  }
@@ -3,7 +3,7 @@ form.simple_form {
3
3
  background-color: #F5F5F5;
4
4
  margin-bottom: 1em;
5
5
  }
6
- form.simple_form, #sidebar {
6
+ form.simple_form, .shadow {
7
7
  border: 1px solid #BBB;
8
8
  -moz-box-shadow: 0.3em 0.3em 9px 1px rgba(0, 0, 0, 0.1);
9
9
  -webkit-box-shadow: 0.3em 0.3em 9px rgba(0, 0, 0, 0.1);
@@ -12,10 +12,15 @@ a img {
12
12
  border: none;
13
13
  }
14
14
 
15
+ .curved {
16
+ -moz-border-radius: 0.5em;
17
+ -webkit-border-radius: 0.5em;
18
+ border-radius: 0.5em;
19
+ }
20
+
15
21
  #header {
16
22
  position: relative;
17
23
  padding: 2em 0;
18
- margin: 0 0 1em 0;
19
24
  }
20
25
  #header h1 {
21
26
  font-size: 18pt;
@@ -44,15 +49,36 @@ a img {
44
49
  font-weight: bold;
45
50
  }
46
51
 
52
+ #outer-container {
53
+ height: 100%;
54
+ padding-top: 1em;
55
+ }
56
+
47
57
  #content {
48
58
  margin-left: 23em;
49
59
  margin-right: 1em;
60
+ padding-bottom: 0.5em;
61
+ }
62
+ #content h1 {
63
+ padding-top: 0.5em;
64
+ margin-top: 0;
50
65
  }
51
66
  #content h2 {
52
67
  border-bottom: 1px solid #AAA;
53
68
  margin-top: 0;
54
69
  padding-bottom: 0.3em;
55
70
  }
71
+ #content .message {
72
+ padding: 0.5em;
73
+ text-align: center;
74
+ background: none repeat scroll 0 0 #CCCCCC;
75
+ color: #333333;
76
+ font-weight: bold;
77
+ line-height: 5em;
78
+ padding: 0.5em;
79
+ text-align: center;
80
+ text-shadow: 1px 1px 4px #FFFFFF;
81
+ }
56
82
 
57
83
  #sidebar {
58
84
  background-color: #CFCFCF;
@@ -142,6 +168,9 @@ h2 p.message {
142
168
  float: right;
143
169
  }
144
170
 
171
+ .CodeMirror-wrapping {
172
+ display: inline-block;
173
+ }
145
174
  .CodeMirror-wrapping iframe {
146
175
  background-color: white;
147
176
  border: 1px solid #BBBBBB !important;
@@ -1,3 +1,3 @@
1
1
  module Cms
2
- VERSION = "0.3.0.3"
2
+ VERSION = "0.3.0.4"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: liquid_cms
3
3
  version: !ruby/object:Gem::Version
4
- hash: 81
4
+ hash: 95
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 3
9
9
  - 0
10
- - 3
11
- version: 0.3.0.3
10
+ - 4
11
+ version: 0.3.0.4
12
12
  platform: ruby
13
13
  authors:
14
14
  - Andrew Kaspick
@@ -17,7 +17,7 @@ autorequire:
17
17
  bindir: bin
18
18
  cert_chain: []
19
19
 
20
- date: 2011-02-13 00:00:00 -06:00
20
+ date: 2011-02-14 00:00:00 -06:00
21
21
  default_executable:
22
22
  dependencies:
23
23
  - !ruby/object:Gem::Dependency
@@ -1312,6 +1312,7 @@ files:
1312
1312
  - lib/generators/liquid_cms/templates/public/cms/images/tree/lastnode.png
1313
1313
  - lib/generators/liquid_cms/templates/public/cms/images/tree/node.png
1314
1314
  - lib/generators/liquid_cms/templates/public/cms/images/tree/vline.png
1315
+ - lib/generators/liquid_cms/templates/public/cms/images/trentacinque.gif
1315
1316
  - lib/generators/liquid_cms/templates/public/cms/javascripts/cms.js
1316
1317
  - lib/generators/liquid_cms/templates/public/cms/javascripts/cookiejar.js
1317
1318
  - lib/generators/liquid_cms/templates/public/cms/javascripts/humanmsg.js