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
+2 -1
View File
@@ -20,7 +20,8 @@ module CustomFieldsHelper
def custom_fields_tabs
tabs = [{:name => 'IssueCustomField', :label => :label_issue_plural},
{:name => 'ProjectCustomField', :label => :label_project_plural},
{:name => 'UserCustomField', :label => :label_user_plural}
{:name => 'UserCustomField', :label => :label_user_plural},
{:name => 'GroupCustomField', :label => :label_group_plural}
]
end
+19
View File
@@ -0,0 +1,19 @@
# redMine - project management software
# Copyright (C) 2008 FreeCode
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
module GroupsHelper
end
+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)