/** * column "state" * * @param Proposal $proposal * @param array $proposals * @param boolean $first * @param boolean $first_admitted * @param integer $num_rows */ private function display_column_state(Proposal $proposal, array $proposals, $first, &$first_admitted, $num_rows) { if ($this->state=="entry" or $this->state=="cancelled") { // individual proposal states if ($proposal->state=="admitted") { if ($first_admitted) { // count admitted proposals for rowspan $num_admitted_rows = 0; foreach ($proposals as $p) { if ($p->state=="admitted") $num_admitted_rows++; } ?> <td rowspan="<?=$num_admitted_rows?>" class="center"><?=$proposal->state_name(); if ($this->period) { ?><br><span class="stateinfo"><? printf( _("Debate starts at %s"), '<span class="datetime">'.datetimeformat_smart($this->period()->debate).'</span>' ); ?></span><? } ?></td> <? $first_admitted = false; } } else { // submitted, cancelled ?> <td class="center"><?=$proposal->state_name()?></td> <? } } else { // issue states if ($first) { ?> <td rowspan="<?=$num_rows?>" class="center"><? if ($this->state=="voting") $this->display_voting(); else echo $this->state_name(); if ( $state_info = $this->state_info() ) { ?><br><span class="stateinfo"><?=$state_info?></span><? } if (Login::$admin and $this->votingmode_offline() and BN!="admin_vote_result.php") { if ($this->state=="preparation") { ?><br><a href="admin_vote_result.php?issue=<?=$this->id?>"><?=_("enter result")?></a><? } elseif ($this->state=="finished") { ?><br><a href="admin_vote_result.php?issue=<?=$this->id?>"><?=_("edit result")?></a><? } } ?></td> <? } } }