diff --git a/app/controllers/trackers_controller.rb b/app/controllers/trackers_controller.rb
index 01bc47a2f..64ad9c83a 100644
--- a/app/controllers/trackers_controller.rb
+++ b/app/controllers/trackers_controller.rb
@@ -38,12 +38,13 @@ class TrackersController < ApplicationController
@tracker ||= Tracker.new(params[:tracker])
@trackers = Tracker.sorted.all
@projects = Project.where("project_type = #{Project::ProjectType_project}").all
- @courses = Course.all
- @course_activity_count=Hash.new
- @courses.each do |course|
- @course_activity_count[course.id]=0
- end
- @course_activity_count=get_course_activity @courses,@course_activity_count
+ # 去掉原因,这块代码已经没有用到
+ # @courses = Course.all
+ # @course_activity_count=Hash.new
+ # @courses.each do |course|
+ # @course_activity_count[course.id]=0
+ # end
+ # @course_activity_count=get_course_activity @courses,@course_activity_count
end
def create
diff --git a/app/views/courses/_course.html.erb b/app/views/courses/_course.html.erb
index 0e1b5caa6..755dd63b0 100644
--- a/app/views/courses/_course.html.erb
+++ b/app/views/courses/_course.html.erb
@@ -58,14 +58,14 @@
<%= content_tag('span', "#{garble @course.members.count}", :class => "info") %>
<%= content_tag('span', l(:label_x_member, :count => memberCount(@course))) %>
-
+
<%= content_tag('span', link_to("#{@course_activity_count[@course.id]}", course_path(@course)), :class => "info") %>
<%= content_tag('span', l(:label_x_activity, :count => @course_activity_count[@course.id])) %>
-
+
-
+
diff --git a/config/locales/projects/zh.yml b/config/locales/projects/zh.yml
index d89fc33ee..c1850b7e4 100644
--- a/config/locales/projects/zh.yml
+++ b/config/locales/projects/zh.yml
@@ -415,4 +415,4 @@ zh:
#
field_sharing: 共享
label_title_code_review: 代码评审
- label_home_non_project: 您还没有创建项目,您可能对系统的其它项目感兴趣!
\ No newline at end of file
+ label_home_non_project: 您还没有创建项目,您可以查看系统的其它项目!
\ No newline at end of file
diff --git a/db/migrate/20150505025003_add_index_to_homeworkforcourse_course_id.rb b/db/migrate/20150505025003_add_index_to_homeworkforcourse_course_id.rb
index cd60a00af..066ed5980 100644
--- a/db/migrate/20150505025003_add_index_to_homeworkforcourse_course_id.rb
+++ b/db/migrate/20150505025003_add_index_to_homeworkforcourse_course_id.rb
@@ -1,4 +1,4 @@
-class AddIndexToHomeworkattachCourseId < ActiveRecord::Migration
+class AddIndexToHomeworkforcourseCourseId < ActiveRecord::Migration
def change
add_index(:homework_for_courses,:course_id)
end
diff --git a/public/javascripts/project.js b/public/javascripts/project.js
index f85f744e3..6dbb0ff6b 100644
--- a/public/javascripts/project.js
+++ b/public/javascripts/project.js
@@ -71,13 +71,35 @@ function showhelpAndScrollTo(id) {
{
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(){
+ var information = $("#showgithelp");
+ var val = information.attr("value");
if(cookieget("repositories_visiable") == "true")
{
$('#repos_git_more').hide();
}
+ else
+ {
+ $('#repos_git_more').show();
+ $("#showgithelp").text("收起Git操作指南");
+ information.attr("value", "hide_help");
+ }
});
diff --git a/public/stylesheets/project.css b/public/stylesheets/project.css
index 019ffa57a..e6a244b0e 100644
--- a/public/stylesheets/project.css
+++ b/public/stylesheets/project.css
@@ -76,7 +76,7 @@ a.problem_name{ color:#ff5722; }
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_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; }
.problem_tit_a:hover{ 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操作文档 */
.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;}
+.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;}