From b6bf78a5df895e00e08f5e1ebebe8f0f0b9b04b8 Mon Sep 17 00:00:00 2001 From: cxt Date: Tue, 23 Feb 2016 11:35:07 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BD=93=E5=A4=A9=E5=8F=91=E5=B8=83=E7=9A=84?= =?UTF-8?q?=E8=B5=84=E6=BA=90=E6=98=BE=E7=A4=BA=E6=9C=AA=E5=8F=91=E5=B8=83?= =?UTF-8?q?=E3=80=81=E6=97=A5=E6=9C=9F=E9=80=89=E6=8B=A9=E5=99=A8=E7=94=A8?= =?UTF-8?q?=E4=B8=AD=E6=96=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/files_controller.rb | 2 ++ app/views/files/_hidden_file.html.erb | 1 + app/views/files/_upload_course_files.erb | 1 + 3 files changed, 4 insertions(+) diff --git a/app/controllers/files_controller.rb b/app/controllers/files_controller.rb index b18612243..ca37e445c 100644 --- a/app/controllers/files_controller.rb +++ b/app/controllers/files_controller.rb @@ -114,6 +114,8 @@ class FilesController < ApplicationController end if @file.publish_time > Date.today @file.is_publish = 0 + else + @file.is_publish = 1 end @file.save respond_to do |format| diff --git a/app/views/files/_hidden_file.html.erb b/app/views/files/_hidden_file.html.erb index eb0f366a3..8e359c605 100644 --- a/app/views/files/_hidden_file.html.erb +++ b/app/views/files/_hidden_file.html.erb @@ -1,3 +1,4 @@ + 发布设置 <%= form_tag(republish_file_course_file_path(@course,@file), :multipart => true,:remote => !ie8?,:name=>"upload_form") do %> diff --git a/app/views/files/_upload_course_files.erb b/app/views/files/_upload_course_files.erb index 1b8b140a5..de43977cd 100644 --- a/app/views/files/_upload_course_files.erb +++ b/app/views/files/_upload_course_files.erb @@ -1,3 +1,4 @@ +

<%= l(:label_upload_files)%>