Merge branch 'design_team' of https://github.com/Rulingcom/orbit into nccu_0509

Conflicts:
	app/controllers/admin/object_auths_new_interface_controller.rb
	app/helpers/application_helper.rb
	app/models/ad_banner.rb
This commit is contained in:
Matthew K. Fu JuYuan committed 2012-05-16 12:13:07 +08:00
commit a31a9c4792
169 files changed
+14400 -185

No files matched your search

+4 -2
View File
@@ -27,7 +27,8 @@ module ParserCommon
res << "_#{i}" if i
res << " active" if (current_page.id.eql?(page.id) || current_page.descendant_of?(page))
res << "'>"
res << "<a href='/#{edit ? admin_page_path(page.id) : page.path}'><span>#{page.i18n_variable[I18n.locale]}</span></a>"
root = "/"
res << "<a href='#{edit ? root + admin_page_path(page.id) : (page._type.eql?('Page') ? root + page.path : page.url)}'><span>#{page.i18n_variable[I18n.locale]}</span></a>"
if page.visible_children.size > 0 && current <= menu.levels
res << "<span class='dot'></span>"
res << menu_level(page, current_page, current + 1, menu, edit)
@@ -119,7 +120,8 @@ module ParserCommon
res << "<ul class='list'>"
menu_page.visible_children.each do |child|
res << "<li class='#{page.id.eql?(child.id) ? 'active' : nil}'>"
res << "<a href='/#{edit ? admin_page_path(child.id) : child.path}'>#{child.i18n_variable[I18n.locale]}</a>"
root = "/"
res << "<a href='#{edit ? root + admin_page_path(child.id) : (child._type.eql?('Page') ? root + child.path : child.url)}'>#{child.i18n_variable[I18n.locale]}</a>"
res << "</li>"
end
res << "</ul>"
+12
View File
@@ -0,0 +1,12 @@
# encoding: utf-8
namespace :designs do
task :change_to, [:design_id] => [:environment] do |t, args|
design = Design.find(args[:design_id])
theme_id = design.themes.first.id
Page.all.each do |page|
page.update_attributes({design_id: args[:design_id], theme_id: (theme_id unless page.root?)})
end
end
end