diff --git a/app/controllers/files_controller.rb b/app/controllers/files_controller.rb index a4ed2cbd1..315eda340 100644 --- a/app/controllers/files_controller.rb +++ b/app/controllers/files_controller.rb @@ -119,7 +119,7 @@ class FilesController < ApplicationController @file.publish_time = params[:publish_time] end end - if @file.publish_time > Date.today + if @file.publish_time > Time.now @file.is_publish = 0 else @file.is_publish = 1 @@ -588,15 +588,13 @@ class FilesController < ApplicationController attachments[:files].each do |attachment| if params[:publish_time] if params[:publish_time] == "" - attachment.publish_time = Date.today + attachment.publish_time = Time.now else attachment.publish_time = params[:publish_time] + attachment.is_publish = 0 end else - attachment.publish_time = Date.today - end - if attachment.publish_time > Date.today - attachment.is_publish = 0 + attachment.publish_time = Time.now end attachment.description = params[:description] attachment.save @@ -604,7 +602,7 @@ class FilesController < ApplicationController end if params[:course_attachment_type] && params[:course_attachment_type].is_a?(Array) params[:course_attachment_type].each do |type| - tag_name = get_tag_name_by_type_number type + tag_name = get_tag_name_by_type_number type if !attachments.empty? && attachments[:files] && tag_name != "" attachments[:files].each do |attachment| attachment.tag_list.add(tag_name) @@ -614,7 +612,7 @@ class FilesController < ApplicationController end else if params[:course_attachment_type] && params[:course_attachment_type] != "5" - tag_name = get_tag_name_by_type_number params[:course_attachment_type] + tag_name = get_tag_name_by_type_number params[:course_attachment_type] if !attachments.empty? && attachments[:files] && tag_name != "" attachments[:files].each do |attachment| attachment.tag_list.add(tag_name) diff --git a/app/views/files/_hidden_file.html.erb b/app/views/files/_hidden_file.html.erb index 1ace422b7..c8de6586f 100644 --- a/app/views/files/_hidden_file.html.erb +++ b/app/views/files/_hidden_file.html.erb @@ -1,38 +1,41 @@ - -发布设置 - -<%= form_tag(republish_file_course_file_path(@course,@file), :multipart => true,:remote => !ie8?,:name=>"upload_form") do %> -
'+options.i18n[options.lang].dayOfWeek[(j+options.dayOfWeekStart)>6?0:j+options.dayOfWeekStart]+' | '; + } + + table+='
---|
'+
+ ' '+d+' '+
+ ' | ';
+
+ if( start.getDay()==options.dayOfWeekStartPrev ) {
+ table+='