Merge remote-tracking branch 'origin/szzh' into szzh
This commit is contained in:
commit
665a17eda5
|
@ -548,6 +548,14 @@ class UsersController < ApplicationController
|
|||
format.api { render_validation_errors(@user) }
|
||||
end
|
||||
end
|
||||
|
||||
unless @user.id.nil?
|
||||
#后台注册的用户默认权限为男性开发员
|
||||
ue = UserExtensions.create(:identity => 3,
|
||||
:gender => 0,
|
||||
:user_id => @user.id)
|
||||
ue.save
|
||||
end
|
||||
end
|
||||
|
||||
def edit
|
||||
|
|
|
@ -390,6 +390,16 @@ module ApplicationHelper
|
|||
s.html_safe
|
||||
end
|
||||
|
||||
#扩展的checkbox生成
|
||||
def principals_check_box_tags_ex(name, principals)
|
||||
s = ''
|
||||
principals.each do |principal|
|
||||
s << "<label>#{ check_box_tag name, principal.id, false, :id => nil } #{h principal.userInfo }</label>\n"
|
||||
end
|
||||
s.html_safe
|
||||
end
|
||||
|
||||
|
||||
# Returns a string for users/groups option tags
|
||||
def principals_options_for_select(collection, selected=nil)
|
||||
s = ''
|
||||
|
|
|
@ -24,7 +24,7 @@ module MembersHelper
|
|||
principal_pages = Redmine::Pagination::Paginator.new principal_count, 10, params['page'] #by young
|
||||
principals = scope.offset(principal_pages.offset).limit(principal_pages.per_page).all
|
||||
|
||||
s = content_tag('div', principals_check_box_tags('membership[user_ids][]', principals), :id => 'principals')
|
||||
s = content_tag('div', principals_check_box_tags_ex('membership[user_ids][]', principals), :id => 'principals')
|
||||
|
||||
links = pagination_links_full(principal_pages, principal_count, :per_page_links => false) {|text, parameters, options|
|
||||
link_to text, autocomplete_project_memberships_path(project, parameters.merge(:q => params[:q], :format => 'js')), :remote => true
|
||||
|
|
|
@ -190,7 +190,11 @@ class User < Principal
|
|||
where(" LOWER(concat(lastname, firstname)) LIKE :p ", :p => pattern)
|
||||
end
|
||||
}
|
||||
|
||||
|
||||
#选择项目成员时显示的用户信息文字
|
||||
def userInfo
|
||||
info=self.name + ' (' + self.login + ')';
|
||||
end
|
||||
|
||||
###添加留言 fq
|
||||
def add_jour(user, notes, reference_user_id = 0, options = {})
|
||||
|
|
Loading…
Reference in New Issue