Skip to content
Browse files

You'll also need to override the collection used otherwise the childr…

…en will be completely wrong.
  • Loading branch information...
1 parent 072853d commit 2673e8c72eb3f1a8217001e5d4d61230f0fbe8e3 @parndt parndt committed Sep 16, 2010
View
4 vendor/refinerycms/core/app/views/shared/_menu.html.erb
@@ -8,7 +8,8 @@
cache_key << request.path
cache(cache_key.compact.join('_')) do
# Select top menu items unless 'roots' is passed in.
- roots ||= @menu_pages.select { |m| m.parent_id == nil }
+ collection ||= @menu_pages
+ roots ||= collection.select { |m| m.parent_id == nil }
if roots.any?
sibling_count = roots.size - 1
-%>
@@ -19,6 +20,7 @@
:locals => {
:hide_children => hide_children,
:sibling_count => sibling_count,
+ :collection => collection,
:apply_css => true #if you don't care about class='first' class='last' or class='selected' set apply_css to false for speed.
}
-%>
View
4 vendor/refinerycms/core/app/views/shared/_menu_branch.html.erb
@@ -4,9 +4,9 @@
"class='#{classes.join(' ')}'"
end
dom_id = ("id='item_#{menu_branch_counter}'" if menu_branch.parent_id.nil? and menu_branch.title.present?)
-
+
hide_children = (defined?(hide_children) && hide_children)
- children = hide_children ? [] : @menu_pages.select { |p| p.parent_id == menu_branch.id && p.in_menu? }
+ children = hide_children ? [] : collection.select { |p| p.parent_id == menu_branch.id && p.in_menu? }
-%>
<li<%= ['', css, dom_id].join(' ').gsub(/\ *$/, '') %>>
<%= link_to menu_branch.title, menu_branch.url %>
View
2 vendor/refinerycms/images/app/controllers/admin/images_controller.rb
@@ -11,7 +11,7 @@ class Admin::ImagesController < Admin::BaseController
def index
search_all_images if searching?
paginate_all_images
-
+
if RefinerySetting.find_or_set(:group_images_by_date_uploaded, true)
@grouped_images = group_by_date(@images)
end
View
2 vendor/refinerycms/pages/app/views/admin/pages/_form_fields_after_title.html.erb
@@ -1 +1 @@
-<%# Intentionally empty, useful override point to add extra fields. %>
+<%# Intentionally empty, useful override point to add extra fields. %>
View
4 vendor/refinerycms/refinery.rb
@@ -1,9 +1,9 @@
require 'rbconfig'
module Refinery
-
+
WINDOWS = !!(RbConfig::CONFIG["host_os"] =~ %r!(msdos|mswin|djgpp|mingw)!)
-
+
class << self
attr_accessor :root, :s3_backend, :base_cache_key

0 comments on commit 2673e8c

Please sign in to comment.
Something went wrong with that request. Please try again.