编辑关卡时,上传附件
This commit is contained in:
parent
6f134f5f28
commit
59849472ab
|
@ -86,6 +86,7 @@ class StatisticsController < ApplicationController
|
|||
|
||||
respond_to do |format|
|
||||
if @statistic.update_attributes(params[:statistic])
|
||||
@statistic.save_attachments_containers(params[:attachments], User.current, true)
|
||||
format.html { redirect_to @statistic, notice: 'Statistic was successfully updated.' }
|
||||
format.json { head :no_content }
|
||||
else
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
<%= stylesheet_link_tag '/editormd/css/editormd','/editormd/css/editormd.min.css' %>
|
||||
<%= javascript_include_tag '/editormd/lib/marked.min.js','/editormd/lib/prettify.min.js','/editormd/lib/raphael.min.js','/editormd/lib/underscore.min.js','/editormd/lib/sequence-diagram.min.js',
|
||||
'/editormd/lib/flowchart.min.js','/editormd/lib/jquery.flowchart.min.js','/editormd/editormd.js' %>
|
||||
<div class="data_showdetail">
|
||||
<p id="notice"><%= notice %></p>
|
||||
|
||||
|
@ -32,5 +35,17 @@
|
|||
<%= link_to '编辑', edit_statistic_path(@statistic) ,:class => "submit_btn" %>
|
||||
<%= link_to '返回', statistics_path ,:class=>"grey_btn" %>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
editormd.loadKaTeX(function() {
|
||||
var taskPassMD = editormd.markdownToHTML("challenge_task_pass_show", {
|
||||
htmlDecode: "style,script,iframe", // you can filter tags decode
|
||||
taskList: true,
|
||||
tex: true, // 默认不解析
|
||||
flowChart: true, // 默认不解析
|
||||
sequenceDiagram: true // 默认不解析
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
Loading…
Reference in New Issue