locomotivecms_mounter 1.2.4 → 1.2.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/locomotive/mounter/models/page.rb +8 -6
- data/lib/locomotive/mounter/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ed7a36b0bfe0218fb12928ff8ea035b96d986562
|
4
|
+
data.tar.gz: d5a7882dacf040bc121fa20b0be5d1f7b2357973
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ab0588d4b36bd438b6c28161fe96ef3091171335bd31819cd8b3b9ca22bb4d113ccb241ed717b38cea9f6bb88a9da527341ee1513a445270cf1bbd7f0b1c37ba
|
7
|
+
data.tar.gz: b9bf2f3ff894b385cb9156fe2280705a2b5301045cc536f393cf621294428cb99b5ff433ba8bfcb35674d4970e11799f708c06e3ee78038bbb7154a29bd0e83b
|
@@ -60,15 +60,17 @@ module Locomotive
|
|
60
60
|
# @return [ String ] The safe full path or nil if the page is not translated in the current locale
|
61
61
|
#
|
62
62
|
def safe_fullpath
|
63
|
-
return nil unless self.translated_in?(Locomotive::Mounter.locale)
|
64
|
-
|
65
|
-
# puts "[safe_fullpath] page = #{self.slug.inspect} / #{self.fullpath.inspect} / #{self.parent.inspect}"
|
66
|
-
|
67
63
|
if self.index_or_404?
|
68
64
|
self.slug
|
69
65
|
else
|
70
66
|
base = self.parent.safe_fullpath
|
71
|
-
_slug = self.templatized?
|
67
|
+
_slug = if self.templatized?
|
68
|
+
'*'
|
69
|
+
elsif !self.translated_in?(Locomotive::Mounter.locale)
|
70
|
+
self.slug_translations[self.mounting_point.default_locale]
|
71
|
+
else
|
72
|
+
self.slug
|
73
|
+
end
|
72
74
|
(base == 'index' ? _slug : File.join(base, _slug)).dasherize
|
73
75
|
end
|
74
76
|
end
|
@@ -245,7 +247,7 @@ module Locomotive
|
|
245
247
|
def localize_fullpath(locales = nil)
|
246
248
|
locales ||= self.translated_in
|
247
249
|
_parent_fullpath = self.parent.try(:fullpath)
|
248
|
-
_fullpath, _slug = self.fullpath.try(:clone), self.slug.clone
|
250
|
+
_fullpath, _slug = self.fullpath.try(:clone), self.slug.to_s.clone
|
249
251
|
|
250
252
|
locales.each do |locale|
|
251
253
|
Locomotive::Mounter.with_locale(locale) do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: locomotivecms_mounter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Didier Lafforgue
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-08-
|
11
|
+
date: 2013-08-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: tilt
|