Changes for helpers, not including all by default

This commit is contained in:
chris committed 2012-10-09 14:47:16 +08:00
1 parent a0103d55c4
commit 189fa553c5
17 files changed
+13 -72

No files matched your search

+11
View File
@@ -0,0 +1,11 @@
module Admin::AppAuthsHelper
def on_off_switch(attribute,attribute_type)
link_to t(:enable), eval("admin_#{attribute_type}_path(attribute, :authenticity_token => form_authenticity_token, :#{attribute_type} => {:disabled => true})"), :remote => true, :method => :put, :id => "disable_#{attribute.id}", :style => "display:#{attribute.is_disabled? ? 'none' : ''}", :class => 'switch'
link_to t(:disable), eval("admin_#{attribute_type}_path(attribute, :authenticity_token => form_authenticity_token, :#{attribute_type} => {:disabled => false})"), :remote => true, :method => :put, :id => "enable_#{attribute.id}", :style => "display:#{attribute.is_disabled? ? '' : 'none'}", :class => 'switch'
end
def if_permitted_to(user,role)
end
end