fix object auth. show error message if user try to do object auth in a wrong way.
This commit is contained in:
1 parent
9937b4ac9b
commit
32c6f17613
7 files changed
+68
-6
No files matched your search
@@ -0,0 +1,11 @@
|
||||
module Admin::PagePartsHelper
|
||||
|
||||
def support_link
|
||||
url_method = @module_app.get_default_widget[:url_method]
|
||||
unless url_method.nil?
|
||||
res = "Link:"
|
||||
res << select_tag( "page_part[widget_field_is_link][]", options_for_select([["NotLink",false],["Link1",url_method]]))
|
||||
res.html_safe
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,14 @@
|
||||
module DefaultWidgetsHelper
|
||||
def get_row_data(row_data,field)
|
||||
field_is_link = (field[0][1]== 'false' ? false : true )
|
||||
field_setting = {:class=>field[0][1],:method=>field[0][0]}
|
||||
if field_is_link
|
||||
field_link = field[0][1].to_s + '_path'
|
||||
binding.pry
|
||||
link = link_to(row_data.send(field_setting[:method]),field_link.send(row_data))
|
||||
content_tag(:span,link,:class=>field_setting[:class])
|
||||
else
|
||||
content_tag(:span,row_data.send(field_setting[:method]),:class=>field_setting[:class])
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in new issue
Block a user