Redesign Admin -> user -> show page

This commit is contained in:
Dmitriy Zaporozhets 2013-02-13 19:14:35 +02:00
parent 6b24c375cb
commit ed3f44085e
6 changed files with 99 additions and 135 deletions

View file

@ -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