]> iEval git - gruntmaster-page.git/commitdiff
Merge branch 'master' into mindcoding
authorMarius Gavrilescu <marius@ieval.ro>
Fri, 28 Feb 2014 10:34:28 +0000 (12:34 +0200)
committerMarius Gavrilescu <marius@ieval.ro>
Fri, 28 Feb 2014 10:34:28 +0000 (12:34 +0200)
1  2 
lib/Gruntmaster/Page/Pb/Entry.pm
tmpl/pb_entry.en

index 9f3fc6b54ee051342288849732a59ef7da19d1e1,12f5e747bebc7452d25060b7a84c739204120b8b..8877ce54cd9774934e364dec26d5e41ba0e24a07
@@@ -2,7 -2,7 +2,7 @@@ package Gruntmaster::Page::Pb::Entry
  
  use Gruntmaster::Page::Base pb_entry => '<tmpl_var name>';
  
 -use constant FORMATS => [qw/C CPP JAVA PERL PYTHON/];
 +use constant FORMATS => [qw/C CPP JAVA PASCAL PERL PYTHON/];
  
  sub _generate{
        my ($self, $htc, $lang, $env, $contest, $id) = @_;
@@@ -16,7 -16,7 +16,7 @@@
  
        $htc->param(cansubmit => 1);
        if ($contest) {
 -              $htc->param(cansubmit => time <= contest_end $contest);
 +              $htc->param(cansubmit => (time <= contest_end $contest));
                $htc->param(contest => $contest);
        }
        $htc->param(formats => FORMATS);
@@@ -25,8 -25,8 +25,9 @@@
        $htc->param(name => problem_name $id);
        $htc->param(author => problem_author $id);
        $htc->param(owner => problem_owner $id);
+       $htc->param(owner_name => do{ local $Gruntmaster::Data::contest; user_name $htc->param('owner')} );
        $htc->param(statement => problem_statement $id);
 +      $htc->param(timelimit => problem_timeout $id);
  }
  
  sub vary { 'Authorization' }
diff --combined tmpl/pb_entry.en
index e7fa7826155bb012c17682f670b50e93348fbb6e,cccb33a9233b7602b05d022c587d68453b19e4cc..bd2ce28bbd59e7b2ba5f13766dee70d603ee33b3
@@@ -4,13 -4,9 +4,13 @@@
  </div>
  
  <div class="col-md-3">
 +<div id="sidebar"></div>
 +
 +<h3>Problem information</h3>
  <dl>
 +<dt>Time limit:</dt> <dd><tmpl_var timelimit>&nbsp;s</dd>
  <dt>Author</dt> <dd><tmpl_var author></dd>
- <dt>Owner</dt> <dd><tmpl_var owner></dd>
+ <dt>Owner</dt> <dd><a href="/us/<tmpl_var owner>"><tmpl_if owner_name><tmpl_var owner_name><tmpl_else><tmpl_var owner></tmpl_if></a></dd>
  </dl>
  
  <tmpl_if cansubmit>
@@@ -29,4 -25,4 +29,4 @@@
  </form>
  </tmpl_if>
  </div>
 -</div>
 +</div>
This page took 0.029422 seconds and 4 git commands to generate.