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

@@ -1,4 +1,4 @@
module Admin::AdBannerHelper
module Admin::AdBannersHelper
def preview_block_ad_images_helper(ad_banner)
printable_ad_images = []
ad_banner.ad_images.each do |ad_image|
-3
View File
@@ -1,3 +0,0 @@
module Admin::AdImagesHelper
end
@@ -1,4 +1,4 @@
module Admin::AppAuthHelper
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'
@@ -1,4 +1,4 @@
module Admin::AssetHelper
module Admin::AssetsHelper
def show_all_fields(asset, field)
a = []
@@ -1,4 +1,4 @@
module Admin::DashboardHelper
module Admin::DashboardsHelper
def get_link(title)
case title
@@ -1,4 +1,4 @@
module Admin::ItemHelper
module Admin::ItemsHelper
def render_node_and_children(node)
ret = ''
@@ -1,4 +1,4 @@
module Admin::ModuleAppHelper
module Admin::ModuleAppsHelper
def if_permit_to_delete(item)
case item.downcase
-18
View File
@@ -1,18 +0,0 @@
module Admin::PageContentHelper
include ActionView::Helpers::UrlHelper
def show_page_context_edit_auth_link(page_context)
type = 'Edit'
# debugger
# a=1
oa = page_context.get_object_auth_by_title(type)
if oa.nil?
page_context.object_auths.new(title: type ).save rescue
oa = page_context.get_object_auth_by_title(type)
end
# link_to t('announcement.bulletin.cate_auth'), edit_admin_object_auth_path(oa)
link_to t('admin.page_context.ob_auth.edit'),admin_object_auth_ob_auth_path(oa)
end
end
@@ -1,4 +1,4 @@
module Admin::PluginHelper
module Admin::PluginsHelper
def render_plugin_list
ret = ''
@@ -1,4 +1,4 @@
module Admin::UserHelper
module Admin::UsersHelper
def show_attribute(object, field_id, locale = '')
attribute = object.attribute_values.detect {|av| av.attribute_field_id.eql?(field_id) || av[locale.to_s].eql?(locale.to_s) } rescue nil
-11
View File
@@ -1,11 +0,0 @@
module Admin::WebLinkHelper
def show_web_link_permission_link(web_link)
type = 'edit'
oa = web_link.get_object_auth_by_title(type)
if oa.nil?
web_link.object_auths.new(title: type ).save
oa = web_link.get_object_auth_by_title(type)
end
link_to t('web_resource.cate_auth'),admin_object_auth_ob_auth_path(oa)
end
end