cms-fortress 1.0.9 → 1.0.12

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.9
1
+ 1.0.12
@@ -18,7 +18,7 @@ class Cms::PageWorkflow < ActiveRecord::Base
18
18
 
19
19
  def self.statuses_for_select(can_publish, can_review)
20
20
  ret = [["Draft", 0]]
21
- ret << ["Review", 1] if can_review
21
+ ret << ["Reviewed", 1] if can_review
22
22
  ret << ["Published", 3] if can_publish
23
23
  # self.statuses.map {|k,v| [v.to_s.titleize, k]}
24
24
  ret
@@ -33,7 +33,7 @@
33
33
  = cms_hook :navigation
34
34
 
35
35
  - else
36
- = render 'cms/fortress/admin/leftnav'
36
+ = render 'cms/fortress/admin/left_nav'
37
37
 
38
38
 
39
39
  = render '/admin/cms/partials/navigation_inner'
data/cms-fortress.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "cms-fortress"
8
- s.version = "1.0.9"
8
+ s.version = "1.0.12"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Melvin Sembrano"]
12
- s.date = "2014-01-01"
12
+ s.date = "2014-01-21"
13
13
  s.description = "Comfortable Mexican Sofa (CMS) - User and role management extension"
14
14
  s.email = "melvinsembrano@gmail.com"
15
15
  s.extra_rdoc_files = [
@@ -49,9 +49,9 @@ Gem::Specification.new do |s|
49
49
  "app/views/admin/cms/partials/_body_before.html.haml",
50
50
  "app/views/cms/fortress/admin/_left_contents_nav.html.haml",
51
51
  "app/views/cms/fortress/admin/_left_designs_nav.html.haml",
52
+ "app/views/cms/fortress/admin/_left_nav.html.haml",
52
53
  "app/views/cms/fortress/admin/_left_settings_nav.html.haml",
53
- "app/views/cms/fortress/admin/_leftnav.html.haml",
54
- "app/views/cms/fortress/admin/_topnav.html.haml",
54
+ "app/views/cms/fortress/admin/_top_nav.html.haml",
55
55
  "app/views/cms/fortress/admin/contents.html.haml",
56
56
  "app/views/cms/fortress/admin/design.html.haml",
57
57
  "app/views/cms/fortress/admin/roles.html.haml",
@@ -7,13 +7,17 @@ module Cms
7
7
  base.class_eval do
8
8
 
9
9
  def render_html(status = 200)
10
- fresh_when etag: @cms_page, last_modified: @cms_page.updated_at.utc, public: true
11
- response.cache_control[:max_age] = @cms_page.cached_timeout.seconds
10
+ cached_timeout = @cms_page.cached_timeout.to_i
11
+
12
+ if cached_timeout > 0
13
+ fresh_when etag: @cms_page, last_modified: @cms_page.updated_at.utc, public: true
14
+ response.cache_control[:max_age] = cached_timeout.seconds
15
+ end
12
16
 
13
17
  if @cms_layout = @cms_page.layout
14
18
 
15
19
  app_layout = (@cms_layout.app_layout.blank? || request.xhr?) ? false : @cms_layout.app_layout
16
- render(:inline => @cms_page.content, :layout => app_layout, :status => status, :content_type => 'text/html') unless performed?
20
+ render(:inline => @cms_page.content, :layout => app_layout, :status => status, :content_type => 'text/html') unless cached_timeout > 0 && performed?
17
21
  else
18
22
  render :text => I18n.t('cms.content.layout_not_found'), :status => 404
19
23
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cms-fortress
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.9
4
+ version: 1.0.12
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-01-01 00:00:00.000000000 Z
12
+ date: 2014-01-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -195,9 +195,9 @@ files:
195
195
  - app/views/admin/cms/partials/_body_before.html.haml
196
196
  - app/views/cms/fortress/admin/_left_contents_nav.html.haml
197
197
  - app/views/cms/fortress/admin/_left_designs_nav.html.haml
198
+ - app/views/cms/fortress/admin/_left_nav.html.haml
198
199
  - app/views/cms/fortress/admin/_left_settings_nav.html.haml
199
- - app/views/cms/fortress/admin/_leftnav.html.haml
200
- - app/views/cms/fortress/admin/_topnav.html.haml
200
+ - app/views/cms/fortress/admin/_top_nav.html.haml
201
201
  - app/views/cms/fortress/admin/contents.html.haml
202
202
  - app/views/cms/fortress/admin/design.html.haml
203
203
  - app/views/cms/fortress/admin/roles.html.haml
@@ -273,7 +273,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
273
273
  version: '0'
274
274
  segments:
275
275
  - 0
276
- hash: -3791821648256819263
276
+ hash: 1796863992481518580
277
277
  required_rubygems_version: !ruby/object:Gem::Requirement
278
278
  none: false
279
279
  requirements: