diff --git a/app/views/problems/manage.html.haml b/app/views/problems/manage.html.haml --- a/app/views/problems/manage.html.haml +++ b/app/views/problems/manage.html.haml @@ -16,12 +16,21 @@ = select_date Date.current, :prefix => 'date_added'     = submit_tag 'Change', :name => 'change_date_added' + + - if Configuration.multicontests? + %li + Add to + = select("contest","id",Contest.all.collect {|c| [c.title, c.id]}) + = submit_tag 'Add', :name => 'add_to_contest' + %table %tr %th/ %th Name %th Full name %th Date added + - if Configuration.multicontests? + %th Contests - for problem in @problems %tr{:id => "row-prob-#{problem.id}", :name=> "prob-#{problem.id}"} @@ -29,4 +38,7 @@ %td= problem.name %td= problem.full_name %td= problem.date_added - + - if Configuration.multicontests? + %td + - problem.contests.each do |contest| + = "(#{contest.name} [#{link_to 'x', :action => 'remove_contest', :id => problem.id, :contest_id => contest.id }])"