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

r573:0d0613111067 - - 3 files changed: 18 inserted, 14 deleted

@@ -1,14 +1,14
1 1 %tr
2 2 %td
3 3 = "#{problem.name}"
4 4 %td
5 5 = "#{problem.full_name}"
6 6 = link_to_description_if_any "[#{t 'main.problem_desc'}] <span class='glyphicon glyphicon-file'></span>".html_safe, problem
7 7 %td
8 8 = @prob_submissions[problem.id][:count]
9 - = link_to "[#{t 'main.submissions_link'}]", main_submission_path(problem.id)
9 + = link_to "[subs]", main_submission_path(problem.id)
10 10 %td
11 11 = render :partial => 'submission_short',
12 12 :locals => {:submission => @prob_submissions[problem.id][:submission], :problem_name => problem.name }
13 13 %td
14 14 = link_to 'Edit', direct_edit_path(problem.id), class: 'btn btn-success'
@@ -1,20 +1,20
1 - = form_tag({:action => 'submit'}, :multipart => true, class: 'form-inline') do
1 + = form_tag({:action => 'submit'}, :multipart => true, class: 'form') do
2 2 - if @submission and @submission.errors.any?
3 3 #error_explanation
4 4 .alert.alert-danger
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 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' }
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
18 18 = file_field_tag 'file'
19 19 = text_field_tag '' , nil, {readonly: true, class: 'form-control'}
20 20 = submit_tag 'Submit', class: 'btn btn-default'
@@ -1,53 +1,57
1 1 - content_for :head do
2 2 = javascript_include_tag "announcement_refresh"
3 3
4 4 = user_title_bar(@user)
5 5
6 - .panel.panel-info
7 - .panel-heading
8 - Announcement
9 - %ul.list-group
10 - = render :partial => 'announcement', :collection => @announcements
6 + - if (GraderConfiguration.contest_mode?) and (@user.site!=nil) and (@user.site.started!=true)
7 + %p=t 'main.start_soon'
11 8
12 -
9 + .row
10 + .col-md-7
13 11 - if GraderConfiguration.show_submitbox_to?(@user)
14 12 .submitbox
15 13 = render :partial => 'submission_box'
16 -
17 - %hr/
18 -
19 - - if (GraderConfiguration.contest_mode?) and (@user.site!=nil) and (@user.site.started!=true)
20 - %p=t 'main.start_soon'
21 -
22 14 - if GraderConfiguration.show_tasks_to?(@user)
23 15 - if not GraderConfiguration.multicontests?
24 16 %table.table.table-striped.table-condensed
25 17 %thead
26 18 %tr
27 19 %th Task name
28 20 %th Full name
29 21 %th # of sub(s)
30 22 %th Results
31 23 %th
32 24 %tbody
33 25 = render :partial => 'problem', :collection => @problems
34 26 - else
35 27 - @contest_problems.each do |cp|
36 28 - if cp[:problems].length > 0
37 29 %h2{:class =>'contest-title'}
38 30 = "#{cp[:contest] ? cp[:contest].title : 'Public problems'}"
39 31 %table.info
40 32 %tr.info-head
41 33 %th Task name
42 34 %th Full name
43 35 %th # of sub(s)
44 36 %th Results
45 37 %th
46 38 = render :partial => 'problem', :collection => cp[:problems]
39 + .col-md-5
40 + .panel.panel-info
41 + .panel-heading
42 + Announcement
43 + %ul.list-group
44 + = render :partial => 'announcement', :collection => @announcements
45 +
46 +
47 +
48 + %hr/
49 +
50 +
47 51
48 52 %hr/
49 53
50 54 %script{:type => 'text/javascript'}
51 55 = "Announcement.refreshUrl = '#{url_for :controller => 'main', :action => 'announcements'}';"
52 56 Announcement.registerRefreshEventTimer();
53 57
You need to be logged in to leave comments. Login now