]> iEval git - plack-app-gruntmaster.git/blobdiff - lib/Gruntmaster/Page/Ct.pm
Add Page::Src
[plack-app-gruntmaster.git] / lib / Gruntmaster / Page / Ct.pm
index f5c6c1f0d2cc9ed6ee53f83137f3b6bb1a5314c4..4aa3254c4a58daccead353d15daf2659bc9e8297 100644 (file)
@@ -11,7 +11,7 @@ use constant TEMPLATES => {
        en => <<'HTML',
 <tmpl_if running>
 <h1>Running contests</h1>
-<table border>
+<table border class="table table-bordered table-striped">
 <thead>
 <tr><th>Name<th>Start date<th>End date<th>Owner
 <tbody>
@@ -25,7 +25,7 @@ use constant TEMPLATES => {
 
 <tmpl_if pending>
 <h1>Pending contests</h1>
-<table border>
+<table border class="table table-bordered table-striped">
 <thead>
 <tr><th>Name<th>Start date<th>End date<th>Owner
 <tbody>
@@ -39,7 +39,7 @@ use constant TEMPLATES => {
 
 <tmpl_if finished>
 <h1>Finished contests</h1>
-<table border>
+<table border class="table table-bordered table-striped">
 <thead>
 <tr><th>Name<th>Start date<th>End date<th>Owner
 <tbody>
@@ -54,7 +54,8 @@ HTML
 };
 
 sub _generate{
-       my ($self, $htc, $path, $lang) = @_;
+       my ($self, $htc, $lang, $logger) = @_;
+       debug $logger => "language is '$lang'";
 
        my (@running, @pending, @finished);
        for (contests) {
@@ -70,9 +71,9 @@ sub _generate{
                push @finished, $ct if time > contest_end;
        }
 
-       $htc->param(running => \@running);
-       $htc->param(pending => \@pending);
-       $htc->param(finished => \@finished);
+       $htc->param(running => \@running) if @running;
+       $htc->param(pending => \@pending) if @pending;
+       $htc->param(finished => \@finished) if @finished;
 }
 
 1
This page took 0.025547 seconds and 4 git commands to generate.