Description:
render compiler message as modal
Commit status:
[Not Reviewed]
References:
Comments:
0 Commit comments 0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
Add another comment

r624:8852e6128763 - - 3 files changed: 16 inserted, 4 deleted

@@ -5,48 +5,59
5
5
6 - if (GraderConfiguration.contest_mode?) and (@user.site!=nil) and (@user.site.started!=true)
6 - if (GraderConfiguration.contest_mode?) and (@user.site!=nil) and (@user.site.started!=true)
7 %p=t 'main.start_soon'
7 %p=t 'main.start_soon'
8
8
9 .row
9 .row
10 .col-md-7
10 .col-md-7
11 - if GraderConfiguration.show_submitbox_to?(@user)
11 - if GraderConfiguration.show_submitbox_to?(@user)
12 .panel.panel-primary
12 .panel.panel-primary
13 .panel-heading
13 .panel-heading
14 Submission
14 Submission
15 .panel-body
15 .panel-body
16 = render :partial => 'submission_box'
16 = render :partial => 'submission_box'
17 - if GraderConfiguration.show_tasks_to?(@user)
17 - if GraderConfiguration.show_tasks_to?(@user)
18 - if not GraderConfiguration.multicontests?
18 - if not GraderConfiguration.multicontests?
19 %table.table.table-striped.table-condensed
19 %table.table.table-striped.table-condensed
20 %thead
20 %thead
21 %tr
21 %tr
22 %th Task name
22 %th Task name
23 %th Full name
23 %th Full name
24 %th # of sub(s)
24 %th # of sub(s)
25 %th Results
25 %th Results
26 %th
26 %th
27 %tbody
27 %tbody
28 = render :partial => 'problem', :collection => @problems
28 = render :partial => 'problem', :collection => @problems
29 - else
29 - else
30 - @contest_problems.each do |cp|
30 - @contest_problems.each do |cp|
31 - if cp[:problems].length > 0
31 - if cp[:problems].length > 0
32 %h2{:class =>'contest-title'}
32 %h2{:class =>'contest-title'}
33 = "#{cp[:contest] ? cp[:contest].title : 'Public problems'}"
33 = "#{cp[:contest] ? cp[:contest].title : 'Public problems'}"
34 %table.info
34 %table.info
35 %tr.info-head
35 %tr.info-head
36 %th Task name
36 %th Task name
37 %th Full name
37 %th Full name
38 %th # of sub(s)
38 %th # of sub(s)
39 %th Results
39 %th Results
40 %th
40 %th
41 = render :partial => 'problem', :collection => cp[:problems]
41 = render :partial => 'problem', :collection => cp[:problems]
42 .col-md-5
42 .col-md-5
43 .panel.panel-info
43 .panel.panel-info
44 .panel-heading
44 .panel-heading
45 Announcement
45 Announcement
46 %ul.list-group
46 %ul.list-group
47 = render :partial => 'announcement', :collection => @announcements
47 = render :partial => 'announcement', :collection => @announcements
48
48
49 %script{:type => 'text/javascript'}
49 %script{:type => 'text/javascript'}
50 = "Announcement.refreshUrl = '#{url_for :controller => 'main', :action => 'announcements'}';"
50 = "Announcement.refreshUrl = '#{url_for :controller => 'main', :action => 'announcements'}';"
51 Announcement.registerRefreshEventTimer();
51 Announcement.registerRefreshEventTimer();
52
52
53 + .modal.fade#compiler{tabindex: -1,role: 'dialog'}
54 + .modal-dialog.modal-lg{role:'document'}
55 + .modal-content
56 + .modal-header
57 + %button.close{type: 'button', data: {dismissed: :modal}, aria: {label: 'close'}}
58 + %span{aria: {hidden: 'true'}, data: {dismiss: 'modal'}} ×
59 + %h4 Compiler message
60 + .modal-body
61 + %pre#compiler_msg
62 + .modal-footer
63 + %button.btn.btn-default{type: 'button', data: {dismiss: 'modal'}} Close
@@ -1,3 +1,4
1 - :javascript
1 + :plain
2 - $("#compiler_msg").html("#{j @submissionhcompiler_msg}")
2 + $("#compiler_msg").html("#{j @submission.compiler_message}");
3 -
3 + $("#compiler").modal();
4 +
@@ -1,2 +1,2
1 - :javascript
1 + :plain
2 $("#latest_status").html("#{j render({partial: 'submission_short', locals: {submission: @submission, problem_name: @problem.name}})}")
2 $("#latest_status").html("#{j render({partial: 'submission_short', locals: {submission: @submission, problem_name: @problem.name}})}")
You need to be logged in to leave comments. Login now