Description:
fix double h2 in live submit
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
r780:bb5de7322cc4 - - 1 file changed: 0 inserted, 3 deleted
@@ -1,51 +1,48 | |||||
|
1 | - %h2 Live submit |
|
||
|
2 | - %br |
|
||
|
3 | - |
|
||
|
4 |
|
|
1 | %textarea#text_sourcecode{style: "display:none"}~ @source |
|
5 | .container |
|
2 | .container |
|
6 | .row |
|
3 | .row |
|
7 | .col-md-12 |
|
4 | .col-md-12 |
|
8 | %h2 Live submit |
|
5 | %h2 Live submit |
|
9 |
|
6 | ||
|
10 | .row |
|
7 | .row |
|
11 | .col-md-12 |
|
8 | .col-md-12 |
|
12 | .alert.alert-info |
|
9 | .alert.alert-info |
|
13 | Write your code in the following box, choose language, and click submit button when finished |
|
10 | Write your code in the following box, choose language, and click submit button when finished |
|
14 | .row |
|
11 | .row |
|
15 | .col-md-8 |
|
12 | .col-md-8 |
|
16 | %div#editor{style: 'height: 500px; border-radius: 7px; font-size: 14px;'} |
|
13 | %div#editor{style: 'height: 500px; border-radius: 7px; font-size: 14px;'} |
|
17 | .col-md-4 |
|
14 | .col-md-4 |
|
18 | - # submission form |
|
15 | - # submission form |
|
19 | = form_tag({controller: :main, :action => 'submit'}, :multipart => true, class: 'form') do |
|
16 | = form_tag({controller: :main, :action => 'submit'}, :multipart => true, class: 'form') do |
|
20 |
|
17 | ||
|
21 | = hidden_field_tag 'editor_text', @source |
|
18 | = hidden_field_tag 'editor_text', @source |
|
22 | = hidden_field_tag 'submission[problem_id]', @problem.id |
|
19 | = hidden_field_tag 'submission[problem_id]', @problem.id |
|
23 | .form-group |
|
20 | .form-group |
|
24 | = label_tag "Task:" |
|
21 | = label_tag "Task:" |
|
25 | = text_field_tag 'asdf', "#{@problem.long_name}", class: 'form-control', disabled: true |
|
22 | = text_field_tag 'asdf', "#{@problem.long_name}", class: 'form-control', disabled: true |
|
26 | .form-group |
|
23 | .form-group |
|
27 | = label_tag "Description:" |
|
24 | = label_tag "Description:" |
|
28 | = link_to_description_if_any "[download] <span class='glyphicon glyphicon-file'></span>".html_safe, @problem |
|
25 | = link_to_description_if_any "[download] <span class='glyphicon glyphicon-file'></span>".html_safe, @problem |
|
29 |
|
26 | ||
|
30 | .form-group |
|
27 | .form-group |
|
31 | = label_tag 'Language:' |
|
28 | = label_tag 'Language:' |
|
32 | = 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" |
|
29 | = 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" |
|
33 | .form-group |
|
30 | .form-group |
|
34 | .input-group |
|
31 | .input-group |
|
35 | %span.input-group-btn |
|
32 | %span.input-group-btn |
|
36 | %span.btn.btn-default.btn-file |
|
33 | %span.btn.btn-default.btn-file |
|
37 | Browse |
|
34 | Browse |
|
38 | = file_field_tag 'load_file' |
|
35 | = file_field_tag 'load_file' |
|
39 | = text_field_tag '' , nil, {readonly: true, class: 'form-control'} |
|
36 | = text_field_tag '' , nil, {readonly: true, class: 'form-control'} |
|
40 | .form-group |
|
37 | .form-group |
|
41 | = submit_tag 'Submit', class: 'btn btn-success', id: 'live_submit', |
|
38 | = submit_tag 'Submit', class: 'btn btn-success', id: 'live_submit', |
|
42 | data: {confirm: "Submitting this source code for task #{@problem.long_name}?"} |
|
39 | data: {confirm: "Submitting this source code for task #{@problem.long_name}?"} |
|
43 | - # latest submission status |
|
40 | - # latest submission status |
|
44 | .panel{class: (@submission && @submission.graded_at) ? "panel-info" : "panel-warning"} |
|
41 | .panel{class: (@submission && @submission.graded_at) ? "panel-info" : "panel-warning"} |
|
45 | .panel-heading |
|
42 | .panel-heading |
|
46 | Latest Submission Status |
|
43 | Latest Submission Status |
|
47 | = link_to "Refresh",get_latest_submission_status_submissions_path(@submission.user,@problem), class: "btn btn-default btn-sm", remote: true if @submission |
|
44 | = link_to "Refresh",get_latest_submission_status_submissions_path(@submission.user,@problem), class: "btn btn-default btn-sm", remote: true if @submission |
|
48 | .panel-body |
|
45 | .panel-body |
|
49 | %div#latest_status |
|
46 | %div#latest_status |
|
50 | - if @submission |
|
47 | - if @submission |
|
51 | = render :partial => 'submission_short', |
|
48 | = render :partial => 'submission_short', |
You need to be logged in to leave comments.
Login now