projects helper added
This commit is contained in:
parent
fed6ab2481
commit
048117c05d
2 changed files with 9 additions and 2 deletions
6
app/helpers/projects_helper.rb
Normal file
6
app/helpers/projects_helper.rb
Normal file
|
@ -0,0 +1,6 @@
|
|||
module ProjectsHelper
|
||||
def grouper_project_members(project)
|
||||
@project.users_projects.sort_by(&:project_access).reverse.group_by(&:project_access)
|
||||
end
|
||||
end
|
||||
|
|
@ -1,8 +1,9 @@
|
|||
- @project.users_projects.group_by(&:project_access).each do |access, members|
|
||||
- grouper_project_members(@project).each do |access, members|
|
||||
%table
|
||||
%thead
|
||||
%tr
|
||||
%th.span7= Project.access_options.key(access).pluralize
|
||||
%th.span7
|
||||
= Project.access_options.key(access).pluralize
|
||||
%th
|
||||
%tbody
|
||||
- members.each do |up|
|
||||
|
|
Loading…
Reference in a new issue