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

@@ -14,49 +14,49
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 {
@@ -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,35 +1,45
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.
@@ -1,33 +1,33
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?
You need to be logged in to leave comments. Login now