This commit is contained in:
yanxd 2014-04-25 16:08:00 +08:00
parent 230b377cad
commit 8f5958abc1
6 changed files with 11 additions and 10 deletions

View File

@ -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

View File

@ -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

View File

@ -1,14 +1,14 @@
<!-- <h3> --><!-- %=l(:label_attachment_plural)%></h3 -->
<span class="borad-title"><%=(@project.project_type == 1) ? t(:label_user_course) : t(:label_project) %>文件共享专区</span>
<span class="borad-title"><%=(@project.project_type == 1) ? t(:label_user_course) : t(:label_project) %>资源共享区</span>
<div class="content-title-top">
<%#= 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) %>
<div class="clearfix"></div>
<div id="file_buttons" class="nhidden">
<%#= 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) %>
<div id="upload_file_div" class="relation_file_div hidden" >
<%= render :partial => 'new', locals: {project: @project}%>
</div>

View File

@ -255,7 +255,7 @@
</div>
<div class="clearfix"></div>
<div style="width:100%;">
<div class="hidden" style="width:100%;">
<div style="width:600px;margin:0px auto;margin-top:80px;">
<table style="width:600px;font-size:15px; color: #e8770d;">
<tr>

View File

@ -246,7 +246,7 @@
<div class="clearfix"></div>
<div style="width:100%;">
<div class="hidden" style="width:100%;">
<div style="width:600px;margin:0px auto;margin-top:180px;">
<table style="width:600px;font-size:15px; color: gray;">
<tr>

View File

@ -1425,7 +1425,7 @@ zh:
label_has_praisers: 赞(%{count})
label_has_watchers: 关注(%{count})
label_has_fans: 粉丝(%{count})
label_coursefile_sharingarea: 课程文件共享专
label_coursefile_sharingarea: 课程资源共享
#modify by men
label_x_has_fans:
zero: 粉丝(%{count})
@ -1668,7 +1668,7 @@ zh:
label_public_info: (打钩为公开,不打钩则不公开,若不公开,仅项目成员可见该项目。)
label_course_view_student: 查看其他课程
label_course_student: 学生
label_homework: 课程作业
label_homework: 课程实践
label_course_file: 资源库 #资料共享
label_stores_index: 资源搜索
label_course_new_homework: 新建作业
@ -1829,7 +1829,8 @@ zh:
label_sumbit_empty: 搜索内容不能为空
#add by linchun (竞赛相关)
label_upload_files: 上传文件
label_upload_files: 上传资源
label_relation_files: 关联已有资源
label_upload_softwarepackage: 上传软件包
label_upload_cuttingphoto: 上传截图
label_contests_reward_method: 奖励方式