Redesign Admin -> user -> show page
This commit is contained in:
parent
6b24c375cb
commit
ed3f44085e
6 changed files with 99 additions and 135 deletions
|
@ -9,8 +9,12 @@ class Admin::UsersController < Admin::ApplicationController
|
|||
end
|
||||
|
||||
def show
|
||||
@projects = Project.scoped
|
||||
@projects = @projects.without_user(admin_user) if admin_user.authorized_projects.present?
|
||||
# Projects user can be added to
|
||||
@not_in_projects = Project.scoped
|
||||
@not_in_projects = @not_in_projects.without_user(admin_user) if admin_user.authorized_projects.present?
|
||||
|
||||
# Projects he already own or joined
|
||||
@projects = admin_user.authorized_projects.where('projects.id in (?)', admin_user.authorized_projects.map(&:id))
|
||||
end
|
||||
|
||||
def team_update
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue