我的issue框架搭建

This commit is contained in:
huang 2016-11-15 10:47:07 +08:00
parent e9ec3ca258
commit 5f21b63c41
3 changed files with 11 additions and 6 deletions

View File

@ -88,13 +88,17 @@ class UsersController < ApplicationController
# 获取我的任务 # 获取我的任务
# order 排序条件 # order 排序条件
# subject 主题:搜索用
# 搜索和列表调用同一方法
def user_issues 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')"+ subject = params[:subject]
# "or (container_type = 'Course' and container_id in (#{user_course_ids.empty? ? '0': user_course_ids.join(',')}) author_id = params[:author_id]
# and is_publish = 1 and container_id is not null)" ).order("#{order.nil? ? 'created_on' : order} #{score}") @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|
# @issues = @Issues= Issue.visible.open. format.html
# where(:assigned_to_id => User.current.id) format.api
format.js
end
end end

View File

View File

@ -638,6 +638,7 @@ RedmineApp::Application.routes.draw do
get 'edit_brief_introduction' get 'edit_brief_introduction'
get "user_resource" get "user_resource"
get "user_issues"
get "import_resources" get "import_resources"
get "import_resources_search" get "import_resources_search"
post "import_into_container" post "import_into_container"