From 00c887ce06707532ce45ad863139f79455480d24 Mon Sep 17 00:00:00 2001 From: Marius Gavrilescu Date: Sat, 14 Feb 2015 11:13:52 +0200 Subject: [PATCH] Add editorial header --- lib/Plack/App/Gruntmaster.pm | 3 ++- lib/Plack/App/Gruntmaster/HTML.pm | 1 + tmpl/ed.en | 6 ++---- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/Plack/App/Gruntmaster.pm b/lib/Plack/App/Gruntmaster.pm index 3ec4e78..425dc31 100644 --- a/lib/Plack/App/Gruntmaster.pm +++ b/lib/Plack/App/Gruntmaster.pm @@ -159,7 +159,8 @@ sub dispatch_request{ sub (/ed/:contest) { forbid contest->is_running; - 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 (/login) { diff --git a/lib/Plack/App/Gruntmaster/HTML.pm b/lib/Plack/App/Gruntmaster/HTML.pm index 0a68116..ce7ca79 100644 --- a/lib/Plack/App/Gruntmaster/HTML.pm +++ b/lib/Plack/App/Gruntmaster/HTML.pm @@ -278,6 +278,7 @@ sub process_st { 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}); diff --git a/tmpl/ed.en b/tmpl/ed.en index 12d47a7..7102cd9 100644 --- a/tmpl/ed.en +++ b/tmpl/ed.en @@ -1,7 +1,5 @@ -
+

250 - Name

-
-
-
+
\ No newline at end of file -- 2.39.2