Merge branch 'design_team' into ldap

Conflicts:
	app/controllers/admin/page_parts_controller.rb
	vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/_filter.html.erb
	vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/_sort_headers.html.erb
This commit is contained in:
Christophe Vilayphiou committed 2012-04-30 07:57:20 +08:00
commit 20504b2205
213 files changed
+5215 -779

No files matched your search

+5 -1
View File
@@ -19,6 +19,10 @@ module OrbitCoreLib
end
def get_object_auth_by_title(title)
self.object_auths.where({title: title }).first
end
def authed_users(title=nil)
users = []
users = case title
@@ -33,7 +37,7 @@ module OrbitCoreLib
[]
end
else
self.object_auths.where(title: title).first.auth_users rescue []
get_object_auth_by_title(title).auth_users rescue []
end
users
end
+12 -3
View File
@@ -43,7 +43,9 @@ module ParserFrontEnd
ret << "<div id='appfrontend' class='dymanic_load' path='/panel/#{page.module_app.key}/front_end/#{page.app_frontend_url}"
ret << "/#{id}" if id
ret << "?inner=true&page_id=#{page.id}"
ret << "&category_id=#{page.category}" if page[:category]
# ret << "&category_id=#{page.category}" if page[:category]
ret << "&category_id=#{params[:category_id]}" if !params[:category_id].blank?
ret << "&tag_id=#{params[:tag_id]}" if !params[:tag_id].blank?
ret << "'></div>"
else
part = page.page_parts.detect{ |p| p.name.to_s == content['name'].to_s } rescue nil
@@ -51,8 +53,15 @@ module ParserFrontEnd
when 'text'
ret << part.i18n_variable[I18n.locale] rescue ''
when 'module_widget'
if part[:category]
ret << "<div class='dymanic_load' path='/panel/#{part.module_app.key}/widget/#{part.widget_path}?inner=true&category_id=#{part[:category]}'></div>"
# if part[:category]
# ret << "<div class='dymanic_load' path='/panel/#{part.module_app.key}/widget/#{part.widget_path}?inner=true&category_id=#{part[:category]}'></div>"
# else
# ret << "<div class='dymanic_load' path='/panel/#{part.module_app.key}/widget/#{part.widget_path}?inner=true'></div>"
# end
if !params[:category_id].blank?
ret << "<div class='dymanic_load' path='/panel/#{part.module_app.key}/widget/#{part.widget_path}?inner=true&category_id=#{params[:category_id]}'></div>"
elsif !params[:tag_id].blank?
ret << "<div class='dymanic_load' path='/panel/#{part.module_app.key}/widget/#{part.widget_path}?inner=true&tag_id=#{params[:tag_id]}'></div>"
else
ret << "<div class='dymanic_load' path='/panel/#{part.module_app.key}/widget/#{part.widget_path}?inner=true'></div>"
end