my $iter = sub {
my ($data, $tr) = @_;
$tr->set_child_content(class => 'author', $data->{author});
- $tr->set_child_content(class => 'value', $data->{value});
+ $tr->set_child_content(class => 'value', $data->{value}) if $args{args}{contest};
+ $tr->fclass('value')->detach unless $args{args}{contest};
$tr->set_child_content(class => 'level', ucfirst $data->{level});
$tr->fclass('name')->namedlink($data->{id}, $data->{name});
$tr->fclass('name')->find('a')->edit_href(sub {$_ .= "?contest=$args{args}{contest}"}) if $args{args}{contest};
$tr->find('td')->attr(class => $tr->find('td')->attr('class').' warning') if $data->{private} && !$args{args}{contest};
};
+ $tree->find('thead')->fclass('value')->detach unless $args{args}{contest};
+
$tree->find('tbody')->find('tr')->iter3([sort { $a->{value} <=> $b->{value} } @{$args{pb}}], $iter);
$tree->fid('open-alert')->detach unless $args{args}{contest};
}
</div>
<table class="table table-striped table-fixed">
-<thead><tr><th>Name<th>Author<th>Owner<th>Level<th>Value</thead>
+<thead><tr><th>Name<th>Author<th>Owner<th>Level<th class="value">Value</thead>
<tbody>
<tr><td class="name"><a href="id">Name</a><td class="author">author<td class="owner"><a href="/us/id">Owner name</a><td class="level">Beginner<td class="value">Value