Fix link switch not showing for default front end
This commit is contained in:
1 parent
5e4e3ac560
commit
f3c809fd58
3 files changed
+12
-12
No files matched your search
@@ -11,7 +11,7 @@ module Admin::PagePartsHelper
|
||||
|
||||
def get_widget_field_rel(local_item=nil)
|
||||
local_item = @part if local_item.nil? && @part
|
||||
local_item = @page if local_item.nil? && @page
|
||||
local_item = @item if local_item.nil? && @item
|
||||
|
||||
case local_item
|
||||
when Page
|
||||
@@ -23,9 +23,9 @@ 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
|
||||
local_item = @page if local_item.nil? && @page
|
||||
local_item = @item if local_item.nil? && @item
|
||||
res = ''
|
||||
choosen_value = prefill_value || (local_item[:widget_field][i][0] rescue nil)
|
||||
choosen_value = prefill_value || (local_item[field_name][i][0] rescue nil)
|
||||
|
||||
if choosen_value
|
||||
choosen_field_is_link = (@module_app.widget_fields.select{|t| t[0].to_s==choosen_value}.first)[2]==:link
|
||||
@@ -53,7 +53,7 @@ module Admin::PagePartsHelper
|
||||
|
||||
def widget_field_options(i,local_item=nil)
|
||||
local_item = @part if local_item.nil? && @part
|
||||
local_item = @page if local_item.nil? && @page
|
||||
local_item = @item if local_item.nil? && @item
|
||||
|
||||
options = @module_app.widget_fields.collect do |widget_field|
|
||||
label = I18n.t("#{@module_app.key}.default_widget.#{widget_field[0]}")
|
||||
@@ -71,7 +71,7 @@ module Admin::PagePartsHelper
|
||||
def widget_fiield_type_options(i,local_item=nil)
|
||||
options = LIST[:widget_field_type].collect{|widget_field| [widget_field.humanize, widget_field]}
|
||||
local_item = @part if local_item.nil? && @part
|
||||
local_item = @page if local_item.nil? && @page
|
||||
local_item = @item if local_item.nil? && @item
|
||||
|
||||
case local_item
|
||||
when Page
|
||||
|
||||
Reference in new issue
Block a user