Search
Project
General
Profile
Home
Projects
Help
Sign in
Register
Search
:
Redmine
All Projects
Redmine
Overview
Download
Activity
Roadmap
Issues
News
Wiki
Plugins
Forums
Repository
Download (970 Bytes)
Defect #1
» application_helper.rb-PATCH.txt
Todd McGrath
, 2008-02-03 10:48
Index: C:/rubyworkspace/redmine-trunk/app/helpers/application_helper.rb
===================================================================
--- C:/rubyworkspace/redmine-trunk/app/helpers/application_helper.rb (revision 127)
+++ C:/rubyworkspace/redmine-trunk/app/helpers/application_helper.rb (working copy)
@@ -44,6 +44,11 @@
def link_to_if_authorized(name, options = {}, html_options = nil, *parameters_for_method_reference)
link_to(name, options, html_options, *parameters_for_method_reference) if authorize_for(options[:controller], options[:action])
end
+
+ # Display a link if user is authorized
+ def link_to_if_authorized_li(name, options = {}, html_options = nil, *parameters_for_method_reference)
+ "<li>" + link_to(name, options, html_options, *parameters_for_method_reference) + "</li>" if authorize_for(options[:controller], options[:action])
+ end
# Display a link to user's account page
def link_to_user(user)
« Previous
1
2
3
4
Next »
(4-4/4)
Loading...