}, 10
},
+ sub (/ed/:contest) {
+ forbid contest->is_running;
+ response ed => 'Editorial of ' . contest->name, db->problem_list(contest => $_{contest}, solution => 1);
+ },
+
sub (/login) {
forbid !remote_user;
};
$tree->find('tbody')->find('tr')->iter3($args{st}, $iter);
}
+
+sub process_ed {
+ my ($tree, %args) = @_;
+ my $iter = sub {
+ my ($data, $div) = @_;
+ $div->set_child_content(class => 'value', $data->{value});
+ $div->set_child_content(class => 'solution', literal $data->{solution});
+ $div->fclass('problem')->namedlink($data->{id}, $data->{name});
+ };
+ my @pb = map { @{$args{$_}} } qw/beginner easy medium hard/;
+ $tree->fclass('well')->iter3(\@pb, $iter);
+}
<div id="links">
<a href="/pb/?contest=contest_id">Problems</a><br>
+<a href="/ed/contest_id">Editorial</a><br>
<a href="/log/?contest=contest_id">Job log</a><br>
<a href="/st/contest_id">Standings</a>
</div>
--- /dev/null
+<div>
+<div class="well">
+<h2><span class="value">250</span> - <a class="problem" href="/pb/id">Name</a></h2>
+<div class="solution">
+</div>
+</div>
+</div>
\ No newline at end of file
</div>
<div class="modal fade" id="solution_modal" role="dialog" aria-hidden="true" tabindex="-1">
-<div class="modal-dialog">
+<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>