">
diff --git a/app/views/repositories/stats.html.erb b/app/views/repositories/stats.html.erb
index b5283629c..0bce15069 100644
--- a/app/views/repositories/stats.html.erb
+++ b/app/views/repositories/stats.html.erb
@@ -1,25 +1,30 @@
<%= l(:label_statistics) %>
-修订 是版本库的提交次数, 显示为橘红色。
-变更 是对版本库中文件的修改次数, 显示为蓝色。
-
- <%= tag("embed", :width => 670, :height => 300, :type => "image/svg+xml", :src => url_for(:controller => 'repositories', :action => 'graph', :id => @project, :repository_id => @repository.identifier_param, :graph => "commits_per_month")) %>
-
-
- <%# 用户每月提交代码次数 %>
- <%= tag("embed", :width => 670, :height => 400, :type => "image/svg+xml", :src => url_for(:controller => 'repositories', :action => 'graph', :id => @project, :repository_id => @repository.identifier_param, :graph => "commits_per_author")) %>
-
-
- <%= tag("embed", :width => 670, :height => 400, :type => "image/svg+xml", :src => url_for(:controller => 'repositories', :action => 'graph', :id => @project, :repository_id => @repository.identifier_param, :graph => "author_commits_per_month")) %>
-
-
- <%# 用户最近六个月的提交次数 %>
- <%= tag("embed", :width => 670, :height => 400, :type => "image/svg+xml", :src => url_for(:controller => 'repositories', :action => 'graph', :id => @project, :repository_id => @repository.identifier_param, :graph => "author_commits_six_month")) %>
-
-
- <%# 用户最近六个月的代码量 %>
- <%= tag("embed", :width => 670, :height => 400, :type => "image/svg+xml", :src => url_for(:controller => 'repositories', :action => 'graph', :id => @project, :repository_id => @repository.identifier_param, :graph => "author_code_six_months")) %>
-
-<%= link_to l(:button_back), :action => 'show', :id => @project %>
-<% html_title(l(:label_repository), l(:label_statistics)) -%>
+<% if @status_commit_count ==0 %>
+ 该项目目前还没有提交过代码!
+<% else %>
+ 修订 是版本库的提交次数, 显示为橘红色。
+ 变更 是对版本库中文件的修改次数, 显示为蓝色。
+
+
+ <%= tag("embed", :width => 670, :height => 300, :type => "image/svg+xml", :src => url_for(:controller => 'repositories', :action => 'graph', :id => @project, :repository_id => @repository.identifier_param, :graph => "commits_per_month")) %>
+
+
+ <%# 用户每月提交代码次数 %>
+ <%= tag("embed", :width => 670, :height => 400, :type => "image/svg+xml", :src => url_for(:controller => 'repositories', :action => 'graph', :id => @project, :repository_id => @repository.identifier_param, :graph => "commits_per_author")) %>
+
+
+ <%= tag("embed", :width => 670, :height => 400, :type => "image/svg+xml", :src => url_for(:controller => 'repositories', :action => 'graph', :id => @project, :repository_id => @repository.identifier_param, :graph => "author_commits_per_month")) %>
+
+
+ <%# 用户最近六个月的提交次数 %>
+ <%= tag("embed", :width => 670, :height => 400, :type => "image/svg+xml", :src => url_for(:controller => 'repositories', :action => 'graph', :id => @project, :repository_id => @repository.identifier_param, :graph => "author_commits_six_month")) %>
+
+
+ <%# 用户最近六个月的代码量 %>
+ <%= tag("embed", :width => 670, :height => 400, :type => "image/svg+xml", :src => url_for(:controller => 'repositories', :action => 'graph', :id => @project, :repository_id => @repository.identifier_param, :graph => "author_code_six_months")) %>
+
+ <%= link_to l(:button_back), :action => 'show', :id => @project %>
+ <% html_title(l(:label_repository), l(:label_statistics)) -%>
+<% end %>
\ No newline at end of file
diff --git a/app/views/school/upload_logo.html.erb b/app/views/school/upload_logo.html.erb
index 97a3f171c..26da7e081 100644
--- a/app/views/school/upload_logo.html.erb
+++ b/app/views/school/upload_logo.html.erb
@@ -1,5 +1,28 @@
-<%= form_tag({action: :upload},method: "post", multipart: true) do %>
- <%= text_field_tag 'school'%>
- <%= file_field_tag 'logo' %>
- <%= submit_tag('Upload') %>
+
+
+<%= form_tag(upload_school_path(@school.id),method: "post", multipart: true) do %>
+ <%#= text_field_tag 'school'%>
+
+
+ <%= image_tag(@school.logo_link, id: "avatar_image", :class=>"school_avatar")%>
+
上传图片
+ <%= file_field_tag 'logo',:style => "display:none;", :id => "file", :onchange => "showPreview(this)"%>
+
+
+ <%= submit_tag('上传') %>
+ <%= submit_tag('取消') %>
+
+
<% end %>
+
diff --git a/app/views/student_work/_programing_work_show.html.erb b/app/views/student_work/_programing_work_show.html.erb
index 7081dea8c..b259e20a5 100644
--- a/app/views/student_work/_programing_work_show.html.erb
+++ b/app/views/student_work/_programing_work_show.html.erb
@@ -24,42 +24,41 @@
- 测试结果:
-
-
-
- 输入 |
- 输出 |
- 测试结果 |
-
- <%@homework.homework_tests.each do |test|%>
- ">
-
- <%= test.input%>
- |
-
- <%= test.output%>
- |
- <% student_work_test = StudentWorkTest.where(:homework_test_id => test.id,:student_work_id => @work.id).first%>
- <%= student_work_test.nil? ? "正在编译" : student_work_test.status_to_s%> |
-
-
- <% end%>
- <% student_work_test = @work.student_work_test.first%>
- <% if student_work_test && student_work_test.error_msg && !student_work_test.error_msg.empty?%>
-
-
- <%= student_work_test.error_msg%>
- |
+ <% if @is_teacher%>
+ 测试结果:
+
+
+
+ 输入 |
+ 输出 |
+ 测试结果 |
- <% end%>
+ <%@homework.homework_tests.each do |test|%>
+ ">
+
+ <%= test.input%>
+ |
+
+ <%= test.output%>
+ |
+ <% student_work_test = StudentWorkTest.where(:homework_test_id => test.id,:student_work_id => @work.id).first%>
+ <%= student_work_test.nil? ? "正在编译" : student_work_test.status_to_s%> |
+
+
+ <% end%>
+ <% student_work_test = @work.student_work_test.first%>
+ <% if student_work_test && student_work_test.error_msg && !student_work_test.error_msg.empty?%>
+
+
+ <%= student_work_test.error_msg%>
+ |
+
+ <% end%>
-
-
-
-
-
- <% if @is_teacher%>
+
+
+
+
<%= render :partial => 'add_score',:locals => {:work => @work,:score => @score}%>
diff --git a/app/views/welcome/course.html.erb b/app/views/welcome/course.html.erb
index 143c32dbe..4edec2202 100644
--- a/app/views/welcome/course.html.erb
+++ b/app/views/welcome/course.html.erb
@@ -56,21 +56,11 @@
<% end %>
-
- <%= l(:label_welcome_trustie_course) %>
+ <%= l(:label_welcome_trustie_course) %>
<% else %>
<% unless @course_page.nil? %>
-
<%= l(:label_welcome_trustie_course) %>
,
@@ -112,7 +102,6 @@
course_term = "春季学期"
end
%>
- <%# (month_now >= 3 && month_now < 9) ? course_term = "春季学期" : course_term = "秋季学期" %>
<% cur_school_course = @school_id.nil? ? [] : find_miracle_course(10,7,@school_id, year_now, course_term) %>
<% if cur_school_course.count == 0 %>
diff --git a/config/locales/zh.yml b/config/locales/zh.yml
index 83ccebbe9..1018a213a 100644
--- a/config/locales/zh.yml
+++ b/config/locales/zh.yml
@@ -381,6 +381,7 @@ zh:
label_organization_choose: --请选择组织--
label_organization_name: 组织名称
label_organization_list: 组织列表
+ label_school_plural: 学校列表
label_organization_new: 新建组织
label_organization_edit: 修改组织
label_project_plural: 项目列表
diff --git a/config/routes.rb b/config/routes.rb
index 1ae607eb7..280053f60 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -39,6 +39,17 @@ RedmineApp::Application.routes.draw do
end
+ resources :school do
+ collection do
+
+ end
+
+ member do
+ get 'upload_logo'
+ post 'upload'
+ end
+ end
+
resources :homework_attach do
collection do
get 'get_homework_member_list'
@@ -670,6 +681,7 @@ RedmineApp::Application.routes.draw do
match 'admin/test_email', :via => :get
match 'admin/default_configuration', :via => :post
get 'admin/organization'
+ get 'admin/schools'
resources :auth_sources do
member do
@@ -808,9 +820,6 @@ RedmineApp::Application.routes.draw do
post 'school/search_school/', :to => 'school#search_school'
get 'school/search_school/', :to => 'school#search_school'
- post 'school/upload', :to => 'school#upload'
- get 'school/upload_logo', :to => 'school#upload_logo'
-
######added by nie
match 'tags/show_projects_tags'
########### added by liuping
diff --git a/lib/redmine.rb b/lib/redmine.rb
index 3043cfe5d..0f6c14b8a 100644
--- a/lib/redmine.rb
+++ b/lib/redmine.rb
@@ -369,6 +369,7 @@ Redmine::MenuManager.map :admin_menu do |menu|
menu.push :projects, {:controller => 'admin', :action => 'projects'}, :caption => :label_project_plural
menu.push :courses, {:controller => 'admin', :action => 'courses'}, :caption => :label_course_all
menu.push :users, {:controller => 'admin', :action => 'users'}, :caption => :label_user_plural
+ menu.push :schools, {:controller => 'admin', :action => 'schools'}, :caption => :label_school_plural
menu.push :first_page_made, {:controller => 'admin',:action => 'first_page_made'},:caption => :label_first_page_made
menu.push :mobile_version, {:controller => 'admin',:action => 'mobile_version'},:caption => :label_mobile_version
menu.push :groups, {:controller => 'groups'}, :caption => :label_group_plural
diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css
index d4d309181..3e01d68ff 100644
--- a/public/stylesheets/application.css
+++ b/public/stylesheets/application.css
@@ -2796,4 +2796,15 @@ div.repos_explain{
.upload_img img{max-width: 100%;}
#activity .upload_img img{max-width: 580px;}
-img,embed{max-width: 100%;}
\ No newline at end of file
+img,embed{max-width: 100%;}
+
+img.school_avatar {
+ background: rgb(245, 245, 245);
+ padding: 4px;
+ border: 1px solid #e5dfc7;
+ float: left;
+ display: block;
+ width: 100px;
+ height: 100px;
+ max-width: none;
+}
\ No newline at end of file
diff --git a/public/stylesheets/courses.css b/public/stylesheets/courses.css
index 778a474cd..00a2f0034 100644
--- a/public/stylesheets/courses.css
+++ b/public/stylesheets/courses.css
@@ -665,7 +665,6 @@ a:hover.ping_pic{border:1px solid #64bdd9;}
.ping_back_tit{ float:left; width:523px; margin-left:10px; }
a.down_btn{ border:1px solid #CCC; color:#999; padding:0px 5px; font-size:12px; text-align:center; display:block;}
a:hover.down_btn{ background:#14ad5a; color:#fff; border:1px solid #14ad5a;}
-.fr{ float:right;}
.min_search{ width:140px; height:20px; border:1px solid #d0d0d0; color:#666; background:url(../images/public_icon.png) 185px -193px no-repeat; }
.li_min_search{ float:right; margin-right:-10px;}
.info_ni_download{ width:100px; padding:5px;position: absolute;display:none;-moz-border-radius:3px; -webkit-border-radius:3px; border-radius:3px; box-shadow:0px 0px 5px #194a81; color:#666; background:#fff; text-align:left;margin-left: 200px;margin-top: 10px;}