我的issue框架搭建
This commit is contained in:
parent
e9ec3ca258
commit
5f21b63c41
|
@ -88,13 +88,17 @@ class UsersController < ApplicationController
|
|||
|
||||
# 获取我的任务
|
||||
# order 排序条件
|
||||
# subject 主题:搜索用
|
||||
# 搜索和列表调用同一方法
|
||||
def user_issues
|
||||
# Issues = Issue.visible.open.where("assigned_to_id = #{assigned_to_id} or author_id = #{User.current.id} er_course_ids.join(',')}) and container_type = 'Course')"+
|
||||
# "or (container_type = 'Course' and container_id in (#{user_course_ids.empty? ? '0': user_course_ids.join(',')})
|
||||
# and is_publish = 1 and container_id is not null)" ).order("#{order.nil? ? 'created_on' : order} #{score}")
|
||||
#
|
||||
# @issues = @Issues= Issue.visible.open.
|
||||
# where(:assigned_to_id => User.current.id)
|
||||
subject = params[:subject]
|
||||
author_id = params[:author_id]
|
||||
@issues = Issue.find(:all, :conditions => ["author_id = ? and assigned_to_id =? AND subject like ?", (author_id ? author_id : User.current.id) , User.current.id, "%#{subject}%"])
|
||||
respond_to do |format|
|
||||
format.html
|
||||
format.api
|
||||
format.js
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
|
|
@ -638,6 +638,7 @@ RedmineApp::Application.routes.draw do
|
|||
|
||||
get 'edit_brief_introduction'
|
||||
get "user_resource"
|
||||
get "user_issues"
|
||||
get "import_resources"
|
||||
get "import_resources_search"
|
||||
post "import_into_container"
|
||||
|
|
Loading…
Reference in New Issue