Description:
- fix various ui issues
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
r613:e3dfadbca639 - - 5 files changed: 13 inserted, 9 deleted
@@ -4,12 +4,13 | |||
|
4 | 4 | before_filter { |controller| controller.authorization_by_roles(['admin'])} |
|
5 | 5 | |
|
6 | 6 | |
|
7 | 7 | def index |
|
8 | 8 | @configurations = GraderConfiguration.find(:all, |
|
9 | 9 | :order => '`key`') |
|
10 | + @group = GraderConfiguration.pluck("grader_configurations.key").map{ |x| x[0...(x.index('.'))] }.uniq.sort | |
|
10 | 11 | end |
|
11 | 12 | |
|
12 | 13 | def reload |
|
13 | 14 | GraderConfiguration.reload |
|
14 | 15 | redirect_to :action => 'index' |
|
15 | 16 | end |
@@ -1,11 +1,11 | |||
|
1 | 1 | |
|
2 | 2 | - if submission.nil? |
|
3 | 3 | = "-" |
|
4 | 4 | - else |
|
5 |
- - |
|
|
5 | + - unless submission.graded_at | |
|
6 | 6 | = t 'main.submitted_at' |
|
7 | 7 | = format_short_time(submission.submitted_at.localtime) |
|
8 | 8 | - else |
|
9 | 9 | = t 'main.graded_at' |
|
10 | 10 | = "#{format_short_time(submission.graded_at.localtime)}, " |
|
11 | 11 | - if GraderConfiguration['ui.show_score'] |
@@ -1,20 +1,23 | |||
|
1 | 1 | /- content_for :header do |
|
2 | 2 | / = javascript_include_tag 'local_jquery' |
|
3 | 3 | |
|
4 | 4 | %h1 System configuration |
|
5 | 5 | |
|
6 | - %table.info | |
|
7 | - %tr.info-head | |
|
8 | - %th Key | |
|
9 |
- %th |
|
|
10 | - %th Value | |
|
6 | + - @group.each do |g| | |
|
7 | + %h2= g | |
|
8 | + %table.table.table-striped | |
|
9 | + %thead | |
|
10 | + %th{style: 'width: 25%'} Key | |
|
11 | + %th{style: 'width: 10%'}Type | |
|
12 | + %th{style: 'width: 15%'} Value | |
|
11 | 13 | %th Description |
|
12 | 14 | - @configurations.each do |conf| |
|
15 | + - next if conf.key[0...(conf.key.index('.'))] != g | |
|
13 | 16 | - @grader_configuration = conf |
|
14 | - %tr{:class => cycle("info-odd", "info-even")} | |
|
17 | + %tr | |
|
15 | 18 | %td |
|
16 | 19 | /= in_place_editor_field :grader_configuration, :key, {}, :rows=>1 |
|
17 | 20 | = @grader_configuration.key |
|
18 | 21 | %td |
|
19 | 22 | /= in_place_editor_field :grader_configuration, :value_type, {}, :rows=>1 |
|
20 | 23 | = @grader_configuration.value_type |
@@ -5,13 +5,13 | |||
|
5 | 5 | %h3= "#{pluralize(@submission.errors.count, "error")} prohibited this user from being saved:" |
|
6 | 6 | %ul |
|
7 | 7 | - @submission.errors.full_messages.each do |msg| |
|
8 | 8 | %li= msg |
|
9 | 9 | .form-group |
|
10 | 10 | = label_tag :submission, 'Problem:' |
|
11 | - = select 'submission', 'problem_id', [[(t 'main.specified_in_header'),'-1']] + @problems.collect {|p| ["[#{p.name}] #{p.full_name}", p.id]}, {:selected => '-1'}, { class: 'select2 form-control' } | |
|
11 | + = select 'submission', 'problem_id', [[(t 'main.specified_in_header'),'-1']] + @problems.collect {|p| ["[#{p.name}] #{p.full_name}", p.id]}, {:selected => '-1'}, { class: 'select2 form-control', style: "width: 100%" } | |
|
12 | 12 | .form-group |
|
13 | 13 | = label_tag :file, 'File:' |
|
14 | 14 | .input-group |
|
15 | 15 | %span.input-group-btn |
|
16 | 16 | %span.btn.btn-default.btn-file |
|
17 | 17 | Browse |
@@ -7,13 +7,13 | |||
|
7 | 7 | = format_short_time(submission.submitted_at.localtime) |
|
8 | 8 | - else |
|
9 | 9 | %strong= t 'main.graded_at' |
|
10 | 10 | = "#{format_short_time(submission.graded_at.localtime)} " |
|
11 | 11 | %br |
|
12 | 12 | - if GraderConfiguration['ui.show_score'] |
|
13 | - =t 'main.score' | |
|
13 | + %strong=t 'main.score' | |
|
14 | 14 | = "#{(submission.points*100/submission.problem.full_score).to_i} " |
|
15 | 15 | = " [" |
|
16 | 16 | %tt |
|
17 | 17 | = submission.grader_comment |
|
18 | 18 | = "]" |
|
19 | 19 | %br |
You need to be logged in to leave comments.
Login now