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

Conflicts:
	config/locales/zh_tw.yml
This commit is contained in:
Matthew K. Fu JuYuan committed 2012-05-14 12:36:09 +08:00
commit 2cd67356a5
80 files changed
+1216 -511

No files matched your search

+8 -6
View File
@@ -8,9 +8,10 @@ module Admin::ItemHelper
dest = admin_page_path(node)
when 'Link'
dest = admin_link_path(node)
no_nested = 'no-nest'
end
ret << "<ul>" unless node.parent.nil?
ret << "<li>"
ret << "<li id='#{node.id}' class='#{no_nested}'>"
ret << "<i class='icons-moves'></i>"
ret << "<div class='with_action'>"
ret << (link_to node.i18n_variable[I18n.locale], dest)
ret << "<div class='quick-edit hide'>"
@@ -22,22 +23,23 @@ module Admin::ItemHelper
ret << "</div>"
ret << render_children(node)
ret << "</li>"
ret << "</ul>" unless node.parent.nil?
end
ret.html_safe
end
def render_children(parent)
children = parent.ordered_children
if !children.entries.blank?
children = parent.children
if !parent.children.entries.blank?
ret = ''
ret << "<ol class='#{'sortable' if parent.parent.nil?}'>"
children.each do |child|
ret << render_node_and_children(child)
end
ret << '</ol>'
ret
else
''
end
end
end
end
+2 -6
View File
@@ -103,11 +103,7 @@ module ApplicationHelper
def active_for_action(controller_name, action_name)
((controller.controller_name.eql?(controller_name) || request.fullpath.eql?(controller_name)) && controller.action_name.eql?(action_name)) ? 'active' : nil
end
def process_page(page, id, params)
parse_page_noko(page, id, params)
end
def page_metas(page)
tmp_meta = {}
metas = ''
@@ -128,7 +124,7 @@ module ApplicationHelper
def page_title(page)
res = "<title>"
page_title = page.title ? page.title[I18n.locale] : page.i18n_variable[I18n.locale]
if page.is_home? && @site.title
if page.root? && @site.title
res << @site.title[I18n.locale]
elsif @site.title && @site.title_always_on
res << @site.title[I18n.locale] + ' - ' + page_title