From a1af18b349c70447e148895e95180b66f19be927 Mon Sep 17 00:00:00 2001 From: Athos Ribeiro Date: Sun, 13 Mar 2016 12:37:21 -0300 Subject: [PATCH] Send config file information to template --- lib/CoprStatus.pm | 6 +++++- template.html.tt | 8 ++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/lib/CoprStatus.pm b/lib/CoprStatus.pm index 2c27947..6be9715 100644 --- a/lib/CoprStatus.pm +++ b/lib/CoprStatus.pm @@ -155,7 +155,11 @@ our %ROUTING = ( sub serve_html { my $data = { title => "SPB Copr Status", - table_entries => info2html() + table_entries => info2html(), + branch0 => ${$config->{Branches}}[0], + branch1 => ${$config->{Branches}}[1], + repo0 => ${$config->{Repositories}}[0], + repo1 => ${$config->{Repositories}}[1] }; my $template = Text::Template->new( diff --git a/template.html.tt b/template.html.tt index 1b5fed7..f918e95 100644 --- a/template.html.tt +++ b/template.html.tt @@ -58,10 +58,10 @@ PACKAGE - git:stable-5.0 - softwarepublico/v5 - git:master - softwarepublico/v6 + git:{$branch0} + softwarepublico/{$repo0} + git:{$branch1} + softwarepublico/{$repo1} -- libgit2 0.21.2