Description:
wip
Commit status:
[Not Reviewed]
References:
Comments:
0 Commit comments 0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
Add another comment

r873:a7f456a02c5b - - 5 files changed: 26 inserted, 9 deleted

@@ -1,230 +1,230
1
1
2 .secondnavbar {
2 .secondnavbar {
3 top: 50px;
3 top: 50px;
4 }
4 }
5
5
6
6
7 //for google material design
7 //for google material design
8 .mi-bs {
8 .mi-bs {
9 vertical-align: middle;
9 vertical-align: middle;
10 position: relative;
10 position: relative;
11 top: -3px;
11 top: -3px;
12 }
12 }
13
13
14 // --------------- bootstrap file upload ----------------------
14 // --------------- bootstrap file upload ----------------------
15 .btn-file {
15 .btn-file {
16 position: relative;
16 position: relative;
17 overflow: hidden;
17 overflow: hidden;
18 }
18 }
19
19
20 .btn-file input[type=file] {
20 .btn-file input[type=file] {
21 position: absolute;
21 position: absolute;
22 top: 0;
22 top: 0;
23 right: 0;
23 right: 0;
24 min-width: 100%;
24 min-width: 100%;
25 min-height: 100%;
25 min-height: 100%;
26 font-size: 100px;
26 font-size: 100px;
27 text-align: right;
27 text-align: right;
28 filter: alpha(opacity = 0);
28 filter: alpha(opacity = 0);
29 opacity: 0;
29 opacity: 0;
30 outline: none;
30 outline: none;
31 background: white;
31 background: white;
32 cursor: inherit;
32 cursor: inherit;
33 display: block;
33 display: block;
34 }
34 }
35
35
36 body {
36 body {
37 //font-size: 13px
37 //font-size: 13px
38 - font-family: 'Krub', Tahoma, "sans-serif";
38 + font-family: 'Noto Sans Thai', Tahoma, "sans-serif";
39 margin: 10px;
39 margin: 10px;
40 padding: 10px;
40 padding: 10px;
41 padding-top: 60px;
41 padding-top: 60px;
42 }
42 }
43
43
44 // ------------------ bootstrap sortable --------------------
44 // ------------------ bootstrap sortable --------------------
45 table.sortable th {
45 table.sortable th {
46 padding-right: 20px !important;
46 padding-right: 20px !important;
47
47
48 span.sign {
48 span.sign {
49 right: (-15px) !important;
49 right: (-15px) !important;
50 }
50 }
51
51
52 &.text-right {
52 &.text-right {
53 padding-left: 20px !important;
53 padding-left: 20px !important;
54 padding-right: 8px !important;
54 padding-right: 8px !important;
55
55
56 &:after, span.sign {
56 &:after, span.sign {
57 left: (-15px) !important;
57 left: (-15px) !important;
58 }
58 }
59 }
59 }
60 }
60 }
61
61
62 input {
62 input {
63 font-family: Tahoma, "sans-serif";
63 font-family: Tahoma, "sans-serif";
64 }
64 }
65
65
66 h1 {
66 h1 {
67 color: #334488;
67 color: #334488;
68 }
68 }
69
69
70 h2 {
70 h2 {
71 color: #5566bb;
71 color: #5566bb;
72 }
72 }
73
73
74 hr {
74 hr {
75 border-top: 1px solid #dddddd;
75 border-top: 1px solid #dddddd;
76 border-bottom: 1px solid #eeeeee;
76 border-bottom: 1px solid #eeeeee;
77 }
77 }
78
78
79 //#a
79 //#a
80 // color: #6666cc
80 // color: #6666cc
81 // text-decoration: none
81 // text-decoration: none
82 //
82 //
83 // &:link, &:visited
83 // &:link, &:visited
84 // color: #6666cc
84 // color: #6666cc
85 // text-decoration: none
85 // text-decoration: none
86 //
86 //
87 // &:hover, &:focus
87 // &:hover, &:focus
88 // color: #111166
88 // color: #111166
89 // text-decoration: none
89 // text-decoration: none
90
90
91 div {
91 div {
92 &.userbar {
92 &.userbar {
93 line-height: 1.5em;
93 line-height: 1.5em;
94 text-align: right;
94 text-align: right;
95 font-size: 12px;
95 font-size: 12px;
96 }
96 }
97
97
98 &.title {
98 &.title {
99 padding: 10px 0px;
99 padding: 10px 0px;
100 line-height: 1.5em;
100 line-height: 1.5em;
101 font-size: 13px;
101 font-size: 13px;
102
102
103 span.contest-over-msg {
103 span.contest-over-msg {
104 font-size: 15px;
104 font-size: 15px;
105 color: red;
105 color: red;
106 }
106 }
107
107
108 table {
108 table {
109 width: 100%;
109 width: 100%;
110 font-weight: bold;
110 font-weight: bold;
111 }
111 }
112
112
113 td {
113 td {
114 &.left-col {
114 &.left-col {
115 text-align: left;
115 text-align: left;
116 vertical-align: top;
116 vertical-align: top;
117 color: #444444;
117 color: #444444;
118 }
118 }
119
119
120 &.right-col {
120 &.right-col {
121 text-align: right;
121 text-align: right;
122 vertical-align: top;
122 vertical-align: top;
123 font-size: 18px;
123 font-size: 18px;
124 color: #116699;
124 color: #116699;
125 }
125 }
126 }
126 }
127 }
127 }
128 }
128 }
129
129
130 table.info {
130 table.info {
131 margin: 10px 0;
131 margin: 10px 0;
132 border: 1px solid #666666;
132 border: 1px solid #666666;
133 border-collapse: collapse;
133 border-collapse: collapse;
134 font-size: 12px;
134 font-size: 12px;
135
135
136 th {
136 th {
137 border: 1px solid #666666;
137 border: 1px solid #666666;
138 line-height: 1.5em;
138 line-height: 1.5em;
139 padding: 0 0.5em;
139 padding: 0 0.5em;
140 }
140 }
141
141
142 td {
142 td {
143 border-left: 1px solid #666666;
143 border-left: 1px solid #666666;
144 border-right: 1px solid #666666;
144 border-right: 1px solid #666666;
145 line-height: 1.5em;
145 line-height: 1.5em;
146 padding: 0 0.5em;
146 padding: 0 0.5em;
147 }
147 }
148 }
148 }
149
149
150 tr {
150 tr {
151 &.info-head {
151 &.info-head {
152 background: #777777;
152 background: #777777;
153 color: white;
153 color: white;
154 }
154 }
155
155
156 &.info-odd {
156 &.info-odd {
157 background: #eeeeee;
157 background: #eeeeee;
158 }
158 }
159
159
160 &.info-even {
160 &.info-even {
161 background: #fcfcfc;
161 background: #fcfcfc;
162 }
162 }
163 }
163 }
164
164
165 @mixin basicbox {
165 @mixin basicbox {
166 background: #eeeeff;
166 background: #eeeeff;
167 border: 1px dotted #99aaee;
167 border: 1px dotted #99aaee;
168 padding: 5px;
168 padding: 5px;
169 margin: 10px 0px;
169 margin: 10px 0px;
170 color: black;
170 color: black;
171 font-size: 13px;
171 font-size: 13px;
172 }
172 }
173
173
174 .infobox {
174 .infobox {
175 @include basicbox;
175 @include basicbox;
176 }
176 }
177
177
178 .submitbox {
178 .submitbox {
179 @include basicbox;
179 @include basicbox;
180 }
180 }
181
181
182 .errorExplanation {
182 .errorExplanation {
183 border: 1px dotted gray;
183 border: 1px dotted gray;
184 color: #bb2222;
184 color: #bb2222;
185 padding: 5px 15px 5px 15px;
185 padding: 5px 15px 5px 15px;
186 margin-bottom: 5px;
186 margin-bottom: 5px;
187 background-color: white;
187 background-color: white;
188 font-weight: normal;
188 font-weight: normal;
189
189
190 h2 {
190 h2 {
191 color: #cc1111;
191 color: #cc1111;
192 font-weight: bold;
192 font-weight: bold;
193 }
193 }
194 }
194 }
195
195
196 table.uinfo {
196 table.uinfo {
197 border-collapse: collapse;
197 border-collapse: collapse;
198 border: 1px solid black;
198 border: 1px solid black;
199 font-size: 13px;
199 font-size: 13px;
200 }
200 }
201
201
202 td.uinfo {
202 td.uinfo {
203 vertical-align: top;
203 vertical-align: top;
204 border: 1px solid black;
204 border: 1px solid black;
205 padding: 5px;
205 padding: 5px;
206 }
206 }
207
207
208 th.uinfo {
208 th.uinfo {
209 background: lightgreen;
209 background: lightgreen;
210 vertical-align: top;
210 vertical-align: top;
211 text-align: right;
211 text-align: right;
212 border: 1px solid black;
212 border: 1px solid black;
213 padding: 5px;
213 padding: 5px;
214 }
214 }
215
215
216 div {
216 div {
217 &.compilermsgbody {
217 &.compilermsgbody {
218 font-family: monospace;
218 font-family: monospace;
219 }
219 }
220
220
221 &.task-menu {
221 &.task-menu {
222 text-align: center;
222 text-align: center;
223 font-size: 13px;
223 font-size: 13px;
224 line-height: 1.75em;
224 line-height: 1.75em;
225 font-weight: bold;
225 font-weight: bold;
226 border-top: 1px dashed gray;
226 border-top: 1px dashed gray;
227 border-bottom: 1px dashed gray;
227 border-bottom: 1px dashed gray;
228 margin-top: 2px;
228 margin-top: 2px;
229 margin-bottom: 4px;
229 margin-bottom: 4px;
230 }
230 }
@@ -1,27 +1,33
1 <!DOCTYPE html>
1 <!DOCTYPE html>
2 %html
2 %html
3 %head
3 %head
4 %title= GraderConfiguration['contest.name']
4 %title= GraderConfiguration['contest.name']
5 = stylesheet_link_tag "application", params[:controller], :media => "all"
5 = stylesheet_link_tag "application", params[:controller], :media => "all"
6 = csrf_meta_tags
6 = csrf_meta_tags
7 = csp_meta_tag
7 = csp_meta_tag
8 = javascript_include_tag :my_app
8 = javascript_include_tag :my_app
9 -# = javascript_import_module_tag('prepend_jquery')
9 -# = javascript_import_module_tag('prepend_jquery')
10 = javascript_importmap_tags
10 = javascript_importmap_tags
11 = content_for :header
11 = content_for :header
12 = yield :head
12 = yield :head
13 -# %link{href:"https://cdn.jsdelivr.net/npm/bootstrap@5.2.1/dist/css/bootstrap.min.css",rel:"stylesheet",integrity:"sha384-iYQeCzEYFbKjA/T2uDLTpkwGzCiq6soy8tYaI1GyVh/UjpbCx/TYkiZhlZB6+fzT",crossorigin:"anonymous"}
13 -# %link{href:"https://cdn.jsdelivr.net/npm/bootstrap@5.2.1/dist/css/bootstrap.min.css",rel:"stylesheet",integrity:"sha384-iYQeCzEYFbKjA/T2uDLTpkwGzCiq6soy8tYaI1GyVh/UjpbCx/TYkiZhlZB6+fzT",crossorigin:"anonymous"}
14 -# %script{src:"https://cdn.jsdelivr.net/npm/@popperjs/core@2.11.6/dist/umd/popper.min.js",integrity:"sha384-oBqDVmMz9ATKxIep9tiCxS/Z9fNfEXiDAYTujMAeBAsjFuCZSmKbSSUnQlmh/jp3",crossorigin:"anonymous"}
14 -# %script{src:"https://cdn.jsdelivr.net/npm/@popperjs/core@2.11.6/dist/umd/popper.min.js",integrity:"sha384-oBqDVmMz9ATKxIep9tiCxS/Z9fNfEXiDAYTujMAeBAsjFuCZSmKbSSUnQlmh/jp3",crossorigin:"anonymous"}
15 -# %script{src:"https://cdn.jsdelivr.net/npm/bootstrap@5.2.1/dist/js/bootstrap.bundle.min.js",integrity:"sha384-7VPbUDkoPSGFnVtYi0QogXtr74QeVeeIs99Qfg5YCF+TidwNdjvaKZX19NZ/e6oz",crossorigin:"anonymous"}
15 -# %script{src:"https://cdn.jsdelivr.net/npm/bootstrap@5.2.1/dist/js/bootstrap.bundle.min.js",integrity:"sha384-7VPbUDkoPSGFnVtYi0QogXtr74QeVeeIs99Qfg5YCF+TidwNdjvaKZX19NZ/e6oz",crossorigin:"anonymous"}
16
16
17 <link rel="preconnect" href="https://fonts.googleapis.com">
17 <link rel="preconnect" href="https://fonts.googleapis.com">
18 <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
18 <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
19 - <link href="https://fonts.googleapis.com/css2?family=Bai+Jamjuree:ital@0;1&family=Krub:ital,wght@0,200;0,400;0,600;1,200;1,400;1,600&family=Sarabun:ital,wght@0,200;0,400;0,600;1,200;1,400;1,600&display=swap" rel="stylesheet">
19 + -#
20 + <link href="https://fonts.googleapis.com/css2?family=Bai+Jamjuree:ital,wght@0,200;0,400;0,600;1,200;1,400;1,600&family=Krub:ital,wght@0,200;0,400;0,600;1,200;1,400;1,600&family=Sarabun:ital,wght@0,200;0,400;0,600;1,200;1,400;1,600&display=swap" rel="stylesheet">
21 + <link href="https://fonts.googleapis.com/css2?family=Mitr:ital,wght@0,300;1,300&family=Kodchasan:ital,wght@0,200;0,400;0,600;1,200;1,400;1,600&family=Noto+Serif+Thai:ital,wght@0,200;0,400;0,600;1,200;1,400;1,600&family=Noto+Sans+Thai:ital,wght@0,200;0,400;0,600;1,200;1,400;1,600&display=swap" rel="stylesheet">
22 + <link href="https://fonts.googleapis.com/css2?family=Noto+Serif+Thai:ital,wght@0,200;0,400;0,600;1,200;1,400;1,600&family=Noto+Sans+Thai:ital,wght@0,200;0,400;0,600;1,200;1,400;1,600&display=swap" rel="stylesheet">
23 + <link href="https://fonts.googleapis.com/css2?family=Noto+Serif+Thai:ital,wght@0,300;0,400;0,500;1,300;1,400;1,500&display=swap" rel="stylesheet">
24 + <link href="https://fonts.googleapis.com/css2?family=Noto+Sans+Thai:ital,wght@0,300;0,400;0,500;1,300;1,400;1,500&display=swap" rel="stylesheet">
25 + <link href="https://fonts.googleapis.com/css2?family=Sarabun:ital,wght@0,300;0,400;0,500;1,300;1,400;1,500&display=swap" rel="stylesheet">
20
26
21 %body
27 %body
22 - unless local_assigns[:skip_header]
28 - unless local_assigns[:skip_header]
23 = render 'layouts/header'
29 = render 'layouts/header'
24
30
25 /= content_tag(:p,flash[:notice],class: 'alert alert-success') if flash[:notice]!=nil
31 /= content_tag(:p,flash[:notice],class: 'alert alert-success') if flash[:notice]!=nil
26 = flash_messages
32 = flash_messages
27 = yield
33 = yield
@@ -1,12 +1,13
1 %h1= GraderConfiguration['ui.front.title']
1 %h1= GraderConfiguration['ui.front.title']
2
2
3 .row
3 .row
4 .col-md-6
4 .col-md-6
5 - - if @announcements.length!=0
5 + .card
6 - .announcementbox{:style => 'margin-top: 0px'}
6 + .card-header
7 - %span{:class => 'title'}
7 + Announcement
8 - Announcements
8 + = link_to 'Manage', announcements_path, class: 'btn btn-secondary btn-sm'
9 + %ul.list-group.list-group-flush
9 = render :partial => 'announcement', :collection => @announcements
10 = render :partial => 'announcement', :collection => @announcements
10 .col-md-4{style: "padding-left: 20px;"}
11 .col-md-4{style: "padding-left: 20px;"}
11 = render :partial => 'login_box'
12 = render :partial => 'login_box'
12 = "current ip is #{@remote_ip}"
13 = "current ip is #{@remote_ip}"
@@ -1,72 +1,82
1 - content_for :head do
1 - content_for :head do
2 = stylesheet_link_tag 'problems'
2 = stylesheet_link_tag 'problems'
3
3
4 %h1 Import problems
4 %h1 Import problems
5
5
6 %p= link_to '[Back to problem list]', problems_path
6 %p= link_to '[Back to problem list]', problems_path
7
7
8 - if @problem and @problem.errors
8 - if @problem and @problem.errors
9 =error_messages_for 'problem'
9 =error_messages_for 'problem'
10
10
11 - = form_tag do_import_problems_path, :multipart => true do |f|
11 + = form_with url: do_import_problems_path, :multipart => true do |f|
12 + .row.mb-2
13 + .col-md-1
14 + = f.label :name, 'Name'
15 + .col-md-11
16 + = f.text_field :name, class: 'form-control'
17 + .row.mb-2
18 + .col-md-1
19 + = f.label :full_name, 'Full Name'
20 + .col-md-11
21 + = f.text_field :full_name, class: 'form-control'
12
22
13 .submitbox
23 .submitbox
14 %table
24 %table
15 %tr
25 %tr
16 %td Name:
26 %td Name:
17 %td= text_field_tag 'name'
27 %td= text_field_tag 'name'
18 %tr
28 %tr
19 %td Full name:
29 %td Full name:
20 %td
30 %td
21 = text_field_tag 'full_name'
31 = text_field_tag 'full_name'
22 %span{:class => 'help'} Leave blank to use the same value as the name above.
32 %span{:class => 'help'} Leave blank to use the same value as the name above.
23 %tr
33 %tr
24 %td Testdata file:
34 %td Testdata file:
25 %td= file_field_tag 'file'
35 %td= file_field_tag 'file'
26 %tr
36 %tr
27 %td
37 %td
28 %td
38 %td
29 %span{:class => 'help'}
39 %span{:class => 'help'}
30 In .zip, .tgz, tar.gz, .tar format.
40 In .zip, .tgz, tar.gz, .tar format.
31 It should includes inputs (e.g., 1.in, 2a.in, 2b.in)
41 It should includes inputs (e.g., 1.in, 2a.in, 2b.in)
32 and solutions (e.g., 1.sol, 2a.sol, 2b.sol).
42 and solutions (e.g., 1.sol, 2a.sol, 2b.sol).
33 %br/
43 %br/
34 You may put task description in *.html for raw html
44 You may put task description in *.html for raw html
35 and *.md or *.markdown for markdown.
45 and *.md or *.markdown for markdown.
36 %br/
46 %br/
37 You may also put a pdf file for the task description
47 You may also put a pdf file for the task description
38 %tr
48 %tr
39 %td Checker:
49 %td Checker:
40 %td= select_tag 'checker', options_for_select([['Text checker','text'],['Float checker','float']], 'text')
50 %td= select_tag 'checker', options_for_select([['Text checker','text'],['Float checker','float']], 'text')
41 %tr
51 %tr
42 %td
52 %td
43 %td
53 %td
44 %span{:class => 'help'}
54 %span{:class => 'help'}
45 "Text" checker checks if the text (including numbers) is the same, ignoring any whitespace
55 "Text" checker checks if the text (including numbers) is the same, ignoring any whitespace
46 %br/
56 %br/
47 "Float" checker checks if all numbers is within EPSILON error using formula |a-b| < EPSILON * max(|a|,|b|)
57 "Float" checker checks if all numbers is within EPSILON error using formula |a-b| < EPSILON * max(|a|,|b|)
48
58
49 - if @allow_test_pair_import
59 - if @allow_test_pair_import
50 %tr
60 %tr
51 %td
61 %td
52 %td
62 %td
53 = check_box_tag 'import_to_db'
63 = check_box_tag 'import_to_db'
54 Import test data to database (for a test-pair task)
64 Import test data to database (for a test-pair task)
55 %tr
65 %tr
56 %td Time limit:
66 %td Time limit:
57 %td
67 %td
58 = text_field_tag 'time_limit'
68 = text_field_tag 'time_limit'
59 %span{:class => 'help'} In seconds. Leave blank to use 1 sec.
69 %span{:class => 'help'} In seconds. Leave blank to use 1 sec.
60 %tr
70 %tr
61 %td Memory limit:
71 %td Memory limit:
62 %td
72 %td
63 = text_field_tag 'memory_limit'
73 = text_field_tag 'memory_limit'
64 %span{:class => 'help'} In MB. Leave blank to use 32MB.
74 %span{:class => 'help'} In MB. Leave blank to use 32MB.
65 %tr
75 %tr
66 %td
76 %td
67 %td= submit_tag 'Import problem'
77 %td= submit_tag 'Import problem'
68
78
69 - if @log
79 - if @log
70 %h3 Import log
80 %h3 Import log
71 %pre.import-log
81 %pre.import-log
72 = @log
82 = @log
@@ -1,65 +1,65
1 - content_for :head do
1 - content_for :head do
2 = stylesheet_link_tag 'problems'
2 = stylesheet_link_tag 'problems'
3 %h1 Problems
3 %h1 Problems
4 %p
4 %p
5 = link_to 'Import problems', {:action => 'import'}, class: 'btn btn-success btn-sm'
5 = link_to 'Import problems', {:action => 'import'}, class: 'btn btn-success btn-sm'
6 = link_to 'New problem', new_problem_path, class: 'btn btn-success btn-sm'
6 = link_to 'New problem', new_problem_path, class: 'btn btn-success btn-sm'
7 = link_to 'Bulk Manage', { action: 'manage'}, class: 'btn btn-info btn-sm'
7 = link_to 'Bulk Manage', { action: 'manage'}, class: 'btn btn-info btn-sm'
8 - = link_to 'Turn off all problems', {:action => 'turn_all_off'}, class: 'btn btn-default btn-sm'
8 + = link_to 'Turn off all problems', {:action => 'turn_all_off'}, class: 'btn btn-secondary btn-sm'
9 - = link_to 'Turn on all problems', {:action => 'turn_all_on'}, class: 'btn btn-default btn-sm'
9 + = link_to 'Turn on all problems', {:action => 'turn_all_on'}, class: 'btn btn-secondary btn-sm'
10 .submitbox
10 .submitbox
11 = form_tag action: 'quick_create', controller: 'problems' do
11 = form_tag action: 'quick_create', controller: 'problems' do
12 %b Quick New:
12 %b Quick New:
13 %label{:for => "problem_name"} Name
13 %label{:for => "problem_name"} Name
14 = text_field 'problem', 'name'
14 = text_field 'problem', 'name'
15 |
15 |
16 %label{:for => "problem_full_name"} Full name
16 %label{:for => "problem_full_name"} Full name
17 = text_field 'problem', 'full_name'
17 = text_field 'problem', 'full_name'
18 = submit_tag "Create"
18 = submit_tag "Create"
19 %table.table.table-condense.table-hover
19 %table.table.table-condense.table-hover
20 %thead
20 %thead
21 %th Name
21 %th Name
22 %th Full name
22 %th Full name
23 %th.text-right Full score
23 %th.text-right Full score
24 %th Tags
24 %th Tags
25 %th
25 %th
26 Submit
26 Submit
27 %sup{class: 'text-primary',data: {toggle: 'tooltip'}, title: 'Admin can always submit to any problem' } [?]
27 %sup{class: 'text-primary',data: {toggle: 'tooltip'}, title: 'Admin can always submit to any problem' } [?]
28 %th Date added
28 %th Date added
29 %th.text-center
29 %th.text-center
30 Avail?
30 Avail?
31 %sup{class: 'text-primary',data: {toggle: 'tooltip'}, title: 'Let user submits to this problem?' } [?]
31 %sup{class: 'text-primary',data: {toggle: 'tooltip'}, title: 'Let user submits to this problem?' } [?]
32 %th.text-center
32 %th.text-center
33 View Data?
33 View Data?
34 %sup{class: 'text-primary',data: {toggle: 'tooltip'}, title: 'Let user view the testcase of this problem?' } [?]
34 %sup{class: 'text-primary',data: {toggle: 'tooltip'}, title: 'Let user view the testcase of this problem?' } [?]
35 %th.text-center
35 %th.text-center
36 Test?
36 Test?
37 %sup{class: 'text-primary',data: {toggle: 'tooltip'}, title: 'Let user uses test interface on this problem?' } [?]
37 %sup{class: 'text-primary',data: {toggle: 'tooltip'}, title: 'Let user uses test interface on this problem?' } [?]
38 - if GraderConfiguration.multicontests?
38 - if GraderConfiguration.multicontests?
39 %th Contests
39 %th Contests
40 - for problem in @problems
40 - for problem in @problems
41 %tr{:class => "#{(problem.available) ? "bg-success bg-opacity-25" : "bg-opacity-25"}", :id => "prob-#{problem.id}", :name => "prob-#{problem.id}"}
41 %tr{:class => "#{(problem.available) ? "bg-success bg-opacity-25" : "bg-opacity-25"}", :id => "prob-#{problem.id}", :name => "prob-#{problem.id}"}
42 - @problem=problem
42 - @problem=problem
43 %td= problem.name #in_place_editor_field :problem, :name, {}, :rows=>1
43 %td= problem.name #in_place_editor_field :problem, :name, {}, :rows=>1
44 %td
44 %td
45 = problem.full_name #in_place_editor_field :problem, :full_name, {}, :rows=>1
45 = problem.full_name #in_place_editor_field :problem, :full_name, {}, :rows=>1
46 = link_to_description_if_any "[#{t 'main.problem_desc'}] <span class='glyphicon glyphicon-file'></span>".html_safe, problem
46 = link_to_description_if_any "[#{t 'main.problem_desc'}] <span class='glyphicon glyphicon-file'></span>".html_safe, problem
47 %td.text-right= problem.full_score #in_place_editor_field :problem, :full_score, {}, :rows=>1
47 %td.text-right= problem.full_score #in_place_editor_field :problem, :full_score, {}, :rows=>1
48 %td
48 %td
49 - problem.tags.each do |t|
49 - problem.tags.each do |t|
50 - #%button.btn.btn-default.btn-sm= t.name
50 - #%button.btn.btn-default.btn-sm= t.name
51 %span.label.label-default= t.name
51 %span.label.label-default= t.name
52 %td= link_to "Submit", direct_edit_problem_submissions_path(problem,@current_user.id), class: 'btn btn-sm btn-primary'
52 %td= link_to "Submit", direct_edit_problem_submissions_path(problem,@current_user.id), class: 'btn btn-sm btn-primary'
53 %td= problem.date_added
53 %td= problem.date_added
54 %td= toggle_button(@problem.available?, toggle_problem_path(@problem), "problem-avail-#{@problem.id}")
54 %td= toggle_button(@problem.available?, toggle_problem_path(@problem), "problem-avail-#{@problem.id}")
55 %td= toggle_button(@problem.view_testcase?, toggle_view_testcase_problem_path(@problem), "problem-view-testcase-#{@problem.id}")
55 %td= toggle_button(@problem.view_testcase?, toggle_view_testcase_problem_path(@problem), "problem-view-testcase-#{@problem.id}")
56 %td= toggle_button(@problem.test_allowed?, toggle_test_problem_path(@problem), "problem-test-#{@problem.id}")
56 %td= toggle_button(@problem.test_allowed?, toggle_test_problem_path(@problem), "problem-test-#{@problem.id}")
57 - if GraderConfiguration.multicontests?
57 - if GraderConfiguration.multicontests?
58 %td
58 %td
59 = problem.contests.collect { |c| c.name }.join(', ')
59 = problem.contests.collect { |c| c.name }.join(', ')
60 %td= link_to 'Stat', {:action => 'stat', :id => problem.id}, class: 'btn btn-info btn-sm btn-block'
60 %td= link_to 'Stat', {:action => 'stat', :id => problem.id}, class: 'btn btn-info btn-sm btn-block'
61 %td= link_to 'Show', {:action => 'show', :id => problem}, class: 'btn btn-info btn-sm btn-block'
61 %td= link_to 'Show', {:action => 'show', :id => problem}, class: 'btn btn-info btn-sm btn-block'
62 %td= link_to 'Edit', {:action => 'edit', :id => problem}, class: 'btn btn-info btn-sm btn-block'
62 %td= link_to 'Edit', {:action => 'edit', :id => problem}, class: 'btn btn-info btn-sm btn-block'
63 %td= link_to 'Destroy', { :action => 'destroy', :id => problem }, :confirm => 'Are you sure?', :method => :delete, class: 'btn btn-danger btn-sm btn-block'
63 %td= link_to 'Destroy', { :action => 'destroy', :id => problem }, :confirm => 'Are you sure?', :method => :delete, class: 'btn btn-danger btn-sm btn-block'
64 %br/
64 %br/
65 = link_to '[New problem]', :action => 'new'
65 = link_to '[New problem]', :action => 'new'
You need to be logged in to leave comments. Login now