User groups feature initial commit.

git-svn-id: http://redmine.rubyforge.org/svn/branches/work@1373 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2008-04-28 15:10:04 +00:00
parent 4783d3d7c5
commit ced3cab7bb
41 changed files with 812 additions and 65 deletions
+13
View File
@@ -42,6 +42,19 @@ module ProjectsHelper
tabs.select {|tab| User.current.allowed_to?(tab[:action], @project)}
end
def principal_select_tag(groups, users)
options = ''
options << "<optgroup label=\"#{l(:label_group_plural)}\" class=\"groups\">" +
options_for_select(groups.collect {|g| [g.name, "group_#{g.id}"]}) +
"</optgroup>" unless groups.empty?
options << "<optgroup label=\"#{l(:label_user_plural)}\" class=\"users\">" +
options_for_select(users.collect {|u| [u.name, "user_#{u.id}"]}) +
"</optgroup>" unless users.empty?
select_tag 'principal', options
end
# Generates a gantt image
# Only defined if RMagick is avalaible
def gantt_image(events, date_from, months, zoom)