Index: app/controllers/roles_controller.rb =================================================================== --- app/controllers/roles_controller.rb (revision 16542) +++ app/controllers/roles_controller.rb (working copy) @@ -100,6 +100,13 @@ redirect_to roles_path end + def members + @role = Role.find(params[:id]) + @projects_members = Member.joins(:roles, :user).where( + :roles => {:id => @role} + ).group(:users, :id).group_by(&:project) + end + def permissions @roles = Role.sorted.to_a @permissions = Redmine::AccessControl.permissions.select { |p| !p.public? } Index: app/models/time_entry_query.rb =================================================================== --- app/models/time_entry_query.rb (revision 16542) +++ app/models/time_entry_query.rb (working copy) @@ -107,7 +107,7 @@ def default_totalable_names [:hours] end - + def default_sort_criteria [['spent_on', 'desc']] end Index: app/models/user.rb =================================================================== --- app/models/user.rb (revision 16542) +++ app/models/user.rb (working copy) @@ -430,7 +430,7 @@ def delete_autologin_token(value) Token.where(:user_id => id, :action => 'autologin', :value => value).delete_all end - + # Returns true if token is a valid session token for the user whose id is user_id def self.verify_session_token(user_id, token) return false if user_id.blank? || token.blank? Index: app/views/roles/index.html.erb =================================================================== --- app/views/roles/index.html.erb (revision 16542) +++ app/views/roles/index.html.erb (working copy) @@ -16,6 +16,7 @@ <%= content_tag(role.builtin? ? 'em' : 'span', link_to(role.name, edit_role_path(role))) %> <%= reorder_handle(role) unless role.builtin? %> + <%= link_to l(:label_member_plural), {:controller => 'roles', :action => 'members', :id => role.id}, :class => 'icon icon-user' unless role.builtin? %> <%= link_to l(:button_copy), new_role_path(:copy => role), :class => 'icon icon-copy' %> <%= delete_link role_path(role) unless role.builtin? %> @@ -28,4 +29,4 @@ <%= javascript_tag do %> $(function() { $("table.roles tbody").positionedItems({items: ".givable"}); }); -<% end %> \ No newline at end of file +<% end %> Index: app/views/roles/members.html.erb =================================================================== --- app/views/roles/members.html.erb (nonexistent) +++ app/views/roles/members.html.erb (working copy) @@ -0,0 +1,22 @@ +<%= title [l(:label_role_plural), roles_path], @role.name, l(:label_member_plural) %> + +<% if @projects_members.empty? %> + +

<%= l(:label_no_data) %>

+ +<% else %> + +<% @projects_members.each do |project, members| next if members.count == 0 %> + +

<%= project.name %>

+
+
+ +
+
+<% end %> +<% end %> Index: config/locales/ja.yml =================================================================== --- config/locales/ja.yml (revision 16542) +++ config/locales/ja.yml (working copy) @@ -291,10 +291,10 @@ field_port: ポート field_account: アカウント field_base_dn: ベースDN - field_attr_login: ログイン名属性 - field_attr_firstname: 名前属性 - field_attr_lastname: 苗字属性 - field_attr_mail: メール属性 + field_attr_login: ログインIDの属性 + field_attr_firstname: 名の属性 + field_attr_lastname: 姓の属性 + field_attr_mail: メールアドレスの属性 field_onthefly: あわせてユーザーを作成 field_start_date: 開始日 field_done_ratio: 進捗率 Index: config/routes.rb =================================================================== --- config/routes.rb (revision 16542) +++ config/routes.rb (working copy) @@ -332,6 +332,8 @@ match 'permissions', :via => [:get, :post] end end + get '/roles/:id/members', :to => 'roles#members' + resources :enumerations, :except => :show match 'enumerations/:type', :to => 'enumerations#index', :via => :get Index: public/stylesheets/application.css =================================================================== --- public/stylesheets/application.css (revision 16542) +++ public/stylesheets/application.css (working copy) @@ -1303,6 +1303,13 @@ .contextual>*:not(:first-child), .buttons>.icon:not(:first-child) { margin-left: 5px; } +#members_list ul { + -moz-column-count: 3; + -webkit-column-count: 3; + column-count: 3; + list-style-position: inside; +} + img.gravatar { vertical-align: middle; border-radius: 20%;