memcached_alan^2
sw 10 years ago
commit cba473269d

@ -75,7 +75,11 @@ class IssuesController < ApplicationController
else else
@limit = 10#per_page_option @limit = 10#per_page_option
end end
@assign_to_id = params[:assigned_to_id]
@author_id = params[:author_id]
@priority_id = params[:priority_id]
@status_id = params[:status_id]
@subject = params[:subject]
@issue_count = @query.issue_count @issue_count = @query.issue_count
@issue_pages = Paginator.new @issue_count, @limit, params['page'] @issue_pages = Paginator.new @issue_count, @limit, params['page']
@offset ||= @issue_pages.offset @offset ||= @issue_pages.offset

@ -38,12 +38,13 @@ class TrackersController < ApplicationController
@tracker ||= Tracker.new(params[:tracker]) @tracker ||= Tracker.new(params[:tracker])
@trackers = Tracker.sorted.all @trackers = Tracker.sorted.all
@projects = Project.where("project_type = #{Project::ProjectType_project}").all @projects = Project.where("project_type = #{Project::ProjectType_project}").all
@courses = Course.all # 去掉原因,这块代码已经没有用到
@course_activity_count=Hash.new # @courses = Course.all
@courses.each do |course| # @course_activity_count=Hash.new
@course_activity_count[course.id]=0 # @courses.each do |course|
end # @course_activity_count[course.id]=0
@course_activity_count=get_course_activity @courses,@course_activity_count # end
# @course_activity_count=get_course_activity @courses,@course_activity_count
end end
def create def create

@ -34,31 +34,31 @@
<%#= form_tag({:controller => 'issues', :action => 'index', :project_id => @project}, :method => :get,:id=>"issue_query_form", :class => 'query_form') do %> <%#= form_tag({:controller => 'issues', :action => 'index', :project_id => @project}, :method => :get,:id=>"issue_query_form", :class => 'query_form') do %>
<%= hidden_field_tag 'set_filter', '1' %> <%= hidden_field_tag 'set_filter', '1' %>
<div class="problem_search" > <div class="problem_search" >
<input class="problem_search_input fl" id="v_subject" type="text" name="v[subject]" value="" onkeypress="EnterPress(event)" onkeydown="EnterPress()"> <input class="problem_search_input fl" id="v_subject" type="text" name="v[subject]" value="<%= @subject ? @subject : ""%>" onkeypress="EnterPress(event)" onkeydown="EnterPress()">
<a href="javascript:void(0)" class="problem_search_btn fl" onclick="remote_function();" >搜索</a> <a href="javascript:void(0)" class="problem_search_btn fl" onclick="remote_function();" >搜索</a>
</div><!--problem_search end--> </div><!--problem_search end-->
<div id="filter_form" class="fr" > <div id="filter_form" class="fr" >
<%= select( :issue,:user_id, @project.members.order("lower(users.login)").map{|c| [c.name, c.user_id]}.unshift(["指派给",0]), <%= select( :issue,:user_id, @project.members.order("lower(users.login)").map{|c| [c.name, c.user_id]}.unshift(["指派给",0]),
{ :include_blank => false,:selected=>0 { :include_blank => false,:selected=>@assign_to_id ? @assign_to_id : 0
}, },
{:onchange=>"remote_function();",:id=>"assigned_to_id",:name=>"v[assigned_to_id]",:class=>"w90"} {:onchange=>"remote_function();",:id=>"assigned_to_id",:name=>"v[assigned_to_id]",:class=>"w90"}
) )
%> %>
<%= select( :issue,:prior, [["低",1],["正常",2],["高",3],["紧急",4],["立刻",5]].unshift(["优先级",0]), <%= select( :issue,:prior, [["低",1],["正常",2],["高",3],["紧急",4],["立刻",5]].unshift(["优先级",0]),
{ :include_blank => false,:selected=>0 { :include_blank => false,:selected=>@priority_id ? @priority_id : 0
}, },
{:onchange=>"remote_function();",:id=>"priority_id",:name=>"v[priority_id]",:class=>"w90"} {:onchange=>"remote_function();",:id=>"priority_id",:name=>"v[priority_id]",:class=>"w90"}
) )
%> %>
<%= select( :issue,:status, [["新增",1],["正在解决",2],["已解决",3],["反馈",4],["关闭",5],["拒绝",6]].unshift(["状态",0]), <%= select( :issue,:status, [["新增",1],["正在解决",2],["已解决",3],["反馈",4],["关闭",5],["拒绝",6]].unshift(["状态",0]),
{ :include_blank => false,:selected=>0 { :include_blank => false,:selected=>@status_id ? @status_id : 0
}, },
{:onchange=>"remote_function();",:id=>"status_id",:name=>"v[status_id]",:class=>"w90"} {:onchange=>"remote_function();",:id=>"status_id",:name=>"v[status_id]",:class=>"w90"}
) )
%> %>
<%= select( :issue,:user_id, @project.members.order("lower(users.login)").map{|c| [c.name, c.user_id]}.unshift(["作者",0]), <%= select( :issue,:user_id, @project.members.order("lower(users.login)").map{|c| [c.name, c.user_id]}.unshift(["作者",0]),
{ :include_blank => false,:selected=>0 { :include_blank => false,:selected=>@author_id ? @author_id : 0
}, },
{:onchange=>"remote_function();",:id=>"author_id",:name=>"v[author_id]",:class=>"w90"} {:onchange=>"remote_function();",:id=>"author_id",:name=>"v[author_id]",:class=>"w90"}
) )

@ -30,7 +30,7 @@
</p> </p>
</div> </div>
</div> </div>
<div class="repos_more"><a id="showgithelp" value="hide_help" onclick ="showhelpAndScrollTo('repos_git_more'); " class="c_dblue lh23">收起Git操作指南</a></div> <div class="repos_more"><a id="showgithelp" value="show_help" onclick ="showhelpAndScrollTo('repos_git_more'); " class="c_dblue lh23">展开Git操作指南</a></div>
<div id="repos_git_more"> <div id="repos_git_more">
<br> <br>
<div class=" c_dark f14"> <div class=" c_dark f14">

@ -351,7 +351,7 @@ zh:
# 意见反馈 # 意见反馈
# #
label_feedback: 意见反馈 label_feedback: 意见反馈
label_feedback_tips: "有什么想说的,尽管来咆哮吧~~" label_feedback_tips: "欢迎反馈网站问题,课程中遇到的问题请反馈给相关老师!"
label_technical_support: "技术支持:" label_technical_support: "技术支持:"
label_feedback_success: "您的意见已经反馈到公共贴吧的新手讨论吧,我们会第一时间解决您的问题,谢谢支持!" label_feedback_success: "您的意见已经反馈到公共贴吧的新手讨论吧,我们会第一时间解决您的问题,谢谢支持!"
label_feedback_value: "该帖来自用户反馈:)" label_feedback_value: "该帖来自用户反馈:)"

@ -1,4 +1,4 @@
class AddIndexToHomeworkattachCourseId < ActiveRecord::Migration class AddIndexToHomeworkforcourseCourseId < ActiveRecord::Migration
def change def change
add_index(:homework_for_courses,:course_id) add_index(:homework_for_courses,:course_id)
end end

@ -71,13 +71,35 @@ function showhelpAndScrollTo(id) {
{ {
cookiesave("repositories_visiable", true,'','',''); cookiesave("repositories_visiable", true,'','','');
} }
var information = $("#showgithelp");
var val = information.attr("value");
if(val=="show_help")
{
$("#showgithelp").text("收起Git操作指南");
information.attr("value", "hide_help");
}
else
{
$("#showgithelp").text("展开Git操作指南");
information.attr("value", "show_help");
}
} }
$(function(){ $(function(){
var information = $("#showgithelp");
var val = information.attr("value");
if(cookieget("repositories_visiable") == "true") if(cookieget("repositories_visiable") == "true")
{ {
$('#repos_git_more').hide(); $('#repos_git_more').hide();
} }
else
{
$('#repos_git_more').show();
$("#showgithelp").text("收起Git操作指南");
information.attr("value", "hide_help");
}
}); });

@ -76,7 +76,7 @@ a.problem_name{ color:#ff5722; }
a:hover.problem_name{ color:#d33503;} a:hover.problem_name{ color:#d33503;}
a.problem_tit{ color:#0781b4; max-width:430px; font-weight:bold; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;} a.problem_tit{ color:#0781b4; max-width:430px; font-weight:bold; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;}
a.problem_tit02{ color:#0781b4; font-weight:bold;max-width:400px;} a.problem_tit02{ color:#0781b4; font-weight:bold;max-width:400px;}
.problem_tit_div{ color:#0781b4; font-weight:bold;width:400px; } .problem_tit_div{ color:#0781b4; font-weight:bold;max-width:400px; }
a.problem_tit_a{ color:#0781b4; } a.problem_tit_a{ color:#0781b4; }
.problem_tit_a:hover{ color:#09658c; } .problem_tit_a:hover{ color:#09658c; }
a:hover.problem_tit,a:hover.problem_tit02{ color:#09658c; } a:hover.problem_tit,a:hover.problem_tit02{ color:#09658c; }
@ -180,6 +180,7 @@ a:hover.link_file{ background:url(../images/pic_file.png) 0 -25px no-repeat; col
/* 版本库展示Git操作文档 */ /* 版本库展示Git操作文档 */
.repos_more{height:23px; width:100%; border:1px solid #CCC; background:#F6F6F6; text-align:center; font-size:12px; padding-top:2px;} .repos_more{height:23px; width:100%; border:1px solid #CCC; background:#F6F6F6; text-align:center; font-size:12px; padding-top:2px;}
.lh23{line-height: 23px;} .lh23{line-height: 23px;}
.repos_git_more{display: none;}
/* 弹框 新样式还没设计出来,暂时用的课程那边的样式 */ /* 弹框 新样式还没设计出来,暂时用的课程那边的样式 */
.alert .close{width:26px;height:26px;overflow:hidden;position:absolute;top:-10px;right:-502px;background:url(images/close.png) no-repeat;cursor:pointer;} .alert .close{width:26px;height:26px;overflow:hidden;position:absolute;top:-10px;right:-502px;background:url(images/close.png) no-repeat;cursor:pointer;}

Loading…
Cancel
Save