comfortable_mexican_sofa 1.0.46 → 1.0.47
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +4 -2
- data/VERSION +1 -1
- data/app/controllers/cms_content_controller.rb +1 -1
- data/app/views/cms_admin/pages/_form.html.erb +1 -1
- data/comfortable_mexican_sofa.gemspec +2 -2
- data/lib/comfortable_mexican_sofa/cms_tag.rb +2 -2
- data/lib/comfortable_mexican_sofa/cms_tag/field_datetime.rb +0 -4
- data/lib/comfortable_mexican_sofa/cms_tag/field_integer.rb +0 -4
- data/lib/comfortable_mexican_sofa/cms_tag/field_string.rb +0 -4
- data/lib/comfortable_mexican_sofa/cms_tag/field_text.rb +0 -4
- data/lib/comfortable_mexican_sofa/cms_tag/helper.rb +0 -4
- data/lib/comfortable_mexican_sofa/cms_tag/page_datetime.rb +0 -4
- data/lib/comfortable_mexican_sofa/cms_tag/page_integer.rb +0 -4
- data/lib/comfortable_mexican_sofa/cms_tag/page_rich_text.rb +0 -4
- data/lib/comfortable_mexican_sofa/cms_tag/page_string.rb +0 -4
- data/lib/comfortable_mexican_sofa/cms_tag/page_text.rb +0 -4
- data/lib/comfortable_mexican_sofa/cms_tag/partial.rb +0 -4
- data/lib/comfortable_mexican_sofa/cms_tag/snippet.rb +0 -4
- metadata +4 -4
data/README.md
CHANGED
@@ -115,6 +115,8 @@ Similarly you can access **Snippet** content:
|
|
115
115
|
|
116
116
|
cms_snippet_content(:snippet_slug)
|
117
117
|
|
118
|
+
You can also directly access `@cms_site`, `@cms_layout` and `@cms_page` objects from helpers, partials and application layouts used in rendering of a CMS page.
|
119
|
+
|
118
120
|
Extending Admin Area
|
119
121
|
--------------------
|
120
122
|
|
@@ -157,7 +159,7 @@ There's a rake task that makes moving seeds into database (and vice-versa) easy:
|
|
157
159
|
# from seeds into database
|
158
160
|
rake comfortable_mexican_sofa:import:all FROM=your-site.local TO=your-site.com SEED_PATH=/path/to/seeds
|
159
161
|
|
160
|
-
# from database to seeds
|
162
|
+
# from database to seeds
|
161
163
|
rake comfortable_mexican_sofa:export:all FROM=your-site.com TO=your-site.local SEED_PATH=/path/to/seeds
|
162
164
|
|
163
165
|
Active Components
|
@@ -166,7 +168,7 @@ Comfortable Mexican Sofa utilizes the following:
|
|
166
168
|
|
167
169
|
* **[https://github.com/rails/rails](https://github.com/rails/rails)** - Ruby on Rails 3.*, of course
|
168
170
|
* **[https://github.com/thoughtbot/paperclip](https://github.com/thoughtbot/paperclip)** - Paperclip to handle file uploads
|
169
|
-
* **[https://github.com/
|
171
|
+
* **[https://github.com/twg/active_link_to](https://github.com/twg/active_link_to)** - Easy method to handle logic behind 'active' links
|
170
172
|
|
171
173
|
* * *
|
172
174
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.47
|
@@ -4,7 +4,7 @@ class CmsContentController < ApplicationController
|
|
4
4
|
before_filter :load_cms_page, :only => :render_html
|
5
5
|
before_filter :load_cms_layout, :only => [:render_css, :render_js]
|
6
6
|
|
7
|
-
caches_page :render_css, :render_js, :if => ComfortableMexicanSofa.config.enable_caching
|
7
|
+
caches_page :render_css, :render_js, :if => Proc.new { |c| ComfortableMexicanSofa.config.enable_caching }
|
8
8
|
|
9
9
|
def render_html(status = 200)
|
10
10
|
layout = @cms_page.cms_layout.app_layout.blank?? false : @cms_page.cms_layout.app_layout
|
@@ -22,7 +22,7 @@
|
|
22
22
|
<%= form.select :parent_id, options %>
|
23
23
|
<% end %>
|
24
24
|
<% if (options = CmsPage.options_for_select(@cms_site, @cms_page, nil, 0, false)).present? %>
|
25
|
-
<%= form.select :target_page_id,
|
25
|
+
<%= form.select :target_page_id, [['---- No Redirect ----', nil]] + options, :label => 'Redirect To Page' %>
|
26
26
|
<% end %>
|
27
27
|
<%= cms_hook :page_form, :object => form %>
|
28
28
|
</div>
|
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{comfortable_mexican_sofa}
|
8
|
-
s.version = "1.0.
|
8
|
+
s.version = "1.0.47"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Oleg Khabarov", "The Working Group Inc"]
|
12
|
-
s.date = %q{2011-
|
12
|
+
s.date = %q{2011-03-03}
|
13
13
|
s.description = %q{}
|
14
14
|
s.email = %q{oleg@theworkinggroup.ca}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -18,7 +18,7 @@ module CmsTag
|
|
18
18
|
# /\{\{\s*?cms:page:(\w+)\}\}/
|
19
19
|
# will match tags like these:
|
20
20
|
# {{cms:page:my_label}}
|
21
|
-
def regex_tag_signature
|
21
|
+
def regex_tag_signature(label = nil)
|
22
22
|
nil
|
23
23
|
end
|
24
24
|
|
@@ -56,7 +56,7 @@ module CmsTag
|
|
56
56
|
# Example:
|
57
57
|
# /<\{\s*?cms:page:tag_label\}/
|
58
58
|
def regex_tag_signature
|
59
|
-
|
59
|
+
self.class.regex_tag_signature(label)
|
60
60
|
end
|
61
61
|
|
62
62
|
# Content that is accociated with Tag instance.
|
@@ -9,10 +9,6 @@ class CmsTag::Partial
|
|
9
9
|
/\{\{\s*cms:partial:(#{label}):?(.*?)\s*\}\}/
|
10
10
|
end
|
11
11
|
|
12
|
-
def regex_tag_signature
|
13
|
-
self.class.regex_tag_signature(label)
|
14
|
-
end
|
15
|
-
|
16
12
|
def content
|
17
13
|
ps = params.split(':').collect_with_index{|p, i| ":param_#{i+1} => '#{p}'"}.join(', ')
|
18
14
|
"<%= render :partial => '#{label}'#{ps.blank?? nil : ", :locals => {#{ps}}"} %>"
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 1
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
version: 1.0.
|
8
|
+
- 47
|
9
|
+
version: 1.0.47
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Oleg Khabarov
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
18
|
+
date: 2011-03-03 00:00:00 -05:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -384,7 +384,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
384
384
|
requirements:
|
385
385
|
- - ">="
|
386
386
|
- !ruby/object:Gem::Version
|
387
|
-
hash:
|
387
|
+
hash: 4181913889619670678
|
388
388
|
segments:
|
389
389
|
- 0
|
390
390
|
version: "0"
|