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

Conflicts:
	app/controllers/admin/pages_controller.rb
	app/helpers/admin/page_parts_helper.rb
This commit is contained in:
chris 2013-03-21 18:51:16 +08:00
commit 8e0331449f
1 changed files with 12 additions and 0 deletions

View File

@ -11,7 +11,11 @@ module Admin::PagePartsHelper
def get_widget_field_rel(local_item=nil)
local_item = @part if local_item.nil? && @part
<<<<<<< HEAD
local_item = @item if local_item.nil? && @item
=======
local_item = @item if local_item.nil? && @page
>>>>>>> 66633443de1c127841eb8ac149d0e3f9095c2f73
case local_item
when Page
@ -23,7 +27,11 @@ module Admin::PagePartsHelper
def link_to_field_switch(i,object_name,field_name,local_item=nil,prefill_value=nil) #link_to_field is for showing
local_item = @part if local_item.nil? && @part
<<<<<<< HEAD
local_item = @item if local_item.nil? && @item
=======
local_item = @item if local_item.nil? && @page
>>>>>>> 66633443de1c127841eb8ac149d0e3f9095c2f73
res = ''
choosen_value = prefill_value || (local_item[field_name][i][0] rescue nil)
@ -53,7 +61,11 @@ module Admin::PagePartsHelper
def widget_field_options(i,local_item=nil)
local_item = @part if local_item.nil? && @part
<<<<<<< HEAD
local_item = @item if local_item.nil? && @item
=======
local_item = @item if local_item.nil? && @page
>>>>>>> 66633443de1c127841eb8ac149d0e3f9095c2f73
options = @module_app.widget_fields.collect do |widget_field|
label = I18n.t("#{@module_app.key}.default_widget.#{widget_field[0]}")