socialforge/app/views/exercise/_edit_head.html.erb

32 lines
2.3 KiB
Plaintext
Raw Normal View History

<%= form_for @exercise, :remote=>true do |f| %>
2015-11-17 18:22:31 +08:00
<div class="testContainer">
<div>
<input name="exercise[exercise_name]" maxlength="100" id="exercise_name" class="testTitle mb10" type="text" placeholder="测验标题" value="<%=@exercise.exercise_name%>" />
</div>
<%# if edit_mode %>
<!--<label class="fl c_grey f14" style="margin-top: 4px;">发布日期(可选)</label>-->
<%# end %>
<label class="fl c_grey f14" style="margin-top: 4px;">截止时间:</label>
2015-11-17 18:22:31 +08:00
<div class="calendar_div fl">
<input type="text" name="exercise[end_time]" id="exercise_end_time" placeholder="截止时间" class="InputBox fl W120 calendar_input" readonly="readonly" value="<%= Time.parse(format_time(exercise.end_time)).strftime("%Y-%m-%d") if exercise.end_time %>"/>
2015-11-17 18:22:31 +08:00
<%= calendar_for('exercise_end_time')%>
</div>
<div class="fl ml15 f14 fontGrey2"><span class="mr5">测验时长:</span><input name="exercise[time]" id="exercise_time" type="text" class="examTime mr5" placeholder="不填即不限时" value="<%=exercise.time if exercise.time!= -1 %>" />分钟</div>
<label class="fl c_grey ml15 f14" style="margin-top: 4px;">发布时间(可选)</label>
<div class="calendar_div fl">
<input type="text" name="exercise[publish_time]" id="exercise_publish_time" placeholder="发布时间(可选)" class="InputBox fl W120 calendar_input" readonly="readonly" value="<%= Time.parse(format_time(exercise.publish_time)).strftime("%Y-%m-%d") if !exercise.publish_time.nil? %>"/>
<%= calendar_for('exercise_publish_time')%>
</div>
2015-11-17 18:22:31 +08:00
<div class="cl"></div>
2015-11-17 20:23:14 +08:00
<textarea class="testDes mt10" name="exercise[exercise_description]" id="exercise_description" placeholder="发布须知:试题类型有选择和填空两种,其中选择题包括单选题和多选题。您可以在此处填写测验相关说明。" ><%=exercise.exercise_description %></textarea>
2015-11-17 18:22:31 +08:00
<div class="ur_editor_footer" style="padding-top: 10px;">
<a class="btn_submit c_white" data-button="ok" onclick="pollsSubmit($(this));">
保存
</a>
<a class="btn_cancel" data-button="cancel" onclick="pollsCancel();">
<%= l(:button_cancel)%>
</a>
</div>
<div class="cl"></div>
</div>
<% end %>