|
|
|
@ -494,6 +494,7 @@ class UsersController < ApplicationController
|
|
|
|
|
end
|
|
|
|
|
#### end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def new
|
|
|
|
|
@user = User.new(:language => Setting.default_language, :mail_notification => Setting.default_notification_option)
|
|
|
|
|
@auth_sources = AuthSource.all
|
|
|
|
@ -544,14 +545,7 @@ class UsersController < ApplicationController
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
def watch_projects
|
|
|
|
|
@watch_type = Watcher.where("watchable_type = ? and user_id = ?", 'Project', @user.id)
|
|
|
|
|
#@project = Project.visible.where("project_type < ?", 1)
|
|
|
|
|
@watch_projects = []
|
|
|
|
|
unless @watch_type.nil?
|
|
|
|
|
@watch_type.each do |obj|
|
|
|
|
|
@watch_projects << Project.find(obj.watchable_id)
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
@watch_projects = Project.joins(:watchers).where("project_type <>? and watchable_type = ? and user_id = ?", '1','Project', @user.id)
|
|
|
|
|
@state = 1
|
|
|
|
|
respond_to do |format|
|
|
|
|
|
format.html {
|
|
|
|
|