添加项目成员界面,显示用户的account
This commit is contained in:
parent
4235ca8984
commit
6f0e621f3c
|
@ -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
|
||||
|
|
|
@ -191,6 +191,10 @@ class User < Principal
|
|||
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