Orbit bar

Structure: page, link, edit and new, page view, edit page parts
Temporary disable authentication in items controller
This commit is contained in:
chris committed 2013-04-12 03:13:03 +08:00
1 parent e4c33b443f
commit a9d25dcdec
62 files changed
+6129 -7208

No files matched your search

+4
View File
@@ -91,6 +91,10 @@ module OrbitApp
@data_count
end
def get_icon_class
@side_bar.get_icon_class
end
def get_widget_by_path(path)
if @widget_set
@widget_set.find_by_path(path)
+8
View File
@@ -63,11 +63,19 @@ module OrbitApp
def get_sidebar_order!
@sidebar_order = (get_module_app.sidebar_order rescue 0)
end
def get_icon_class
@icon_class
end
def get_module_app
@get_module_app.call
end
def get_module_app_key
@module_app_key
end
def head_label_i18n(var,options ={})
@head_label = var
@icon_class = options[:icon_class]
+4 -4
View File
@@ -28,7 +28,7 @@ module ParserCommon
res << "_#{i}" if i
res << " active" if (current_page.id.eql?(page.id) || current_page.descendant_of?(page))
res << "'>"
root = "/"
root = ""
res << "<a href='#{edit ? root + admin_page_path(page.id) : (page.class.to_s.eql?('Page') ? root + page.path : page.url)}'><span>#{page.title}</span></a>"
if page.visible_children.size > 0 && current < menu.levels
res << "<span class='dot'></span>"
@@ -131,7 +131,7 @@ module ParserCommon
res << "<ul class='list'>"
menu_page.visible_children.each do |child|
res << "<li class='#{page.id.eql?(child.id) ? 'active' : nil}'>"
root = "/"
root = ""
res << "<a href='#{edit ? root + admin_page_path(child.id) : (child.class.to_s.eql?('Page') ? root + child.path : child.url)}'>#{child.title}</a>"
res << "</li>"
end
@@ -248,8 +248,8 @@ module ParserCommon
part = page.page_parts.detect{ |p| p.name.to_s == content['name'].to_s } rescue nil
part_title = part.title rescue nil
if edit
ret << "<div id='#{content['name']}' part_id='#{part.id}' class='editable' style='border:solid 1px; margin:5px; padding:5px;'>" if part
ret << "<div class='edit_link' style='display:none'>"
ret << "<div id='#{content['name']}' part_id='#{part.id}' class='editable'>" if part
ret << "<div class='edit_link'>"
ret << " <a href='#{edit_admin_page_part_path(part.id)}' class='nav'>#{t(:edit)}</a>" if part
ret << '</div>'
end