2012-05-15 10:55:16 +00:00
|
|
|
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
|
2012-06-26 02:57:51 +00:00
|
|
|
link_to t('web_resource.cate_auth'),admin_object_auth_ob_auth_path(oa)
|
2012-05-15 10:55:16 +00:00
|
|
|
end
|
|
|
|
end
|