From 8bbb5a71e03318ee44ca69c632eecd134a179c23 Mon Sep 17 00:00:00 2001 From: cxt Date: Fri, 15 Mar 2019 16:58:47 +0800 Subject: [PATCH] =?UTF-8?q?markdown=E4=B8=8A=E4=BC=A0=E7=9A=84=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E6=9D=83=E9=99=90=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/application_helper.rb | 2 +- app/views/subjects/_new_or_edit.html.erb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 3ec38cde..19c82857 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -4340,7 +4340,7 @@ module ApplicationHelper candown = (attachment.is_public == 1 || attachment.is_public == true) end else - if attachment.container_type == "MarkDown" || attachment.container_type.nil? || attachment.container_type == "Shixun" || attachment.container_type == "Memo" || attachment.container_type == "Career" || attachment.container_type == "Exercise" || attachment.container_type == "ExerciseBank" + if attachment.container_type == "MarkDown" || attachment.container_type.nil? || attachment.container_type == 'Subject' || attachment.container_type == "Shixun" || attachment.container_type == "Memo" || attachment.container_type == "Career" || attachment.container_type == "Exercise" || attachment.container_type == "ExerciseBank" candown = true end end diff --git a/app/views/subjects/_new_or_edit.html.erb b/app/views/subjects/_new_or_edit.html.erb index b5d15a26..9bd72d23 100644 --- a/app/views/subjects/_new_or_edit.html.erb +++ b/app/views/subjects/_new_or_edit.html.erb @@ -78,7 +78,7 @@ placeholder: "请在此输入实训课程的简介", imageUpload : true, imageFormats : ["jpg", "jpeg", "gif", "png", "bmp", "webp", "JPG", "JPEG", "GIF", "PNG", "BMP", "WEBP"], - imageUploadURL : "<%= upload_with_markdown_path(:container_id => @subject.id, :container_type => @subject.class) %>" //url + imageUploadURL : "<%= upload_with_markdown_path(:container_id => @subject.id, :container_type => 'MarkDown') %>" //url }); md_elocalStorage(shixun_editormd, "subject_desc_<%= User.current.id %>", "desc"); /* --------------------------------- 学习须知 -------------------------------------- */