You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
pgfqe6ch8/app/views/libraries/new.html.erb

81 lines
4.4 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<%= javascript_include_tag "/codemirror/lib/codemirror", "/codemirror/mode/javascript/javascript", "/codemirror/addon/hint/show-hint", "/codemirror/addon/hint/javascript-hint", "/codemirror/addon/selection/active-line", "/codemirror/addon/lint/javascript-lint", "/codemirror/addon/lint/css-lint", "/codemirror/addon/lint/lint", "/codemirror/addon/lint/json-lint", "/editormd/lib/codemirror/addon/lint/css-lint" %>
<%= stylesheet_link_tag "/codemirror/lib/codemirror" %>
<%= stylesheet_link_tag '/editormd/css/editormd' %>
<%= javascript_include_tag '/editormd/editormd' %>
<div class="educontent mb50">
<p class="mt10 mb20 clearfix lineh-20">
<a href="javascript:void(0)" class="color-grey-9">胡莎莎</a> &gt;
<a href="javascript:void(0)" class="color-grey-9">文库</a> &gt;
<span class="color-grey-3">新建</span>
</p>
<p class="lineh-25 font-22 mb20">上传文档</p>
<div class="edu-back-white">
<div class="padding30">
<p class="clearfix mb20">
<span class="upload_Title">标题</span>
<input type="text" class="greyInput winput-240-35 mr20 fl" placeholder="例如:软件工程教学案例"/>
<span class="color-grey-c font-12 fl mt5">简明扼要介绍文档&视频所包含的主要的内容</span>
</p>
<div>
<%= render :partial => 'attachments/from_libraries', :locals => {:container => @homework} %>
</div>
</div>
<div class="padding30 bor-top-greyE">
<div class="clearfix df">
<span class="upload_Title">描述</span>
<div class="flex1">
<div id="libraries_description">
<textarea name="libraries[description]"><%#= @introduction_sample || @shixun.description %></textarea>
</div>
</div>
</div>
</div>
<div class="padding30 bor-top-greyE">
<li class="lineh-25 color-grey-6 font-18 mb20">审核说明</li>
<ul class="font-16">
<li>平台管理员将对每天新上传的文档进行审核,审核通过的文档将公开显示,否则将私有化或移除</li>
</ul>
</div>
<div class="padding30 bor-top-greyE">
<li class="lineh-25 color-grey-6 font-18 mb20">温馨提示</li>
<ul class="font-16">
<li>1.请勿上传已设置加密或只读的文档资源</li>
<li>2.可以上传教学积累和撰写的文档资料如教学案例、总结、心得等上传支持的文件最大容量100MB</li>
<li>3.上传涉及侵权内容的文档将会被移除。</li>
<li>4.为营造绿色网络环境,严禁上传违反国家关于互联网相关规定的内容</li>
<li>5.ChromeFirefoxSafariIE11及以上版本浏览器上传</li>
</ul>
</div>
</div>
</div>
<script>
/* ------------------------------- 描述md ------------------------------*/
var shixun_editormd = editormd("libraries_description", {
width: "100%",
height: 210,
syncScrolling: "single",
//你的lib目录的路径我这边用JSP做测试的
path: "/editormd/lib/",
tex: true,
watch:false,
toolbarIcons: function () {
// Or return editormd.toolbarModes[name]; // full, simple, mini
// Using "||" set icons align right.
return ["bold", "italic", "|", "list-ul", "list-ol", "|", "code", "code-block", "|", "testIcon", "testIcon1", '|', "image", "table", '|', "watch", "clear"]
},
toolbarCustomIcons: {
testIcon: "<a type=\"inline\" class=\"latex\" ><div class='zbg'></div></a>",
testIcon1: "<a type=\"latex\" class=\"latex\" ><div class='zbg_latex'></div></a>"
},
//这个配置在simple.html中并没有但是为了能够提交表单使用这个配置可以让构造出来的HTML代码直接在第二个隐藏的textarea域中方便post提交表单。
saveHTMLToTextarea: true,
autoFocus: false,
// 用于增加自定义工具栏的功能可以直接插入HTML标签不使用默认的元素创建图标
dialogMaskOpacity: 0.6,
placeholder: "请输入参考答案",
imageUpload: true,
imageFormats: ["jpg", "jpeg", "gif", "png", "bmp", "webp", "JPG", "JPEG", "GIF", "PNG", "BMP", "WEBP"],
imageUploadURL: "<%#= upload_with_markdown_path(:container_id => @shixun.id, :container_type => @shixun.class) %>" //url
});
</script>