Merge branch 'develop' into 'develop'
本周上线内容 本周上线内容 See merge request !106
This commit is contained in:
commit
438dfd2c26
|
@ -360,7 +360,7 @@ class PullRequestsController < ApplicationController
|
|||
:project_id => project_id,
|
||||
:forge_message_id => pull_request_id,
|
||||
:forge_message_type => "PullRequest",
|
||||
:viewed => true,
|
||||
:viewed => false,
|
||||
:status => status,
|
||||
:operate_user_id => User.current.id,
|
||||
)
|
||||
|
|
|
@ -35,11 +35,11 @@ class UsersController < ApplicationController
|
|||
|
||||
#
|
||||
before_filter :can_show_course, :only => [:user_courses,:user_homeworks]
|
||||
before_filter :find_user, :only => [:user_fanslist, :user_watchlist, :show, :edit, :update, :destroy, :edit_membership, :user_courses, :unsolved_issues_list, :unfinished_homework_list,
|
||||
before_filter :find_user, :only => [:user_fanslist, :user_watchlist, :show, :edit, :update, :destroy, :edit_membership, :user_courses, :unsolved_issues_list, :unfinished_homework_list, :user_manage_homeworks,
|
||||
:unfinished_poll_list, :user_homeworks,:student_homeworks, :destroy_membership, :user_activities, :user_projects, :user_newfeedback, :user_comments,
|
||||
:anonymous_evaluation_list,:unfinished_test_list, :watch_contests, :info, :watch_projects, :show_score, :topic_score_index, :project_score_index,
|
||||
:anonymous_evaluation_list,:unfinished_test_list, :watch_contests, :info, :watch_projects, :show_score, :topic_score_index, :project_score_index, :user_receive_homeworks,
|
||||
:unapproval_applied_list, :activity_score_index, :influence_score_index, :score_index,:show_new_score, :topic_new_score_index, :project_new_score_index,
|
||||
:activity_new_score_index, :influence_new_score_index, :score_new_index,:user_projects_index,:user_resource,:user_contestlist,
|
||||
:activity_new_score_index, :influence_new_score_index, :score_new_index,:user_projects_index,:user_resource,:user_contestlist, :user_manage_issues, :user_receive_issues,
|
||||
:user_courses4show,:user_projects4show,:user_contests4show,:user_course_activities,:user_project_activities,:user_feedback4show,:user_visitorlist,:user_messages,:edit_brief_introduction,
|
||||
:user_import_homeworks,:user_search_homeworks,:user_import_resource, :user_system_messages,:choose_user_course,:user_courselist,:user_projectlist,:sort_syllabus_list,
|
||||
:sort_project_list,:my_homeworks,:manage_or_receive_homeworks,:search_m_r_homeworks, :cancel_or_collect,:expand_courses,:homepage, :user_issues, :course_community, :project_community, :contest_community]
|
||||
|
@ -150,6 +150,98 @@ class UsersController < ApplicationController
|
|||
end
|
||||
end
|
||||
|
||||
# 我发布的issue
|
||||
def user_manage_issues
|
||||
@manage_issues = "我发布的Issue"
|
||||
# 排序(默认以更新时间降序)
|
||||
order = "updated_on desc"
|
||||
if params[:reorder_release_time]
|
||||
order = "created_on #{params[:reorder_release_time]}"
|
||||
elsif params[:reorder_turnover_time]
|
||||
order = "updated_on #{params[:reorder_turnover_time]}"
|
||||
end
|
||||
|
||||
@subject = params[:subject]
|
||||
params[:assigned_to_id].to_i == 0 ? @assigned_to = nil : @assigned_to = params[:assigned_to_id].to_i
|
||||
params[:author_id].to_i == 0 ? author_id = nil : author_id = params[:author_id].to_i
|
||||
params[:project_id].to_i == 0 ? @project_id = nil : @project_id = params[:project_id]
|
||||
if @project_id.nil?
|
||||
@issues = Issue.where("author_id =? and subject like ?",
|
||||
@user.id, "%#{@subject}%").order(order)
|
||||
else
|
||||
@issues = Issue.where("author_id =? and project_id=? and subject like ?",
|
||||
@user.id, @project_id, "%#{@subject}%").order(order)
|
||||
end
|
||||
@issues_filter = Issue.where("author_id =?", @user.id).order('updated_on desc')
|
||||
@issue_open_count = Issue.where(:author_id => @user.id, :status_id => [1, 2, 3, 4, 6]).count
|
||||
@issue_close_count = Issue.where(:author_id => @user.id, :status_id => 5).count
|
||||
|
||||
# 导出excel的issues
|
||||
@excel_issues = @issues
|
||||
@issue_count = @issues.count
|
||||
@limit = 10
|
||||
@is_remote = true
|
||||
@issue_pages = Paginator.new @issue_count, @limit, params['page'] || 1
|
||||
@offset ||= @issue_pages.offset
|
||||
@issues = paginateHelper @issues, @limit
|
||||
# @issues.limit(@issue_pages.per_page).offset(@issue_pages.offset).reorder(order).all
|
||||
respond_to do |format|
|
||||
format.html{render :layout => 'static_base'}
|
||||
format.xls{
|
||||
filename = "我发布的_#{l(:label_issue_list_xls)}.xls"
|
||||
send_data(issue_list_xls(@excel_issues), :type => 'application/octet-stream', :filename => filename_for_content_disposition(filename))
|
||||
}
|
||||
format.api
|
||||
format.js
|
||||
end
|
||||
end
|
||||
|
||||
# 我收到的issue
|
||||
def user_receive_issues
|
||||
@receive_issues = "我收到的Issue"
|
||||
# 排序(默认以更新时间降序)
|
||||
order = "updated_on desc"
|
||||
if params[:reorder_release_time]
|
||||
order = "created_on #{params[:reorder_release_time]}"
|
||||
elsif params[:reorder_turnover_time]
|
||||
order = "updated_on #{params[:reorder_turnover_time]}"
|
||||
end
|
||||
|
||||
@subject = params[:subject]
|
||||
params[:assigned_to_id].to_i == 0 ? @assigned_to = nil : @assigned_to = params[:assigned_to_id].to_i
|
||||
params[:author_id].to_i == 0 ? author_id = nil : author_id = params[:author_id].to_i
|
||||
params[:project_id].to_i == 0 ? @project_id = nil : @project_id = params[:project_id]
|
||||
if @project_id.nil?
|
||||
@issues = Issue.where("assigned_to_id =? and subject like ?",
|
||||
@user.id, "%#{@subject}%").order(order)
|
||||
else
|
||||
@issues = Issue.where("assigned_to_id =? and project_id=? and subject like ?",
|
||||
@user.id, @project_id, "%#{@subject}%").order(order)
|
||||
end
|
||||
@issues_filter = Issue.where("assigned_to_id =?", @user.id).order('updated_on desc')
|
||||
@issue_open_count = Issue.where(:assigned_to_id => @user.id, :status_id => [1, 2, 3, 4, 6]).count
|
||||
@issue_close_count = Issue.where(:assigned_to_id => @user.id, :status_id => 5).count
|
||||
|
||||
# 导出excel的issues
|
||||
@excel_issues = @issues
|
||||
@issue_count = @issues.count
|
||||
@limit = 10
|
||||
@is_remote = true
|
||||
@issue_pages = Paginator.new @issue_count, @limit, params['page'] || 1
|
||||
@offset ||= @issue_pages.offset
|
||||
@issues = paginateHelper @issues, @limit
|
||||
# @issues.limit(@issue_pages.per_page).offset(@issue_pages.offset).reorder(order).all
|
||||
respond_to do |format|
|
||||
format.html{render :layout => 'static_base'}
|
||||
format.xls{
|
||||
filename = "我发布的_#{l(:label_issue_list_xls)}.xls"
|
||||
send_data(issue_list_xls(@excel_issues), :type => 'application/octet-stream', :filename => filename_for_content_disposition(filename))
|
||||
}
|
||||
format.api
|
||||
format.js
|
||||
end
|
||||
end
|
||||
|
||||
#展开所有回复
|
||||
def show_all_replies
|
||||
case params[:type]
|
||||
|
@ -362,7 +454,7 @@ class UsersController < ApplicationController
|
|||
messages.each do |message_all|
|
||||
# 未读的消息存放在数组
|
||||
mess = message_all.message
|
||||
if (message_all.message_type != "SystemMessage"&& !mess.nil? && (mess.viewed == 0 || !mess.viewed)) || (message_all.message_type == "SystemMessage"&& !mess.nil? && mess.created_at > onclick_time)
|
||||
if (message_all.message_type != "SystemMessage" && !mess.nil? && (mess.viewed == 0 || !mess.viewed)) || (message_all.message_type == "SystemMessage"&& !mess.nil? && mess.created_at > onclick_time)
|
||||
unless (message_all.message_type == 'CourseMessage' && mess && mess.course && mess.course.is_delete == 1)
|
||||
@message_alls << mess
|
||||
end
|
||||
|
@ -1738,6 +1830,72 @@ class UsersController < ApplicationController
|
|||
end
|
||||
end
|
||||
|
||||
# 用户发布的作业
|
||||
def user_manage_homeworks
|
||||
@manage_homeworks = "我发布的作业"
|
||||
@order,@b_sort,@type = params[:order] || "created_at",params[:sort] || "desc", 1
|
||||
@r_sort = @b_sort == "desc" ? "asc" : "desc"
|
||||
@type = @type.to_i
|
||||
tea_courses = @user.courses.visible.not_deleted.select{|course| @user.has_teacher_role(course)}
|
||||
tea_course_ids = tea_courses.empty? ? "(-1)" : "(" + tea_courses.map{|course| course.id}.join(',') + ")"
|
||||
@homeworks = HomeworkCommon.where("course_id in #{tea_course_ids}").order("#{@order} #{@b_sort}")
|
||||
if params[:property]
|
||||
all_homework_ids = @homeworks.empty? ? "(-1)" : "(" + @homeworks.map{|h| h.id}.join(",") + ")"
|
||||
if params[:property] == "1"
|
||||
@homeworks = HomeworkCommon.find_by_sql("select * from homework_commons where id in #{all_homework_ids} and homework_type = 1")
|
||||
elsif params[:property] == "2"
|
||||
@homeworks = HomeworkCommon.find_by_sql("select * from homework_commons where id in #{all_homework_ids} and homework_type = 2")
|
||||
elsif params[:property] == "3"
|
||||
@homeworks = HomeworkCommon.find_by_sql("select * from homework_commons where id in #{all_homework_ids} and homework_type = 3")
|
||||
end
|
||||
end
|
||||
@limit = 10
|
||||
@is_remote = true
|
||||
@hw_count = @homeworks.count
|
||||
@hw_pages = Paginator.new @hw_count, @limit, params['page'] || 1
|
||||
@offset ||= @hw_pages.offset
|
||||
@homeworks = paginateHelper @homeworks,@limit
|
||||
@search = ""
|
||||
@property = params[:property]
|
||||
respond_to do |format|
|
||||
format.js
|
||||
format.html {render :layout => 'static_base'}
|
||||
end
|
||||
end
|
||||
|
||||
# 用户收到的作业
|
||||
def user_receive_homeworks
|
||||
@receive_homeworks = "我收到的作业"
|
||||
@order,@b_sort,@type = params[:order] || "created_at",params[:sort] || "desc", 2
|
||||
@r_sort = @b_sort == "desc" ? "asc" : "desc"
|
||||
@type = @type.to_i
|
||||
stu_courses = @user.courses.visible.not_deleted.select{|course| @user.has_student_role(course)}
|
||||
stu_course_ids = stu_courses.empty? ? "(-1)" : "(" + stu_courses.map{|course| course.id}.join(',') + ")"
|
||||
@homeworks = HomeworkCommon.where("course_id in #{stu_course_ids} and publish_time <= '#{Date.today}'").order("#{@order} #{@b_sort}")
|
||||
if params[:property]
|
||||
all_homework_ids = @homeworks.empty? ? "(-1)" : "(" + @homeworks.map{|h| h.id}.join(",") + ")"
|
||||
if params[:property] == "1"
|
||||
@homeworks = HomeworkCommon.find_by_sql("select * from homework_commons where id in #{all_homework_ids} and homework_type = 1")
|
||||
elsif params[:property] == "2"
|
||||
@homeworks = HomeworkCommon.find_by_sql("select * from homework_commons where id in #{all_homework_ids} and homework_type = 2")
|
||||
elsif params[:property] == "3"
|
||||
@homeworks = HomeworkCommon.find_by_sql("select * from homework_commons where id in #{all_homework_ids} and homework_type = 3")
|
||||
end
|
||||
end
|
||||
@limit = 10
|
||||
@is_remote = true
|
||||
@hw_count = @homeworks.count
|
||||
@hw_pages = Paginator.new @hw_count, @limit, params['page'] || 1
|
||||
@offset ||= @hw_pages.offset
|
||||
@homeworks = paginateHelper @homeworks,@limit
|
||||
@search = ""
|
||||
@property = params[:property]
|
||||
respond_to do |format|
|
||||
format.js
|
||||
format.html {render :layout => 'static_base'}
|
||||
end
|
||||
end
|
||||
|
||||
#我管理/收到的作业
|
||||
def manage_or_receive_homeworks
|
||||
@order,@b_sort,@type = params[:order] || "created_at",params[:sort] || "desc",params[:type] || 1
|
||||
|
|
|
@ -1348,6 +1348,14 @@ module ApplicationHelper
|
|||
title << @course_community
|
||||
elsif !@contest_community.blank?
|
||||
title << @contest_community
|
||||
elsif !@manage_issues.blank?
|
||||
title << @manage_issues
|
||||
elsif !@receive_issues.blank?
|
||||
title << @receive_issues
|
||||
elsif !@manage_homeworks.blank?
|
||||
title << @manage_homeworks
|
||||
elsif !@receive_homeworks.blank?
|
||||
title << @receive_homeworks
|
||||
else
|
||||
title << @user.try(:realname)
|
||||
end
|
||||
|
@ -2920,6 +2928,20 @@ module ApplicationHelper
|
|||
@user_course_total = @my_joined_course_count + @my_course_count
|
||||
end
|
||||
|
||||
# 用户发布的作业数
|
||||
def user_manage_homework_count
|
||||
tea_courses = @user.courses.visible.not_deleted.select{|course| @user.has_teacher_role(course)}
|
||||
tea_course_ids = tea_courses.map{|course| course.id}
|
||||
@manage_homeworks = HomeworkCommon.where(:course_id => tea_course_ids).count
|
||||
end
|
||||
|
||||
# 用户收到的作业数
|
||||
def user_receive_homework_count
|
||||
stu_courses = @user.courses.visible.not_deleted.select{|course| @user.has_student_role(course)}
|
||||
stu_course_ids = stu_courses.empty? ? "(-1)" : "(" + stu_courses.map{|course| course.id}.join(',') + ")"
|
||||
@homeworks = HomeworkCommon.where("course_id in #{stu_course_ids} and publish_time <= '#{Date.today}'").count
|
||||
end
|
||||
|
||||
# 用户发布的issue数
|
||||
def issues_author_is_self_count
|
||||
@issues = Issue.where( :author_id => @user.id )
|
||||
|
|
|
@ -130,7 +130,7 @@ module IssuesHelper
|
|||
end
|
||||
|
||||
def options_for_version_isuue_list(project)
|
||||
versions = Version.where(:project_id => project, :status => "open").map{|version| [version.name, version.id]}.unshift(["里程碑", 0])
|
||||
versions = Version.where(:project_id => project, :status => "open").order("created_on desc").map{|version| [version.name, version.id]}.unshift(["里程碑", 0])
|
||||
end
|
||||
|
||||
def render_issue_subject_with_tree(issue)
|
||||
|
|
|
@ -203,7 +203,7 @@ class Memo < ActiveRecord::Base
|
|||
end
|
||||
|
||||
def destroyable_by? user
|
||||
(user && self.author == user) || user.admin?
|
||||
(user && self.author == user) || user.admin? || self.forum.creator == user
|
||||
#self.author == user || user.admin?
|
||||
end
|
||||
|
||||
|
|
|
@ -150,6 +150,10 @@
|
|||
<li><a href="<%=news_path(ma.forge_message.id) %>" target="_blank" title="<%=ma.forge_message.author.show_name %> 发布了新闻:<%= ma.forge_message.title.html_safe%>"><span class="shadowbox_news_user"><%=ma.forge_message.author.show_name %> </span>发布了新闻:<%= ma.forge_message.title.html_safe%></a></li>
|
||||
<% elsif ma.forge_message_type == "Comment" %>
|
||||
<li><a href="<%=news_path(ma.forge_message.commented.id) %>" target="_blank" title="<%=ma.forge_message.author.show_name %> 评论了新闻:<%= ma.forge_message.commented.title%>"><span class="shadowbox_news_user"><%=ma.forge_message.author.show_name %> </span>评论了新闻:<%= ma.forge_message.commented.title%></a></li>
|
||||
<% elsif ma.forge_message_type == "PullRequest" && PullRequest.where(:pull_request_id => ma.forge_message_id).count != 0%>
|
||||
<% send_message_user = PullRequest.where(:pull_request_id => ma.forge_message_id) %>
|
||||
<% author = User.find(ma.operate_user_id.nil? ? 2 : ma.operate_user_id) %>
|
||||
<li><a href="<%= project_pull_requests_path(ma.project_id) %>" target="_blank" title="<%= User.find(author.id).show_name %> <%= pull_request_message_status(ma) %> <%= send_message_user[0].title %>"><span class="shadowbox_news_user"><%= User.find(author.id).show_name %> </span><%= pull_request_message_status(ma) %> <%= send_message_user[0].title %></a></li>
|
||||
<% end %>
|
||||
<% elsif ma.class == MemoMessage %>
|
||||
<% if ma.memo_type == "Memo" && !ma.memo.nil? && !ma.memo.author.nil? %>
|
||||
|
@ -179,8 +183,8 @@
|
|||
<% end %>
|
||||
<% end %>
|
||||
</ul>
|
||||
<a onclick = "show_more();" id = "show_more_messages" style="display: none; cursor: pointer;" class = "shadowbox_news_all">展开更多</a>
|
||||
<%= link_to '查看全部', user_message_path(User.current),:id =>'show_all_messages', :class => "shadowbox_news_all", :style => "display:none", :target =>"_Blank" %>
|
||||
<!--<a onclick = "show_more();" id = "show_more_messages" style="display: none; cursor: pointer;" class = "shadowbox_news_all">展开更多</a>-->
|
||||
<%= link_to '查看全部', user_message_path(User.current),:id =>'show_all_messages', :class => "shadowbox_news_all", :target =>"_Blank" %>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
|
|
@ -1,18 +1,18 @@
|
|||
<ul>
|
||||
<% if User.current.logged?%>
|
||||
<% if User.current == target%>
|
||||
<!-- <li style="width: 119px; float: left; border-right: 1px solid #ddd;"><%#= link_to("个人资料", my_account_path, :class => "user_editinfo") %></li>-->
|
||||
<% if User.current == target %>
|
||||
<!--<li style="width: 119px; float: left; border-right: 1px solid #ddd;"><%#= link_to("个人资料", my_account_path, :class => "user_editinfo") %></li>-->
|
||||
<li><%= link_to '个人主页', homepage_user_path(@user), :class => "user_editinfo", :target => '_blank' %></li>
|
||||
<li class="cl"></li>
|
||||
<% else%>
|
||||
<!-- <li style="width: 119px; float: left; border-right: 1px solid #ddd;">
|
||||
<%# if target.base_homepage.nil? %>
|
||||
<a href="javascript:void(0)" class ="user_editinfo" style="color: #cccccc" title="该用户暂未设置主页">主页</a>
|
||||
<%# else %>
|
||||
<%#=link_to "主页", homepage_user_path(@user.login), :class => 'user_editinfo', :target => '_blank' %>
|
||||
<%# end %>
|
||||
</li>-->
|
||||
<li>
|
||||
<li style="width: 119px; float: left; border-right: 1px solid #ddd;">
|
||||
<% if target.base_homepage.nil? %>
|
||||
<a href="javascript:void(0)" class ="user_editinfo" style="color: #cccccc" title="该用户暂未设置主页">TA的主页</a>
|
||||
<% else %>
|
||||
<%=link_to "TA的主页", homepage_user_path(@user.login), :class => 'user_editinfo', :target => '_blank' %>
|
||||
<% end %>
|
||||
</li>
|
||||
<li style="width: 118px; float: left;">
|
||||
<%if(target.watched_by?(User.current))%>
|
||||
<%= link_to "取消关注",watch_path(:object_type=> 'user',:object_id=>target.id,:target_id=>target.id),:class => "user_editinfo", :method => "delete",:remote => "true", :title => "取消关注"%>
|
||||
<% else %>
|
||||
|
@ -20,6 +20,6 @@
|
|||
<% end %>
|
||||
</li>
|
||||
<li class="cl"></li>
|
||||
<% end%>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</ul>
|
|
@ -71,7 +71,10 @@
|
|||
<ul class="users_accordion mb10">
|
||||
<% if @user == User.current %>
|
||||
<li id="user_05" class="user_icons_myhw">
|
||||
<%=link_to '我的作业', my_homeworks_user_path(@user), :target => "_blank", :style => "font-size:14px;" %>
|
||||
<%=link_to '我发布的作业', user_manage_homeworks_user_path(@user), :target => "_blank", :style => "font-size:14px;" %>
|
||||
</li>
|
||||
<li id="user_05" class="user_icons_myhw">
|
||||
<%=link_to '我收到的作业', user_receive_homeworks_user_path(@user), :target => "_blank", :style => "font-size:14px;" %>
|
||||
</li>
|
||||
<li id="user_06" class="icons-doc clear">
|
||||
<%= link_to "题库", user_homeworks_user_path(User.current), :target => "_blank", :style => "font-size:14px;" %>
|
||||
|
|
|
@ -62,7 +62,10 @@
|
|||
<%= link_to "加入项目", applied_join_project_path, :remote => true, :method => "post", :style => "font-size:14px;" %>
|
||||
</li>
|
||||
<li id="user_09" class="user_icons_myissues">
|
||||
<%= link_to "我的Issue", user_issues_user_path(@user), :target => "_blank", :style => "font-size:14px;" %>
|
||||
<%= link_to "我发布的issue", user_manage_issues_user_path(@user), :target => "_blank", :style => "font-size:14px;" %>
|
||||
</li>
|
||||
<li id="user_10" class="user_icons_myissues">
|
||||
<%= link_to "我收到的issue", user_receive_issues_user_path(@user), :target => "_blank", :style => "font-size:14px;" %>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
|
|
|
@ -159,7 +159,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<% if is_current_user %>
|
||||
<% if hidden_unproject_infos %>
|
||||
<% if hidden_unproject_infos && user_course_count > 0 %>
|
||||
<div class="home-user-leftnav">
|
||||
<h3 >
|
||||
<%= link_to "课程社区", user_course_community_path(User.current), :class => "fl" , :target => "_blank", :style => "color:#666" %>
|
||||
|
@ -170,9 +170,18 @@
|
|||
<%= link_to user_course_count > 0 ? "课程<span class='issues_nav_tag mr10 fr' style='line-height:18px;margin-top: 9px;font-size: 11px;background-color:#f5f2f2;color:#666;'>#{user_course_count}</span>".html_safe : "课程",
|
||||
user_course_community_path(User.current), :id => "user_course_list", :target => "_blank" %>
|
||||
</li>
|
||||
<li class="home-user-leftnav-li icons-homework clear">
|
||||
<%=link_to '我的作业', my_homeworks_user_path(@user), :target => "_blank", :class => "fl", :style => "color:#666" %>
|
||||
</li>
|
||||
<% if user_manage_homework_count > 0 %>
|
||||
<li class="home-user-leftnav-li icons-homework clear">
|
||||
<%= link_to user_manage_homework_count > 0 ? "我发布的作业<span class='issues_nav_tag mr10 fr' style='line-height:18px;margin-top:9px;font-size:11px;background-color:#f5f2f2;color:#666;'>#{user_manage_homework_count}</span>".html_safe : "我发布的作业",
|
||||
user_manage_homeworks_user_path(@user), :target => "_blank" %>
|
||||
</li>
|
||||
<% end %>
|
||||
<% if user_receive_homework_count > 0 %>
|
||||
<li class="home-user-leftnav-li icons-homework clear">
|
||||
<%= link_to "我收到的作业<span class='issues_nav_tag mr10 fr' style='line-height:18px;margin-top:9px;font-size:11px;background-color:#f5f2f2;color:#666;'>#{user_receive_homework_count}</span>".html_safe,
|
||||
user_receive_homeworks_user_path(@user), :target => "_blank" %>
|
||||
</li>
|
||||
<% end %>
|
||||
<li class="home-user-leftnav-li icons-doc clear">
|
||||
<%= link_to "题库", user_homeworks_user_path(User.current), :target => "_blank", :class => "fl", :style => "color:#666" %>
|
||||
</li>
|
||||
|
@ -183,26 +192,32 @@
|
|||
<%# end %>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="home-user-leftnav">
|
||||
<h3 >
|
||||
<%= link_to "项目社区", user_project_community_path(User.current), :class => "fl", :target => "_blank", :style => "color:#666" %>
|
||||
</h3>
|
||||
<ul>
|
||||
<li class="home-user-leftnav-li icons-project clear">
|
||||
<%= link_to user_project_count > 0 ? "项目<span class='issues_nav_tag mr10 fr' style='line-height:18px;margin-top:9px;font-size:11px;background-color:#f5f2f2;color:#666;'>#{user_project_count}</span>".html_safe : "项目",
|
||||
user_project_community_path(User.current), :id => 'user_project_list', :target => "_blank" %>
|
||||
</li>
|
||||
<li class="home-user-leftnav-li icons-issue clear">
|
||||
<%= link_to issues_author_is_self_count > 0 ? "我发布的issue<span class='issues_nav_tag mr10 fr'style='line-height:18px;margin-top:9px;font-size:11px;background-color:#f5f2f2;color:##666;'>#{issues_author_is_self_count}</span>".html_safe : "我发布的issue",
|
||||
user_issues_user_path(@user, :type => "author" ), :target => "_blank" %>
|
||||
</li>
|
||||
<li class="home-user-leftnav-li icons-issue clear">
|
||||
<%= link_to issues_assigned_is_self_count > 0 ? "我收到的issue<span class='issues_nav_tag mr10 fr' style='line-height:18px;margin-top:9px;font-size:11px;background-color:#f5f2f2;color:#666;'>#{issues_assigned_is_self_count}</span>".html_safe : "我收到的issue",
|
||||
user_issues_user_path(@user, :type => "assigned"), :target => "_blank" %>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<% if hidden_unproject_infos %>
|
||||
<% if user_project_count > 0%>
|
||||
<div class="home-user-leftnav">
|
||||
<h3 >
|
||||
<%= link_to "项目社区", user_project_community_path(User.current), :class => "fl", :target => "_blank", :style => "color:#666" %>
|
||||
</h3>
|
||||
<ul>
|
||||
<li class="home-user-leftnav-li icons-project clear">
|
||||
<%= link_to user_project_count > 0 ? "项目<span class='issues_nav_tag mr10 fr' style='line-height:18px;margin-top:9px;font-size:11px;background-color:#f5f2f2;color:#666;'>#{user_project_count}</span>".html_safe : "项目",
|
||||
user_project_community_path(User.current), :id => 'user_project_list', :target => "_blank" %>
|
||||
</li>
|
||||
<% if issues_author_is_self_count > 0 %>
|
||||
<li class="home-user-leftnav-li icons-issue clear">
|
||||
<%= link_to issues_author_is_self_count > 0 ? "我发布的issue<span class='issues_nav_tag mr10 fr'style='line-height:18px;margin-top:9px;font-size:11px;background-color:#f5f2f2;color:##666;'>#{issues_author_is_self_count}</span>".html_safe : "我发布的issue",
|
||||
user_manage_issues_user_path(@user), :target => "_blank" %>
|
||||
</li>
|
||||
<% end %>
|
||||
<% if issues_assigned_is_self_count > 0 %>
|
||||
<li class="home-user-leftnav-li icons-issue clear">
|
||||
<%= link_to issues_assigned_is_self_count > 0 ? "我收到的issue<span class='issues_nav_tag mr10 fr' style='line-height:18px;margin-top:9px;font-size:11px;background-color:#f5f2f2;color:#666;'>#{issues_assigned_is_self_count}</span>".html_safe : "我收到的issue",
|
||||
user_receive_issues_user_path(@user), :target => "_blank" %>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
<% end %>
|
||||
<% if hidden_unproject_infos && user_contest_count > 0 %>
|
||||
<div class="home-user-leftnav">
|
||||
<h3 >
|
||||
<%= link_to "竞赛社区", user_contest_community_path(User.current), :class => "fl" , :target => "_blank"%>
|
||||
|
@ -222,17 +237,19 @@
|
|||
<span class="fr mr5" style="font-size:12px;color: #7f7f7f;"><%= time_tag(@user.created_on).html_safe %></span>
|
||||
</h3>
|
||||
<ul>
|
||||
<% if hidden_unproject_infos %>
|
||||
<% if hidden_unproject_infos && user_course_count > 0 %>
|
||||
<li class="home-user-leftnav-li icons-class clear">
|
||||
<%= link_to user_course_count > 0 ? "课程<span class='issues_nav_tag ml140'>#{user_course_count}</span>".html_safe : "课程",
|
||||
user_course_community_path(@user), :id => "user_course_list", :class => "fl", :target => "_blank" %>
|
||||
</li>
|
||||
<% end %>
|
||||
<% if user_project_count > 0 %>
|
||||
<li class="home-user-leftnav-li icons-project clear">
|
||||
<%= link_to user_project_count > 0 ? "项目<span class='issues_nav_tag ml140'>#{user_project_count}</span>".html_safe : "项目",
|
||||
user_project_community_path(@user), :id => 'user_project_list', :class => "fl", :target => "_blank" %>
|
||||
</li>
|
||||
<% if hidden_unproject_infos %>
|
||||
<% end %>
|
||||
<% if hidden_unproject_infos && user_contest_count > 0 %>
|
||||
<li class="home-user-leftnav-li icons-project clear">
|
||||
<%= link_to user_contest_count > 0 ? "竞赛<span class='issues_nav_tag ml140'>#{user_contest_count}</span>".html_safe : "竞赛",
|
||||
user_contest_community_path(@user), :id => 'user_contest_list', :class => "fl", :target => "_blank" %>
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
<img src="https://www.trustie.net/images/wechat/trustie_QR.jpg" width="120" height="120" >
|
||||
<p style=" color:#666;">
|
||||
扫一扫,关注 Trustie 微信公众号,更方便获任务通知,作业等提醒<br/>
|
||||
想了解更多信息,请访问 <a href="www.trustie.net" style=" color:#3b94d6;"> www.trustie.net</a>
|
||||
想了解更多信息,请访问 <a href="https://www.trustie.net/" style=" color:#3b94d6;"> www.trustie.net</a>
|
||||
</p>
|
||||
</div>
|
||||
<div style="padding:20px; color:#333; line-height: 1.9;background: #eee;border:1px solid #ddd; border-top:none; width: 558px;">
|
||||
|
|
|
@ -56,7 +56,7 @@
|
|||
:class => 'fr mr20 undis',
|
||||
:data => {:confirm => l(:text_are_you_sure)},
|
||||
:title => l(:button_delete)
|
||||
) if @memo.author.id == User.current.id || User.current.admin? %>
|
||||
) if @memo.author.id == User.current.id || User.current.admin? || User.current == @forum.creator %>
|
||||
</span>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
|
|
|
@ -6,15 +6,15 @@
|
|||
<% @is_valuate = is_praise_or_tread(obj,user_id)%>
|
||||
<% if @is_valuate.size > 0 %> <!-- 评价过 1代表赞 0代表踩 -->
|
||||
<% @flag = @is_valuate.first.praise_or_tread %>
|
||||
<% if @flag == 1 %> <!-- 顶过 --><!-- modified by bai -->
|
||||
<a href="javascript:void(0);" class="<%= obj.author.id == User.current.id ? 'linkGrey2 postLikeIcon mr30':'linkGrey2 postLikeIcon' %>" title="<%= l(:label_issue_praise_over)%>" > <%= get_praise_num(obj)%></a>
|
||||
<% if @flag == 1 %> <!-- 顶过 --><!-- modified by bai -->
|
||||
<a href="javascript:void(0);" class="<%= (obj.author.id == User.current.id || obj.forum.creator == User.current || User.current.admin?) ? 'linkGrey2 postLikeIcon mr30':'linkGrey2 postLikeIcon' %>" title="<%= l(:label_issue_praise_over)%>" > <%= get_praise_num(obj)%></a>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<% if user_id == obj.author_id %>
|
||||
|
||||
<!--<%#= image_tag "/images/praise_tread/praise_true.png" , weight:"22px", height:"22px",:title => l(:label_issue_not_praise_over) %>-->
|
||||
<a href="javascript:void(0);" class="linkGrey2 postLikeIcon mr30" title="<%= l(:label_issue_not_praise_over)%>" > <%= get_praise_num(obj)%></a>
|
||||
|
||||
<% elsif user_id == obj.forum.creator_id || User.current.admin? %>
|
||||
<a href="<%= praise_tread_praise_plus_path({:obj_id => obj.id,:obj_type => obj.class, :horizontal => horizontal })%>" data-remote="true" class="linkGrey2 postLikeIcon mr30" title="<%= l(:label_issue_praise)%>" > <%= get_praise_num(obj) %></a>
|
||||
<% else %>
|
||||
<!-- 积分少于2分不能踩帖 -->
|
||||
<%# if OptionNumber.get_user_option_number(user_id).nil? || OptionNumber.get_user_option_number(user_id).total_score < 2 %>
|
||||
|
|
|
@ -26,19 +26,21 @@
|
|||
<%= link_to image_tag(url_to_avatar(@memo.author),:width=>50,:height => 50,:alt=>'贴吧图像' ),user_path(@memo.author) %>
|
||||
</div>
|
||||
<div class="postThemeWrap">
|
||||
<% if @memo.author.id == User.current.id || User.current.admin? %>
|
||||
<% if @memo.author.id == User.current.id || User.current.admin? || User.current == @forum.creator %>
|
||||
<div class="homepagePostSetting">
|
||||
<ul>
|
||||
<li class="homepagePostSettingIcon">
|
||||
<ul class="homepagePostSettiongText">
|
||||
<li><a href="<%= edit_forum_memo_path(@memo.forum,@memo)%>" class="postOptionLink">编辑</a></li>
|
||||
<% if @memo.author.id == User.current.id || User.current.admin? %>
|
||||
<li><a href="<%= edit_forum_memo_path(@memo.forum,@memo)%>" class="postOptionLink">编辑</a></li>
|
||||
<% end %>
|
||||
<li><a href="javascript:void(0);" class="postOptionLink" onclick="del_confirm();">删除</a></li>
|
||||
<li style="display: none"><a href="<%= forum_memo_path(@memo.forum,@memo) %>" data-method="delete" id="del_memo_link" ></a></li>
|
||||
<li style="display: none"><a href="<%= forum_memo_path(@memo.forum, @memo) %>" data-method="delete" id="del_memo_link" ></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<%end%>
|
||||
<% end %>
|
||||
<div class="postDetailTitle fl">
|
||||
<a href="javascript:void(0);" class="f14 linkGrey4 fb" style="overflow:hidden;">主题: <%= @memo.subject%></a>
|
||||
</div>
|
||||
|
@ -67,7 +69,7 @@
|
|||
<div class="cl"></div>
|
||||
<div class="homepagePostReply">
|
||||
<div class="homepagePostReplyBanner">
|
||||
<div class="homepagePostReplyBannerCount">回复(<%=@reply_count %>)</div>
|
||||
<div class="homepagePostReplyBannerCount">回复(<%= @reply_count %>)</div>
|
||||
<div class="homepagePostReplyBannerTime"></div>
|
||||
</div>
|
||||
<div class="" id="reply_div_<%= @memo.id %>">
|
||||
|
@ -85,7 +87,7 @@
|
|||
<%= f.hidden_field :parent_id, :required => true, value: @memo.id %>
|
||||
<%= hidden_field_tag :quote,"",:required => false,:style => 'display:none' %>
|
||||
<div nhname='toolbar_container_<%= @memo.id%>'></div>
|
||||
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= @memo.id%>' name="memo[content]"></textarea>
|
||||
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= @memo.id %>' name="memo[content]"></textarea>
|
||||
<a id="new_message_submit_btn_<%= @memo.id%>" href="javascript:void(0)" onclick="this.style.display='none'" class="blue_n_btn fr" style="display:none;margin-top:6px;">发送</a>
|
||||
<div class="cl"></div>
|
||||
<p nhname='contentmsg_<%= @memo.id%>'></p>
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
<span class="c_red ml5 w690" id="project_name_notice" style="padding-left:100px;display: none;">项目名称不能为空!</span>
|
||||
</li>
|
||||
<li class="clear mb10">
|
||||
<label class="label fl mr5"> 项目描述 : </label>
|
||||
<label class="label fl mr5"> 项目简介 : </label>
|
||||
<%= f.kindeditor :description, :editor_id => 'project_setting_editor',
|
||||
:owner_id => @project.nil? ? 0: @project.id,
|
||||
:owner_type => OwnerTypeHelper::PROJECT,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<% if @requests.blank? %>
|
||||
<div class="no-merge-content">没有可显示的请求</div>
|
||||
<%= render :partial => "projects/no_data" %>
|
||||
<% else %>
|
||||
<% @requests.each do |request| %>
|
||||
<div class="clear new_roadmap_listbox">
|
||||
|
|
|
@ -5,34 +5,20 @@
|
|||
<% else %>
|
||||
<% homeworks.each do |homework| %>
|
||||
<ul class="sy_classlist">
|
||||
<span class="hw_icons_cir fl mt5 mr5"></span>
|
||||
<span class="icons-user-homework homework-user-leftnav-li fl"></span>
|
||||
<div class="fl ">
|
||||
<h3 class="sy_classlist_title fl">
|
||||
<%= link_to homework.name, student_work_index_path(:homework => homework.id), :class => 'sy_cblack', :target => '_blank' %>
|
||||
<%= link_to homework.course.name+" / "+homework.name, student_work_index_path(:homework => homework.id), :class => 'sy_cblack', :target => '_blank' %>
|
||||
</h3>
|
||||
<div class="cl"></div>
|
||||
<p class="sy_cgrey clear">
|
||||
<span class="fl">来源:</span>
|
||||
<span class="hw_classname mr15 fl">
|
||||
<%= link_to homework.course.name, course_path(homework.course), :target => '_blank', :class => 'hw_cgrey' %>
|
||||
</span>
|
||||
<span class="mr15 fl">类别:<%=homework.homework_type_ch %></span>
|
||||
<span class="fl">作品:</span>
|
||||
<span class="sy_corange hw_w30 fl "><%=homework.student_works.has_committed.count %></span>
|
||||
<span class="fl">/</span>
|
||||
<span class="sy_cgrey hw_w30 fl mr15"><%= homework.homework_type == 3 ? '--' : homework.course.student.count %></span>
|
||||
<span class="fl">待评阅:</span>
|
||||
<span class="sy_corange hw_w30 fl"><%= homework.student_works.has_committed.where("teacher_score is null and teaching_asistant_score is null").count %></span>
|
||||
<span class="fl">/</span>
|
||||
<span class="sy_cgrey hw_w30 fl mr15"><%=homework.student_works.has_committed.count %></span>
|
||||
<span class="mr15 fl">发布时间:
|
||||
<% if homework.publish_time %>
|
||||
<%= format_date(homework.publish_time) %>
|
||||
<% else %>
|
||||
<span> -- </span>
|
||||
<% end %>
|
||||
</span>
|
||||
<span class="mr15 fl"><%=(cur_homework_end_time homework).html_safe %></span>
|
||||
<span class="mr15 fl"><%= (cur_homework_end_time homework).html_safe %></span>
|
||||
<span class="fl">未交:</span>
|
||||
<span class="sy_cgrey hw_w30 fl mr15"><%= homework.homework_type == 3 ? '--' : (homework.course.student.count - homework.student_works.has_committed.count) %></span>
|
||||
<span class="fl c_green">已评:</span>
|
||||
<span class="sy_cgrey hw_w30 fl mr15"><%= homework.student_works.has_committed.count - homework.student_works.has_committed.where("teacher_score is null and teaching_asistant_score is null").count %></span>
|
||||
<span class="fl c_red">未评:</span>
|
||||
<span class="sy_cgrey hw_w30 fl mr15"><%= homework.student_works.has_committed.count %></span>
|
||||
</p>
|
||||
</div>
|
||||
<% if homework.student_works.has_committed.count == 0 %>
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
<span class="sy_cgrey ">排序:</span>
|
||||
<% if type == 1 %>
|
||||
<%= link_to "发布时间",search_m_r_homeworks_user_path(@user,:name=>search,:type => type,:property=>property,:order => "publish_time", :sort => @r_sort),:class => "sy_cgrey fl",:remote => true%>
|
||||
<%= link_to "发布时间",search_m_r_homeworks_user_path(@user,:name=>search,:type => type,:property => property,:order => "publish_time", :sort => @r_sort),:class => "sy_cgrey fl",:remote => true%>
|
||||
<% if order == "publish_time" %>
|
||||
<%= link_to "", search_m_r_homeworks_user_path(@user,:name=>search,:type => type,:property=>property,:order => "publish_time", :sort => @r_sort), :class => "#{@r_sort == 'asc' ? 'sortupbtn' : 'sortdownbtn'} mt15 fl", :remote => true %>
|
||||
<%= link_to "", search_m_r_homeworks_user_path(@user,:name=>search,:type => type, :property => property,:order => "publish_time", :sort => @r_sort), :class => "#{@r_sort == 'asc' ? 'sortupbtn' : 'sortdownbtn'} mt15 fl", :remote => true %>
|
||||
<% else %>
|
||||
<%= link_to "", search_m_r_homeworks_user_path(@user,:name=>search,:type => type,:property=>property,:order => "publish_time", :sort => @r_sort), :class => "sortdownbtn sort_no mt15 fl", :remote => true %>
|
||||
<%= link_to "", search_m_r_homeworks_user_path(@user,:name=>search,:type => type,:property => property,:order => "publish_time", :sort => @r_sort), :class => "sortdownbtn sort_no mt15 fl", :remote => true %>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<%= link_to "状态", search_m_r_homeworks_user_path(@user,:name=>search,:type => type,:property=>property,:order => "status", :sort => @r_sort),:class => "sy_cgrey fl",:remote => true%>
|
||||
<%= link_to "状态", search_m_r_homeworks_user_path(@user,:name=>search,:type => type,:property => property,:order => "status", :sort => @r_sort),:class => "sy_cgrey fl",:remote => true%>
|
||||
<% if order == "status" %>
|
||||
<%= link_to "", search_m_r_homeworks_user_path(@user,:name=>search,:type => type,:property=>property,:order => "status", :sort => @r_sort), :class => "#{@r_sort == 'asc' ? 'sortupbtn' : 'sortdownbtn'} mt15 fl", :remote => true %>
|
||||
<% else %>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
</div>
|
||||
|
||||
<div class="hw_search_box fr mr10">
|
||||
<input class="hw_search-input" name="search" value='<%=search %>' placeholder="输入作业关键词进行搜索" type="text" >
|
||||
<input class="hw_search-input" name="search" value='<%= search %>' placeholder="输入作业关键词进行搜索" type="text" >
|
||||
<span class="hw_btn_search"></span>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
|
@ -17,7 +17,7 @@
|
|||
}
|
||||
lastSearchCondition = $(e.target).val().trim();
|
||||
$.ajax({
|
||||
url: '<%= url_for(:controller => 'users', :action => 'search_m_r_homeworks') %>'+'?name='+ e.target.value+'&type=<%=type %>&property=<%=property %>',
|
||||
url: '<%= url_for(:controller => 'users', :action => 'search_m_r_homeworks') %>'+'?name='+ e.target.value+'&type=<%= type %>&property=<%= property %>',
|
||||
type:'get'
|
||||
});
|
||||
}
|
||||
|
|
|
@ -0,0 +1,85 @@
|
|||
<% unless activity.author.nil? %>
|
||||
<div class="issues_list_box clear" id="user_activity_<%= user_activity_id%>">
|
||||
<div class="issues_ciricons fl ">
|
||||
<% if activity.status_id.to_i == 5 %>
|
||||
<span class="issues_ciricons_02"></span>
|
||||
<% else %>
|
||||
<span class="issues_ciricons_01"></span>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class=" fl ml5">
|
||||
<div class="issues_list_titlebox clear">
|
||||
<a href="<%= issue_path(activity) %>" class="issues_list_title fl" style="width: 400px" target="_blank" title="<%= activity.subject.to_s %>"><%= activity.subject.to_s %></a>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="issues_list_small">
|
||||
<p class="fl issues_list_name" ><span class="mr5"><%= format_time(activity.created_on) %> </span>发布</p>
|
||||
<p class="fl ml10"> <span class="mr5"><%= format_time(activity.updated_on) %> </span>更新</p>
|
||||
</div>
|
||||
</div>
|
||||
<ul class="issues_list_txt fr">
|
||||
<li class=" c_grey issues_list_max mr5">
|
||||
<%= Project.find(activity.project_id).name %>
|
||||
</li>
|
||||
<li class="issues_list_min c_grey">
|
||||
<% case activity.tracker_id %>
|
||||
<% when 1 %>
|
||||
缺陷
|
||||
<% when 2 %>
|
||||
功能
|
||||
<% when 3 %>
|
||||
支持
|
||||
<% when 4 %>
|
||||
任务
|
||||
<% when 5 %>
|
||||
周报
|
||||
<% end %>
|
||||
</li>
|
||||
<li class="c_grey">
|
||||
<% if !activity.assigned_to_id.nil? && activity.assigned_to_id != 0 %>
|
||||
<% if activity.try(:assigned_to).try(:realname).blank? %>
|
||||
<%= link_to activity.assigned_to, user_path(activity.assigned_to_id)%>
|
||||
<% else %>
|
||||
<%= link_to activity.try(:assigned_to).try(:realname), user_path(activity.assigned_to_id)%>
|
||||
<% end %>
|
||||
<% end %></li>
|
||||
<li class="issues_list_min c_grey">
|
||||
<%= activity.priority.name %>
|
||||
</li>
|
||||
|
||||
<li class="c_grey issues_list_max" title="<%= activity.fixed_version %>"><%= activity.fixed_version %></li>
|
||||
<li class="issues_list_min c_grey mr5" ><%= activity.status.name %></li>
|
||||
<li class="<%= (activity.done_ratio == 100 ? 'c_green issues_list_min mr5' : 'c_red issues_list_min mr5') %>"><%= activity.done_ratio %>%</li>
|
||||
<li class="issues_list_min">
|
||||
<% if activity.journals.count > 0 %>
|
||||
<span class="issues_icons_mes fl mr5 mt12"></span>
|
||||
<span class="fl mr5"><%= activity.journals.count %></span>
|
||||
<% end %>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<script>
|
||||
$(".issues_list_box").mouseover(function(){
|
||||
var iconOrder;
|
||||
var iconSize = $(this).children().eq(2).children().eq(7).children().size();
|
||||
if(iconSize > 1){
|
||||
iconOrder = 2;
|
||||
} else{
|
||||
iconOrder = 0;
|
||||
}
|
||||
$(this).children().eq(2).children().eq(7).children().eq(iconOrder).show();
|
||||
});
|
||||
$(".issues_list_box").mouseout(function(){
|
||||
var iconOrder;
|
||||
var iconSize = $(this).children().eq(2).children().eq(7).children().size();
|
||||
if(iconSize > 1){
|
||||
iconOrder = 2;
|
||||
} else{
|
||||
iconOrder = 0;
|
||||
}
|
||||
$(this).children().eq(2).children().eq(7).children().eq(iconOrder).hide();
|
||||
});
|
||||
</script>
|
||||
|
|
@ -0,0 +1,84 @@
|
|||
<% unless activity.author.nil? %>
|
||||
<div class="issues_list_box clear" id="user_activity_<%= user_activity_id%>">
|
||||
<div class="issues_ciricons fl ">
|
||||
<% if activity.status_id.to_i == 5 %>
|
||||
<span class="issues_ciricons_02"></span>
|
||||
<% else %>
|
||||
<span class="issues_ciricons_01"></span>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class=" fl ml5">
|
||||
<div class="issues_list_titlebox clear">
|
||||
<a href="<%= issue_path(activity) %>" class="issues_list_title fl" style="width: 400px" target="_blank" title="<%= activity.subject.to_s %>"><%= activity.subject.to_s %></a>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="issues_list_small">
|
||||
<p class="fl issues_list_name" ><span class="mr5"><%= format_time(activity.created_on) %> </span>发布</p>
|
||||
<p class="fl ml10"> <span class="mr5"><%= format_time(activity.updated_on) %> </span>更新</p>
|
||||
</div>
|
||||
</div>
|
||||
<ul class="issues_list_txt fr">
|
||||
<li class=" c_grey issues_list_max mr5">
|
||||
<%= Project.find(activity.project_id).name %>
|
||||
</li>
|
||||
<li class="c_grey">
|
||||
<% if activity.try(:author).try(:realname) == ' ' %>
|
||||
<%= link_to activity.try(:author), user_path(activity.author_id)%>
|
||||
<% else %>
|
||||
<%= link_to activity.try(:author).try(:realname), user_path(activity.author_id)%>
|
||||
<% end %>
|
||||
</li>
|
||||
<li class="issues_list_min c_grey">
|
||||
<% case activity.tracker_id %>
|
||||
<% when 1 %>
|
||||
缺陷
|
||||
<% when 2 %>
|
||||
功能
|
||||
<% when 3 %>
|
||||
支持
|
||||
<% when 4 %>
|
||||
任务
|
||||
<% when 5 %>
|
||||
周报
|
||||
<% end %>
|
||||
</li>
|
||||
<li class="issues_list_min c_grey">
|
||||
<%= activity.priority.name %>
|
||||
</li>
|
||||
|
||||
<li class="c_grey issues_list_max" title="<%= activity.fixed_version %>"><%= activity.fixed_version %></li>
|
||||
<li class="issues_list_min c_grey mr5" ><%= activity.status.name %></li>
|
||||
<li class="<%= (activity.done_ratio == 100 ? 'c_green issues_list_min mr5' : 'c_red issues_list_min mr5') %>"><%= activity.done_ratio %>%</li>
|
||||
<li class="issues_list_min">
|
||||
<% if activity.journals.count > 0 %>
|
||||
<span class="issues_icons_mes fl mr5 mt12"></span>
|
||||
<span class="fl mr5"><%= activity.journals.count %></span>
|
||||
<% end %>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<script>
|
||||
$(".issues_list_box").mouseover(function(){
|
||||
var iconOrder;
|
||||
var iconSize = $(this).children().eq(2).children().eq(7).children().size();
|
||||
if(iconSize > 1){
|
||||
iconOrder = 2;
|
||||
} else{
|
||||
iconOrder = 0;
|
||||
}
|
||||
$(this).children().eq(2).children().eq(7).children().eq(iconOrder).show();
|
||||
});
|
||||
$(".issues_list_box").mouseout(function(){
|
||||
var iconOrder;
|
||||
var iconSize = $(this).children().eq(2).children().eq(7).children().size();
|
||||
if(iconSize > 1){
|
||||
iconOrder = 2;
|
||||
} else{
|
||||
iconOrder = 0;
|
||||
}
|
||||
$(this).children().eq(2).children().eq(7).children().eq(iconOrder).hide();
|
||||
});
|
||||
</script>
|
||||
|
|
@ -5,29 +5,22 @@
|
|||
<% else %>
|
||||
<% homeworks.each do |homework| %>
|
||||
<ul class="sy_classlist">
|
||||
<span class="hw_icons_cir fl mt5 mr5"></span>
|
||||
<span class="icons-user-homework homework-user-leftnav-li fl"></span>
|
||||
<div class="fl ">
|
||||
<h3 class="sy_classlist_title fl">
|
||||
<%= link_to homework.name, student_work_index_path(:homework => homework.id), :class => 'sy_cblack', :target => '_blank' %>
|
||||
<%= link_to homework.course.name + " / " +homework.name, student_work_index_path(:homework => homework.id), :class => 'sy_cblack', :target => '_blank' %>
|
||||
</h3>
|
||||
<div class="cl"></div>
|
||||
<p class="sy_cgrey clear">
|
||||
<span class=" fl">来源:</span>
|
||||
<span class="hw_classname fl mr15">
|
||||
<%= link_to homework.course.name, course_path(homework.course), :target => '_blank', :class => 'hw_cgrey' %>
|
||||
</span>
|
||||
<span class="mr15 fl">类别:<%=homework.homework_type_ch %></span>
|
||||
<span class="mr15 fl"><%= cur_homework_end_time homework %></span>
|
||||
<% my_work = homework.student_works.where("user_id = ? && work_status != 0",User.current).first %>
|
||||
<span class="fl">状态:</span><span class="<%= my_work ? '' : 'hw_cir_nomal hw_cir_lorange' %> fl mr15"><%= my_work ? '已提交' : '未提交' %></span>
|
||||
<span class="fl">作品:</span><span class="sy_corange hw_w20 fl mr15"><%=homework.student_works.has_committed.count %></span>
|
||||
<span class="fl">成绩:</span>
|
||||
<% if my_work && !my_work.work_score.nil? %>
|
||||
<span class="sy_corange hw_w40 fl mr15"><%= format("%.1f",my_work.work_score.to_f) %></span>
|
||||
<% else %>
|
||||
<span class="sy_cgrey hw_w40 fl mr15">--</span>
|
||||
<% end %>
|
||||
<span class="mr15 fl">发布时间:<%= format_date homework.publish_time %></span>
|
||||
<span class="mr15 fl"><%=cur_homework_end_time homework %></span>
|
||||
</p>
|
||||
</div>
|
||||
<%= student_for_homework_common homework %>
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
<% issue_list(issues) do |issue| -%>
|
||||
<script>
|
||||
$(function () {
|
||||
sd_create_editor_from_data(<%= issue.id %>, null, "100%", "<%= issue.class.name %>");
|
||||
});
|
||||
</script>
|
||||
<%= render :partial => 'users/my_manage_issue_list', :locals => {:activity => issue, :user_activity_id => issue.id} %>
|
||||
<% end %>
|
||||
|
||||
<div style="text-align:left;">
|
||||
<div style="width:auto; display:inline-block;">
|
||||
<ul>
|
||||
<%= link_to "导出EXCEL", user_manage_issues_user_path(:format => 'xls'), :class => "hw_btn_blue ml10 mt10 mb10", :id => "sendexcel",
|
||||
:onclick => "remote_function_export('#{User.current}')"%>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
<div class="pages fr" style="width:auto; display:inline-block;margin-top:10px">
|
||||
<ul id="issue_list_pagination" class="fr">
|
||||
<%= pagination_links_full @issue_pages, @issue_count, :per_page_links => false, :remote => @is_remote, :flag => true, :is_new => true %>
|
||||
</ul>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
|
@ -704,34 +704,34 @@
|
|||
<% end %>
|
||||
<% if ma.course_message_type == "CourseRequestDealResult" %>
|
||||
<ul class="homepageNewsList fl">
|
||||
<div class="longMessageWidth">
|
||||
<div class="shortMessageWidth">
|
||||
<li class="homepageNewsPortrait fl">
|
||||
<div class="navHomepageLogo fl"><%= image_tag("/images/trustie_logo1.png", width: "30px", height: "30px", class: "mt3") %></div>
|
||||
<%= link_to image_tag(url_to_avatar(User.find(ma.user_id)), :width => "30", :height => "30"), user_path(User.find(ma.user_id)), :target => '_blank' %>
|
||||
<!--<div class="navHomepageLogo fl"><%#= image_tag("/images/trustie_logo1.png", width: "30px", height: "30px", class: "mt3") %></div>-->
|
||||
</li>
|
||||
<li class="homepageNewsPubType fl">
|
||||
<span class="newsBlue homepageNewsPublisher">系统提示</span>
|
||||
<span class="newsBlue homepageNewsPublisher">
|
||||
<%=link_to User.find(ma.user_id).show_name, user_path(User.find(ma.user_id)),
|
||||
:class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
||||
</span>
|
||||
<span class="homepageNewsType fl">
|
||||
班级申请进度反馈:</span>
|
||||
申请以“<%= ma.content.include?('9') ? '教师' : '教辅' %>”身份加入:
|
||||
</span>
|
||||
</li>
|
||||
<li class="messageInformationContents">
|
||||
<%= link_to ma.status == 1 ?
|
||||
'您申请成为班级"'+Course.find(ma.course_id).name+'"的'+(ma.content.include?('9') ? '教师' : '教辅')+'申请已通过'
|
||||
:
|
||||
'您申请成为班级"'+Course.find(ma.course_id).name+'"的'+(ma.content.include?('9') ? '教师' : '教辅')+'的申请被拒绝', course_path(Course.find(ma.course_id)),
|
||||
<%= link_to Course.find(ma.course_id).name, course_path(Course.find(ma.course_id)),
|
||||
:class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
||||
<!--:onmouseover => "message_titile_show($(this),event)",-->
|
||||
<!--:onmouseout => "message_titile_hide($(this))" %>-->
|
||||
</li>
|
||||
</div>
|
||||
<div style="display: none" class="message_title_red system_message_style">
|
||||
<p>
|
||||
<%= User.current.lastname + User.current.firstname %>老师您好!您已成功加入班级<%= Course.find(ma.course_id).name%>。
|
||||
</p>
|
||||
<p>申请班级:<%= Course.find(ma.course_id).name%></p>
|
||||
<div class="fl">班级描述:</div>
|
||||
<div class="ml60"><%= Course.find(ma.course_id).description.nil? ? "" : Course.find(ma.course_id).description.html_safe %></div>
|
||||
<p>申请职位:<%= ma.content == '9' ? "教师" : "教辅"%></p>
|
||||
</div>
|
||||
<li class="messageOperateContents fl">
|
||||
<% if ma.status == 1 %>
|
||||
<%= User.find(ma.course_message_id).show_name%>已通过
|
||||
<% else %>
|
||||
<%= User.find(ma.course_message_id).show_name%>已拒绝
|
||||
<% end %>
|
||||
</li>
|
||||
<li class="homepageNewsTime fr"><%= time_tag(ma.created_at).html_safe %> </li>
|
||||
</ul>
|
||||
<% end %>
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
<% issue_list(issues) do |issue| -%>
|
||||
<script>
|
||||
$(function () {
|
||||
sd_create_editor_from_data(<%= issue.id %>, null, "100%", "<%= issue.class.name %>");
|
||||
});
|
||||
</script>
|
||||
<%= render :partial => 'users/my_receive_issue_list', :locals => {:activity => issue, :user_activity_id => issue.id} %>
|
||||
<% end %>
|
||||
|
||||
<div style="text-align:left;">
|
||||
<div style="width:auto; display:inline-block;">
|
||||
<ul>
|
||||
<%= link_to "导出EXCEL", user_manage_issues_user_path(:format => 'xls'), :class => "hw_btn_blue ml10 mt10 mb10", :id => "sendexcel",
|
||||
:onclick => "remote_function_export('#{User.current}')"%>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
<div class="pages fr" style="width:auto; display:inline-block;margin-top:10px">
|
||||
<ul id="issue_list_pagination" class="fr">
|
||||
<%= pagination_links_full @issue_pages, @issue_count, :per_page_links => false, :remote => @is_remote, :flag => true, :is_new => true %>
|
||||
</ul>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
|
@ -173,13 +173,13 @@
|
|||
}
|
||||
$(function(){
|
||||
<% if @type %>
|
||||
<% if @type == "assigned" %>
|
||||
HoverLi(2);
|
||||
switch_assign_to(<%= User.current.id %>);
|
||||
<% else %>
|
||||
HoverLi(3);
|
||||
createByMe(<%= User.current.id %>);
|
||||
<% end %>
|
||||
<% if @type == "assigned" %>
|
||||
HoverLi(2);
|
||||
switch_assign_to(<%= User.current.id %>);
|
||||
<% else %>
|
||||
HoverLi(3);
|
||||
createByMe(<%= User.current.id %>);
|
||||
<% end %>
|
||||
<% end %>
|
||||
});
|
||||
</script>
|
||||
|
@ -224,9 +224,9 @@
|
|||
</a>
|
||||
</li>
|
||||
<li id="issues_list_nav_3" onclick="HoverLi(3);">
|
||||
<a href="javascript:void(0);" id="issues_type_3" onclick="createByMe(<%= User.current.id %>)">我的发布<span class="issues_nav_tag ml5">
|
||||
<%= @issues_author_count %>
|
||||
</span></a>
|
||||
<a href="javascript:void(0);" id="issues_type_3" onclick="createByMe(<%= User.current.id %>)">我的发布
|
||||
<span class="issues_nav_tag ml5"><%= @issues_author_count %></span>
|
||||
</a>
|
||||
</li>
|
||||
<div class="cl"></div>
|
||||
</ul>
|
||||
|
|
|
@ -0,0 +1,42 @@
|
|||
<script type="text/javascript" language="javascript">
|
||||
function HoverLi(url){
|
||||
window.location.href = url;
|
||||
}
|
||||
</script>
|
||||
<div class="mt10 mb10">
|
||||
<div class="banner-big f16 fontGrey3" style="margin: 0 auto; position: relative;">
|
||||
我发布的的作业
|
||||
<div class="hw_more_box" >
|
||||
<ul>
|
||||
<li class="hw_more_icons fr">
|
||||
<ul class="hw_more_txt">
|
||||
<li> <a href="<%= manage_or_receive_homeworks_user_path(@user, :type => @type, :property => 0) %>" id="homework_type_all" class="hw_more_li" data-method="get" data-remote="true">全部作业</a> </li>
|
||||
<li> <a href="<%= manage_or_receive_homeworks_user_path(@user, :type => @type, :property => 1) %>" id="homework_type_nor" class="hw_more_li" data-method="get" data-remote="true">普通作业</a> </li>
|
||||
<li> <a href="<%= manage_or_receive_homeworks_user_path(@user, :type => @type, :property => 2) %>" id="homework_type_pro" class="hw_more_li" data-method="get" data-remote="true">编程作业</a> </li>
|
||||
<li> <a href="<%= manage_or_receive_homeworks_user_path(@user, :type => @type, :property => 3) %>" id="homework_type_gro" class="hw_more_li" data-method="get" data-remote="true">分组作业</a> </li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hw_content mb10" >
|
||||
<div id="hw_tab_con_2">
|
||||
<div class="sy_category" id="homework_search_input">
|
||||
<%= render :partial=>'my_homeworks_search', :locals => {:type => @type,:property => nil, :order => @order, :search => ''} %>
|
||||
</div>
|
||||
|
||||
<div class="sy_classbox" style="min-height:800px;" id="my_homework_list">
|
||||
<%= render :partial => "manage_homework_list", :locals => {:homeworks => @homeworks, :is_manage => 1} %>
|
||||
</div>
|
||||
|
||||
<div style="text-align:center;">
|
||||
<div class="pages" style="width:auto; display:inline-block;">
|
||||
<ul id="homework_list_ref_pages">
|
||||
<%= pagination_links_full @hw_pages, @hw_count, :per_page_links => false, :remote => @is_remote, :flag => true, :is_new => true%>
|
||||
</ul>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1,7 @@
|
|||
$("#my_homework_list").html('<%= escape_javascript(render :partial => "manage_homework_list", :locals => {:homeworks => @homeworks, :is_manage => 1})%>');
|
||||
$("#homework_list_ref_pages").html('<%= pagination_links_full @hw_pages, @hw_count, :per_page_links => false, :remote => @is_remote, :flag => true, :is_new => true %>');
|
||||
$("#my_homework_sort").html('<%= escape_javascript( render :partial => 'users/my_homework_sort', :locals => {:type => @type,:property => @property,:order => @order,:search => @search})%>');
|
||||
$("#homework_type_all").attr('href','<%= manage_or_receive_homeworks_user_path(@user, :type => @type, :property => 0) %>');
|
||||
$("#homework_type_nor").attr('href','<%= manage_or_receive_homeworks_user_path(@user, :type => @type, :property => 1) %>');
|
||||
$("#homework_type_pro").attr('href','<%= manage_or_receive_homeworks_user_path(@user, :type => @type, :property => 2) %>');
|
||||
$("#homework_type_gro").attr('href','<%= manage_or_receive_homeworks_user_path(@user, :type => @type, :property => 3) %>');
|
|
@ -0,0 +1,312 @@
|
|||
<%= content_for(:header_tags) do %>
|
||||
<%= import_ke(enable_at: true,init_activity: true) %>
|
||||
<% end %>
|
||||
|
||||
<script xmlns="http://www.w3.org/1999/html">
|
||||
function add_style(){
|
||||
// $("#proeject_id").val("来源");
|
||||
if($("select[id='tracker_id']").val() != 0){
|
||||
$("#tracker_id").addClass('issues_filter_active');
|
||||
}
|
||||
if($("select[id='author_id']").val() != 0){
|
||||
$("#author_id").addClass('issues_filter_active');
|
||||
}
|
||||
if($("select[id='assigned_to_id']").val() !=0){
|
||||
$("#assigned_to_id").addClass('issues_filter_active');
|
||||
}
|
||||
if($("select[id='priority_id']").val() !=0){
|
||||
$("#priority_id").addClass('issues_filter_active');
|
||||
}
|
||||
if($("select[id='fixed_version_id']").val() !=0){
|
||||
$("#fixed_version_id").addClass('issues_filter_active');
|
||||
}
|
||||
if($("select[id='status_id']").val() != 0 ){
|
||||
$("#status_id").addClass('issues_filter_active');
|
||||
}
|
||||
if($("select[id='done_ratio']").val() != -1){
|
||||
$("#done_ratio").addClass('issues_filter_active');
|
||||
}
|
||||
if($("select[id='test']").val() != 0 ){
|
||||
$("#test").addClass('issues_filter_active');
|
||||
}
|
||||
if($("select[id='tracker_id']").val() == 0){
|
||||
$("#tracker_id").removeClass('issues_filter_active');
|
||||
}
|
||||
if($("select[id='author_id']").val() == 0){
|
||||
$("#author_id").removeClass('issues_filter_active');
|
||||
}
|
||||
if($("select[id='assigned_to_id']").val() ==0){
|
||||
$("#assigned_to_id").removeClass('issues_filter_active');
|
||||
}
|
||||
if($("select[id='priority_id']").val() ==0){
|
||||
$("#priority_id").removeClass('issues_filter_active');
|
||||
}
|
||||
if($("select[id='fixed_version_id']").val() ==0){
|
||||
$("#fixed_version_id").removeClass('issues_filter_active');
|
||||
}
|
||||
if($("select[id='status_id']").val() == 0 ){
|
||||
$("#status_id").removeClass('issues_filter_active');
|
||||
}
|
||||
if($("select[id='done_ratio']").val() == -1){
|
||||
$("#done_ratio").removeClass('issues_filter_active');
|
||||
}
|
||||
if($("select[id='test']").val() == 0 ){
|
||||
$("#test").removeClass('issues_filter_active');
|
||||
}
|
||||
};
|
||||
//issues列表
|
||||
function g(o){
|
||||
return document.getElementById(o);
|
||||
}
|
||||
function HoverLi(n){
|
||||
//如果有N个标签,就将i<=N;
|
||||
for(var i=1;i<=3;i++){
|
||||
g('issues_list_nav_'+i).className='issues_nav_nomal';
|
||||
g('issues_list_content_'+i).className='undis';
|
||||
}
|
||||
g('issues_list_content_'+n).className='dis';
|
||||
g('issues_list_nav_'+n).className='issues_nav_hover';
|
||||
}
|
||||
$(function(){
|
||||
$("#RSide").removeAttr("id");
|
||||
$("#Container").css("width","1000px");
|
||||
$("input[nhname='date_show']").change(function(){
|
||||
if($(this).val()=='创建日期起始' || $(this).val()=='创建日期结束')return;
|
||||
$("input[nhname='date_val']",$(this).parent('div')).val($(this).val());
|
||||
remote_function();
|
||||
});
|
||||
|
||||
});
|
||||
function remote_function() {
|
||||
$("#issue_query_form").submit();
|
||||
}
|
||||
|
||||
function remote_function_export(user) {
|
||||
var project_id = $("#project_id").attr("value");
|
||||
var tracker_id = $("#tracker_id").attr("value");
|
||||
var subject = $("#v_subject").attr("value");
|
||||
var assigned_to_id = $("#assigned_to_id").attr("value");
|
||||
var fixed_version_id = $("#fixed_version_id").attr("value");
|
||||
var status_id = $("#status_id").attr("value");
|
||||
var done_ratio = $("#done_ratio").attr("value");
|
||||
var test = $("#test").attr("value");
|
||||
var author_id = $("#author_id").attr("value");
|
||||
var priority_id = $("#priority_id").attr("value");
|
||||
var issue_create_date_start = $("#issue_date_start_issue_export").attr("value");
|
||||
var issue_create_date_end = $("#issue_date_end_issue_export").attr("value");
|
||||
$("#sendexcel").attr("href","/users/"+user+"/user_manage_issues.xls?project_id="+project_id+"&tracker_id="+tracker_id+"&assigned_to_id="+assigned_to_id+"&fixed_version_id="+fixed_version_id+"&status_id="+status_id+"&done_ratio="+done_ratio+"&test="+test+"&author_id="+author_id+"&subject="+subject+"&issue_create_date_start="+issue_create_date_start+"&issue_create_date_end="+issue_create_date_end+"&priority_id="+priority_id);
|
||||
///projects/1811/issues.xls?export=true&set_filter=1
|
||||
}
|
||||
function EnterPress(e){
|
||||
var e = e || window.event;
|
||||
if(e.keyCode == 13){
|
||||
remote_function();
|
||||
}
|
||||
}
|
||||
|
||||
// 点击的时候让过滤条件选中assign_to
|
||||
function switch_assign_to(assign) {
|
||||
var assign = "option[value =" + assign + "]";
|
||||
$("#issues_type_2").click(function(){
|
||||
|
||||
});
|
||||
$("select[id='assigned_to_id']").find(assign).attr("selected", "selected");
|
||||
$("select[id='author_id']").val('');
|
||||
$("select[id='priority_id']").val('');
|
||||
$("select[id='project_id']").val('');
|
||||
$("select[id='tracker_id']").val('');
|
||||
$("select[id='fixed_version_id']").val('');
|
||||
$("select[id='status_id']").val('');
|
||||
$("select[id='done_ratio']").val('');
|
||||
$("select[id='test']").val('');
|
||||
$("#tracker_id").removeClass('issues_filter_active');
|
||||
$("#author_id").removeClass('issues_filter_active');
|
||||
$("#assigned_to_id").addClass('issues_filter_active');
|
||||
$("#priority_id").removeClass('issues_filter_active');
|
||||
$("#fixed_version_id").removeClass('issues_filter_active');
|
||||
$("#status_id").removeClass('issues_filter_active');
|
||||
$("#done_ratio").removeClass('issues_filter_active');
|
||||
$("#test").removeClass('issues_filter_active');
|
||||
remote_function();
|
||||
}
|
||||
|
||||
// 点击的时候让过滤条件选中user_id
|
||||
function createByMe(user_id) {
|
||||
var user = "option[value =" + user_id + "]";
|
||||
$("#createByMe").click(function(){
|
||||
|
||||
});
|
||||
$("select[id='author_id']").find(user).attr("selected", "selected");
|
||||
$("select[id='assigned_to_id']").val('');
|
||||
$("select[id='priority_id']").val('');
|
||||
$("select[id='project_id']").val('');
|
||||
$("select[id='tracker_id']").val('');
|
||||
$("select[id='fixed_version_id']").val('');
|
||||
$("select[id='status_id']").val('');
|
||||
$("select[id='done_ratio']").val('');
|
||||
$("select[id='test']").val('');
|
||||
$("#tracker_id").removeClass('issues_filter_active');
|
||||
$("#author_id").addClass('issues_filter_active');
|
||||
$("#assigned_to_id").removeClass('issues_filter_active');
|
||||
$("#priority_id").removeClass('issues_filter_active');
|
||||
$("#fixed_version_id").removeClass('issues_filter_active');
|
||||
$("#status_id").removeClass('issues_filter_active');
|
||||
$("#done_ratio").removeClass('issues_filter_active');
|
||||
$("#test").removeClass('issues_filter_active');
|
||||
remote_function();
|
||||
}
|
||||
// 清楚表单所有选项
|
||||
function all_reset_form() {
|
||||
$("#issue_query_form")[0].reset();
|
||||
$("select[id='author_id']").val('');
|
||||
$("select[id='assigned_to_id']").val('');
|
||||
$("input[nhname='date_val']").val('');
|
||||
$("#tracker_id").removeClass('issues_filter_active');
|
||||
$("#author_id").removeClass('issues_filter_active');
|
||||
$("#assigned_to_id").removeClass('issues_filter_active');
|
||||
$("#priority_id").removeClass('issues_filter_active');
|
||||
$("#fixed_version_id").removeClass('issues_filter_active');
|
||||
$("#status_id").removeClass('issues_filter_active');
|
||||
$("#done_ratio").removeClass('issues_filter_active');
|
||||
$("#test").removeClass('issues_filter_active');
|
||||
$("#reorder_turnover_time").removeClass("sortArrowActiveU");
|
||||
$("#reorder_turnover_time").addClass("sortArrowActiveD");
|
||||
$("#reorder_release_time").removeClass("sortArrowActiveD");
|
||||
$("#reorder_release_time").removeClass("sortArrowActiveU");
|
||||
remote_function();
|
||||
}
|
||||
function add_class(id){
|
||||
if($("#"+id).hasClass("sortArrowActiveD")){
|
||||
$("#"+id).removeClass("sortArrowActiveD");
|
||||
$("#"+id).addClass("sortArrowActiveU");
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
url: '<%= user_manage_issues_user_path(@user) %>' + '.js?' + id + '=asc&page='+<%= @issue_pages.page %>,
|
||||
data: $("#issue_query_form").serialize()
|
||||
});
|
||||
}else if($("#"+id).hasClass("sortArrowActiveU")){
|
||||
$("#"+id).removeClass("sortArrowActiveU");
|
||||
$("#"+id).addClass("sortArrowActiveD");
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
url: '<%= user_manage_issues_user_path(@user) %>' + '.js?' + id + '=desc&page='+<%= @issue_pages.page %>,
|
||||
data: $("#issue_query_form").serialize()
|
||||
});
|
||||
}else{
|
||||
$("#"+id).addClass("sortArrowActiveD");
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
url: '<%= user_manage_issues_user_path(@user) %>' + '.js?' + id + '=desc&page='+<%= @issue_pages.page%>,
|
||||
data: $("#issue_query_form").serialize()
|
||||
});
|
||||
}
|
||||
}
|
||||
$(function() {
|
||||
$("#release_time").click(function(){
|
||||
$("#reorder_turnover_time").removeClass("sortArrowActiveU");
|
||||
$("#reorder_turnover_time").removeClass("sortArrowActiveD");
|
||||
add_class("reorder_release_time");
|
||||
});
|
||||
$("#turnover_time").click(function () {
|
||||
$("#reorder_release_time").removeClass("sortArrowActiveD");
|
||||
$("#reorder_release_time").removeClass("sortArrowActiveU");
|
||||
add_class("reorder_turnover_time");
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<!--缺陷列表开始-->
|
||||
<div id="myissues_con" class="myissues_con mb10">
|
||||
<div class="myissues_head mb5">
|
||||
<h2 class="ml15">我发布的Issue</h2>
|
||||
</div>
|
||||
<div class="clear mb5">
|
||||
<div class="issues_statistics fl">
|
||||
<ul>
|
||||
<li>所有<a href="javascript:void(0);" class="issues_greycirbg_btn "><%= @issues_filter.count %></a></li>
|
||||
<li>开启<a href="javascript:void(0);" class="issues_greycirbg_btn "><%= @issue_open_count %></a></li>
|
||||
<li>关闭<a href="javascript:void(0);" class="issues_greycirbg_btn "><%= @issue_close_count %></a></li>
|
||||
</ul>
|
||||
</div><!--issues_statistics end-->
|
||||
|
||||
</div>
|
||||
<%= form_tag( user_manage_issues_user_path(@user), :remote => 'xls', :method => "post", :id => "issue_query_form", :class => 'query_form') do %>
|
||||
<div class="clear mb10">
|
||||
<div class="hw_search_box fl ">
|
||||
<input class="hw_search-input" placeholder="输入Issue名称进行搜索" type="text" id="v_subject" name="subject" onkeypress="EnterPress(event)" onkeydown="EnterPress()">
|
||||
<a href="javascript:void(0);" class="hw_btn_search" onclick="remote_function();" ></a>
|
||||
</div>
|
||||
<a href="javascript:void(0);" class="sy_btn_grey fl ml5" onclick="all_reset_form();">清除</a>
|
||||
<div class="fr">
|
||||
<a href="javascript:void(0);" class="linkGrey2 fl">排序: </a>
|
||||
<div id="release_time" class="w65 fl"><a href="javascript:void(0);" class="linkGrey2 fl">发布时间</a><a href="javascript:void(0);" id="reorder_release_time" class=""></a></div>
|
||||
<div id="turnover_time" class="w65 fl"><a href="javascript:void(0);" class="linkGrey2 fl">更新时间</a><a href="javascript:void(0);" id="reorder_turnover_time" class="sortArrowActiveD"></a></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="issues_con_list" style="position: relative;">
|
||||
<ul id="issues_list_nav" >
|
||||
<li id="issues_list_nav_1" class="issues_nav_hover" onclick="HoverLi(1);all_reset_form();">
|
||||
<a href="javascript:void(0);" id="issues_type_1" onclick="all_reset_form();" >搜索结果</a>
|
||||
<span id="issue_filter_all"><%= render :partial => "users/my_issue_filter_all" %></span>
|
||||
</li>
|
||||
<div class="cl"></div>
|
||||
</ul>
|
||||
<div class="issues_filter">
|
||||
<div class="issues_form_filter mt5 mr5">
|
||||
<%= select( :project, :project_id, options_for_issue_project_list(@issues_filter),
|
||||
{ :include_blank => false,:selected => @project_id ? @project_id : 0 },
|
||||
{ :onchange => "remote_function();add_style();", :id => "project_id", :name => "project_id", :class => "fl", :style=>"width: 80px; margin-right:20px;"}
|
||||
)%>
|
||||
<select placeholder=" 类型" class="fl my_issues_filter" disabled="disabled" style="padding:0px; margin:0px;width:35px; margin-right:10px;">
|
||||
<option value="0" selected="selected">类型</option>
|
||||
</select>
|
||||
<select placeholder=" 指派给" class="fl my_issues_filter" disabled="disabled" style="padding:0px; margin-right: 15px;">
|
||||
<option value="0" selected="selected">指派给</option>
|
||||
</select>
|
||||
<%= select( :issue, :user_id, [[@user.show_name, @user.id]].unshift(["指派给",0]),
|
||||
{ :include_blank => false, :selected => @assigned_to ? @assigned_to : 0},
|
||||
{:onchange=>"remote_function();add_style();",:id => "assigned_to_id",:name => "assigned_to_id", :class => "fl", :style => "visibility:hidden; width:0px;margin:0px;padding:0px;"} )
|
||||
%>
|
||||
<select placeholder=" 优先度" class="fl my_issues_filter" disabled="disabled" style="padding:0px; margin:0px">
|
||||
<option value="0" selected="selected">优先度</option>
|
||||
</select>
|
||||
<select placeholder=" 里程碑" class="fl my_issues_filter" disabled="disabled" style="padding:0px;margin-left: 20px; margin-right: 10px">
|
||||
<option value="0" selected="selected">里程碑</option>
|
||||
</select>
|
||||
<select placeholder=" 状态" class="fl my_issues_filter" disabled="disabled" style="padding:0px; margin-right:10px;width:35px;">
|
||||
<option value="0" selected="selected">状态</option>
|
||||
</select>
|
||||
<select placeholder=" 完成度" class="fl my_issues_filter" disabled="disabled" style="padding:0px; margin:0px">
|
||||
<option value="0" selected="selected">完成度</option>
|
||||
</select>
|
||||
<select placeholder=" 排序" class="fl my_issues_filter" disabled="disabled" style="width:50px;visibility:hidden;margin-left: 0px;margin-right: 0px;">
|
||||
<option value="0" selected="selected">排序</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<% end %>
|
||||
<% if @issues.empty? %>
|
||||
<p class="nodata mt10"><%= l(:label_no_data) %></p>
|
||||
<% else %>
|
||||
<div id="issue_list">
|
||||
<%= render :partial => 'users/user_manage_issue_list', :locals => {:issues => @issues, :issue_pages => @issue_pages, :issue_count => @issue_count, :subject => @subject } %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div><!--issues_filter end-->
|
||||
<div id="issues_list_content_1">
|
||||
</div><!--issues_list_content_1 end-->
|
||||
<div id="issues_list_content_2" class="undis">
|
||||
</div><!--issues_list_content_2 end-->
|
||||
<div id="issues_list_content_3" class="undis">
|
||||
</div><!--issues_list_content_3 end-->
|
||||
<!--issues_con_list end-->
|
||||
|
||||
|
||||
<!--缺陷列表结束-->
|
||||
|
||||
<!--缺陷列表结束-->
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
$("#issue_filter_all").html("<%= escape_javascript(render :partial => 'users/my_issue_filter_all') %>");
|
||||
$("#issue_list").html("<%= escape_javascript(render :partial => 'users/user_manage_issue_list',:locals => {:issues => @issues, :issue_pages=> @issue_pages, :issue_count => @issue_count })%>");
|
||||
$("#issue_list_pagination").html('<%= pagination_links_full @issue_pages, @issue_count, :issues => @issues, :per_page_links => false, :remote => @is_remote, :flag => true, :is_new => true %>');
|
|
@ -14,16 +14,18 @@
|
|||
<div class="cl"></div>
|
||||
|
||||
<div id="messageContent">
|
||||
<div class="resources"><%= link_to image_tag(url_to_avatar(User.current),:class=>"fl mr10", :width => "50", :height => "50"), :alt => "用户头像" %>
|
||||
<div class="fl" style="width:658px;">
|
||||
<%= form_for('new_form',:url => leave_user_message_path(@user.id), :html =>{:id => "user_feedback_new"}, :method => "post") do |f|%>
|
||||
<%=render :partial => "jour_form", :locals => {:f => f} %>
|
||||
<input id="private_flag" name="private" type="hidden" value="0"/>
|
||||
<a href="javascript:void(0);" class="blue_n_btn fr mt5" id="submit_feedback_user" >留言</a>
|
||||
<a href="javascript:void(0);" class="greyBtn2 postReplySubmit mt5 mr15" id="private_submit_feedback_user">私信</a>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<% unless is_current_user %>
|
||||
<div class="resources"><%= link_to image_tag(url_to_avatar(User.current),:class=>"fl mr10", :width => "50", :height => "50"), :alt => "用户头像" %>
|
||||
<div class="fl" style="width:658px;">
|
||||
<%= form_for('new_form',:url => leave_user_message_path(@user.id), :html =>{:id => "user_feedback_new"}, :method => "post") do |f|%>
|
||||
<%= render :partial => "jour_form", :locals => {:f => f} %>
|
||||
<input id="private_flag" name="private" type="hidden" value="0"/>
|
||||
<a href="javascript:void(0);" class="blue_n_btn fr mt5" id="submit_feedback_user" >留言</a>
|
||||
<a href="javascript:void(0);" class="greyBtn2 postReplySubmit mt5 mr15" id="private_submit_feedback_user">私信</a>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<%=render :partial => "users/user_jours_list", :locals => {:jours =>@jour, :page => 0, :type => @type, :count => @jour_count} %>
|
||||
<div class="cl"></div>
|
||||
</div><!--message_box end-->
|
||||
|
|
|
@ -0,0 +1,42 @@
|
|||
<script type="text/javascript" language="javascript">
|
||||
function HoverLi(url){
|
||||
window.location.href = url;
|
||||
}
|
||||
</script>
|
||||
<div class="mt10 mb10">
|
||||
<div class="banner-big f16 fontGrey3" style="margin: 0 auto; position: relative;">
|
||||
我收到的的作业
|
||||
<div class="hw_more_box" >
|
||||
<ul>
|
||||
<li class="hw_more_icons fr">
|
||||
<ul class="hw_more_txt">
|
||||
<li> <a href="<%= manage_or_receive_homeworks_user_path(@user, :type => @type, :property => 0) %>" id="homework_type_all" class="hw_more_li" data-method="get" data-remote="true">全部作业</a> </li>
|
||||
<li> <a href="<%= manage_or_receive_homeworks_user_path(@user, :type => @type, :property => 1) %>" id="homework_type_nor" class="hw_more_li" data-method="get" data-remote="true">普通作业</a> </li>
|
||||
<li> <a href="<%= manage_or_receive_homeworks_user_path(@user, :type => @type, :property => 2) %>" id="homework_type_pro" class="hw_more_li" data-method="get" data-remote="true">编程作业</a> </li>
|
||||
<li> <a href="<%= manage_or_receive_homeworks_user_path(@user, :type => @type, :property => 3) %>" id="homework_type_gro" class="hw_more_li" data-method="get" data-remote="true">分组作业</a> </li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hw_content mb10" >
|
||||
<div id="hw_tab_con_2">
|
||||
<div class="sy_category" id="homework_search_input">
|
||||
<%= render :partial=>'my_homeworks_search', :locals => {:type => @type,:property => nil, :order => @order, :search => ''} %>
|
||||
</div>
|
||||
|
||||
<div class="sy_classbox" style="min-height:800px;" id="my_homework_list">
|
||||
<%= render :partial => "receive_homework_list", :locals => {:homeworks => @homeworks} %>
|
||||
</div>
|
||||
|
||||
<div style="text-align:center;">
|
||||
<div class="pages" style="width:auto; display:inline-block;">
|
||||
<ul id="homework_list_ref_pages">
|
||||
<%= pagination_links_full @hw_pages, @hw_count, :per_page_links => false, :remote => @is_remote, :flag => true, :is_new => true%>
|
||||
</ul>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1,7 @@
|
|||
$("#my_homework_list").html('<%= escape_javascript(render :partial => "receive_homework_list", :locals => {:homeworks => @homeworks})%>');
|
||||
$("#homework_list_ref_pages").html('<%= pagination_links_full @hw_pages, @hw_count, :per_page_links => false, :remote => @is_remote, :flag => true, :is_new => true %>');
|
||||
$("#my_homework_sort").html('<%= escape_javascript( render :partial => 'users/my_homework_sort', :locals => {:type => @type,:property => @property,:order => @order,:search => @search})%>');
|
||||
$("#homework_type_all").attr('href','<%= manage_or_receive_homeworks_user_path(@user, :type => @type, :property => 0) %>');
|
||||
$("#homework_type_nor").attr('href','<%= manage_or_receive_homeworks_user_path(@user, :type => @type, :property => 1) %>');
|
||||
$("#homework_type_pro").attr('href','<%= manage_or_receive_homeworks_user_path(@user, :type => @type, :property => 2) %>');
|
||||
$("#homework_type_gro").attr('href','<%= manage_or_receive_homeworks_user_path(@user, :type => @type, :property => 3) %>');
|
|
@ -0,0 +1,313 @@
|
|||
<%= content_for(:header_tags) do %>
|
||||
<%= import_ke(enable_at: true,init_activity: true) %>
|
||||
<% end %>
|
||||
|
||||
<script xmlns="http://www.w3.org/1999/html">
|
||||
function add_style(){
|
||||
// $("#proeject_id").val("来源");
|
||||
if($("select[id='tracker_id']").val() != 0){
|
||||
$("#tracker_id").addClass('issues_filter_active');
|
||||
}
|
||||
if($("select[id='author_id']").val() != 0){
|
||||
$("#author_id").addClass('issues_filter_active');
|
||||
}
|
||||
if($("select[id='assigned_to_id']").val() !=0){
|
||||
$("#assigned_to_id").addClass('issues_filter_active');
|
||||
}
|
||||
if($("select[id='priority_id']").val() !=0){
|
||||
$("#priority_id").addClass('issues_filter_active');
|
||||
}
|
||||
if($("select[id='fixed_version_id']").val() !=0){
|
||||
$("#fixed_version_id").addClass('issues_filter_active');
|
||||
}
|
||||
if($("select[id='status_id']").val() != 0 ){
|
||||
$("#status_id").addClass('issues_filter_active');
|
||||
}
|
||||
if($("select[id='done_ratio']").val() != -1){
|
||||
$("#done_ratio").addClass('issues_filter_active');
|
||||
}
|
||||
if($("select[id='test']").val() != 0 ){
|
||||
$("#test").addClass('issues_filter_active');
|
||||
}
|
||||
if($("select[id='tracker_id']").val() == 0){
|
||||
$("#tracker_id").removeClass('issues_filter_active');
|
||||
}
|
||||
if($("select[id='author_id']").val() == 0){
|
||||
$("#author_id").removeClass('issues_filter_active');
|
||||
}
|
||||
if($("select[id='assigned_to_id']").val() ==0){
|
||||
$("#assigned_to_id").removeClass('issues_filter_active');
|
||||
}
|
||||
if($("select[id='priority_id']").val() ==0){
|
||||
$("#priority_id").removeClass('issues_filter_active');
|
||||
}
|
||||
if($("select[id='fixed_version_id']").val() ==0){
|
||||
$("#fixed_version_id").removeClass('issues_filter_active');
|
||||
}
|
||||
if($("select[id='status_id']").val() == 0 ){
|
||||
$("#status_id").removeClass('issues_filter_active');
|
||||
}
|
||||
if($("select[id='done_ratio']").val() == -1){
|
||||
$("#done_ratio").removeClass('issues_filter_active');
|
||||
}
|
||||
if($("select[id='test']").val() == 0 ){
|
||||
$("#test").removeClass('issues_filter_active');
|
||||
}
|
||||
};
|
||||
//issues列表
|
||||
function g(o){
|
||||
return document.getElementById(o);
|
||||
}
|
||||
function HoverLi(n){
|
||||
//如果有N个标签,就将i<=N;
|
||||
for(var i=1;i<=3;i++){
|
||||
g('issues_list_nav_'+i).className='issues_nav_nomal';
|
||||
g('issues_list_content_'+i).className='undis';
|
||||
}
|
||||
g('issues_list_content_'+n).className='dis';
|
||||
g('issues_list_nav_'+n).className='issues_nav_hover';
|
||||
}
|
||||
$(function(){
|
||||
$("#RSide").removeAttr("id");
|
||||
$("#Container").css("width","1000px");
|
||||
$("input[nhname='date_show']").change(function(){
|
||||
if($(this).val()=='创建日期起始' || $(this).val()=='创建日期结束')return;
|
||||
$("input[nhname='date_val']",$(this).parent('div')).val($(this).val());
|
||||
remote_function();
|
||||
});
|
||||
|
||||
});
|
||||
function remote_function() {
|
||||
$("#issue_query_form").submit();
|
||||
}
|
||||
|
||||
function remote_function_export(user) {
|
||||
var project_id = $("#project_id").attr("value");
|
||||
var tracker_id = $("#tracker_id").attr("value");
|
||||
var subject = $("#v_subject").attr("value");
|
||||
var assigned_to_id = $("#assigned_to_id").attr("value");
|
||||
var fixed_version_id = $("#fixed_version_id").attr("value");
|
||||
var status_id = $("#status_id").attr("value");
|
||||
var done_ratio = $("#done_ratio").attr("value");
|
||||
var test = $("#test").attr("value");
|
||||
var author_id = $("#author_id").attr("value");
|
||||
var priority_id = $("#priority_id").attr("value");
|
||||
var issue_create_date_start = $("#issue_date_start_issue_export").attr("value");
|
||||
var issue_create_date_end = $("#issue_date_end_issue_export").attr("value");
|
||||
$("#sendexcel").attr("href","/users/"+user+"/user_receive_issues.xls?project_id="+project_id+"&tracker_id="+tracker_id+"&assigned_to_id="+assigned_to_id+"&fixed_version_id="+fixed_version_id+"&status_id="+status_id+"&done_ratio="+done_ratio+"&test="+test+"&author_id="+author_id+"&subject="+subject+"&issue_create_date_start="+issue_create_date_start+"&issue_create_date_end="+issue_create_date_end+"&priority_id="+priority_id);
|
||||
///projects/1811/issues.xls?export=true&set_filter=1
|
||||
}
|
||||
function EnterPress(e){
|
||||
var e = e || window.event;
|
||||
if(e.keyCode == 13){
|
||||
remote_function();
|
||||
}
|
||||
}
|
||||
|
||||
// 点击的时候让过滤条件选中assign_to
|
||||
function switch_assign_to(assign) {
|
||||
var assign = "option[value =" + assign + "]";
|
||||
$("#issues_type_2").click(function(){
|
||||
|
||||
});
|
||||
$("select[id='assigned_to_id']").find(assign).attr("selected", "selected");
|
||||
$("select[id='author_id']").val('');
|
||||
$("select[id='priority_id']").val('');
|
||||
$("select[id='project_id']").val('');
|
||||
$("select[id='tracker_id']").val('');
|
||||
$("select[id='fixed_version_id']").val('');
|
||||
$("select[id='status_id']").val('');
|
||||
$("select[id='done_ratio']").val('');
|
||||
$("select[id='test']").val('');
|
||||
$("#tracker_id").removeClass('issues_filter_active');
|
||||
$("#author_id").removeClass('issues_filter_active');
|
||||
$("#assigned_to_id").addClass('issues_filter_active');
|
||||
$("#priority_id").removeClass('issues_filter_active');
|
||||
$("#fixed_version_id").removeClass('issues_filter_active');
|
||||
$("#status_id").removeClass('issues_filter_active');
|
||||
$("#done_ratio").removeClass('issues_filter_active');
|
||||
$("#test").removeClass('issues_filter_active');
|
||||
remote_function();
|
||||
}
|
||||
|
||||
// 点击的时候让过滤条件选中user_id
|
||||
function createByMe(user_id) {
|
||||
var user = "option[value =" + user_id + "]";
|
||||
$("#createByMe").click(function(){
|
||||
|
||||
});
|
||||
$("select[id='author_id']").find(user).attr("selected", "selected");
|
||||
$("select[id='assigned_to_id']").val('');
|
||||
$("select[id='priority_id']").val('');
|
||||
$("select[id='project_id']").val('');
|
||||
$("select[id='tracker_id']").val('');
|
||||
$("select[id='fixed_version_id']").val('');
|
||||
$("select[id='status_id']").val('');
|
||||
$("select[id='done_ratio']").val('');
|
||||
$("select[id='test']").val('');
|
||||
$("#tracker_id").removeClass('issues_filter_active');
|
||||
$("#author_id").addClass('issues_filter_active');
|
||||
$("#assigned_to_id").removeClass('issues_filter_active');
|
||||
$("#priority_id").removeClass('issues_filter_active');
|
||||
$("#fixed_version_id").removeClass('issues_filter_active');
|
||||
$("#status_id").removeClass('issues_filter_active');
|
||||
$("#done_ratio").removeClass('issues_filter_active');
|
||||
$("#test").removeClass('issues_filter_active');
|
||||
remote_function();
|
||||
}
|
||||
// 清楚表单所有选项
|
||||
function all_reset_form() {
|
||||
$("#issue_query_form")[0].reset();
|
||||
$("select[id='author_id']").val('');
|
||||
$("select[id='assigned_to_id']").val('');
|
||||
$("input[nhname='date_val']").val('');
|
||||
$("#tracker_id").removeClass('issues_filter_active');
|
||||
$("#author_id").removeClass('issues_filter_active');
|
||||
$("#assigned_to_id").removeClass('issues_filter_active');
|
||||
$("#priority_id").removeClass('issues_filter_active');
|
||||
$("#fixed_version_id").removeClass('issues_filter_active');
|
||||
$("#status_id").removeClass('issues_filter_active');
|
||||
$("#done_ratio").removeClass('issues_filter_active');
|
||||
$("#test").removeClass('issues_filter_active');
|
||||
$("#reorder_turnover_time").removeClass("sortArrowActiveU");
|
||||
$("#reorder_turnover_time").addClass("sortArrowActiveD");
|
||||
$("#reorder_release_time").removeClass("sortArrowActiveD");
|
||||
$("#reorder_release_time").removeClass("sortArrowActiveU");
|
||||
remote_function();
|
||||
}
|
||||
function add_class(id){
|
||||
if($("#"+id).hasClass("sortArrowActiveD")){
|
||||
$("#"+id).removeClass("sortArrowActiveD");
|
||||
$("#"+id).addClass("sortArrowActiveU");
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
url: '<%= user_receive_issues_user_path(@user) %>' + '.js?' + id + '=asc&page='+<%= @issue_pages.page %>,
|
||||
data: $("#issue_query_form").serialize()
|
||||
});
|
||||
}else if($("#"+id).hasClass("sortArrowActiveU")){
|
||||
$("#"+id).removeClass("sortArrowActiveU");
|
||||
$("#"+id).addClass("sortArrowActiveD");
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
url: '<%= user_receive_issues_user_path(@user) %>' + '.js?' + id + '=desc&page='+<%= @issue_pages.page %>,
|
||||
data: $("#issue_query_form").serialize()
|
||||
});
|
||||
}else{
|
||||
$("#"+id).addClass("sortArrowActiveD");
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
url: '<%= user_receive_issues_user_path(@user) %>' + '.js?' + id + '=desc&page='+<%= @issue_pages.page%>,
|
||||
data: $("#issue_query_form").serialize()
|
||||
});
|
||||
}
|
||||
}
|
||||
$(function() {
|
||||
$("#release_time").click(function(){
|
||||
$("#reorder_turnover_time").removeClass("sortArrowActiveU");
|
||||
$("#reorder_turnover_time").removeClass("sortArrowActiveD");
|
||||
add_class("reorder_release_time");
|
||||
});
|
||||
$("#turnover_time").click(function () {
|
||||
$("#reorder_release_time").removeClass("sortArrowActiveD");
|
||||
$("#reorder_release_time").removeClass("sortArrowActiveU");
|
||||
add_class("reorder_turnover_time");
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<!--缺陷列表开始-->
|
||||
<div id="myissues_con" class="myissues_con mb10">
|
||||
<div class="myissues_head mb5">
|
||||
<h2 class="ml15">我收到的Issue</h2>
|
||||
</div>
|
||||
<div class="clear mb5">
|
||||
<div class="issues_statistics fl">
|
||||
<ul>
|
||||
<li>所有<a href="javascript:void(0);" class="issues_greycirbg_btn "><%= @issues_filter.count %></a></li>
|
||||
<li>开启<a href="javascript:void(0);" class="issues_greycirbg_btn "><%= @issue_open_count %></a></li>
|
||||
<li>关闭<a href="javascript:void(0);" class="issues_greycirbg_btn "><%= @issue_close_count %></a></li>
|
||||
</ul>
|
||||
</div><!--issues_statistics end-->
|
||||
|
||||
</div>
|
||||
<%= form_tag( user_receive_issues_user_path(@user), :remote => 'xls', :method => "post", :id => "issue_query_form", :class => 'query_form') do %>
|
||||
<div class="clear mb10">
|
||||
<div class="hw_search_box fl ">
|
||||
<input class="hw_search-input" placeholder="输入Issue名称进行搜索" type="text" id="v_subject" name="subject" onkeypress="EnterPress(event)" onkeydown="EnterPress()">
|
||||
<a href="javascript:void(0);" class="hw_btn_search" onclick="remote_function();" ></a>
|
||||
</div>
|
||||
<a href="javascript:void(0);" class="sy_btn_grey fl ml5" onclick="all_reset_form();">清除</a>
|
||||
<div class="fr">
|
||||
<a href="javascript:void(0);" class="linkGrey2 fl">排序: </a>
|
||||
<div id="release_time" class="w65 fl"><a href="javascript:void(0);" class="linkGrey2 fl">发布时间</a><a href="javascript:void(0);" id="reorder_release_time" class=""></a></div>
|
||||
<div id="turnover_time" class="w65 fl"><a href="javascript:void(0);" class="linkGrey2 fl">更新时间</a><a href="javascript:void(0);" id="reorder_turnover_time" class="sortArrowActiveD"></a></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="issues_con_list" style="position: relative;">
|
||||
<ul id="issues_list_nav" >
|
||||
<li id="issues_list_nav_1" class="issues_nav_hover" onclick="HoverLi(1);all_reset_form();">
|
||||
<a href="javascript:void(0);" id="issues_type_1" onclick="all_reset_form();" >搜索结果</a>
|
||||
<span id="issue_filter_all"><%= render :partial => "users/my_issue_filter_all" %></span>
|
||||
</li>
|
||||
<div class="cl"></div>
|
||||
</ul>
|
||||
<div class="issues_filter">
|
||||
<div class="issues_form_filter mt5 mr5">
|
||||
<%= select( :project, :project_id, options_for_issue_project_list(@issues_filter),
|
||||
{ :include_blank => false,:selected => @project_id ? @project_id : 0 },
|
||||
{ :onchange => "remote_function();add_style();", :id => "project_id", :name => "project_id", :class => "fl", :style=>"width: 80px; margin-right:20px;"}
|
||||
)%>
|
||||
<select placeholder=" 发布人" class="fl my_issues_filter" disabled="disabled" style="padding:0px;width: 50px;margin-right: 15px;">
|
||||
<option value="0" selected="selected">发布人</option>
|
||||
</select>
|
||||
<%= select( :issue, :user_id, [[@user.show_name, @user.id]].unshift(["发布人",0]),
|
||||
{:include_blank => false,:selected => @author_id ? @author_id : 0},
|
||||
{:onchange => "remote_function();add_style();",:id => "author_id", :name => "author_id", :class => "fl", :style => "visibility:hidden;width: 0px;margin:0px;padding:0px;"}
|
||||
)
|
||||
%>
|
||||
<select placeholder=" 类型" class="fl my_issues_filter" disabled="disabled" style="padding:0px; margin:0px;width:35px; margin-right:10px;">
|
||||
<option value="0" selected="selected">类型</option>
|
||||
</select>
|
||||
<select placeholder=" 优先度" class="fl my_issues_filter" disabled="disabled" style="padding:0px; margin:0px">
|
||||
<option value="0" selected="selected">优先度</option>
|
||||
</select>
|
||||
<select placeholder=" 里程碑" class="fl my_issues_filter" disabled="disabled" style="padding:0px;margin-left: 20px; margin-right: 10px">
|
||||
<option value="0" selected="selected">里程碑</option>
|
||||
</select>
|
||||
<select placeholder=" 状态" class="fl my_issues_filter" disabled="disabled" style="padding:0px; margin-right:10px;width:35px;">
|
||||
<option value="0" selected="selected">状态</option>
|
||||
</select>
|
||||
<select placeholder=" 完成度" class="fl my_issues_filter" disabled="disabled" style="padding:0px; margin:0px">
|
||||
<option value="0" selected="selected">完成度</option>
|
||||
</select>
|
||||
<select placeholder=" 排序" class="fl my_issues_filter" disabled="disabled" style="width:50px;visibility:hidden;margin-left: 0px;margin-right: 0px;">
|
||||
<option value="0" selected="selected">排序</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<% end %>
|
||||
<% if @issues.empty? %>
|
||||
<p class="nodata mt10"><%= l(:label_no_data) %></p>
|
||||
<% else %>
|
||||
<div id="issue_list">
|
||||
<%= render :partial => 'users/user_receive_issues_list', :locals => {:issues => @issues, :issue_pages => @issue_pages, :issue_count => @issue_count, :subject => @subject } %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div><!--issues_filter end-->
|
||||
<div id="issues_list_content_1">
|
||||
</div><!--issues_list_content_1 end-->
|
||||
<div id="issues_list_content_2" class="undis">
|
||||
</div><!--issues_list_content_2 end-->
|
||||
<div id="issues_list_content_3" class="undis">
|
||||
</div><!--issues_list_content_3 end-->
|
||||
<!--issues_con_list end-->
|
||||
|
||||
|
||||
<!--缺陷列表结束-->
|
||||
|
||||
<!--缺陷列表结束-->
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
$("#issue_filter_all").html("<%= escape_javascript(render :partial => 'users/my_issue_filter_all') %>");
|
||||
$("#issue_list").html("<%= escape_javascript(render :partial => 'users/user_receive_issues_list',:locals => {:issues => @issues, :issue_pages=> @issue_pages, :issue_count => @issue_count })%>");
|
||||
$("#issue_list_pagination").html('<%= pagination_links_full @issue_pages, @issue_count, :issues => @issues, :per_page_links => false, :remote => @is_remote, :flag => true, :is_new => true %>');
|
|
@ -291,7 +291,7 @@ zh:
|
|||
|
||||
label_tags_project_name: "项目名称:"
|
||||
label_projects_new_name: "项目名称"
|
||||
label_tags_project_description: "项目描述"
|
||||
label_tags_project_description: "项目简介"
|
||||
|
||||
label_organization_name: "组织名称"
|
||||
label_organization_description: "组织描述"
|
||||
|
|
|
@ -737,6 +737,10 @@ RedmineApp::Application.routes.draw do
|
|||
get 'edit_brief_introduction'
|
||||
get "user_resource"
|
||||
match "user_issues", :to => 'users#user_issues', :via => [:get, :post], :as => "user_issues"
|
||||
match "user_manage_issues", :to => 'users#user_manage_issues', :via => [:get, :post], :as => "user_manage_issues"
|
||||
match "user_receive_issues", :to => 'users#user_receive_issues', :via => [:get, :post], :as => "user_receive_issues"
|
||||
match "user_manage_homeworks", :to => 'users#user_manage_homeworks', :via => [:get, :post], :as => "user_manage_homeworks"
|
||||
match "user_receive_homeworks", :to =>'users#user_receive_homeworks', :via => [:get, :post], :as => "user_receive_homeworks"
|
||||
get "import_resources"
|
||||
get "import_resources_search"
|
||||
post "import_into_container"
|
||||
|
|
|
@ -248,6 +248,7 @@ h4{ font-size:14px;}/*color:#3b3b3b;*/
|
|||
.w56 {width:56px;}
|
||||
.w60{ width:60px;}
|
||||
.w61{ width:61px;}
|
||||
.w65{ width:65px;}
|
||||
.w70{ width:70px;}
|
||||
.w80{ width:80px;}
|
||||
.w90{ width:90px;}
|
||||
|
@ -878,3 +879,6 @@ input.btn-blue{background: #3b94d6; color: #fff; cursor:pointer;}
|
|||
input:hover.btn-blue{background: #2788d0; color: #fff;}
|
||||
input.btn-grey{background: #d9d9d9; color: #656565; cursor:default;}
|
||||
input.btn-grey:hover{background: #717171; color: #fff; cursor:default;}
|
||||
.icons-user-homework{background:url(/images/user/home-user-left.png) 0px -150px no-repeat; }
|
||||
.homework-user-leftnav-li{ height: 25px; line-height: 40px; padding-left: 25px; color: #666;background:url(/images/user/home-user-left.png) 0px -149px no-repeat; font-size: 14px; position: relative; }
|
||||
.homework-user-leftnav-li:hover{ height: 25px; line-height: 40px; padding-left: 25px; background:#f4f4f4; background:url(/images/user/home-user-left.png) 0px -186px no-repeat; font-size: 14px; position: relative; }
|
||||
|
|
Loading…
Reference in New Issue