sub (/ed/:contest) {
forbid !contest->is_finished;
sub (/ed/:contest) {
forbid !contest->is_finished;
- response ed => 'Editorial of ' . contest->name, db->problem_list(contest => $_{contest}, solution => 1);
+ my $pblist = db->problem_list(contest => $_{contest}, solution => 1);
+ response ed => 'Editorial of ' . contest->name, {%$pblist, editorial => contest->editorial};
sub process_ed {
my ($tree, %args) = @_;
sub process_ed {
my ($tree, %args) = @_;
+ $tree->content_handler(editorial => literal $args{editorial});
my $iter = sub {
my ($data, $div) = @_;
$div->set_child_content(class => 'value', $data->{value});
my $iter = sub {
my ($data, $div) = @_;
$div->set_child_content(class => 'value', $data->{value});
+<div id="editorial"></div>
<div class="well">
<h2><span class="value">250</span> - <a class="problem" href="/pb/id">Name</a></h2>
<div class="well">
<h2><span class="value">250</span> - <a class="problem" href="/pb/id">Name</a></h2>
-<div class="solution">
-</div>
-</div>
+<div class="solution"></div>
</div>
\ No newline at end of file
</div>
\ No newline at end of file