socialforge/app/views/courses/_show_compare_code.html.erb

22 lines
1.1 KiB
Plaintext
Raw Normal View History

<% content_for :header_tags do %>
<%= javascript_include_tag "/assets/codemirror/codemirror_python_ruby_c" %>
<%= stylesheet_link_tag "/assets/codemirror/codemirror" %>
<%= stylesheet_link_tag "/assets/codemirror/merge" %>
<%= javascript_include_tag "https://cdnjs.cloudflare.com/ajax/libs/diff_match_patch/20121119/diff_match_patch.js"%>
<%= javascript_include_tag "/assets/codemirror/merge" %>
<% end %>
<article>
<h3 style="float:left; width:47%; text-align:center;"><%=src_name%></h3>
<% if @simi_value.to_i >= 90 %>
<h6 style="color:red;float:left; width:6%; text-align:center;">相似度<%=@simi_value.to_i%>%</h3>
<% else %>
2016-04-15 17:07:38 +08:00
<h6 style="float:left; width:6%; text-align:center;">相似度<%=@simi_value.to_i%>%</h3>
<% end %>
<h3 style="float:left; width:47%; text-align:center;"><%=dst_name%></h3><div class="cl"></div>
<pre id = "program-src_1" style = "display: none" ><%= src_code if src_code%></pre>
<pre id = "program-src_2" style = "display: none" ><%= dst_code if dst_code%></pre>
<div class = "program-compare-code" id=program-compare-code></div>
</article>