添加执行文件选项

This commit is contained in:
huang 2017-04-27 11:21:47 +08:00
parent 18543c87ca
commit a17a1f8910
3 changed files with 15 additions and 0 deletions

View File

@ -85,6 +85,10 @@
<label class="panel-form-label fl">文件路径:</label>
<%= f.text_field :path, :class => "panel-form-width-690 panel-box-sizing fl", :no_label => true, :placeholder => "进入实训后将默认打开该文件app/controllers/welcome_controller.rb", :maxlength => "256" %>
</li>
<li class="clearfix">
<label class="panel-form-label fl">执行文件:</label>
<%= f.text_field :exec_path, :class => "panel-form-width-690 panel-box-sizing fl", :no_label => true, :placeholder => "输入关卡需要执行的文件路径app/controllers/welcome_controller.rb", :maxlength => "256" %>
</li>
<li class="clearfix">
<label class="panel-form-label fl">预备知识:</label>
<div id="challenge_ready_konewlege" class="new_li">

View File

@ -52,6 +52,12 @@
<%= @challenge.path.blank? ? "无" : (h @challenge.path.html_safe) %>
</div>
</li>
<li class="clearfix">
<label class="panel-form-label fl">执行文件:</label>
<div class="fl task-bg-grey panel-box-sizing panel-form-width-690">
<%= @challenge.exec_path.blank? ? "无" : (h @challenge.exec_path) %>
</div>
</li>
<li class="clearfix challenge_bottom">
<label class="panel-form-label fl">预备知识:</label>
<div class="fl task-bg-grey panel-box-sizing panel-form-width-690 new_li" id="wordsView" style="width: 90%">

View File

@ -0,0 +1,5 @@
class AddExecPathToChallenges < ActiveRecord::Migration
def change
add_column :challenges, :exec_path, :string
end
end