Show More
Commit Description:
add get_latest_submission_status for submission
Commit Description:
add get_latest_submission_status for submission
References:
File last commit:
Show/Diff file:
Action:
app/views/sources/direct_edit.html.haml
| 34 lines
| 1.4 KiB
| text/x-haml
| HamlLexer
|
r565 | %h2 Live submit | |||
r564 | %br | |||
r565 | %textarea#text_haha{style: "display:none"}~ @source | |||
r564 | .container | |||
.row | ||||
r567 | .col-md-12 | |||
.alert.alert-info | ||||
Write your code in the following box, choose language, and click submit button when finished | ||||
.row | ||||
r581 | .col-md-8 | |||
r565 | %div#editor{style: 'height: 500px; border-radius: 7px; font-size: 14px;'} | |||
r581 | .col-md-4 | |||
r565 | = form_tag({controller: :main, :action => 'submit'}, :multipart => true, class: 'form') do | |||
= hidden_field_tag 'editor_text', @source | ||||
= hidden_field_tag 'submission[problem_id]', @problem.id | ||||
.form-group | ||||
= label_tag "Task:" | ||||
= text_field_tag 'asdf', "#{@problem.long_name}", class: 'form-control', disabled: true | ||||
.form-group | ||||
= label_tag 'Language' | ||||
r579 | = select_tag 'language_id', options_from_collection_for_select(Language.all, 'id', 'pretty_name', @lang_id || Language.find_by_pretty_name("Python").id || Language.first.id), class: 'form-control select', style: "width: 100px" | |||
r565 | .form-group | |||
= submit_tag 'Submit', class: 'btn btn-success', id: 'live_submit', | ||||
data: {confirm: "Submitting this source code for task #{@problem.long_name}?"} | ||||
r581 | .panel.panel-info | |||
.panel-heading | ||||
Latest Submission Status | ||||
.panel-body | ||||
- if @submission | ||||
= render :partial => 'submission_short', | ||||
:locals => {:submission => @submission, :problem_name => @problem.name } | ||||