fullstack-cms 0.2.18 → 0.2.19

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.18
1
+ 0.2.19
@@ -10,7 +10,7 @@ module SettingsHelper
10
10
  namespaced_key = namespaced_key.to_s
11
11
  group, key = namespaced_key.include?(namespace_separator) ? namespaced_key.split(namespace_separator) : [nil, namespaced_key]
12
12
 
13
- s = Setting.global("#{key}", :autocreate => false, :default => value, :group => group, :options => opts[:options], :locale => (opts[:locale] == false ? nil : I18n.locale.to_s))
13
+ s = Setting.global("#{key}", :autocreate => false, :default => value, :group => group, :options => opts[:options], :locale => ((Fullstack::Cms.localized == false || opts[:locale] == false) ? nil : I18n.locale.to_s))
14
14
 
15
15
  end
16
16
 
@@ -121,7 +121,10 @@ module Pageable
121
121
  end
122
122
  }
123
123
 
124
- path_segments.unshift(locale.to_s)
124
+ if Fullstack::Cms.prepend_locale_to_path
125
+ path_segments.unshift(locale.to_s)
126
+ end
127
+
125
128
  "/" + path_segments.join("/")
126
129
  end
127
130
 
@@ -166,7 +169,7 @@ module Pageable
166
169
  end
167
170
 
168
171
  def load_current_page
169
- if Fullstack::Cms.config.localize
172
+ if Fullstack::Cms.localized?
170
173
  @current_page.reload if @current_page = self.class.pages["#{action_name}@#{I18n.locale}"]
171
174
  else
172
175
  @current_page.reload if @current_page = self.class.pages[action_name]
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "fullstack-cms"
8
- s.version = "0.2.18"
8
+ s.version = "0.2.19"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["mcasimir"]
12
- s.date = "2012-09-12"
12
+ s.date = "2012-09-13"
13
13
  s.description = "CMS system built on fullstack"
14
14
  s.email = "maurizio.cas@gmail.com"
15
15
  s.extra_rdoc_files = [
@@ -2,7 +2,7 @@ module Fullstack
2
2
  module Cms
3
3
 
4
4
  class Configuration
5
- attr_writer :linkables, :localized
5
+ attr_writer :linkables, :localized, :prepend_locale_to_path
6
6
 
7
7
  def default_locale
8
8
  "#{I18n.default_locale}" || "en"
@@ -14,6 +14,9 @@ module Fullstack
14
14
  alias :localize :localized
15
15
  alias :localized? :localized
16
16
 
17
+ def prepend_locale_to_path
18
+ @prepend_locale_to_path.nil? ? true : @prepend_locale_to_path
19
+ end
17
20
 
18
21
  def linkables
19
22
  @linkables || []
@@ -83,7 +86,7 @@ module Fullstack
83
86
  config
84
87
  end
85
88
 
86
- delegate :linkables, :localized, :localized?, :resources, :to => :config
89
+ delegate :linkables, :localized, :localized?, :resources, :prepend_locale_to_path, :to => :config
87
90
 
88
91
  end
89
92
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fullstack-cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.18
4
+ version: 0.2.19
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: 2012-09-12 00:00:00.000000000 Z
12
+ date: 2012-09-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: fullstack-admin
@@ -333,7 +333,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
333
333
  version: '0'
334
334
  segments:
335
335
  - 0
336
- hash: 1287581399845633310
336
+ hash: -1432430026618138619
337
337
  required_rubygems_version: !ruby/object:Gem::Requirement
338
338
  none: false
339
339
  requirements: