diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index 95fbed1d3..730546aa6 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -862,7 +862,7 @@ class ProjectsController < ApplicationController if params[:project][:is_public] == '0' project_status = ProjectStatus.find_by_project_id(@project.id) - project_status.destroy + project_status.destroy if project_status elsif params[:project][:is_public] == '1' project_status = ProjectStatus.create(:project_id => @project.id, :watchers_count => @project.watchers.count, :changesets_count => @project.changesets.count,:grade => 0, :project_type => @project.project_type) end diff --git a/app/controllers/welcome_controller.rb b/app/controllers/welcome_controller.rb index d566c9b86..5e8eef074 100644 --- a/app/controllers/welcome_controller.rb +++ b/app/controllers/welcome_controller.rb @@ -17,7 +17,7 @@ class WelcomeController < ApplicationController caches_action :robots - before_filter :fake, :only => [:index, :course] + # before_filter :fake, :only => [:index, :course] before_filter :entry_select_course, :entry_select_contest, :entry_select_user, :only => [:index] def index diff --git a/app/views/files/index.html.erb b/app/views/files/index.html.erb index cfaba8749..98befd091 100644 --- a/app/views/files/index.html.erb +++ b/app/views/files/index.html.erb @@ -1,14 +1,14 @@ -<%=(@project.project_type == 1) ? t(:label_user_course) : t(:label_project) %>文件共享专区 +<%=(@project.project_type == 1) ? t(:label_user_course) : t(:label_project) %>资源共享区
<%#= link_to(l(:label_attachment_new), 'javascript:void(0);', :onclick=>"$('#file_buttons').slideToggle();", :class => 'icon icon-add') if User.current.allowed_to?(:manage_files, @project) %>
<%#= link_to('上传文件', new_project_file_path(@project), :class => 'icon m5p5 button_submit') if User.current.allowed_to?(:manage_files, @project) %> - <%= link_to('上传文件', 'javascript:void(0);', :class => 'icon m5p5 button_submit', :onclick => "$('#relation_file_div').slideUp();$('#upload_file_div').slideToggle('slow');") if User.current.allowed_to?(:manage_files, @project) %> - <%= link_to('关联已有文件', 'javascript:void(0);', :onclick => "$('#upload_file_div').slideUp();$('#relation_file_div').slideToggle();", :class => 'icon m5p5 button_submit') if User.current.allowed_to?(:manage_files, @project) %> + <%= link_to( l(:label_upload_files), 'javascript:void(0);', :class => 'icon m5p5 button_submit', :onclick => "$('#relation_file_div').slideUp();$('#upload_file_div').slideToggle('slow');") if User.current.allowed_to?(:manage_files, @project) %> + <%= link_to(l(:label_relation_files), 'javascript:void(0);', :onclick => "$('#upload_file_div').slideUp();$('#relation_file_div').slideToggle();", :class => 'icon m5p5 button_submit') if User.current.allowed_to?(:manage_files, @project) %> diff --git a/app/views/welcome/course.html.erb b/app/views/welcome/course.html.erb index f757e83bb..c91b3e453 100644 --- a/app/views/welcome/course.html.erb +++ b/app/views/welcome/course.html.erb @@ -255,7 +255,7 @@
-
+