refinerycms-core 0.9.9.9 → 0.9.9.10
Sign up to get free protection for your applications and to get access to all the features.
@@ -5,7 +5,7 @@
|
|
5
5
|
# Select top menu items unless 'roots' is supplied.
|
6
6
|
collection ||= @menu_pages.includes(:slugs)
|
7
7
|
caching = ((defined?(cache_menu) && cache_menu) || RefinerySetting.find_or_set(:cache_menu, false)) && File.writable?(Rails.cache.cache_path)
|
8
|
-
cache_if(caching
|
8
|
+
cache_if(caching && !logged_in?, [Refinery.base_cache_key, "pages_menus", dom_id, Globalize.locale, request.path].join('_')) do
|
9
9
|
if (roots ||= collection.select{|p| p.parent_id.nil?}).present?
|
10
10
|
# In order to match items that aren't shown in menu and highlight their associations.
|
11
11
|
# This can be supplied if the logic is different in your case.
|
@@ -18,7 +18,7 @@
|
|
18
18
|
<%= RefinerySetting.find_or_set(:site_name, 'Company Name') %>
|
19
19
|
</span>
|
20
20
|
|
21
|
-
<%= link_to t('.log_out',
|
21
|
+
<%= link_to t('.log_out', site_bar_translate_locale_args),
|
22
22
|
destroy_user_session_path, :id => 'logout' %>
|
23
23
|
</div>
|
24
24
|
</div>
|
data/lib/refinery/application.rb
CHANGED
@@ -3,7 +3,7 @@ require 'tmpdir'
|
|
3
3
|
module Refinery
|
4
4
|
module Application
|
5
5
|
class << self
|
6
|
-
def
|
6
|
+
def refinery!
|
7
7
|
::ApplicationHelper.send :include, ::Refinery::ApplicationHelper
|
8
8
|
|
9
9
|
[::ApplicationController, ::Admin::BaseController].each do |c|
|
@@ -35,14 +35,7 @@ module Refinery
|
|
35
35
|
|
36
36
|
# Include the refinery controllers and helpers dynamically
|
37
37
|
base.config.to_prepare do
|
38
|
-
::Refinery::Application.
|
39
|
-
end
|
40
|
-
|
41
|
-
# load in any settings that the developer wants after the initialization.
|
42
|
-
base.config.after_initialize do
|
43
|
-
if (settings = Rails.root.join('config', 'settings.rb')).exist?
|
44
|
-
require settings.to_s
|
45
|
-
end
|
38
|
+
::Refinery::Application.refinery!
|
46
39
|
end
|
47
40
|
end
|
48
41
|
end
|
@@ -4,13 +4,13 @@ module Refinery
|
|
4
4
|
|
5
5
|
# Generates the link to determine where the site bar switch button returns to.
|
6
6
|
def site_bar_switch_link
|
7
|
-
link_to_if(admin?, t('.switch_to_your_website',
|
7
|
+
link_to_if(admin?, t('.switch_to_your_website', site_bar_translate_locale_args),
|
8
8
|
(if session.keys.include?(:website_return_to) and session[:website_return_to].present?
|
9
9
|
session[:website_return_to]
|
10
10
|
else
|
11
11
|
root_path(:locale => (::Refinery::I18n.default_frontend_locale if defined?(::Refinery::I18n) && ::Refinery::I18n.enabled?))
|
12
12
|
end)) do
|
13
|
-
link_to t('.switch_to_your_website_editor',
|
13
|
+
link_to t('.switch_to_your_website_editor', site_bar_translate_locale_args),
|
14
14
|
(if session.keys.include?(:refinery_return_to) and session[:refinery_return_to].present?
|
15
15
|
session[:refinery_return_to]
|
16
16
|
else
|
@@ -19,6 +19,14 @@ module Refinery
|
|
19
19
|
end
|
20
20
|
end
|
21
21
|
|
22
|
+
def site_bar_translate_locale_args
|
23
|
+
if defined?(::Refinery::I18n)
|
24
|
+
{:locale => ::Refinery::I18n.current_locale}
|
25
|
+
else
|
26
|
+
{}
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
22
30
|
end
|
23
31
|
end
|
24
32
|
end
|
data/refinerycms-core.gemspec
CHANGED
@@ -2,10 +2,10 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{refinerycms-core}
|
5
|
-
s.version = %q{0.9.9.
|
5
|
+
s.version = %q{0.9.9.10}
|
6
6
|
s.summary = %q{Core engine for Refinery CMS}
|
7
7
|
s.description = %q{The core of Refinery CMS. This handles the common functionality and is required by most engines}
|
8
|
-
s.date = %q{2011-03-
|
8
|
+
s.date = %q{2011-03-17}
|
9
9
|
s.email = %q{info@refinerycms.com}
|
10
10
|
s.homepage = %q{http://refinerycms.com}
|
11
11
|
s.rubyforge_project = %q{refinerycms}
|
@@ -14,8 +14,8 @@ Gem::Specification.new do |s|
|
|
14
14
|
s.require_paths = %w(lib)
|
15
15
|
s.executables = %w()
|
16
16
|
|
17
|
-
s.add_dependency 'refinerycms-base', '~> 0.9.9.
|
18
|
-
s.add_dependency 'refinerycms-settings', '~> 0.9.9.
|
17
|
+
s.add_dependency 'refinerycms-base', '~> 0.9.9.10'
|
18
|
+
s.add_dependency 'refinerycms-settings', '~> 0.9.9.10'
|
19
19
|
s.add_dependency 'refinerycms-generators', '~> 1.0'
|
20
20
|
s.add_dependency 'acts_as_indexed', '~> 0.7'
|
21
21
|
s.add_dependency 'friendly_id_globalize3', '~> 3.2.1'
|
@@ -136,7 +136,6 @@ Gem::Specification.new do |s|
|
|
136
136
|
'lib/generators/templates/config/i18n-js.yml',
|
137
137
|
'lib/generators/templates/config/initializers',
|
138
138
|
'lib/generators/templates/config/initializers/devise.rb',
|
139
|
-
'lib/generators/templates/config/settings.rb',
|
140
139
|
'lib/generators/templates/db',
|
141
140
|
'lib/generators/templates/db/seeds.rb',
|
142
141
|
'lib/refinery',
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: refinerycms-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.9.9.
|
5
|
+
version: 0.9.9.10
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Resolve Digital
|
@@ -13,7 +13,7 @@ autorequire:
|
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
15
|
|
16
|
-
date: 2011-03-
|
16
|
+
date: 2011-03-17 00:00:00 +13:00
|
17
17
|
default_executable:
|
18
18
|
dependencies:
|
19
19
|
- !ruby/object:Gem::Dependency
|
@@ -24,7 +24,7 @@ dependencies:
|
|
24
24
|
requirements:
|
25
25
|
- - ~>
|
26
26
|
- !ruby/object:Gem::Version
|
27
|
-
version: 0.9.9.
|
27
|
+
version: 0.9.9.10
|
28
28
|
type: :runtime
|
29
29
|
version_requirements: *id001
|
30
30
|
- !ruby/object:Gem::Dependency
|
@@ -35,7 +35,7 @@ dependencies:
|
|
35
35
|
requirements:
|
36
36
|
- - ~>
|
37
37
|
- !ruby/object:Gem::Version
|
38
|
-
version: 0.9.9.
|
38
|
+
version: 0.9.9.10
|
39
39
|
type: :runtime
|
40
40
|
version_requirements: *id002
|
41
41
|
- !ruby/object:Gem::Dependency
|
@@ -228,7 +228,6 @@ files:
|
|
228
228
|
- lib/generators/templates/config/database.yml.sqlite3
|
229
229
|
- lib/generators/templates/config/i18n-js.yml
|
230
230
|
- lib/generators/templates/config/initializers/devise.rb
|
231
|
-
- lib/generators/templates/config/settings.rb
|
232
231
|
- lib/generators/templates/db/seeds.rb
|
233
232
|
- lib/refinery/activity.rb
|
234
233
|
- lib/refinery/admin/base_controller.rb
|